/* =====================================================================
   NourishLink - "Midnight Forest" premium dark theme
   Works on top of Bootstrap 5.3 (html has data-bs-theme="dark").
   Sections: 1 tokens | 2 base | 3 navbar | 4 buttons | 5 cards & stats | 6 forms | 7 tables & badges
             8 alerts/modals | 9 hero & home | 10 footer | 11 maps | 12 animation | 13 NourishBot | 14 responsive
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
    --nl-bg: #0B0F0E;
    --nl-bg2: #111916;
    --nl-card: #17221D;
    --nl-elev: #1D2B24;
    --nl-emerald: #00D68F;
    --nl-green: #20B981;
    --nl-gold: #D6B56D;
    --nl-text: #F2F5F2;
    --nl-muted: #A3B3A9;
    --nl-border: rgba(255, 255, 255, 0.08);
    --nl-border-em: rgba(0, 214, 143, 0.28);
    --nl-danger: #FF6B6B;
    --nl-warn: #F2C46D;
    --nl-radius: 16px;
    --nl-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --nl-ease: cubic-bezier(.2, .7, .2, 1);

    /* legacy variable names still used by older markup */
    --nl-dark: var(--nl-bg2);
    --nl-light: rgba(0, 214, 143, .1);
}

[data-bs-theme="dark"] {
    --bs-body-bg: var(--nl-bg);
    --bs-body-color: var(--nl-text);
    --bs-body-color-rgb: 242, 245, 242;
    --bs-secondary-color: var(--nl-muted);
    --bs-secondary-color-rgb: 163, 179, 169;
    --bs-tertiary-bg: var(--nl-bg2);
    --bs-secondary-bg: var(--nl-elev);
    --bs-border-color: var(--nl-border);
    --bs-border-color-translucent: var(--nl-border);
    --bs-emphasis-color: #fff;
    --bs-link-color: var(--nl-emerald);
    --bs-link-color-rgb: 0, 214, 143;
    --bs-link-hover-color: #5cf0bd;
    --bs-link-hover-color-rgb: 92, 240, 189;
    --bs-success: var(--nl-emerald);
    --bs-success-rgb: 0, 214, 143;
    --bs-warning-rgb: 242, 196, 109;
    --bs-danger-rgb: 255, 107, 107;
    --bs-heading-color: var(--nl-text);
    --bs-card-bg: var(--nl-card);
    --bs-card-cap-bg: rgba(255, 255, 255, .03);
    --bs-card-border-color: var(--nl-border);
    --bs-modal-bg: var(--nl-elev);
    --bs-modal-border-color: var(--nl-border);
    --bs-list-group-bg: transparent;
    --bs-list-group-border-color: var(--nl-border);
}

