/* ============================================
   ANHIVA Design System
   Anonymous HIV Assessment
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */
:root {
    /* Teal - Primary */
    --teal-50: #e1f5ee;
    --teal-200: #5dcaa5;
    --teal-400: #1d9e75;
    --teal-600: #0f6e56;
    --teal-800: #085041;

    /* Amber - Accent */
    --amber-50: #faeeda;
    --amber-100: #fac775;
    --amber-400: #ef9f27;
    --amber-800: #854f0b;

    /* Gray - Neutral */
    --gray-50: #f1efe8;
    --gray-100: #d3d1c7;
    --gray-400: #888780;
    --gray-900: #2c2c2a;

    /* Risk Levels */
    --risk-low-bg: #eaf3de;
    --risk-low-text: #3b6d11;
    --risk-med-bg: #faeeda;
    --risk-med-text: #854f0b;
    --risk-high-bg: #fcebeb;
    --risk-high-text: #a32d2d;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(44, 44, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(44, 44, 42, 0.08);
    --shadow-lg: 0 8px 30px rgba(44, 44, 42, 0.12);
    --shadow-xl: 0 20px 60px rgba(44, 44, 42, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--teal-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--teal-600);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1.1rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--gray-900);
}

.text-secondary {
    color: var(--gray-400);
}
.text-teal {
    color: var(--teal-400);
}
.text-amber {
    color: var(--amber-400);
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}

/* ============================================
   Container
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-sm {
    max-width: 800px;
}

.container-xs {
    max-width: 500px;
}

/* ============================================
   Navbar - User
   ============================================ */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--teal-400);
    text-decoration: none;
}

.navbar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--teal-400), var(--teal-600));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.navbar-menu a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    color: var(--gray-900);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: var(--teal-50);
    color: var(--teal-400);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-900);
    cursor: pointer;
    padding: var(--space-sm);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-md);
        border-bottom: 1px solid var(--gray-100);
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-actions {
        display: none;
    }

    .navbar-actions.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        background: white;
        padding: var(--space-md);
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 24px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--teal-400);
    color: white;
    border-color: var(--teal-400);
}

.btn-primary:hover {
    background: var(--teal-600);
    border-color: var(--teal-600);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--teal-400);
    border-color: var(--teal-400);
}

.btn-outline:hover {
    background: var(--teal-400);
    color: white;
}

.btn-secondary {
    background: var(--gray-50);
    color: var(--gray-900);
    border-color: var(--gray-100);
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.btn-amber {
    background: var(--amber-400);
    color: white;
    border-color: var(--amber-400);
}

.btn-amber:hover {
    background: var(--amber-800);
    border-color: var(--amber-800);
    color: white;
}

.btn-danger {
    background: var(--risk-high-text);
    color: white;
    border-color: var(--risk-high-text);
}

.btn-danger:hover {
    background: #8b2525;
    border-color: #8b2525;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-body {
    padding: var(--space-lg);
}

.card-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

.card-text {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--gray-100);
    text-align: center;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto var(--space-md);
}

.stat-card .stat-icon.teal {
    background: var(--teal-50);
    color: var(--teal-400);
}

.stat-card .stat-icon.amber {
    background: var(--amber-50);
    color: var(--amber-400);
}

.stat-card .stat-icon.success {
    background: var(--risk-low-bg);
    color: var(--risk-low-text);
}

.stat-card .stat-icon.warning {
    background: var(--risk-med-bg);
    color: var(--risk-med-text);
}

.stat-card .stat-icon.danger {
    background: var(--risk-high-bg);
    color: var(--risk-high-text);
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* Fact Cards */
.fact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border-left: 4px solid var(--amber-400);
    border-top: 1px solid var(--gray-100);
    border-right: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-normal);
}

.fact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fact-card .fact-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.fact-card .fact-text {
    font-size: 0.9rem;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.fact-card .fact-source {
    font-size: 0.75rem;
    color: var(--amber-800);
    font-style: italic;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1.4;
}

.badge-risiko-rendah {
    background: var(--risk-low-bg);
    color: var(--risk-low-text);
}

.badge-risiko-sedang {
    background: var(--risk-med-bg);
    color: var(--risk-med-text);
}

.badge-risiko-tinggi {
    background: var(--risk-high-bg);
    color: var(--risk-high-text);
}

.badge-teal {
    background: var(--teal-50);
    color: var(--teal-800);
}

.badge-amber {
    background: var(--amber-50);
    color: var(--amber-800);
}

.badge-gray {
    background: var(--gray-50);
    color: var(--gray-400);
}

.badge-status-menunggu {
    background: var(--amber-50);
    color: var(--amber-800);
}

.badge-status-dijadwalkan {
    background: var(--teal-50);
    color: var(--teal-800);
}

.badge-status-selesai {
    background: var(--risk-low-bg);
    color: var(--risk-low-text);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--gray-900);
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--teal-400);
    box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control.is-invalid {
    border-color: var(--risk-high-text);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23888780' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.8rem;
    color: var(--risk-high-text);
    margin-top: var(--space-xs);
}

