/* =====================================================
   AICC Estates — Main Stylesheet
   Human-made palette: earthy, warm, natural
   ===================================================== */

/* -----------------------------------------------------
   CSS Variables
   ----------------------------------------------------- */
:root {
    /* Earthy palette */
    --c-primary:        #8B4513;
    --c-primary-dark:   #6B3410;
    --c-primary-light:  #A0522D;
    --c-secondary:      #556B2F;
    --c-accent:         #C19A6B;
    --c-gold:           #B8860B;

    /* Neutrals */
    --c-bg:             #FAF7F2;
    --c-surface:        #FFFFFF;
    --c-surface-alt:    #F5F1EA;
    --c-border:         #E5DFD5;
    --c-border-strong:  #C9C1B3;

    /* Text */
    --c-text:           #2C2C2C;
    --c-text-soft:      #4A4A4A;
    --c-muted:          #6B6B6B;
    --c-muted-light:    #8C8C8C;

    /* Status */
    --c-success:        #4A7C59;
    --c-success-bg:     #E8F0EA;
    --c-warning:        #B8860B;
    --c-warning-bg:     #FBF3DC;
    --c-danger:         #8B2E2E;
    --c-danger-bg:      #F5E1E1;
    --c-info:           #4A6B8B;
    --c-info-bg:        #E1EAF2;

    /* Typography */
    --font-heading:     'Fraunces', Georgia, serif;
    --font-body:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:        'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  0.75rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows (soft, warm) */
    --shadow-sm: 0 1px 2px rgba(60, 40, 20, 0.06);
    --shadow-md: 0 4px 12px rgba(60, 40, 20, 0.08);
    --shadow-lg: 0 12px 32px rgba(60, 40, 20, 0.10);
    --shadow-xl: 0 24px 48px rgba(60, 40, 20, 0.12);

    /* Layout */
    --container: 1200px;
    --container-narrow: 720px;
}

/* -----------------------------------------------------
   Reset & Base
   ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--c-text);
    margin: 0 0 var(--space-md);
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 var(--space-md); }

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--c-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* -----------------------------------------------------
   Layout
   ----------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-alt {
    background: var(--c-surface);
}

/* -----------------------------------------------------
   Header / Navbar
   ----------------------------------------------------- */
.site-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    gap: var(--space-lg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--c-primary);
    letter-spacing: -0.02em;
}

.nav-brand:hover { color: var(--c-primary-dark); }

.nav-brand svg { width: 32px; height: 32px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--c-text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: var(--space-xs) 0;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--c-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--c-primary);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* -----------------------------------------------------
   Buttons
   ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s ease;
    white-space: nowrap;
    min-height: 44px;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}
.btn-primary:hover {
    background: var(--c-primary-dark);
    border-color: var(--c-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--c-primary);
    border-color: var(--c-primary);
}
.btn-outline:hover {
    background: var(--c-primary);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--c-text-soft);
    border-color: var(--c-border);
}
.btn-ghost:hover {
    background: var(--c-surface-alt);
    border-color: var(--c-border-strong);
    color: var(--c-text);
}

.btn-gold {
    background: var(--c-gold);
    color: #fff;
    border-color: var(--c-gold);
}
.btn-gold:hover {
    background: #A0750A;
    border-color: #A0750A;
    color: #fff;
}

.btn-danger {
    background: var(--c-danger);
    color: #fff;
    border-color: var(--c-danger);
}
.btn-danger:hover {
    background: #6E2323;
    border-color: #6E2323;
    color: #fff;
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; min-height: 36px; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; min-height: 52px; }
.btn-block { display: flex; width: 100%; }

/* -----------------------------------------------------
   Hero
   ----------------------------------------------------- */
.hero {
    background: linear-gradient(135deg, #F5F1EA 0%, #EDE6DA 100%);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(193, 154, 107, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    position: relative;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.4rem 1rem;
    background: rgba(139, 69, 19, 0.08);
    color: var(--c-primary);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-lg);
}

.hero h1 {
    margin-bottom: var(--space-lg);
    color: var(--c-text);
}

.hero h1 em {
    font-style: italic;
    color: var(--c-primary);
    font-weight: 500;
}