/* ---------- 2. Base ---------- */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    background: var(--nl-bg);
    background-image:
        radial-gradient(900px 500px at 85% -10%, rgba(0, 214, 143, .08), transparent 60%),
        radial-gradient(700px 500px at -10% 40%, rgba(214, 181, 109, .05), transparent 60%);
    background-attachment: fixed;
    color: var(--nl-text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
a { text-decoration: none; transition: color .2s var(--nl-ease); }
::selection { background: rgba(0, 214, 143, .35); color: #fff; }
.text-muted, .form-text { color: var(--nl-muted) !important; }
.text-success { color: var(--nl-emerald) !important; }
h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; }
.nl-title { color: var(--nl-text); font-weight: 700; position: relative; }
.nl-title::after { content: ""; display: block; width: 44px; height: 3px; margin-top: .5rem; border-radius: 3px; background: linear-gradient(90deg, var(--nl-emerald), var(--nl-gold)); }
.text-center .nl-title::after, .nl-title.text-center::after { margin-left: auto; margin-right: auto; }
code { color: var(--nl-gold); }
hr { border-color: var(--nl-border); opacity: 1; }
:focus-visible { outline: 2px solid var(--nl-emerald); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--nl-bg); }
::-webkit-scrollbar-thumb { background: #27382F; border-radius: 8px; border: 2px solid var(--nl-bg); }
::-webkit-scrollbar-thumb:hover { background: #33493d; }

/* brand slogan: "Connecting Food, Sharing Hope" */
.nl-slogan { font-style: italic; letter-spacing: .03em; margin: 0; }
.nl-slogan-hero { font-size: 1.25rem; color: var(--nl-gold); }
.nl-slogan-footer { color: var(--nl-gold); font-size: .95rem; }
.nl-slogan-form { color: var(--nl-gold); font-size: .95rem; }

/* ---------- 3. Navbar (glass) ---------- */
.nl-navbar {
    background: rgba(11, 15, 14, .55);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--nl-border);
    transition: background .3s var(--nl-ease), box-shadow .3s var(--nl-ease);
    padding-top: .55rem; padding-bottom: .55rem;
}
.nl-navbar.nl-scrolled { background: rgba(11, 15, 14, .86); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.nl-navbar .navbar-brand { font-size: 1.2rem; letter-spacing: -.01em; color: var(--nl-text); }
.nl-navbar .navbar-brand img { filter: drop-shadow(0 0 10px rgba(0, 214, 143, .45)); transition: transform .4s var(--nl-ease); }
.nl-navbar .navbar-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.nl-navbar .navbar-brand .nl-brand-text { background: linear-gradient(90deg, #fff, #bff7e2); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.nl-navbar .nav-link {
    color: var(--nl-muted); font-weight: 500; border-radius: 999px; padding: .45rem .9rem !important;
    position: relative; transition: color .25s, background .25s;
}
.nl-navbar .nav-link:hover { color: var(--nl-emerald); background: rgba(0, 214, 143, .08); }
.nl-navbar .nav-link.active { color: var(--nl-emerald); background: rgba(0, 214, 143, .12); box-shadow: inset 0 0 0 1px var(--nl-border-em); }
.nl-navbar .navbar-toggler { border: 1px solid var(--nl-border); border-radius: 12px; padding: .4rem .6rem; }
.nl-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(0, 214, 143, .25); }
.nl-navbar .navbar-toggler-icon { filter: invert(1) brightness(1.2); }
.nl-navbar .badge { position: absolute; top: 0; right: -2px; font-size: .62rem; }
.nl-navbar .btn { border-radius: 999px; padding-left: 1.1rem; padding-right: 1.1rem; }
@media (max-width: 991.98px) {
    .nl-navbar .navbar-collapse { margin-top: .75rem; padding: .75rem; border: 1px solid var(--nl-border); border-radius: var(--nl-radius); background: rgba(17, 25, 22, .92); }
    .nl-navbar .navbar-nav .btn, .nl-navbar form .btn { width: 100%; margin-top: .25rem; }
}

/* role sub navigation */
.nl-subnav { background: var(--nl-bg2); border-bottom: 1px solid var(--nl-border); }
.nl-subnav .container { overflow-x: auto; flex-wrap: nowrap !important; scrollbar-width: thin; }
.nl-subnav .btn { white-space: nowrap; border-radius: 999px; font-size: .82rem; }

/* ---------- 4. Buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: .01em; transition: transform .2s var(--nl-ease), box-shadow .25s var(--nl-ease), background .25s, border-color .25s, color .25s; }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; box-shadow: none !important; transform: none !important; }
.btn:focus-visible { box-shadow: 0 0 0 .25rem rgba(0, 214, 143, .3) !important; outline: none; }

/* Primary emerald (also = Bootstrap btn-success) */
.btn-success, .btn-nl-primary {
    --bs-btn-color: #04130D; --bs-btn-hover-color: #04130D; --bs-btn-active-color: #04130D; --bs-btn-disabled-color: #04130D;
    color: #04130D; background: linear-gradient(135deg, #00E699, #00C07F); border: 1px solid transparent;
    box-shadow: 0 6px 18px rgba(0, 214, 143, .25);
}
.btn-success:hover, .btn-nl-primary:hover { color: #04130D; background: linear-gradient(135deg, #3dfbb8, #00D68F); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 214, 143, .38); }
.btn-success:active, .btn-nl-primary:active { background: linear-gradient(135deg, #00C07F, #00A56C) !important; color: #04130D !important; }
.btn-success:disabled, .btn-nl-primary:disabled { background: linear-gradient(135deg, #00E699, #00C07F); color: #04130D; }

/* Secondary dark (also = btn-light / btn-secondary) */
.btn-light, .btn-secondary, .btn-nl-secondary {
    --bs-btn-color: var(--nl-text); --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: var(--nl-muted);
    color: var(--nl-text); background: var(--nl-elev); border: 1px solid var(--nl-border);
}
.btn-light:hover, .btn-secondary:hover, .btn-nl-secondary:hover { color: #fff; background: #25382e; border-color: var(--nl-border-em); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.btn-light:active, .btn-secondary:active, .btn-nl-secondary:active { background: #14201a !important; color: #fff !important; border-color: var(--nl-border) !important; }
.btn-light:disabled, .btn-secondary:disabled, .btn-nl-secondary:disabled { background: var(--nl-elev); color: var(--nl-muted); border-color: var(--nl-border); }

/* Gold accent (also = btn-warning) */
.btn-warning, .btn-nl-gold {
    --bs-btn-color: #1b1303; --bs-btn-hover-color: #1b1303; --bs-btn-active-color: #1b1303; --bs-btn-disabled-color: #1b1303;
    color: #1b1303; background: linear-gradient(135deg, #F0D798, #D6B56D); border: 1px solid transparent; box-shadow: 0 6px 18px rgba(214, 181, 109, .22);
}
.btn-warning:hover, .btn-nl-gold:hover { color: #1b1303; background: linear-gradient(135deg, #F8E5B2, #E3C27D); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(214, 181, 109, .34); }
.btn-warning:active, .btn-nl-gold:active { background: #C9A55B !important; color: #1b1303 !important; }

/* Outline (btn-outline-success / btn-outline-light / btn-outline-primary) */
.btn-outline-success, .btn-outline-light, .btn-outline-primary, .btn-nl-outline {
    --bs-btn-color: var(--nl-emerald); --bs-btn-hover-color: #04130D; --bs-btn-active-color: #04130D; --bs-btn-disabled-color: var(--nl-emerald);
    color: var(--nl-emerald); background: transparent; border: 1px solid var(--nl-border-em);
}
.btn-outline-success:hover, .btn-outline-light:hover, .btn-outline-primary:hover, .btn-nl-outline:hover {
    color: #04130D; background: var(--nl-emerald); border-color: var(--nl-emerald); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 214, 143, .3);
}
.btn-outline-success:active, .btn-outline-light:active, .btn-nl-outline:active { background: #00B574 !important; color: #04130D !important; }
.btn-outline-success:disabled, .btn-outline-light:disabled, .btn-nl-outline:disabled { background: transparent; color: var(--nl-emerald); border-color: var(--nl-border-em); }
.btn-outline-secondary { --bs-btn-color: var(--nl-muted); --bs-btn-hover-bg: var(--nl-elev); --bs-btn-hover-color: #fff; --bs-btn-border-color: var(--nl-border); --bs-btn-hover-border-color: var(--nl-border-em); }

/* Danger */
.btn-danger, .btn-nl-danger { color: #fff; background: linear-gradient(135deg, #ff7a7a, #e04848); border: 1px solid transparent; box-shadow: 0 6px 18px rgba(255, 107, 107, .2); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; }
.btn-danger:hover, .btn-nl-danger:hover { color: #fff; background: linear-gradient(135deg, #ff8f8f, #ea5555); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 107, 107, .35); }
.btn-danger:active, .btn-nl-danger:active { background: #c93b3b !important; color: #fff !important; }
.btn-outline-danger { --bs-btn-color: var(--nl-danger); --bs-btn-border-color: rgba(255, 107, 107, .4); --bs-btn-hover-bg: #e04848; --bs-btn-hover-border-color: #e04848; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #c93b3b; --bs-btn-active-color: #fff; }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: .6; }
.btn-close:hover { opacity: 1; }

/* ---------- 5. Cards, stat cards ---------- */
.card {
    background: linear-gradient(160deg, rgba(29, 43, 36, .72), rgba(23, 34, 29, .92));
    border: 1px solid var(--nl-border); border-radius: var(--nl-radius);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: var(--nl-shadow); color: var(--nl-text);
}
.card.shadow-sm { box-shadow: var(--nl-shadow) !important; }
.card-header, .card-header.bg-white { background: rgba(255, 255, 255, .03) !important; border-bottom: 1px solid var(--nl-border); color: var(--nl-text); border-radius: var(--nl-radius) var(--nl-radius) 0 0 !important; }
.bg-white { background: var(--nl-card) !important; }
.nl-card, .nl-stat { transition: transform .3s var(--nl-ease), border-color .3s, box-shadow .3s; }
.nl-card { border-top: 1px solid var(--nl-border-em); position: relative; overflow: hidden; }
.nl-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--nl-emerald), transparent); opacity: .8; }
.nl-card:hover { transform: translateY(-6px); border-color: var(--nl-border-em); box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 214, 143, .12); }
.nl-card .card-title { color: #fff; font-weight: 700; }

.nl-stat { position: relative; overflow: hidden; border: 1px solid var(--nl-border-em); border-left: 1px solid var(--nl-border-em); }
.nl-stat::after { content: ""; position: absolute; width: 140px; height: 140px; right: -50px; top: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 214, 143, .22), transparent 70%); pointer-events: none; }
.nl-stat:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(0, 0, 0, .5), 0 0 24px rgba(0, 214, 143, .12); }
.nl-stat .card-body { display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.15rem; position: relative; z-index: 1; }
.nl-stat-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--nl-emerald); background: linear-gradient(135deg, rgba(0, 214, 143, .2), rgba(0, 214, 143, .05)); border: 1px solid var(--nl-border-em); }
.nl-stat-label { color: var(--nl-muted); font-size: .8rem; letter-spacing: .02em; line-height: 1.2; }
.nl-stat .display-6, .nl-stat-value { color: #fff; font-weight: 800; font-size: 2rem; line-height: 1.1; background: linear-gradient(180deg, #fff, #bfe9d8); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nl-stat.nl-gold .nl-stat-icon { color: var(--nl-gold); background: linear-gradient(135deg, rgba(214, 181, 109, .2), rgba(214, 181, 109, .05)); border-color: rgba(214, 181, 109, .35); }
.nl-step-icon { width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(135deg, rgba(0, 214, 143, .2), rgba(0, 214, 143, .04)); border: 1px solid var(--nl-border-em); color: var(--nl-emerald); display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; box-shadow: 0 0 30px rgba(0, 214, 143, .12); transition: transform .3s var(--nl-ease); }
.nl-step:hover .nl-step-icon { transform: translateY(-4px) rotate(-4deg); }
.list-group-item { background: var(--nl-card); color: var(--nl-text); border-color: var(--nl-border); }
.list-group-item-action:hover { background: var(--nl-elev); color: #fff; }

/* ---------- 6. Forms ---------- */
.form-label { color: var(--nl-muted); font-size: .86rem; font-weight: 600; margin-bottom: .35rem; }
.form-control, .form-select, .input-group-text {
    background-color: #0F1613; color: var(--nl-text); border: 1px solid var(--nl-border); border-radius: 12px;
    padding: .65rem .9rem; transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.form-control-sm, .form-select-sm { padding: .4rem .7rem; border-radius: 10px; }
.input-group > .form-control, .input-group > .form-select { border-radius: 0 12px 12px 0; }
.input-group > :first-child { border-radius: 12px 0 0 12px !important; }
.input-group > :last-child { border-radius: 0 12px 12px 0 !important; }
.input-group-text { background: var(--nl-elev); color: var(--nl-muted); }
.form-control::placeholder, textarea::placeholder { color: #6F8277; opacity: 1; }
.form-control:hover, .form-select:hover { border-color: rgba(255, 255, 255, .16); }
.form-control:focus, .form-select:focus { background-color: #101A15; color: #fff; border-color: var(--nl-emerald); box-shadow: 0 0 0 .22rem rgba(0, 214, 143, .18); }
.form-control:disabled, .form-select:disabled { background: #0c120f; color: #7d8d83; opacity: 1; }
.form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2300D68F' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-select option { background: #111916; color: var(--nl-text); }
.form-check-input { background-color: #0F1613; border-color: rgba(255, 255, 255, .25); }
.form-check-input:checked { background-color: var(--nl-emerald); border-color: var(--nl-emerald); }
.form-check-input:focus { box-shadow: 0 0 0 .22rem rgba(0, 214, 143, .22); border-color: var(--nl-emerald); }
.form-check-label { color: var(--nl-text); }
input[type="date"], input[type="datetime-local"] { color-scheme: dark; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #0F1613 inset !important; -webkit-text-fill-color: var(--nl-text) !important; caret-color: #fff; }
/* validation (server-side messages rendered by ASP.NET tag helpers) */
.text-danger, .field-validation-error { color: var(--nl-danger) !important; font-size: .82rem; }
.field-validation-error { display: block; margin-top: .25rem; }
.field-validation-error::before { content: "\26A0\FE0E  "; }
.input-validation-error { border-color: var(--nl-danger) !important; box-shadow: 0 0 0 .18rem rgba(255, 107, 107, .12); }
.validation-summary-errors, .alert-danger.py-2 { border-radius: 12px; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.btn-check:checked + .btn-outline-success, .btn-check:active + .btn-outline-success { background: var(--nl-emerald); color: #04130D; border-color: var(--nl-emerald); box-shadow: 0 0 18px rgba(0, 214, 143, .3); }
.btn-group > .btn { border-radius: 12px; }
.btn-group > .btn:not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group > .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
@media (max-width: 575.98px) { .btn-group { display: flex; flex-direction: column; width: 100%; } .btn-group > .btn { border-radius: 12px !important; margin: 0 0 .35rem 0 !important; } }

/* ---------- 7. Tables & badges ---------- */
.table-responsive { -webkit-overflow-scrolling: touch; border-radius: 12px; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--nl-text); --bs-table-border-color: var(--nl-border); --bs-table-hover-bg: rgba(0, 214, 143, .06); --bs-table-hover-color: #fff; --bs-table-striped-bg: rgba(255, 255, 255, .02); margin-bottom: 0; }
.nl-table { border-collapse: separate; border-spacing: 0; }
.nl-table thead th {
    background: rgba(0, 214, 143, .08); color: var(--nl-emerald); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    white-space: nowrap; border-bottom: 1px solid var(--nl-border-em); padding: .85rem .9rem;
}
.nl-table thead th:first-child { border-top-left-radius: 12px; }
.nl-table thead th:last-child { border-top-right-radius: 12px; }
.nl-table tbody td { padding: .8rem .9rem; border-bottom: 1px solid var(--nl-border); vertical-align: middle; }
.nl-table tbody tr { transition: background .2s; }
.nl-table tbody tr:hover { background: rgba(0, 214, 143, .06); box-shadow: inset 3px 0 0 var(--nl-emerald); }
.nl-table tbody tr:last-child td { border-bottom: 0; }

.badge { font-weight: 600; letter-spacing: .02em; padding: .42em .75em; border-radius: 999px; border: 1px solid transparent; }
.badge.bg-success { background: rgba(0, 214, 143, .14) !important; color: var(--nl-emerald) !important; border-color: rgba(0, 214, 143, .35); }
.badge.bg-warning { background: rgba(242, 196, 109, .14) !important; color: var(--nl-warn) !important; border-color: rgba(242, 196, 109, .35); }
.badge.bg-warning.text-dark, .badge.text-dark { color: var(--nl-warn) !important; }
.badge.bg-danger { background: rgba(255, 107, 107, .14) !important; color: var(--nl-danger) !important; border-color: rgba(255, 107, 107, .35); }
.badge.bg-secondary { background: rgba(163, 179, 169, .12) !important; color: var(--nl-muted) !important; border-color: rgba(163, 179, 169, .25); }
.badge.bg-info { background: rgba(94, 190, 255, .14) !important; color: #7fcbff !important; border-color: rgba(94, 190, 255, .3); }
.nl-navbar .badge.bg-danger { background: #e04848 !important; color: #fff !important; border: 0; }

/* ---------- 8. Alerts, modals, misc ---------- */
.alert { border-radius: 14px; border: 1px solid var(--nl-border); background: var(--nl-card); color: var(--nl-text); }
.alert-success { background: rgba(0, 214, 143, .1); border-color: rgba(0, 214, 143, .35); color: #9bf3d2; }
.alert-danger { background: rgba(255, 107, 107, .1); border-color: rgba(255, 107, 107, .35); color: #ffb3b3; }
.alert-warning { background: rgba(242, 196, 109, .1); border-color: rgba(242, 196, 109, .35); color: #f6dba3; }
.alert-info { background: rgba(94, 190, 255, .09); border-color: rgba(94, 190, 255, .3); color: #b6e1ff; }
.alert-light { background: var(--nl-card); color: var(--nl-muted); border-color: var(--nl-border); }
.alert-link { color: inherit; text-decoration: underline; }
.modal-content { border-radius: 18px; border: 1px solid var(--nl-border-em); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.modal-header, .modal-footer { border-color: var(--nl-border); }
.border-success { border-color: var(--nl-border-em) !important; }
.border { border-color: var(--nl-border) !important; }
.border-top { border-color: var(--nl-border) !important; }
.dropdown-menu { background: var(--nl-elev); border: 1px solid var(--nl-border); border-radius: 12px; }
.dropdown-item { color: var(--nl-text); }
.dropdown-item:hover { background: rgba(0, 214, 143, .1); color: var(--nl-emerald); }

/* ---------- 9. Hero & homepage ---------- */
.nl-hero {
    position: relative; overflow: hidden; isolation: isolate; text-align: left;
    padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem);
    background:
        radial-gradient(900px 520px at 80% 30%, rgba(0, 214, 143, .22), transparent 65%),
        radial-gradient(700px 400px at 5% 90%, rgba(214, 181, 109, .12), transparent 65%),
        linear-gradient(180deg, #0B0F0E 0%, #0e1a15 60%, #0B0F0E 100%);
    border-bottom: 1px solid var(--nl-border);
}
.nl-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("../images/hero-food.svg") right center / cover no-repeat; opacity: .9; }
.nl-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 15, 14, .96) 0%, rgba(11, 15, 14, .7) 45%, rgba(11, 15, 14, .1) 100%); }
.nl-orb { position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1; pointer-events: none; animation: nl-float 9s ease-in-out infinite; }
.nl-orb.o1 { width: 280px; height: 280px; background: rgba(0, 214, 143, .25); top: -60px; right: 10%; }
.nl-orb.o2 { width: 220px; height: 220px; background: rgba(214, 181, 109, .16); bottom: -50px; left: 8%; animation-delay: -4s; }
.nl-eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--nl-emerald); background: rgba(0, 214, 143, .1); border: 1px solid var(--nl-border-em); margin-bottom: 1.25rem; }
.nl-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nl-emerald); box-shadow: 0 0 10px var(--nl-emerald); animation: nl-pulse 2s infinite; }
.nl-hero h1 { font-weight: 800; font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.05; letter-spacing: -.03em; color: #fff; max-width: 14ch; }
.nl-hero h1 .nl-grad { background: linear-gradient(90deg, var(--nl-emerald), #7ff3c8 50%, var(--nl-gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nl-hero .lead { color: var(--nl-muted); max-width: 40rem; font-size: clamp(1rem, 2vw, 1.2rem); }
.nl-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.nl-hero-actions .btn { padding: .85rem 1.6rem; border-radius: 999px; }
.nl-hero-enter > * { opacity: 0; transform: translateY(22px); animation: nl-rise .8s var(--nl-ease) forwards; }
.nl-hero-enter > *:nth-child(1) { animation-delay: .05s; } .nl-hero-enter > *:nth-child(2) { animation-delay: .15s; }
.nl-hero-enter > *:nth-child(3) { animation-delay: .25s; } .nl-hero-enter > *:nth-child(4) { animation-delay: .35s; }
.nl-hero-enter > *:nth-child(5) { animation-delay: .45s; }
.nl-section-sub { color: var(--nl-muted); max-width: 40rem; margin-inline: auto; }

/* ---------- 10. Footer ---------- */
.nl-footer { background: linear-gradient(180deg, var(--nl-bg2), #080b0a); border-top: 1px solid var(--nl-border); color: var(--nl-muted); position: relative; }
.nl-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--nl-emerald), transparent); opacity: .6; }
.nl-footer h6 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.nl-footer a { color: var(--nl-muted); }
.nl-footer a:hover { color: var(--nl-emerald); }
.nl-footer ul { list-style: none; padding: 0; margin: 0; }
.nl-footer li { margin-bottom: .5rem; }
.nl-footer .nl-brand { color: #fff; font-weight: 800; font-size: 1.3rem; }
.nl-footer-bottom { border-top: 1px solid var(--nl-border); color: #6F8277; font-size: .85rem; }

/* ---------- 11. Maps (Leaflet / MapLibre) ---------- */
.nl-map { height: 62vh; min-height: 380px; width: 100%; border-radius: var(--nl-radius) var(--nl-radius) 0 0; z-index: 0; }
.nl-map-card { overflow: hidden; }
.nl-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.nl-pin-wrap { background: transparent; border: 0; }
.nl-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: var(--c, #198754); transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); position: relative; }
.nl-pin::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #fff; top: 8px; left: 8px; }
.leaflet-container, .leaflet-popup-content { color: #1b2a22; font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #fff; color: #1b2a22; }
.leaflet-control-zoom a { background: var(--nl-elev) !important; color: var(--nl-emerald) !important; border-color: var(--nl-border) !important; }
.nl-legend { background: rgba(255, 255, 255, .02); }

/* ---------- 12. Animation helpers ---------- */
@keyframes nl-rise { to { opacity: 1; transform: none; } }
@keyframes nl-float { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-22px) translateX(10px); } }
@keyframes nl-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 214, 143, .6); } 70% { box-shadow: 0 0 0 10px rgba(0, 214, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 214, 143, 0); } }
.nl-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--nl-ease), transform .7s var(--nl-ease); }
.nl-reveal.nl-in { opacity: 1; transform: none; }
.nl-d1 { transition-delay: .08s; } .nl-d2 { transition-delay: .16s; } .nl-d3 { transition-delay: .24s; } .nl-d4 { transition-delay: .32s; }
main { animation: nl-fade .45s ease both; }
@keyframes nl-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 13. NourishBot ---------- */
.nb { position: fixed; right: 20px; bottom: 20px; z-index: 1080; font-family: inherit; }
.nb-fab {
    position: relative; width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #04130D; font-size: 1.65rem; background: linear-gradient(135deg, #00F0A3, #00B574);
    box-shadow: 0 10px 28px rgba(0, 214, 143, .45), 0 0 0 0 rgba(0, 214, 143, .5); animation: nb-glow 2.8s infinite;
    transition: transform .3s var(--nl-ease);
}
.nb-fab:hover { transform: scale(1.08) rotate(-4deg); }
.nb-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nb-fab .nb-fab-close { display: none; font-size: 1.3rem; }
.nb-open .nb-fab { animation: none; box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.nb-open .nb-fab .nb-fab-open { display: none; }
.nb-open .nb-fab .nb-fab-close { display: inline; }
.nb-tip {
    position: absolute; right: 74px; top: 50%; transform: translate(8px, -50%); white-space: nowrap; padding: .45rem .8rem; border-radius: 10px;
    background: var(--nl-elev); color: var(--nl-text); font-size: .82rem; font-weight: 600; border: 1px solid var(--nl-border-em);
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--nl-ease);
}
.nb-fab:hover .nb-tip, .nb-fab:focus-visible .nb-tip { opacity: 1; transform: translate(0, -50%); }
.nb-open .nb-tip { display: none; }
@keyframes nb-glow { 0% { box-shadow: 0 10px 28px rgba(0, 214, 143, .45), 0 0 0 0 rgba(0, 214, 143, .5); } 70% { box-shadow: 0 10px 28px rgba(0, 214, 143, .45), 0 0 0 16px rgba(0, 214, 143, 0); } 100% { box-shadow: 0 10px 28px rgba(0, 214, 143, .45), 0 0 0 0 rgba(0, 214, 143, 0); } }

.nb-window {
    position: absolute; right: 0; bottom: 78px; width: 380px; max-width: calc(100vw - 24px); height: min(580px, calc(100dvh - 120px));
    display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
    background: rgba(17, 25, 22, .9); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid var(--nl-border-em); box-shadow: 0 30px 80px rgba(0, 0, 0, .65), 0 0 40px rgba(0, 214, 143, .08);
    opacity: 0; visibility: hidden; transform: translateY(18px) scale(.96); transform-origin: bottom right; pointer-events: none;
    transition: opacity .28s var(--nl-ease), transform .28s var(--nl-ease), visibility 0s linear .28s, height .28s var(--nl-ease);
}
.nb-open .nb-window { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.nb-min .nb-window { height: 68px; }
.nb-min .nb-log, .nb-min .nb-chips, .nb-min .nb-form { display: none; }

.nb-head { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; color: #04130D; background: linear-gradient(135deg, #00E699, #0CB57A); flex: 0 0 auto; cursor: default; }
.nb-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #0B0F0E; color: var(--nl-emerald); box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); flex: 0 0 auto; }
.nb-head-text { min-width: 0; flex: 1 1 auto; }
.nb-title { font-weight: 800; line-height: 1.15; }
.nb-sub { font-size: .72rem; font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #0B3D2B; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); margin-right: 2px; animation: nl-pulse 2s infinite; }
.nb-head-actions { display: flex; gap: .15rem; flex: 0 0 auto; }
.nb-icon-btn { width: 32px; height: 32px; border: 0; border-radius: 10px; background: rgba(4, 19, 13, .12); color: #04130D; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.nb-icon-btn:hover { background: rgba(4, 19, 13, .28); }

.nb-log { flex: 1 1 auto; overflow-y: auto; padding: 1rem .9rem .5rem; display: flex; flex-direction: column; gap: .6rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.nb-row { display: flex; max-width: 100%; animation: nb-pop .3s var(--nl-ease); }
.nb-row.nb-user { justify-content: flex-end; }
@keyframes nb-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.nb-bubble { max-width: 88%; padding: .6rem .85rem; border-radius: 16px; font-size: .9rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }
.nb-bot .nb-bubble { background: var(--nl-elev); color: var(--nl-text); border: 1px solid var(--nl-border); border-bottom-left-radius: 5px; }
.nb-user .nb-bubble { background: linear-gradient(135deg, #00E699, #00BD7E); color: #04130D; font-weight: 500; border-bottom-right-radius: 5px; }
.nb-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; white-space: normal; }
.nb-link { display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--nl-emerald); background: rgba(0, 214, 143, .1); border: 1px solid var(--nl-border-em); transition: background .2s, color .2s, transform .2s; }
.nb-link:hover { background: var(--nl-emerald); color: #04130D; transform: translateY(-1px); }
.nb-typing { display: inline-flex; gap: 5px; align-items: center; padding: .75rem .9rem; }
.nb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--nl-emerald); opacity: .4; animation: nb-dot 1.1s infinite ease-in-out; }
.nb-typing span:nth-child(2) { animation-delay: .15s; } .nb-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes nb-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-5px); opacity: 1; } }

.nb-chips { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem .9rem .6rem; max-height: 128px; overflow-y: auto; }
.nb-chip { border: 1px solid var(--nl-border-em); background: rgba(0, 214, 143, .06); color: var(--nl-text); border-radius: 999px; padding: .32rem .7rem; font-size: .78rem; cursor: pointer; text-align: left; transition: background .2s, color .2s, transform .2s; }
.nb-chip:hover { background: var(--nl-emerald); color: #04130D; transform: translateY(-1px); }
.nb-form { flex: 0 0 auto; display: flex; gap: .5rem; padding: .7rem .8rem .85rem; border-top: 1px solid var(--nl-border); background: rgba(11, 15, 14, .55); }
.nb-input { flex: 1 1 auto; min-width: 0; background: #0F1613; color: var(--nl-text); border: 1px solid var(--nl-border); border-radius: 999px; padding: .6rem 1rem; font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.nb-input::placeholder { color: #6F8277; }
.nb-input:focus { outline: none; border-color: var(--nl-emerald); box-shadow: 0 0 0 .2rem rgba(0, 214, 143, .18); }
.nb-send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, #00E699, #00BD7E); color: #04130D; font-size: 1rem; transition: transform .2s, opacity .2s; }
.nb-send:hover:not(:disabled) { transform: scale(1.08); }
.nb-send:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 14. Responsive ---------- */
@media (max-width: 767.98px) {
    .nl-hero { text-align: center; }
    .nl-hero h1, .nl-hero .lead { margin-left: auto; margin-right: auto; }
    .nl-hero-actions { justify-content: center; }
    .nl-hero::after { background: rgba(11, 15, 14, .78); }
    .nl-stat .card-body { padding: .9rem; gap: .7rem; }
    .nl-stat-icon { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 12px; }
    .nl-stat .display-6, .nl-stat-value { font-size: 1.6rem; }
}
@media (max-width: 575.98px) {
    .nl-map { height: 50vh; min-height: 320px; }
    .container { padding-left: 1rem; padding-right: 1rem; }
    .nl-hero-actions .btn { width: 100%; }
    .nb { right: 12px; bottom: 12px; }
    .nb-fab { width: 56px; height: 56px; }
    .nb-window { position: fixed; right: 8px; left: 8px; bottom: 80px; width: auto; max-width: none; height: min(78dvh, calc(100dvh - 100px)); border-radius: 20px; }
    .nb-tip { display: none; }
    .card-body { padding: 1rem; }
    .display-4 { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .nl-reveal, .nl-hero-enter > * { opacity: 1; transform: none; }
}

/* ---------- Demo payment receipt ---------- */
.nl-receipt { border-style: dashed; }
@media print {
    .nl-navbar, .nl-subnav, .nl-footer, .nb, .d-print-none { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .nl-receipt { border: 1px solid #000 !important; background: #fff !important; color: #000 !important; }
    .nl-receipt .text-muted { color: #333 !important; }
}
