:root {
    --gold: #D4A843;
    --gold-light: #E8C96A;
    --gold-dark: #B8912E;
    --terra: #C0543B;
    --terra-light: #D47A66;
    --terra-dark: #9B3E2A;
    --green: #2D6A4F;
    --green-light: #40916C;
    --green-dark: #1B4332;
    --brown: #6B4226;
    --brown-light: #8B5E3C;
    --dark: #1A1A2E;
    --dark-secondary: #16213E;
    --dark-card: #0F3460;
    --cream: #FDF6EC;
    --cream-dark: #F5EDDF;
    --warm-white: #FAF7F2;
    --text: #2D2D2D;
    --text-light: #6B6B6B;
    --text-muted: #9B9B9B;
    --border: #E8E2D8;
    --shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 10px 40px rgba(26, 26, 46, 0.12);
    --shadow-xl: 0 20px 60px rgba(26, 26, 46, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--warm-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.3; color: var(--dark); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
a { color: var(--gold-dark); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--terra); }
img { max-width: 100%; height: auto; }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

/* Navigation */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(26, 26, 46, 0.95); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.15);
    transition: var(--transition);
}
.navbar.scrolled { background: rgba(26, 26, 46, 0.98); box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1440px; margin: 0 auto; padding: 0 24px; height: 72px;
}
.navbar-brand { display: flex; align-items: center; gap: 12px; }
.navbar-brand .logo-text {
    font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.navbar-brand .logo-sub { font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 3px; display: block; margin-top: -4px; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
    color: rgba(255,255,255,0.8); padding: 8px 16px; border-radius: 8px;
    font-size: 0.9rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: rgba(212, 168, 67, 0.1); }
.nav-auth { display: flex; align-items: center; gap: 12px; }
.btn-nav {
    padding: 8px 20px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
    border: none; cursor: pointer; transition: var(--transition); text-decoration: none;
}
.btn-nav-outline { border: 1.5px solid rgba(212, 168, 67, 0.5); color: var(--gold); background: transparent; }
.btn-nav-outline:hover { background: rgba(212, 168, 67, 0.15); color: var(--gold-light); border-color: var(--gold); }
.btn-nav-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark); }
.btn-nav-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(212, 168, 67, 0.4); color: var(--dark); }

.mobile-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; padding: 8px; }

/* Hero Section */
.hero {
    position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 50%, var(--green-dark) 100%);
    overflow: hidden; margin-top: 72px;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800"><defs><radialGradient id="a" cx="400" cy="400" r="400"><stop offset="0" stop-color="%23D4A843" stop-opacity="0.08"/><stop offset="1" stop-color="%23D4A843" stop-opacity="0"/></radialGradient></defs><circle cx="400" cy="400" r="400" fill="url(%23a)"/></svg>') center/cover;
}
.hero-pattern {
    position: absolute; inset: 0; opacity: 0.03;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(212,168,67,0.5) 50px, rgba(212,168,67,0.5) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(212,168,67,0.5) 50px, rgba(212,168,67,0.5) 51px);
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 40px 24px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(212, 168, 67, 0.15); border: 1px solid rgba(212, 168, 67, 0.3);
    padding: 8px 20px; border-radius: 50px; margin-bottom: 32px;
    font-size: 0.85rem; color: var(--gold-light); text-transform: uppercase; letter-spacing: 2px;
}
.hero h1 { color: white; margin-bottom: 24px; font-size: clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 span { background: linear-gradient(135deg, var(--gold), var(--gold-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 650px; margin: 0 auto 40px; line-height: 1.8; }

/* Search Bar */
.hero-search {
    max-width: 640px; margin: 0 auto 48px; position: relative;
}
.hero-search input {
    width: 100%; padding: 18px 60px 18px 24px; border-radius: 16px;
    border: 2px solid rgba(212, 168, 67, 0.3); background: rgba(255,255,255,0.08);
    color: white; font-size: 1.05rem; backdrop-filter: blur(10px); transition: var(--transition);
}
.hero-search input::placeholder { color: rgba(255,255,255,0.55); }
.hero-search input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.12); }
.hero-search button {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); border: none;
    width: 44px; height: 44px; border-radius: 12px; color: var(--dark);
    font-size: 1.1rem; cursor: pointer; transition: var(--transition);
}
.hero-search button:hover { transform: translateY(-50%) scale(1.05); }
.search-suggestions {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 8px;
    background: white; border-radius: var(--radius); box-shadow: var(--shadow-xl);
    max-height: 320px; overflow-y: auto; display: none; z-index: 100;
}
.search-suggestions.active { display: block; }
.search-suggestion-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px;
    cursor: pointer; transition: var(--transition); color: var(--text); border-bottom: 1px solid var(--border);
}
.search-suggestion-item:hover { background: var(--cream); }
.search-suggestion-item i { color: var(--gold); width: 20px; text-align: center; }
.search-suggestion-item .label { font-weight: 500; }
.search-suggestion-item .sublabel { font-size: 0.8rem; color: var(--text-muted); }

