/* ================================================================
   NEIGHBORLINK
   Site-wide visual theme
   ================================================================ */


:root {
    --nl-primary: #176b5b;
    --nl-primary-dark: #105247;
    --nl-primary-light: #e8f4f1;
    --nl-secondary: #2878a8;
    --nl-secondary-light: #eaf4fa;
    --nl-heart: #d9534f;
    --nl-warning: #a56a00;
    --nl-warning-light: #fff7df;
    --nl-success: #237a57;
    --nl-success-light: #e7f6ef;
    --nl-danger: #b64242;
    --nl-danger-light: #fbeaea;
    --nl-text: #24332f;
    --nl-muted: #66736f;
    --nl-border: #dce5e2;
    --nl-background: #f6f9f8;
    --nl-card: #ffffff;
    --nl-shadow: 0 4px 18px rgba(22, 58, 49, 0.08);
    --nl-shadow-hover: 0 9px 28px rgba(22, 58, 49, 0.13);
    --nl-radius: 14px;
}


/* ================================================================
   BASE
   ================================================================ */


html {
    position: relative;
    min-height: 100%;
    font-size: 15px;
    scroll-behavior: smooth;
}


@media (min-width: 768px) {

    html {
        font-size: 16px;
    }
}


body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient( 180deg, #ffffff 0, var(--nl-background) 350px );
    color: var(--nl-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
}


a {
    color: var(--nl-primary);
}


    a:hover {
        color: var(--nl-primary-dark);
    }


h1,
h2,
h3,
h4,
h5,
h6 {
    color: #193c34;
    font-weight: 700;
}


h1 {
    letter-spacing: -0.025em;
}


/* ================================================================
   SKIP LINK / ACCESSIBILITY
   ================================================================ */


.nl-skip-link {
    position: fixed;
    top: -100px;
    left: 15px;
    z-index: 10000;
    padding: 10px 15px;
    background: var(--nl-primary-dark);
    color: white;
    border-radius: 0 0 8px 8px;
    font-weight: 700;
    text-decoration: none;
}


    .nl-skip-link:focus {
        top: 0;
        color: white;
    }


/* ================================================================
   HEADER
   ================================================================ */


.nl-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--nl-border);
    box-shadow: 0 2px 12px rgba(30, 65, 56, 0.05);
    backdrop-filter: blur(10px);
}


.nl-navbar {
    min-height: 76px;
    padding-top: 9px;
    padding-bottom: 9px;
}


/* ================================================================
   BRAND
   ================================================================ */


.nl-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: 22px;
    text-decoration: none;
}


    .nl-brand:hover {
        text-decoration: none;
    }


.nl-brand-icon {
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    background: var(--nl-primary-light);
    border-radius: 13px;
    font-size: 22px;
}


.nl-brand-name {
    display: block;
    color: var(--nl-primary-dark);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}


