:root {
    --donor-1: #16a34a;
    --donor-2: #22c55e;
    --ngo-1: #2563eb;
    --ngo-2: #06b6d4;
    --accent-1: #0f766e;
    --accent-2: #2563eb;
    --ink: #0f172a;
    --soft: #64748b;
    --line: #dbe2ea;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-feature-settings: "ss01" 1;
}

.page-glow {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(40rem 20rem at 20% -10%, rgba(34, 197, 94, 0.2), transparent 70%),
        radial-gradient(36rem 18rem at 90% -20%, rgba(37, 99, 235, 0.2), transparent 65%),
        radial-gradient(30rem 22rem at 50% 110%, rgba(15, 118, 110, 0.14), transparent 70%),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 52%, #f8fafc 100%);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    transition: all 180ms ease;
}

.nav-link:hover {
    background-color: #eef2ff;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.nav-link-donor:hover {
    background-color: #dcfce7;
    color: #15803d;
}

.nav-link-ngo:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.status-pill {
    border-radius: 9999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-available {
    background: #dcfce7;
    color: #15803d;
}

.status-claimed {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-collected {
    background: #e2e8f0;
    color: #334155;
}

.fwd-hero {
    background:
        radial-gradient(42rem 20rem at 10% 10%, rgba(16, 185, 129, 0.18), transparent 70%),
        radial-gradient(35rem 18rem at 85% 15%, rgba(59, 130, 246, 0.2), transparent 68%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.95));
    backdrop-filter: blur(2px);
}

.panel-polish {
    border: 1px solid #dbe7f2;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.auth-card {
    border: 1px solid #dbe7f2;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.08);
}

.kpi-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    min-width: 0;
}

.kpi-card p {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--soft);
    text-transform: uppercase;
}

.kpi-card h3 {
    margin: 0.4rem 0 0;
    font-size: clamp(1rem, 2.2vw, 1.7rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--ink);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kpi-card .kpi-value,
.kpi-card .text-3xl {
    margin-top: 0.4rem;
    font-size: clamp(1rem, 2.1vw, 1.65rem) !important;
    line-height: 1.2 !important;
    font-weight: 800;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.money-value {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kpi-money {
    font-variant-numeric: tabular-nums;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chat-suggestion-chip {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms ease;
}

.chat-suggestion-chip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.fwdchat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 4.7rem;
    z-index: 50;
    width: min(420px, calc(100vw - 1.5rem));
}

.fwdchat-card {
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid #cbd5e1;
    background: white;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.fwdchat-messages {
    height: 320px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.fwdchat-bubble {
    max-width: 85%;
    border-radius: 0.9rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    line-height: 1.38;
    white-space: pre-wrap;
}

.fwdchat-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    border-bottom-right-radius: 0.3rem;
}

.fwdchat-bot {
    align-self: flex-start;
    background: white;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-bottom-left-radius: 0.3rem;
}

.message-thread {
    min-height: 360px;
    max-height: 460px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.chat-row {
    display: flex;
    margin-bottom: 0.6rem;
}

.chat-row.mine {
    justify-content: flex-end;
}

.chat-row.theirs {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 76%;
    border-radius: 0.9rem;
    padding: 0.6rem 0.7rem;
}

.bubble-mine {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    border-bottom-right-radius: 0.3rem;
}

.bubble-mine p {
    color: white;
}

.bubble-theirs {
    background: white;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-bottom-left-radius: 0.3rem;
}

.map-canvas {
    width: 100%;
    height: 320px;
    border-radius: 0.9rem;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    background: #e2e8f0;
}

.map-distance-info {
    margin-top: 0.65rem;
    font-size: 0.78rem;
    color: #334155;
    border-radius: 0.6rem;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    padding: 0.5rem 0.65rem;
}

.address-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.address-suggestions button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    color: #1e293b;
    cursor: pointer;
}

.address-suggestions button:last-child {
    border-bottom: 0;
}

.address-suggestions button:hover {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 0.58rem 0.72rem;
    }

    #menuItems {
        border-top: 1px solid #e2e8f0;
        margin-top: 0.35rem;
        padding-top: 0.6rem;
    }

    #fwdChatOpen {
        right: 0.75rem;
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        padding: 0.62rem 0.95rem;
        font-size: 0.95rem;
        line-height: 1;
    }

    .fwdchat-panel {
        right: 0.75rem;
        bottom: calc(3.4rem + max(0.75rem, env(safe-area-inset-bottom)));
        width: calc(100vw - 1.5rem);
    }

    .message-thread {
        max-height: 340px;
    }

    .kpi-card .kpi-value,
    .kpi-card .text-3xl,
    .kpi-card h3 {
        font-size: clamp(0.95rem, 5vw, 1.35rem) !important;
    }
}