/* Hero Actions */
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats Bar */
.stats-bar {
    position: relative; z-index: 3; margin-top: -50px;
    background: white; border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
    padding: 32px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px;
    max-width: 900px; margin-left: auto; margin-right: auto;
}
.stat-item { text-align: center; }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--gold-dark); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: var(--radius); font-size: 0.95rem; font-weight: 600;
    border: none; cursor: pointer; transition: var(--transition); text-decoration: none; line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(212, 168, 67, 0.4); color: var(--dark); }
.btn-secondary { background: white; color: var(--text); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--gold); color: var(--gold-dark); transform: translateY(-2px); }
.btn-outline-gold { background: transparent; border: 2px solid var(--gold); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: var(--dark); }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: white; }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }
.btn-green { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: white; }
.btn-green:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4); color: white; }
.btn-terra { background: linear-gradient(135deg, var(--terra), var(--terra-dark)); color: white; }
.btn-terra:hover { transform: translateY(-2px); color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; color: white; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 14px; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--dark); color: white; }
.section-dark h2, .section-dark h3 { color: white; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-light); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.section-header .divider { width: 60px; height: 3px; background: linear-gradient(90deg, var(--gold), var(--terra)); margin: 16px auto 0; border-radius: 2px; }

/* Cards */
.card {
    background: white; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow); transition: var(--transition);
    border: 1px solid rgba(232, 226, 216, 0.5);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; overflow: hidden; height: 220px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img .card-badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(26, 26, 46, 0.8); color: var(--gold-light);
    padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; backdrop-filter: blur(4px);
}
.card-body { padding: 20px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body h3 a { color: var(--dark); }
.card-body h3 a:hover { color: var(--gold-dark); }
.card-body p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.card-meta { display: flex; align-items: center; gap: 16px; font-size: 0.8rem; color: var(--text-muted); }
.card-meta i { color: var(--gold); }

/* Territory Card */
.territory-card .card-img { height: 180px; background: linear-gradient(135deg, var(--green-dark), var(--dark-secondary)); display: flex; align-items: center; justify-content: center; }
.territory-card .card-img .territory-icon { font-size: 3rem; color: var(--gold); opacity: 0.85; }
.territory-card .card-stats { display: flex; gap: 12px; margin-top: 12px; }
.territory-card .card-stat { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--text-muted); }
.territory-card .card-stat i { font-size: 0.7rem; color: var(--gold); }

/* Figure Card */
.figure-card .card-img { height: 260px; background: linear-gradient(135deg, var(--brown), var(--dark)); display: flex; align-items: center; justify-content: center; }
.figure-card .card-img .figure-placeholder { font-size: 4rem; color: rgba(212, 168, 67, 0.6); }
.figure-card .role-badge {
    display: inline-block; background: var(--cream); color: var(--brown);
    padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; margin-bottom: 8px;
}

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