/* Radio/Checkbox custom */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-sm);
}

.form-check:hover {
    border-color: var(--teal-200);
    background: var(--teal-50);
}

.form-check.selected {
    border-color: var(--teal-400);
    background: var(--teal-50);
}

.form-check input[type="radio"],
.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--teal-400);
    flex-shrink: 0;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-900);
    line-height: 1.5;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(
        135deg,
        var(--teal-600) 0%,
        var(--teal-400) 50%,
        var(--teal-200) 100%
    );
    color: white;
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero .btn-primary {
    background: white;
    color: var(--teal-600);
    border-color: white;
    font-size: 1rem;
    padding: 14px 36px;
}

.hero .btn-primary:hover {
    background: var(--teal-50);
    border-color: var(--teal-50);
    color: var(--teal-800);
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.section-header p {
    color: var(--gray-400);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header .section-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, var(--teal-400), var(--amber-400));
    border-radius: var(--radius-full);
    margin: var(--space-md) auto 0;
}

/* ============================================
   Grid System
   ============================================ */
.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);
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .grid-2 {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero {
        padding: var(--space-2xl) 0;
    }
    .auth-split {
        grid-template-columns: 1fr;
    }
    .auth-split-left {
        display: none;
    }
    h1 {
        font-size: 1.8rem;
    }
    h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Feature Cards (Section 3)
   ============================================ */
.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--gray-100);
    text-align: center;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-card .feature-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto var(--space-lg);
    background: var(--teal-50);
    color: var(--teal-400);
}

.feature-card h4 {
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: var(--space-lg) var(--space-md) var(--space-md);
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ============================================
   Comments/Testimonials
   ============================================ */
.comment-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--gray-100);
}

.comment-card .comment-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.comment-card .comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal-50);
    color: var(--teal-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-card .comment-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.comment-card .comment-date {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.comment-card .comment-text {
    font-size: 0.9rem;
    color: var(--gray-900);
    line-height: 1.7;
    max-height: calc(1.2em * 6);
    overflow-y: auto;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--teal-200);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
}

/* ============================================
   Admin Sidebar Layout
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    background: var(--gray-900);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.admin-sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header .brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--teal-200);
}

.admin-sidebar-header .brand-sub {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin-top: 2px;
}

.admin-sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
    overflow-y: auto;
}

.admin-nav-section {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-md);
}

.admin-nav-section-title {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    color: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    position: relative;
}

.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.admin-nav-link.active {
    background: var(--teal-400);
    color: white;
}

.admin-nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.admin-nav-link .nav-badge {
    position: absolute;
    right: 12px;
    background: var(--amber-400);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    font-weight: 700;
}

.admin-sidebar-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--teal-400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
}

.admin-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.admin-user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    margin-left: 270px;
    background: var(--gray-50);
    min-height: 100vh;
}

.admin-topbar {
    background: white;
    border-bottom: 1px solid var(--gray-100);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-topbar h1 {
    font-size: 1.3rem;
    margin-bottom: 0;
}

.admin-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.admin-content {
    padding: var(--space-xl);
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
}

/* ============================================
   Tables (Admin)
   ============================================ */
.table-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gray-50);
}

.data-table th {
    padding: 14px var(--space-md);
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--gray-100);
}

.data-table td {
    padding: 14px var(--space-md);
    font-size: 0.9rem;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Screening Flow
   ============================================ */
.screening-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.screening-progress .progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-100);
    transition: all var(--transition-fast);
}

.screening-progress .progress-dot.active {
    background: var(--teal-400);
    transform: scale(1.3);
}

.screening-progress .progress-dot.completed {
    background: var(--teal-200);
}

.question-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.question-number {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal-400);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.question-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--teal-50);
    color: var(--teal-800);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

.question-nav {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    gap: var(--space-md);
}

/* ============================================
   Result Card
   ============================================ */
.result-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.result-header {
    padding: var(--space-2xl);
    text-align: center;
}

