/* ═══════════════════════════════════════════════════
   Corporate FAQ — Main Stylesheet
   ═══════════════════════════════════════════════════ */

:root {
    --primary: #b82e31;
    --primary-dark: #9c2628;
    --primary-light: #FDF0F0;
    --secondary: #d43639;
    --bg: #F8FAFC;
    --bg-white: #FFFFFF;
    --text: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --error: #EF4444;
    --error-bg: #FEF2F2;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.03);
    --transition: all .2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary {
    background: var(--border-light);
    color: var(--text);
}
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-sm { padding: .35rem .7rem; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-group { display: flex; gap: .4rem; align-items: center; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .6rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
}
.badge-light { background: var(--border-light); color: var(--text-secondary); }
.badge-admin { background: #FEF3C7; color: #D97706; }

/* ── Flash messages ── */
.flash-container { margin-top: 1rem; }
.flash {
    padding: .8rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
}
.flash-success { background: var(--success-bg); color: #065F46; border-left: 4px solid var(--success); }
.flash-error { background: var(--error-bg); color: #991B1B; border-left: 4px solid var(--error); }
.flash-warning { background: var(--warning-bg); color: #92400E; border-left: 4px solid var(--warning); }
.flash-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: .5;
    line-height: 1;
}
.flash-close:hover { opacity: 1; }

/* ══════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════ */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 0;
    flex-shrink: 1;
}
.navbar-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-brand:hover { color: var(--primary-dark); }
.navbar-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-user {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    color: var(--text-secondary);
}
.nav-logout:hover { color: var(--error); background: var(--error-bg); }
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text);
    padding: .4rem;
    touch-action: manipulation;
}

/* ══════════════════════════════════════════════════
   HERO / SEARCH
   ══════════════════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, #b82e31 0%, #9c2628 50%, #7a1e20 100%);
    padding: 3.5rem 0;
    text-align: center;
    color: #fff;
}
.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    opacity: .9;
    margin-bottom: 2rem;
}
.search-form { max-width: 700px; margin: 0 auto; }
.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    padding: .4rem .5rem .4rem 1.2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
}
.search-icon { color: var(--text-light); font-size: 1.1rem; margin-right: .8rem; }
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: var(--text);
}
.search-input::placeholder { color: var(--text-light); }
.search-btn {
    border-radius: 50px !important;
    padding: .7rem 1.5rem !important;
}

.search-form-inline {
    margin-bottom: 2rem;
}
.search-form-inline .search-box {
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.search-box-results {
    border-radius: 50px;
}

/* ── Search wrapper (positions dropdown) ── */
.search-wrapper {
    position: relative;
    width: 100%;
}

/* ── Navbar compact search ── */
.navbar-search {
    flex: 1;
    max-width: 420px;
    margin: 0 1.5rem;
}
.navbar-search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .35rem .9rem;
    transition: var(--transition);
}
.navbar-search-box:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(184,46,49,.1);
}
.navbar-search-icon {
    color: var(--text-light);
    font-size: .85rem;
    margin-right: .5rem;
}
.navbar-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: .88rem;
    font-family: inherit;
    background: transparent;
    color: var(--text);
    min-width: 0;
}

/* ══════════════════════════════════════════════════
   LIVE SEARCH DROPDOWN
   ══════════════════════════════════════════════════ */
.live-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
    z-index: 500;
    max-height: 480px;
    overflow-y: auto;
    animation: dropdownIn .15s ease;
}
.live-search-dropdown.visible { display: block; }
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lsd-group-title {
    padding: .5rem 1rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-light);
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
}
.lsd-item {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem 1rem;
    cursor: pointer;
    transition: background .1s ease;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}