/* Country Grid */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.country-card {
    display: flex; align-items: center; gap: 12px; padding: 16px 20px;
    background: white; border-radius: var(--radius); border: 1px solid var(--border);
    transition: var(--transition); cursor: pointer;
}
.country-card:hover { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-2px); }
.country-card .flag { font-size: 1.5rem; }
.country-card .name { font-weight: 600; font-size: 0.9rem; }

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 100%);
    padding: 120px 0 60px; text-align: center; margin-top: 72px;
}
.page-header h1 { color: white; margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; font-size: 0.85rem; }
.breadcrumb a { color: var(--gold-dark); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .sep { color: var(--text-muted); }
.territory-header .breadcrumb a { color: var(--gold-light); }
.territory-header .breadcrumb a:hover { color: white; }
.territory-header .breadcrumb span, .territory-header .breadcrumb .sep { color: rgba(255,255,255,0.5); }
.figure-header .breadcrumb a { color: var(--gold-light); }
.figure-header .breadcrumb a:hover { color: white; }
.figure-header .breadcrumb span, .figure-header .breadcrumb .sep { color: rgba(255,255,255,0.5); }

/* Territory Detail */
.territory-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--green-dark) 100%);
    padding: 120px 0 80px; margin-top: 72px; position: relative; overflow: hidden;
}
.territory-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 80px;
    background: linear-gradient(to top, var(--warm-white), transparent);
}
.territory-header-content { position: relative; z-index: 2; max-width: 800px; }
.territory-header h1 { color: white; margin-bottom: 8px; }
.territory-header .old-name { color: var(--gold-light); font-style: italic; font-size: 1.1rem; margin-bottom: 16px; }
.territory-header .territory-meta { display: flex; flex-wrap: wrap; gap: 20px; color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.territory-header .territory-meta i { color: var(--gold); margin-right: 6px; }

/* Territory Content */
.territory-content { display: grid; grid-template-columns: 1fr 340px; gap: 40px; padding: 40px 0 80px; }
.territory-main { min-width: 0; }
.territory-sidebar { }

/* Content Sections */
.content-section { margin-bottom: 40px; padding: 32px; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.content-section h2 { font-size: 1.4rem; margin-bottom: 16px; display: flex; align-items: center; gap: 12px; }
.content-section h2 i { color: var(--gold); }
.content-section .section-text { color: var(--text); line-height: 1.9; }
.content-section .section-text p { margin-bottom: 16px; }

/* Sidebar Widgets */
.sidebar-widget {
    background: white; border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow); margin-bottom: 24px;
}
.sidebar-widget h3 { font-size: 1.1rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sidebar-widget h3 i { color: var(--gold); font-size: 0.9rem; }
.sidebar-widget .info-list { list-style: none; }
.sidebar-widget .info-list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; font-size: 0.9rem; }
.sidebar-widget .info-list li:last-child { border-bottom: none; }
.sidebar-widget .info-list .label { color: var(--text-muted); }
.sidebar-widget .info-list .value { font-weight: 600; color: var(--text); }

/* Figure Detail */
.figure-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--brown) 100%);
    padding: 120px 0 60px; margin-top: 72px;
}
.figure-profile { display: flex; gap: 32px; align-items: flex-start; }
.figure-avatar {
    width: 180px; height: 180px; border-radius: 50%; overflow: hidden;
    border: 4px solid var(--gold); flex-shrink: 0;
    background: linear-gradient(135deg, var(--brown-light), var(--dark));
    display: flex; align-items: center; justify-content: center;
}
.figure-avatar img { width: 100%; height: 100%; object-fit: cover; }
.figure-avatar i { font-size: 4rem; color: rgba(212, 168, 67, 0.7); }
.figure-info h1 { color: white; margin-bottom: 8px; }
.figure-info .role { color: var(--gold-light); font-size: 1.1rem; font-weight: 500; }
.figure-info .dates { color: rgba(255,255,255,0.75); font-size: 0.9rem; margin-top: 8px; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.form-group label .required { color: var(--terra); }
.form-control {
    width: 100%; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: 10px; font-size: 0.95rem; color: var(--text);
    background: white; transition: var(--transition); font-family: inherit;
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15); }
.form-control.error { border-color: var(--terra); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: none; background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%236B6B6B" d="M6 8L1 3h10z"/></svg>'); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.form-error { color: var(--terra); font-size: 0.8rem; margin-top: 4px; }
.form-hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 2px; }