.result-header.risiko-rendah {
    background: linear-gradient(135deg, var(--risk-low-bg), #d4e8c4);
}

.result-header.risiko-sedang {
    background: linear-gradient(135deg, var(--risk-med-bg), #f5ddb8);
}

.result-header.risiko-tinggi {
    background: linear-gradient(135deg, var(--risk-high-bg), #f5c5c5);
}

.result-risk-level {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.result-header.risiko-rendah .result-risk-level {
    color: var(--risk-low-text);
}
.result-header.risiko-sedang .result-risk-level {
    color: var(--risk-med-text);
}
.result-header.risiko-tinggi .result-risk-level {
    color: var(--risk-high-text);
}

.result-body {
    padding: var(--space-2xl);
}

.result-detail {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

.result-detail:last-child {
    border-bottom: none;
}

.result-detail .label {
    color: var(--gray-400);
    font-weight: 500;
}

.result-detail .value {
    font-weight: 600;
    color: var(--gray-900);
}

.result-actions {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

/* ============================================
   Auth Pages
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--teal-50) 0%,
        var(--gray-50) 50%,
        var(--amber-50) 100%
    );
    padding: var(--space-lg);
}

.auth-split {
    min-height: calc(100vh - 80px);
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-split-left {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-400));
    color: white;
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-split-right {
    background: #fff;
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-card .auth-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--teal-400);
    margin-bottom: var(--space-sm);
}

.auth-card .auth-subtitle {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.auth-divider {
    text-align: center;
    margin: var(--space-lg) 0;
    color: var(--gray-400);
    font-size: 0.8rem;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--gray-100);
}

.auth-divider::before {
    left: 0;
}
.auth-divider::after {
    right: 0;
}

/* ============================================
   Disclaimer Box
   ============================================ */
.disclaimer-box {
    background: var(--amber-50);
    border: 1px solid var(--amber-100);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.disclaimer-box .disclaimer-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    color: var(--amber-800);
    margin-bottom: var(--space-sm);
}

.disclaimer-box p {
    font-size: 0.85rem;
    color: var(--amber-800);
    margin-bottom: 0;
}

/* ============================================
   Category Tabs
   ============================================ */
.category-tabs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.category-tab {
    padding: 8px 20px;
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.category-tab:hover,
.category-tab.active {
    background: var(--teal-400);
    border-color: var(--teal-400);
    color: white;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-xl) 0;
    list-style: none;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-400);
    background: white;
    border: 1px solid var(--gray-100);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background: var(--teal-400);
    border-color: var(--teal-400);
    color: white;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-100);
    margin-bottom: var(--space-lg);
}

.empty-state h3 {
    color: var(--gray-400);
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.empty-state p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-lg);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ============================================
   Utilities
   ============================================ */
.d-flex {
    display: flex;
}
.align-center {
    align-items: center;
}
.justify-between {
    justify-content: space-between;
}
.gap-sm {
    gap: var(--space-sm);
}
.gap-md {
    gap: var(--space-md);
}
.gap-lg {
    gap: var(--space-lg);
}
.flex-wrap {
    flex-wrap: wrap;
}

.fact-item {
    align-items: flex-start;
}

.fact-edit-form {
    width: 100%;
}

.fact-controls {
    min-width: 180px;
    flex-shrink: 0;
}

.fact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: flex-end;
    align-items: center;
}

.fact-delete-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.fact-delete-form .btn,
.fact-actions .btn {
    min-width: 112px;
}

@media (max-width: 700px) {
    .fact-item {
        align-items: stretch;
    }

    .fact-controls {
        width: 100%;
        min-width: auto;
    }

    .fact-actions {
        justify-content: flex-start;
    }
}

.mt-sm {
    margin-top: var(--space-sm);
}
.mt-md {
    margin-top: var(--space-md);
}
.mt-lg {
    margin-top: var(--space-lg);
}
.mt-xl {
    margin-top: var(--space-xl);
}
.mb-sm {
    margin-bottom: var(--space-sm);
}
.mb-md {
    margin-bottom: var(--space-md);
}
.mb-lg {
    margin-bottom: var(--space-lg);
}
.mb-xl {
    margin-bottom: var(--space-xl);
}

.w-100 {
    width: 100%;
}

/* Quill Editor Customization */
.ql-toolbar.ql-snow {
    border-color: var(--gray-100) !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.ql-container.ql-snow {
    border-color: var(--gray-100) !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    min-height: 200px;
    font-family: "Inter", sans-serif;
    font-size: 0.9rem;
}

/* ============================================
   Notification dot
   ============================================ */
.notification-dot {
    width: 8px;
    height: 8px;
    background: var(--amber-400);
    border-radius: 50%;
    display: inline-block;
    margin-left: var(--space-xs);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Print / PDF styles
   ============================================ */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    body {
        background: white;
    }
}