.lsd-item:last-child { border-bottom: none; }
.lsd-item:hover, .lsd-item.active {
    background: var(--primary-light);
    color: var(--text);
}
.lsd-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}
.lsd-item-icon.section-icon {
    background: var(--primary-light);
    color: var(--primary);
}
.lsd-item-icon.question-icon {
    background: #FDF0F0;
    color: #d43639;
}
.lsd-item-body {
    flex: 1;
    min-width: 0;
}
.lsd-item-title {
    font-size: .9rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lsd-item-meta {
    font-size: .75rem;
    color: var(--text-light);
    margin-top: .1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lsd-item-arrow {
    color: var(--text-light);
    font-size: .75rem;
    flex-shrink: 0;
}
.lsd-footer {
    padding: .6rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--border-light);
}
.lsd-footer a {
    font-size: .85rem;
    font-weight: 500;
    color: var(--primary);
}
.lsd-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: .9rem;
}

/* ── Highlight (disabled) ── */
mark {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ══════════════════════════════════════════════════
   SEARCH RESULTS PAGE (redesigned)
   ══════════════════════════════════════════════════ */
.sr-header {
    margin-bottom: 2rem;
}
.sr-summary {
    font-size: .95rem;
    color: var(--text-secondary);
    margin-top: .5rem;
}

.sr-block {
    margin-bottom: 2.5rem;
}
.sr-block-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid var(--border);
}
.sr-block-title i { color: var(--primary); }

/* Section results */
.sr-sections {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.sr-section-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.3rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    color: var(--text);
    text-decoration: none;
}
.sr-section-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    color: var(--text);
}
.sr-section-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}
.sr-section-card:hover .sr-section-icon {
    background: var(--primary);
    color: #fff;
}
.sr-section-body {
    flex: 1;
    min-width: 0;
}
.sr-section-body h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .15rem;
}
.sr-section-body p {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: .2rem;
}
.sr-section-meta {
    font-size: .78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: .3rem;
}
.sr-section-arrow {
    color: var(--text-light);
    font-size: .85rem;
    flex-shrink: 0;
    transition: var(--transition);
}
.sr-section-card:hover .sr-section-arrow {
    color: var(--primary);
    transform: translateX(3px);
}

/* Question results */
.sr-questions {
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.sr-question-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    transition: var(--transition);
}
.sr-question-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.sr-q-section-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: .2rem .7rem;
    border-radius: 20px;
    margin-bottom: .6rem;
    text-decoration: none;
    font-weight: 500;
}
.sr-q-section-tag:hover {
    background: var(--primary);
    color: #fff;
}
.sr-q-title {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: .5rem;
}
.sr-q-title:hover { color: var(--primary); }
.sr-q-icon {
    color: var(--primary);
    margin-top: .15rem;
    flex-shrink: 0;
}
.sr-q-preview {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: .6rem;
    padding-left: 1.5rem;
}
.sr-q-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .83rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    padding-left: 1.5rem;
}
.sr-q-link:hover {
    text-decoration: underline;
}
.sr-q-link i {
    font-size: .7rem;
    transition: transform .15s ease;
}
.sr-q-link:hover i { transform: translateX(3px); }

/* ══════════════════════════════════════════════════
   SECTIONS GRID
   ══════════════════════════════════════════════════ */
.sections-grid { padding: 2.5rem 0; }
.sections-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}
.grid-small {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.section-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    color: var(--text);
    text-decoration: none;
}
.section-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: var(--text);
}
.section-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.section-card:hover .section-card-icon {
    background: var(--primary);
    color: #fff;
}
.section-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .4rem;
}
.section-card p {
    font-size: .85rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: .8rem;
}
.section-card-count {
    font-size: .8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.section-card-small { padding: 1rem; }
.section-card-small h3 { font-size: .95rem; margin-bottom: 0; }

/* ══════════════════════════════════════════════════
   PAGE CONTENT
   ══════════════════════════════════════════════════ */
.page-content { padding: 2rem 0 3rem; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
}
.breadcrumb a {
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--text-light); font-size: .7rem; flex-shrink: 0; }
.breadcrumb span:last-child {
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Section header */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.section-header-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    flex-shrink: 0;
}
.section-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}
.section-desc {
    color: var(--text-secondary);
    margin-top: .2rem;
}