/* Alerts */
.alert {
    padding: 14px 20px; border-radius: var(--radius); margin-bottom: 20px;
    display: flex; align-items: center; gap: 12px; font-size: 0.9rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.alert-info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 40px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
    transition: var(--transition);
}
.pagination a { color: var(--text); background: white; border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--gold); color: var(--gold-dark); }
.pagination .active { background: var(--gold); color: var(--dark); font-weight: 700; border: none; }
.pagination .dots { border: none; background: none; color: var(--text-muted); }

/* Pagination Nav (partial) */
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; flex-wrap: wrap; }
.pagination-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: 8px; font-size: 0.9rem; font-weight: 500;
    color: var(--text); background: white; border: 1px solid var(--border);
    transition: var(--transition);
}
.pagination-link:hover { background: var(--cream); color: var(--gold-dark); border-color: var(--gold); }
.pagination-link.active { background: var(--gold); color: white; border-color: var(--gold); font-weight: 700; }
.pagination-dots { color: var(--text-muted); padding: 0 4px; }

/* Footer */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: var(--gold); font-family: 'Inter', sans-serif; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }
.footer-brand .logo-text { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.85rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.55); }

/* Auth Pages */
.auth-page { display: flex; min-height: 100vh; margin-top: 72px; }
.auth-visual {
    flex: 1; background: linear-gradient(135deg, var(--dark), var(--green-dark));
    display: flex; align-items: center; justify-content: center; padding: 40px;
}
.auth-visual-content { text-align: center; color: white; max-width: 400px; }
.auth-visual-content h2 { margin-bottom: 16px; font-size: 2rem; color: white; }
.auth-visual-content p { color: rgba(255,255,255,0.85); }
.auth-form-section { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--warm-white); }
.auth-form-box { width: 100%; max-width: 440px; }
.auth-form-box h1 { margin-bottom: 8px; font-size: 1.8rem; }
.auth-form-box .subtitle { color: var(--text-light); margin-bottom: 32px; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.dash-stat {
    background: white; border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px;
}
.dash-stat .icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.dash-stat .icon-gold { background: rgba(212, 168, 67, 0.12); color: var(--gold-dark); }
.dash-stat .icon-green { background: rgba(45, 106, 79, 0.12); color: var(--green); }
.dash-stat .icon-terra { background: rgba(192, 84, 59, 0.12); color: var(--terra); }
.dash-stat .icon-blue { background: rgba(15, 52, 96, 0.12); color: var(--dark-card); }
.dash-stat .number { font-size: 1.6rem; font-weight: 700; color: var(--dark); font-family: 'Playfair Display', serif; }
.dash-stat .label { font-size: 0.8rem; color: var(--text-muted); }
.dashboard-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th {
    text-align: left; padding: 12px 16px; font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}
table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
table tbody tr:hover { background: var(--cream); }
table .status-badge {
    display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-approved { background: #d4edda; color: #155724; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-published { background: #d4edda; color: #155724; }
.status-draft { background: #e2e3e5; color: #383d41; }

/* Admin Layout */
.admin-layout { display: flex; min-height: 100vh; margin-top: 72px; }
.admin-sidebar {
    width: 260px; background: var(--dark); padding: 24px 0; flex-shrink: 0;
    position: sticky; top: 72px; height: calc(100vh - 72px); overflow-y: auto;
}
.admin-sidebar .sidebar-nav { list-style: none; }
.admin-sidebar .sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 24px; color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: var(--transition);
}
.admin-sidebar .sidebar-nav a:hover, .admin-sidebar .sidebar-nav a.active { color: var(--gold); background: rgba(212, 168, 67, 0.1); }
.admin-sidebar .sidebar-nav a i { width: 20px; text-align: center; }
.admin-sidebar .sidebar-nav .nav-label { padding: 20px 24px 8px; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.3); }
.admin-main { flex: 1; padding: 32px; background: var(--cream); min-width: 0; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.admin-header h1 { font-size: 1.6rem; }

/* Contribute Page */
.contribute-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; margin-top: 32px; }
.contribute-card {
    background: white; border-radius: var(--radius-lg); padding: 32px; text-align: center;
    box-shadow: var(--shadow); transition: var(--transition); border: 2px solid transparent;
}
.contribute-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.contribute-card .icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.contribute-card h3 { margin-bottom: 8px; }
.contribute-card p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 16px; }

/* Map Page */
.map-page { margin-top: 72px; }
.map-container { height: calc(100vh - 72px); width: 100%; position: relative; }
#africa-map { width: 100%; height: 100%; }
.map-sidebar {
    position: absolute; top: 20px; left: 20px; z-index: 500;
    background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
    width: 320px; max-height: calc(100vh - 130px); overflow-y: auto;
}
.map-sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.map-sidebar-header h2 { font-size: 1.2rem; }
.map-sidebar-content { padding: 16px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-link {
    padding: 10px 20px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer;
    transition: var(--transition); background: none; border-top: none; border-left: none; border-right: none;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--gold-dark); border-bottom-color: var(--gold); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Badge */
.badge-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 50px; font-size: 0.78rem; font-weight: 600;
}

/* Traditions */
.tradition-card {
    background: white; border-radius: var(--radius); padding: 20px;
    border-left: 4px solid var(--gold); box-shadow: var(--shadow);
    margin-bottom: 16px; transition: var(--transition);
}
.tradition-card:hover { box-shadow: var(--shadow-lg); }
.tradition-card .type-badge { font-size: 0.75rem; color: var(--gold-dark); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.tradition-card h4 { margin: 8px 0; }
.tradition-card p { color: var(--text-light); font-size: 0.9rem; }

/* Places List */
.place-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.place-item:last-child { border-bottom: none; }
.place-item .place-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--green); }
.place-item .place-info { flex: 1; }
.place-item .place-info h4 { font-size: 0.95rem; font-family: 'Inter', sans-serif; }
.place-item .place-info p { font-size: 0.8rem; color: var(--text-muted); }