.nl-brand-tagline {
    display: block;
    margin-top: 4px;
    color: var(--nl-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}


/* ================================================================
   MAIN NAVIGATION
   ================================================================ */


.nl-main-nav {
    gap: 2px;
}


    .nl-main-nav .nav-link {
        position: relative;
        display: flex;
        align-items: center;
        min-height: 43px;
        padding: 9px 10px !important;
        border-radius: 9px;
        color: #344a44 !important;
        font-size: 13px;
        font-weight: 650;
        white-space: nowrap;
        transition: background 0.15s ease, color 0.15s ease;
    }


        .nl-main-nav .nav-link:hover {
            background: var(--nl-primary-light);
            color: var(--nl-primary-dark) !important;
        }


        .nl-main-nav .nav-link.nl-nav-active {
            background: var(--nl-primary-light);
            color: var(--nl-primary-dark) !important;
            font-weight: 750;
        }


            .nl-main-nav .nav-link.nl-nav-active::after {
                content: "";
                position: absolute;
                left: 12px;
                right: 12px;
                bottom: 3px;
                height: 2px;
                border-radius: 2px;
                background: var(--nl-primary);
            }


.nl-nav-icon {
    margin-right: 4px;
}


.nl-nav-with-badge {
    gap: 2px;
}


/* ================================================================
   NOTIFICATION COUNTER
   ================================================================ */


.nl-count-badge {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 5px;
    background: var(--nl-danger);
    color: white;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}


/* ================================================================
   DROPDOWNS
   ================================================================ */


.nl-dropdown-menu,
.nl-account-menu {
    min-width: 265px;
    margin-top: 8px !important;
    padding: 8px;
    background: white;
    border: 1px solid var(--nl-border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(22, 58, 49, 0.14);
}


    .nl-dropdown-menu .dropdown-item {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        border-radius: 8px;
        color: var(--nl-text);
        white-space: normal;
    }


        .nl-dropdown-menu .dropdown-item:hover,
        .nl-account-menu .dropdown-item:hover {
            background: var(--nl-primary-light);
            color: var(--nl-primary-dark);
        }


        .nl-dropdown-menu .dropdown-item strong {
            display: block;
            color: inherit;
            font-size: 13px;
        }


        .nl-dropdown-menu .dropdown-item small {
            display: block;
            margin-top: 2px;
            color: var(--nl-muted);
            font-size: 11px;
        }


.nl-dropdown-icon {
    width: 25px;
    display: inline-flex;
    justify-content: center;
    flex: 0 0 25px;
    font-size: 17px;
}


.dropdown-divider {
    border-color: var(--nl-border);
}


/* ================================================================
   USER / ACCOUNT NAVIGATION
   ================================================================ */


.nl-user-nav {
    gap: 8px;
}


.nl-account-link {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 43px;
    padding: 5px 8px !important;
    border-radius: 10px;
    color: var(--nl-text) !important;
    font-size: 13px;
    font-weight: 650;
}


    .nl-account-link:hover {
        background: var(--nl-primary-light);
    }


.nl-user-avatar {
    width: 33px;
    height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 33px;
    background: var(--nl-primary-light);
    border-radius: 50%;
}


.nl-account-name {
    max-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.nl-account-menu {
    min-width: 225px;
}


    .nl-account-menu .dropdown-item {
        position: relative;
        padding: 9px 10px;
        border-radius: 7px;
        color: var(--nl-text);
        font-size: 13px;
    }


.nl-account-menu-header {
    padding: 7px 10px;
}


.nl-account-menu-title {
    color: var(--nl-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


.nl-account-menu-name {
    margin-top: 2px;
    color: var(--nl-text);
    font-size: 13px;
    font-weight: 750;
}


.nl-menu-count {
    float: right;
    min-width: 20px;
    margin-left: 10px;
    padding: 1px 6px;
    background: var(--nl-danger);
    border-radius: 999px;
    color: white;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
}


.nl-dropdown-logout {
    color: var(--nl-danger) !important;
    font-weight: 700;
}


    .nl-dropdown-logout:hover {
        background: var(--nl-danger-light) !important;
        color: #812f2f !important;
    }


/* ================================================================
   LOGGED-OUT NAV
   ================================================================ */


.nl-login-link {
    padding-left: 12px !important;
    padding-right: 12px !important;
    color: var(--nl-primary-dark) !important;
    font-weight: 700;
}


.nl-join-button {
    display: inline-flex;
    align-items: center;
    min-height: 41px;
    padding: 7px 14px !important;
    font-size: 13px;
}


/* ================================================================
   MOBILE MENU BUTTON
   ================================================================ */


.nl-menu-button {
    width: 43px;
    height: 43px;
    padding: 7px;
    border: 1px solid var(--nl-border);
    border-radius: 10px;
    background: white;
}


    .nl-menu-button:focus {
        box-shadow: 0 0 0 0.2rem rgba(23, 107, 91, 0.14);
    }


/* ================================================================
   MAIN PAGE
   ================================================================ */


.nl-main {
    flex: 1;
    padding: 30px 0 55px;
}


.nl-page {
    max-width: 950px;
    margin: 0 auto;
}


/* ================================================================
   CARDS
   ================================================================ */


.nl-card {
    padding: 24px;
    background: var(--nl-card);
    border: 1px solid var(--nl-border);
    border-radius: var(--nl-radius);
    box-shadow: var(--nl-shadow);
}


.nl-card-hover {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}


    .nl-card-hover:hover {
        transform: translateY(-2px);
        box-shadow: var(--nl-shadow-hover);
    }


/* ================================================================
   BUTTONS
   ================================================================ */


.btn {
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 9px;
    font-weight: 650;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}


.btn-primary,
.nl-btn-primary {
    border-color: var(--nl-primary) !important;
    background: var(--nl-primary) !important;
    color: white !important;
}


    .btn-primary:hover,
    .nl-btn-primary:hover {
        border-color: var(--nl-primary-dark) !important;
        background: var(--nl-primary-dark) !important;
        color: white !important;
    }


.btn-success {
    border-color: var(--nl-success);
    background: var(--nl-success);
}


.btn-outline-primary {
    border-color: var(--nl-primary);
    color: var(--nl-primary);
}


    .btn-outline-primary:hover {
        border-color: var(--nl-primary);
        background: var(--nl-primary);
        color: white;
    }


.btn:disabled,
.btn.disabled {
    cursor: not-allowed;
    opacity: 0.62;
}


/* ================================================================
   FORMS
   ================================================================ */


.form-control,
.form-select {
    min-height: 45px;
    border: 1px solid #cbd8d4;
    border-radius: 9px;
    background: white;
}


textarea.form-control {
    line-height: 1.5;
}


.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--nl-primary);
    box-shadow: 0 0 0 0.2rem rgba(23, 107, 91, 0.14);
}


label,
.form-label {
    color: #314a43;
    font-weight: 650;
}


/* ================================================================
   ALERTS
   ================================================================ */


.alert {
    border-radius: 11px;
    border-width: 1px;
}


.alert-success {
    border-color: #b9dfcd;
    background: var(--nl-success-light);
    color: #18583e;
}


.alert-warning {
    border-color: #ead59a;
    background: var(--nl-warning-light);
    color: #745000;
}


.alert-danger {
    border-color: #efc3c3;
    background: var(--nl-danger-light);
    color: #842f2f;
}


/* ================================================================
   BADGES
   ================================================================ */


.badge {
    padding: 6px 9px;
    border-radius: 20px;
    font-weight: 700;
}


/* ================================================================
   TABLES
   ================================================================ */


.table {
    background: white;
    border-color: var(--nl-border);
}


    .table thead th {
        color: #345048;
        font-size: 13px;
        font-weight: 750;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }


/* ================================================================
   HELPERS
   ================================================================ */


.nl-muted {
    color: var(--nl-muted);
}


.nl-section-title {
    margin-bottom: 6px;
}


.nl-section-description {
    margin-bottom: 22px;
    color: var(--nl-muted);
}


.nl-status-success {
    color: var(--nl-success);
    font-weight: 700;
}


.nl-status-warning {
    color: var(--nl-warning);
    font-weight: 700;
}


/* ================================================================
   FOOTER
   ================================================================ */


.nl-footer {
    margin-top: auto;
    padding: 30px 0 18px;
    background: #123d34;
    color: #dcebe7;
}


.nl-footer-content {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr);
    align-items: center;
    gap: 28px;
}


.nl-footer-brand {
    color: white;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
}


    .nl-footer-brand:hover {
        color: white;
        text-decoration: none;
    }


.nl-footer-tagline {
    margin-top: 3px;
    color: #b9d0ca;
    font-size: 12px;
}


.nl-footer-mission {
    max-width: 280px;
    margin-top: 7px;
    color: #9fbbb4;
    font-size: 11px;
    line-height: 1.45;
}


.nl-footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}


    .nl-footer-links a {
        color: #dcebe7;
        text-decoration: none;
        font-size: 13px;
    }


        .nl-footer-links a:hover {
            color: white;
            text-decoration: underline;
        }


.nl-footer-copyright {
    color: #b9d0ca;
    text-align: right;
    font-size: 12px;
}


.nl-footer-small {
    margin-top: 3px;
    font-size: 10px;
}


.nl-footer-safety {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9fbbb4;
    text-align: center;
    font-size: 11px;
}


    .nl-footer-safety strong {
        color: #ffffff;
    }


/* ================================================================
   ACCESSIBILITY
   ================================================================ */


a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(40, 120, 168, 0.35);
    outline-offset: 2px;
}