/* ══════════════════════════════════════════════════
   ACCORDION
   ══════════════════════════════════════════════════ */
.accordion {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.accordion-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.accordion-item:hover { border-color: var(--primary); }
.accordion-item.open { border-color: var(--primary); box-shadow: var(--shadow-md); }
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1.1rem 1.3rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    gap: 1rem;
}
.accordion-header:hover { background: var(--border-light); }
.accordion-title { flex: 1; }
.accordion-icon {
    color: var(--text-light);
    transition: transform .3s ease;
    flex-shrink: 0;
}
.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
    color: var(--primary);
}
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .3s ease;
}
.accordion-item.open .accordion-body {
    max-height: 5000px;
    padding: 0 1.3rem 1.3rem;
}

/* Answer content */
.answer-content {
    color: var(--text);
    line-height: 1.8;
    font-size: .95rem;
}
.answer-content p { margin-bottom: .8rem; }
.answer-content ul, .answer-content ol {
    margin: .5rem 0 1rem 1.5rem;
}
.answer-content li { margin-bottom: .3rem; }
.answer-content strong { color: var(--text); }
.answer-content code {
    background: var(--primary-light);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .88rem;
}
.answer-content a { color: var(--primary); text-decoration: underline; }
.answer-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: .5rem 0;
}
.answer-content kbd {
    background: var(--border-light);
    border: 1px solid var(--border);
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .85rem;
}

/* Media in answers */
.answer-media {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.media-item img, .media-item video {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* (old search-result-* classes removed — replaced by sr-* classes above) */

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}
.empty-state p { margin-bottom: 1rem; font-size: 1.1rem; }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 2rem 0;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    color: var(--text-light);
    font-size: .85rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* ══════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b82e31 0%, #9c2628 50%, #7a1e20 100%);
}
.login-container { width: 100%; max-width: 420px; padding: 1rem; }
.login-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-header { text-align: center; margin-bottom: 2rem; }
.login-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .3rem;
}
.login-header p {
    color: var(--text-secondary);
    font-size: .9rem;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: .4rem;
    color: var(--text);
}
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: .7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-white);
    transition: var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(184,46,49,.12);
}
.form-hint {
    display: block;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: .3rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-actions {
    display: flex;
    gap: .8rem;
    margin-top: 1.5rem;
}
.icon-input-group {
    display: flex;
    align-items: center;
    gap: .8rem;
}
.icon-preview {
    width: 42px;
    height: 42px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.icon-input-group input { flex: 1; }
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.file-input {
    padding: .5rem !important;
    border-style: dashed !important;
}

/* ══════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════ */
.admin-body {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #1E293B;
    color: #CBD5E1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
}
.sidebar-header {
    padding: 1.3rem 1.5rem;
    border-bottom: 1px solid #334155;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.sidebar-brand:hover { color: #fff; }
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .7rem 1.5rem;
    color: #94A3B8;
    font-size: .9rem;
    transition: var(--transition);
}
.sidebar-link:hover { color: #fff; background: #334155; }
.sidebar-link.active {
    color: #fff;
    background: var(--primary);
}
.sidebar-divider {
    height: 1px;
    background: #334155;
    margin: .8rem 1.5rem;
}

/* Main area */
.admin-main {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    height: 60px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text);
}
.admin-user {
    font-size: .9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.admin-flash-container { padding: 1rem 1.5rem 0; }
.admin-content {
    flex: 1;
    padding: 1.5rem;
}
.admin-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-page-header .admin-page-title { margin-bottom: 0; }

/* Admin cards */
.admin-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.admin-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: .85rem; color: var(--text-secondary); }

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th {
    text-align: left;
    padding: .7rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--border);
}
.admin-table td {
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: .9rem;
}
.admin-table tbody tr:hover { background: var(--border-light); }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }

/* Drag handle */
.drag-handle {
    cursor: grab;
    color: var(--text-light);
    user-select: none;
}
.drag-handle:active { cursor: grabbing; }

/* Admin form layouts */
.form-inline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Quill editor */
.quill-editor {
    min-height: 200px;
    background: #fff;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.ql-toolbar.ql-snow {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-color: var(--border);
}
.ql-container.ql-snow {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    border-color: var(--border);
    font-family: inherit;
    font-size: .95rem;
}

/* Media grid in admin */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.media-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.media-card img, .media-card video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.media-card-info {
    padding: .5rem .8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.modal-content h3 { margin-bottom: 1rem; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

/* ── Tablet & small laptop (≤ 768px) ── */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }

    /* Navbar */
    .navbar-inner { height: 56px; }
    .navbar-brand { font-size: 1.05rem; gap: .5rem; }
    .navbar-search { display: none; }
    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }
    .navbar-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: .5rem 0;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        z-index: 99;
    }
    .navbar-links.open { display: flex; }
    .nav-link, .nav-user {
        justify-content: flex-start;
        width: 100%;
        padding: .85rem 1.25rem;
        font-size: .95rem;
    }
    .nav-link {
        border-radius: 0;
    }
    .nav-link:hover { background: var(--border-light); }

    /* Hero */
    .hero { padding: 2rem 0 2.2rem; }
    .hero h1 { font-size: 1.5rem; margin-bottom: .3rem; }
    .hero-subtitle { font-size: .95rem; margin-bottom: 1.4rem; }

    /* Grid */
    .grid { grid-template-columns: 1fr; gap: .8rem; }

    /* Section cards — keep vertical, just tighten */
    .section-card { padding: 1.1rem; }
    .section-card-icon { width: 42px; height: 42px; font-size: 1.1rem; margin-bottom: .8rem; }
    .section-card h3 { font-size: .95rem; }
    .section-card p { font-size: .82rem; }
    .section-card:hover { transform: none; }

    /* Sections title */
    .sections-grid { padding: 1.5rem 0; }
    .sections-title { font-size: 1.2rem; margin-bottom: 1rem; }

    /* Section page */
    .page-content { padding: 1.2rem 0 2rem; }
    .section-header { flex-direction: row; align-items: center; gap: .8rem; margin-bottom: 1.5rem; }
    .section-header-icon { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 12px; }
    .section-header h1 { font-size: 1.15rem; }
    .section-desc { font-size: .85rem; }
    .breadcrumb {
        margin-bottom: .8rem;
        font-size: .82rem;
        gap: .3rem;
        padding: .5rem .8rem;
        background: var(--bg-white);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
    }

    /* Accordion */
    .accordion { gap: .5rem; }
    .accordion-header {
        padding: .9rem 1rem;
        font-size: .93rem;
        gap: .8rem;
        min-height: 48px;
    }
    .accordion-item.open .accordion-body {
        padding: 0 1rem 1rem;
    }
    .answer-content { font-size: .9rem; line-height: 1.7; }

    /* Search results */
    .sr-section-card { padding: .85rem 1rem; gap: .8rem; }
    .sr-section-icon { width: 38px; height: 38px; font-size: .95rem; }
    .sr-section-body h3 { font-size: .92rem; }
    .sr-section-body p { font-size: .82rem; }
    .sr-question-card { padding: 1rem; }
    .sr-q-title { font-size: .95rem; }
    .sr-q-preview { padding-left: 0; font-size: .85rem; }
    .sr-q-link { padding-left: 0; }

    /* Live search dropdown */
    .live-search-dropdown { max-height: 60vh; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .form-inline-grid { grid-template-columns: 1fr; }
    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="email"],
    .form-group input[type="number"],
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: .75rem 1rem;
    }

    /* Search input — prevent iOS zoom */
    .search-input { font-size: 16px; }

    /* Footer */
    .footer { padding: 1.5rem 0; font-size: .8rem; margin-top: 1.5rem; }

    /* Empty state */
    .empty-state { padding: 2rem .5rem; }
    .empty-state i { font-size: 2.5rem; }
    .empty-state p { font-size: 1rem; }

    /* Admin */
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .3s ease;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
    .stat-card { padding: 1rem; gap: .8rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.1rem; }
    .stat-value { font-size: 1.3rem; }
    .stat-label { font-size: .8rem; }
    .admin-content { padding: 1rem; }
    .admin-page-title { font-size: 1.25rem; }
    .admin-table { font-size: .82rem; }
    .admin-table th, .admin-table td { padding: .55rem .5rem; }
    .admin-table .btn-group { flex-wrap: wrap; }
    .admin-card { padding: 1rem; }

    /* Modal */
    .modal { padding: .75rem; }
    .modal-content { padding: 1.5rem; }
}