/* Testimonial Card */
.testimonial-card {
    background: white; border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow); border-top: 3px solid var(--gold);
}
.testimonial-card .quote { font-style: italic; color: var(--text); line-height: 1.8; margin-bottom: 16px; }
.testimonial-card .narrator { display: flex; align-items: center; gap: 12px; }
.testimonial-card .narrator-name { font-weight: 600; font-size: 0.9rem; }
.testimonial-card .narrator-relation { color: var(--text-muted); font-size: 0.8rem; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--text-muted); margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; }

/* Responsive */
@media (max-width: 1024px) {
    .territory-content { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 20px; overflow-x: hidden; }
    .dashboard-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-auth { display: none; }
    .mobile-toggle { display: block; }
    .hero { min-height: 80vh; }
    .hero h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; align-items: center; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); margin-top: -30px; padding: 20px; }
    .section { padding: 48px 0; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .auth-page { flex-direction: column; }
    .auth-visual { min-height: 200px; }
    .figure-profile { flex-direction: column; align-items: center; text-align: center; }
    .figure-avatar { width: 140px; height: 140px; }
    .territory-header .territory-meta { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .map-sidebar { display: none; }
    .hero-search input { padding: 14px 50px 14px 16px; font-size: 0.9rem; }
}

/* Mobile Nav Overlay */
.mobile-nav {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(26, 26, 46, 0.98); backdrop-filter: blur(20px);
    padding: 80px 24px 24px; flex-direction: column; gap: 8px;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
    color: white; padding: 14px 20px; font-size: 1.1rem; font-weight: 500;
    border-radius: 10px; transition: var(--transition);
}
.mobile-nav a:hover { background: rgba(212, 168, 67, 0.15); color: var(--gold); }
.mobile-nav .close-nav {
    position: absolute; top: 20px; right: 20px; background: none;
    border: none; color: white; font-size: 1.5rem; cursor: pointer;
}