.hero-lead {
    font-size: 1.125rem;
    color: var(--c-text-soft);
    margin-bottom: var(--space-xl);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: var(--c-surface);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* -----------------------------------------------------
   Stats bar
   ----------------------------------------------------- */
.stats-bar {
    background: var(--c-primary);
    color: #fff;
    padding: var(--space-xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat-item {
    padding: var(--space-md);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: var(--c-accent);
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
}

/* -----------------------------------------------------
   Cards
   ----------------------------------------------------- */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: all .2s ease;
}

.card-hover:hover {
    border-color: var(--c-border-strong);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 69, 19, 0.08);
    color: var(--c-primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.card-icon svg { width: 22px; height: 22px; }

.card h3 { font-size: 1.15rem; margin-bottom: var(--space-xs); }

.card p { color: var(--c-muted); margin-bottom: 0; font-size: 0.95rem; }

/* Estate card */
.estate-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
}

.estate-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--c-border-strong);
}

.estate-image {
    aspect-ratio: 4/3;
    background: var(--c-surface-alt);
    overflow: hidden;
    position: relative;
}

.estate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.estate-card:hover .estate-image img {
    transform: scale(1.05);
}

.estate-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    color: var(--c-primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.estate-badge.available { color: var(--c-success); }
.estate-badge.occupied  { color: var(--c-primary); }
.estate-badge.maintenance { color: var(--c-warning); }

.estate-body {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.estate-body h3 {
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.estate-location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--c-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.estate-location svg { width: 14px; height: 14px; flex-shrink: 0; }

.estate-body p {
    color: var(--c-text-soft);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    flex: 1;
}

.estate-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--c-border);
    gap: var(--space-md);
}

.estate-price {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-primary);
}

.estate-price small {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* -----------------------------------------------------
   Grid utilities
   ----------------------------------------------------- */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
}

.section-eyebrow {
    display: inline-block;
    color: var(--c-primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

.section-header p {
    color: var(--c-muted);
    font-size: 1.05rem;
}

/* -----------------------------------------------------
   Forms
   ----------------------------------------------------- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: var(--space-xs);
}

.form-label .req { color: var(--c-danger); }

.form-hint {
    display: block;
    font-size: 0.825rem;
    color: var(--c-muted);
    margin-top: var(--space-xs);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-md);
    transition: all .15s ease;
    min-height: 44px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--c-muted-light);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--font-body);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.form-error {
    font-size: 0.85rem;
    color: var(--c-danger);
    margin-top: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.form-error svg { width: 14px; height: 14px; flex-shrink: 0; }

/* -----------------------------------------------------
   Alerts / Flash messages
   ----------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    border: 1px solid transparent;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: var(--c-success-bg);
    color: var(--c-success);
    border-color: rgba(74, 124, 89, 0.2);
}

.alert-warning {
    background: var(--c-warning-bg);
    color: #8B6400;
    border-color: rgba(184, 134, 11, 0.25);
}

.alert-danger {
    background: var(--c-danger-bg);
    color: var(--c-danger);
    border-color: rgba(139, 46, 46, 0.2);
}

.alert-info {
    background: var(--c-info-bg);
    color: var(--c-info);
    border-color: rgba(74, 107, 139, 0.2);
}

/* -----------------------------------------------------
   Auth pages (login/register)
   ----------------------------------------------------- */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--c-bg);
}

.auth-visual {
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: #fff;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(193, 154, 107, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(193, 154, 107, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.auth-visual-content {
    position: relative;
    max-width: 440px;
    text-align: left;
}

.auth-visual-content h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: var(--space-md);
}

.auth-visual-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1.6;
}

.auth-visual-content .brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.auth-visual-content .brand svg { width: 36px; height: 36px; }

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
}

.auth-form {
    width: 100%;
    max-width: 420px;
}

.auth-form h1 {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.auth-form .subtitle {
    color: var(--c-muted);
    margin-bottom: var(--space-xl);
}

.auth-form-footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--c-border);
    color: var(--c-muted);
    font-size: 0.95rem;
}

.auth-form-footer a {
    font-weight: 600;
}

/* -----------------------------------------------------
   Footer
   ----------------------------------------------------- */
