:root {
    /* ── Legacy palette (kept for compatibility) ── */
    --primary: #2D6A4F;
    --primary-dark: #1B4332;
    --primary-light: #95D5B2;
    --accent: #D4A017;
    --bg: #F8F9FA;
    --text: #212529;
    --text-muted: #6C757D;
    --border: #DEE2E6;
    --white: #FFFFFF;
    --danger: #DC3545;
    --success: #198754;

    /* ── Naseeb brand tokens ── */
    --nb-gold:      #B8882E;
    --nb-gold-lit:  #D4A84E;
    --nb-teal:      #1B4F43;
    --nb-navy:      #0D1B27;
    --nb-cream:     #F8F4EC;
    --nb-ink:       #1A140C;
    --nb-muted:     #7A6A52;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
}

/* ===== Auth ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--nb-navy) 0%, var(--nb-teal) 100%);
    padding: 20px;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}

    .auth-logo h2 {
        color: var(--nb-teal);
        font-weight: 700;
        font-size: 1.8rem;
        margin-bottom: 4px;
    }

    .auth-logo p {
        color: #6C757D;
        font-size: 0.9rem;
    }

/* ===== Layout ===== */
.app-layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    direction: rtl;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--nb-navy);
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #F8F9FA;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .sidebar-brand h4 {
        color: var(--nb-gold-lit);
        font-weight: 700;
        font-size: 1.4rem;
        margin: 0;
    }

    .sidebar-brand small {
        color: rgba(184,136,46,0.6);
        font-size: 0.75rem;
    }

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}

.nav-item {
    padding: 4px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.8) !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
}

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255,255,255,0.1);
        color: #FFFFFF !important;
    }

.top-bar {
    background: #FFFFFF;
    border-bottom: 1px solid #DEE2E6;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-content {
    padding: 32px 24px;
    flex: 1;
}

/* ===== Cards ===== */
.card {
    border: 1px solid #DEE2E6;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    background: #FFFFFF;
}

.card-header {
    background: #FFFFFF;
    border-bottom: 1px solid #DEE2E6;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 700;
    color: var(--nb-teal);
}

/* ===== Buttons ===== */
.btn-primary {
    background: #2D6A4F;
    border-color: #2D6A4F;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    padding: 10px 20px;
}

    .btn-primary:hover {
        background: #1B4332;
        border-color: #1B4332;
    }

.btn-outline-primary {
    color: #2D6A4F;
    border-color: #2D6A4F;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    border-radius: 8px;
}

/* ===== Forms ===== */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #DEE2E6;
    font-family: 'Cairo', sans-serif;
    padding: 10px 14px;
    transition: border-color 0.2s;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #2D6A4F;
        box-shadow: 0 0 0 3px rgba(45,106,79,0.15);
    }

.form-label {
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* ===== Match Card ===== */
.match-card {
    border: 1px solid #DEE2E6;
    border-radius: 12px;
    background: #FFFFFF;
    padding: 20px;
    transition: box-shadow 0.2s;
    cursor: pointer;
    margin-bottom: 16px;
}

    .match-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

.compatibility-badge {
    background: #2D6A4F;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ===== Disclosure ===== */
.disclosure-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #DEE2E6;
}

    .disclosure-row:last-child {
        border-bottom: none;
    }

.disclosure-status-accepted {
    color: #198754;
    font-weight: 600;
}

.disclosure-status-rejected {
    color: #DC3545;
    font-weight: 600;
}

.disclosure-status-pending {
    color: #6C757D;
}

/* ===== Stars ===== */
.stars {
    color: var(--nb-gold);
}

/* ===== Alerts ===== */
.alert {
    border-radius: 8px;
    border: none;
}

/* ===== Blazor Error ===== */
#blazor-error-ui {
    background: #ffefef;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    text-align: center;
    font-family: 'Cairo', sans-serif;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        left: 0.75rem;
        top: 0.5rem;
    }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-right: 0;
    }
}

/* Fix Bootstrap blue focus override */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible,
.btn-primary:focus:active {
    background-color: #2D6A4F !important;
    border-color: #2D6A4F !important;
    box-shadow: none !important;
    outline: none !important;
}

    .btn-primary:hover {
        background-color: #1B4332 !important;
        border-color: #1B4332 !important;
    }

/* ===== Split Auth Layout ===== */
.auth-split {
    display: flex;
    min-height: 100vh;
    direction: rtl;
}

.auth-left {
    width: 420px;
    min-width: 420px;
    background: linear-gradient(160deg, var(--nb-navy) 0%, var(--nb-teal) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.islamic-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

    .auth-left-content h1 {
        font-size: 3rem;
        font-weight: 700;
        color: var(--nb-gold-lit);
        margin-bottom: 32px;
        text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

.quran-verse {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 2;
    color: white;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

    .quran-verse span {
        display: block;
        font-size: 0.75rem;
        font-weight: 400;
        color: rgba(184,136,46,0.7);
        margin-top: 6px;
    }

.auth-tagline {
    color: rgba(184,136,46,0.7);
    font-size: 1rem;
    margin-bottom: 40px;
}

.auth-switch {
    display: flex;
    gap: 12px;
    justify-content: center;
}

    .auth-switch a {
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        padding: 8px 24px;
        border-radius: 20px;
        font-weight: 600;
        transition: all 0.2s;
        border: 1px solid rgba(255,255,255,0.2);
    }

        .auth-switch a.active,
        .auth-switch a:hover {
            background: var(--nb-gold);
            color: white;
            border-color: var(--nb-gold);
        }

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #F8F9FA;
    overflow-y: auto;
}

.auth-form-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

    .auth-form-box h3 {
        color: var(--nb-teal);
        font-weight: 700;
        margin-bottom: 24px;
        text-align: center;
    }

/* Mobile */
@media (max-width: 768px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-left {
        width: 100%;
        min-width: unset;
        padding: 30px 20px;
    }

    .auth-left-content h1 {
        font-size: 2rem;
    }

    .auth-right {
        padding: 20px;
    }
}

/* ===== MultiSelectChip ===== */
.multi-select-chip {
    position: relative;
}

.multi-select-input {
    border: 1px solid #DEE2E6;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    background: white;
    gap: 8px;
    transition: border-color 0.2s;
}

    .multi-select-input:hover {
        border-color: #2D6A4F;
    }

    .multi-select-input .placeholder {
        color: #ADB5BD;
        font-size: 0.9rem;
    }

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.chip {
    background: #E8F5E9;
    color: #1B4332;
    border: 1px solid #95D5B2;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chip-remove {
    cursor: pointer;
    font-weight: 700;
    color: #2D6A4F;
    line-height: 1;
}

    .chip-remove:hover {
        color: #DC3545;
    }

.dropdown-arrow {
    color: #6C757D;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border: 1px solid #DEE2E6;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
    margin-top: 4px;
}

.dropdown-option {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background 0.15s;
}

    .dropdown-option:hover {
        background: #F8F9FA;
    }

    .dropdown-option.selected {
        background: #E8F5E9;
        color: #1B4332;
        font-weight: 600;
    }

.check-icon {
    width: 16px;
    color: #2D6A4F;
    font-weight: 700;
}

.multi-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 199;
    background: transparent;
}