/* ── Phone (≤ 480px) ── */
@media (max-width: 480px) {
    /* Hero */
    .hero { padding: 1.6rem 0 1.8rem; }
    .hero h1 { font-size: 1.25rem; }
    .hero-subtitle { font-size: .88rem; margin-bottom: 1.2rem; }

    /* Search — stays horizontal, just compact */
    .search-box { padding: .3rem .4rem .3rem .8rem; }
    .search-btn { padding: .6rem 1rem !important; font-size: .85rem; }

    /* Section cards */
    .section-card { padding: .9rem; }
    .section-card-icon { width: 38px; height: 38px; font-size: 1rem; margin-bottom: .6rem; }
    .section-card h3 { font-size: .9rem; }
    .section-card p { font-size: .78rem; }

    /* Section page */
    .section-header-icon { width: 42px; height: 42px; font-size: 1.2rem; }
    .section-header h1 { font-size: 1.05rem; }

    /* Accordion touch-friendly */
    .accordion-header { padding: .85rem .9rem; font-size: .9rem; }
    .accordion-item.open .accordion-body { padding: 0 .9rem .9rem; }

    /* Login */
    .login-container { padding: .75rem; }
    .login-card { padding: 1.8rem 1.3rem; border-radius: 16px; }
    .login-icon { width: 60px; height: 60px; font-size: 1.7rem; border-radius: 16px; }
    .login-header h1 { font-size: 1.3rem; }
    .login-header { margin-bottom: 1.5rem; }

    /* Admin phone */
    .stats-grid { grid-template-columns: 1fr; }
    .admin-page-title { font-size: 1.1rem; }
    .admin-page-header { flex-direction: column; align-items: flex-start; }
    .admin-content { padding: .75rem; }

    /* Navbar */
    .navbar-brand { font-size: .95rem; }
    .navbar-brand i { font-size: 1.1rem; }
}

/* ── Very small phone (≤ 360px) ── */
@media (max-width: 360px) {
    .container { padding: 0 .75rem; }
    .hero h1 { font-size: 1.1rem; }
    .hero-subtitle { font-size: .82rem; }
    .hero { padding: 1.3rem 0 1.5rem; }
    .search-box { padding: .25rem .3rem .25rem .6rem; }
    .search-btn { padding: .55rem .8rem !important; font-size: .8rem; }
    .search-icon { font-size: .95rem; margin-right: .5rem; }
    .sections-title { font-size: 1.05rem; }
    .section-card { padding: .8rem; }
    .section-card-icon { width: 36px; height: 36px; font-size: .9rem; }
    .section-card h3 { font-size: .85rem; }
    .navbar-brand { font-size: .85rem; }
    .navbar-brand i { display: none; }
    .accordion-header { font-size: .87rem; padding: .8rem; }
    .login-card { padding: 1.5rem 1rem; }
}