.site-footer {
    background: #2C2620;
    color: #B8B0A4;
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #FAF7F2;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-brand svg { width: 32px; height: 32px; color: var(--c-accent); }

.footer-about {
    color: #9C9488;
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 340px;
}

.footer-col h4 {
    color: #FAF7F2;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
    font-family: var(--font-body);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li { margin-bottom: var(--space-sm); }

.footer-col a {
    color: #B8B0A4;
    font-size: 0.95rem;
    transition: color .2s;
}

.footer-col a:hover { color: var(--c-accent); }

.footer-bottom {
    border-top: 1px solid #3D352C;
    padding-top: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #7A7368;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* -----------------------------------------------------
   Utilities
   ----------------------------------------------------- */
.text-center { text-align: center; }
.text-muted  { color: var(--c-muted); }
.text-sm     { font-size: 0.875rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }

/* -----------------------------------------------------
   Responsive — general
   ----------------------------------------------------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; max-width: 500px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-visual { display: none; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}

@media (max-width: 640px) {
    .container { padding: 0 var(--space-md); }
    .section { padding: var(--space-2xl) 0; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; }

    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }

    .footer-bottom { flex-direction: column; text-align: center; }
}

/* -----------------------------------------------------
   Print
   ----------------------------------------------------- */
@media print {
    .site-header, .site-footer, .nav-actions, .btn { display: none !important; }
    body { background: #fff; }
}

/* =============================================
   MOBILE SIDEBAR NAVIGATION — RIGHT SIDE
   ============================================= */

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--c-text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background .2s;
}

.nav-toggle:hover { background: var(--c-surface-alt); }
.nav-toggle svg { width: 24px; height: 24px; }

/* Overlay nyuma ya drawer */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 6, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 998;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer pembeni ya KULIA */
.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;                      /* ✅ kulia */
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--c-surface);
    box-shadow: -4px 0 24px rgba(60, 40, 20, 0.15);  /* ✅ kivuli kushoto */
    transform: translateX(100%);                      /* ✅ toka kulia */
    transition: transform .3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-drawer-close {
    background: none;
    border: none;
    color: var(--c-text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-md);
    transition: background .2s;
}

.nav-drawer-close:hover { background: var(--c-surface-alt); }
.nav-drawer-close svg { width: 22px; height: 22px; }

.nav-drawer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--c-primary);
}

.nav-drawer-brand svg { width: 28px; height: 28px; }

.nav-drawer-links {
    list-style: none;
    padding: var(--space-md) 0;
    margin: 0;
    flex: 1;
}

.nav-drawer-links li { margin: 0; }

.nav-drawer-links a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--c-text-soft);
    font-weight: 500;
    font-size: 1rem;
    border-right: 3px solid transparent;    /* ✅ kulia */
    transition: all .2s;
}

.nav-drawer-links a:hover,
.nav-drawer-links a.active {
    background: var(--c-surface-alt);
    color: var(--c-primary);
    border-right-color: var(--c-primary);   /* ✅ kulia */
}

.nav-drawer-links a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-drawer-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* =============================================
   PASSWORD FIELD WITH TOGGLE
   ============================================= */

.password-field {
    position: relative;
}

.password-field .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--c-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    min-height: 36px;
    min-width: 36px;
}

.password-toggle:hover {
    color: var(--c-primary);
    background: var(--c-surface-alt);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.password-toggle .icon-eye-off { display: none; }
.password-toggle.visible .icon-eye    { display: none; }
.password-toggle.visible .icon-eye-off { display: block; }

/* =============================================
   NAV VISIBILITY OVERRIDE — FINAL
   Inahakikisha:
   - Simu (≤900px): hamburger inaonekana, nav-links/nav-actions zimefichwa
   - Desktop (≥901px): nav-links + nav-actions zinaonekana, hamburger + drawer zimefichwa
   ============================================= */

@media (max-width: 900px) {
    .nav-links,
    .nav-actions {
        display: none !important;
    }
    .nav-toggle {
        display: flex !important;
    }
}

@media (min-width: 901px) {
    .nav-toggle {
        display: none !important;
    }
    .nav-links {
        display: flex !important;
    }
    .nav-actions {
        display: flex !important;
    }
    .nav-drawer,
    .nav-overlay {
        display: none !important;
    }
}