/* ================================================================
   TABLET / MOBILE NAVIGATION
   ================================================================ */


@media (max-width: 991.98px) {

    .nl-navbar {
        min-height: 68px;
    }


    #neighborLinkNav {
        margin-top: 12px;
        padding: 13px 0 10px;
        border-top: 1px solid var(--nl-border);
    }


    .nl-main-nav {
        gap: 3px;
    }


        .nl-main-nav .nav-link {
            min-height: 46px;
            padding: 11px 10px !important;
            font-size: 14px;
        }


            .nl-main-nav .nav-link.nl-nav-active::after {
                top: 9px;
                bottom: 9px;
                left: 0;
                right: auto;
                width: 3px;
                height: auto;
                border-radius: 3px;
            }


    .nl-dropdown-menu {
        margin: 3px 0 7px !important;
        padding: 5px;
        border: 1px solid var(--nl-border);
        box-shadow: none;
    }


    .nl-user-nav {
        align-items: stretch !important;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--nl-border);
    }


    .nl-account-link {
        width: 100%;
        min-height: 47px;
        padding: 7px 8px !important;
    }


    .nl-account-name {
        max-width: none;
    }


    .nl-account-menu {
        margin-top: 3px !important;
        box-shadow: none;
    }


    .nl-login-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }


    .nl-join-button {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 5px;
    }


    .nl-footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }


    .nl-footer-mission {
        margin-left: auto;
        margin-right: auto;
    }


    .nl-footer-links {
        justify-content: center;
    }


    .nl-footer-copyright {
        text-align: center;
    }
}


/* ================================================================
   SMALL MOBILE
   ================================================================ */


@media (max-width: 575.98px) {

    .nl-brand-tagline {
        display: none;
    }


    .nl-brand-name {
        font-size: 19px;
    }


    .nl-brand-icon {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        font-size: 19px;
    }


    .nl-main {
        padding: 20px 0 40px;
    }


    .nl-card {
        padding: 18px;
    }


    h1 {
        font-size: 1.75rem;
    }


    .btn {
        min-height: 44px;
    }


    .nl-footer {
        padding: 26px 0 17px;
    }
}
/* ============================================================
   LANGUAGE SELECTOR
   ============================================================ */

.nl-language-link {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.nl-language-menu {
    min-width: 165px;
}

    .nl-language-menu form {
        margin: 0;
    }

    .nl-language-menu .dropdown-item {
        width: 100%;
        border: 0;
        background: transparent;
        text-align: left;
        cursor: pointer;
    }