/* APEL PUSKESWAN 2026 - Design System */
/* Color palette: Professional Indigo + Slate + semantic colors */

:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #EEF2FF;
    --secondary: #0EA5E9;
    --success: #10B981;
    --success-light: #D1FAE5;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.04);
    --radius: 10px;
    --container-max: 1320px;
    --section-gap: 32px;
    --card-gap: 24px;
    /* Typography */
    --font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-page-title: 700 2rem/1.3 var(--font-family);
    --font-section-title: 600 1.5rem/1.35 var(--font-family);
    --font-card-title: 600 1.15rem/1.4 var(--font-family);
    --font-subsection: 600 1rem/1.5 var(--font-family);
    --font-body: 400 0.95rem/1.6 var(--font-family);
    --font-small: 400 0.8rem/1.5 var(--font-family);
    --font-button: 600 0.9rem/1.4 var(--font-family);
    --font-caption: 400 0.85rem/1.5 var(--font-family);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== LOGO LAYOUT ==================== */
.logo-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.logo-pair img {
    height: auto;
    max-width: 100%;
    object-fit: contain;
}
.logo-pair .logo-apel { height: 100px; width: auto; }
.logo-pair .logo-tuah { height: 120px; width: auto; }

/* ==================== NAVBAR — redesigned ==================== */
.navbar {
    background: #FFFFFF;
    color: var(--gray-700);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    min-height: 70px;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* Brand / Logo area */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: 70px;
    margin-right: 28px;
}
.nav-brand-logos {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-brand-logos img {
    border-radius: 4px;
    object-fit: contain;
}
.nav-brand-logos .nav-logo-apel { height: 34px; width: auto; }
.nav-brand-logos .nav-logo-tuah { height: 40px; width: auto; }
.nav-brand-logos .nav-separator {
    width: 1px;
    height: 28px;
    background: var(--gray-200);
}
.nav-brand-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Main nav links container */
.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: flex-start;
    height: 70px;
}
.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
}
.nav-links a:hover {
    background: var(--gray-100);
    color: var(--primary);
}
.nav-links a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

/* Right-side group: profile + logout */
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
    height: 70px;
}
.nav-right a {
    color: var(--gray-600);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    letter-spacing: 0.01em;
}
.nav-right a:hover {
    background: var(--gray-100);
    color: var(--primary);
}
.nav-right a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}
.nav-right .nav-profile {
    font-weight: 600;
    color: var(--gray-700);
}
.nav-right .nav-logout {
    color: var(--danger);
    background: transparent;
}
.nav-right .nav-logout:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 8px;
    margin-left: auto;
    border-radius: 8px;
    line-height: 1;
}
.nav-toggle:hover {
    background: var(--gray-100);
}

/* ==================== RESPONSIVE NAV ==================== */
@media (max-width: 900px) {
    /* ── HEADER MOBILE: satu baris ☰ kiri · YANDIK tengah · 🔑 kanan (center vertikal) ── */
    .navbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: 64px;
        align-items: center;
        justify-items: stretch;
        height: 64px;
        min-height: 64px;
        padding: 0 12px;
        gap: 0;
        flex-wrap: nowrap;
    }
    .nav-brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 0;
        display: flex;
        align-items: center;
        flex: none;
    }
    .nav-brand-logos { display: none; }
    .nav-brand-text-group { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
    .nav-brand-text { font-size: 1rem; }
    .nav-brand-sub { display: none; }
    .nav-toggle {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        align-self: center;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        margin: 0;
        order: 0;
    }
    .nav-right {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: center;
        display: flex;
        flex-direction: row;
        width: auto;
        padding: 0;
        gap: 6px;
        border: none;
        margin: 0;
        order: 0;
    }
    .nav-right a {
        flex: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        padding: 0 14px;
        text-align: center;
        font-size: 0.78rem;
        white-space: nowrap;
        border-radius: 8px;
    }
    .nav-links {
        grid-column: 1 / -1;
        grid-row: 2;
        display: none;
        flex-direction: column;
        width: 100%;
        height: auto;
        padding: 8px 0 12px;
        gap: 2px;
        border-top: 1px solid var(--gray-100);
        order: 0;
    }
    .nav-links a {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    /* When toggle is active */
    .navbar.nav-open .nav-links {
        display: flex;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .navbar.nav-open .nav-toggle {
        color: var(--primary);
    }
    /* Mobile dropdown: click instead of hover */
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 16px;
        min-width: auto;
        display: none;
    }
    .nav-dropdown:hover .nav-dropdown-menu,
    .nav-dropdown:focus-within .nav-dropdown-menu {
        display: block;
    }
    .nav-dropdown-group-title { color: var(--gray-500); font-size: 0.75rem; padding: 6px 16px 2px; }
    .nav-dropdown-group a { color: var(--gray-500) !important; padding: 8px 16px 8px 32px !important; font-size: 0.85rem !important; }
    .nav-dropdown-group a:hover { background: var(--gray-100); color: var(--primary) !important; }
    .nav-dropdown-divider { background: var(--gray-100); margin: 8px 16px; }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 12px;
    }
    .nav-brand {
        gap: 8px;
    }
    .nav-brand-logos .nav-logo-apel { height: 26px; }
    .nav-brand-logos .nav-logo-tuah { height: 26px; }
    .nav-brand-text { font-size: 0.85rem; }
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 28px 24px;
    width: 100%;
}

h1 {
    color: var(--gray-800);
    margin-bottom: 24px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
h2 {
    color: var(--gray-700);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
h3 {
    color: var(--gray-800);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}
h4 {
    color: var(--gray-700);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    text-align: center;
    padding: 52px 24px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #818CF8 100%);
    border-radius: 16px;
    margin-bottom: var(--section-gap);
    color: white;
    overflow: hidden;
}

/* Subtle dot-grid pattern overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.2' fill='white'/%3E%3Ccircle cx='0' cy='0' r='1.2' fill='white'/%3E%3Ccircle cx='60' cy='0' r='1.2' fill='white'/%3E%3Ccircle cx='0' cy='60' r='1.2' fill='white'/%3E%3Ccircle cx='60' cy='60' r='1.2' fill='white'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.05;
    pointer-events: none;
}

/* Decorative abstract shapes */
.hero-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.hero-deco-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 65%);
    top: -120px;
    right: -80px;
}
.hero-deco-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 65%);
    bottom: -100px;
    left: -60px;
}

/* Content wrapper */
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

/* Logos */
.hero-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.hero-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-logo-apel {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}
.hero-logo-tuah {
    height: 95px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Title */
.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: white;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* Subtitle */
.hero-subtitle {
    color: rgba(255,255,255,0.88);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ==================== AUTH PAGES — layout only ==================== */
.auth-body {
    background: linear-gradient(135deg, #4F46E5, #6366F1);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.auth-container { width: 100%; max-width: 440px; }
.auth-card {
    background: white;
    padding: 40px 36px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}
/* Auth page logo */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 3rem;
}
.auth-logo img { object-fit: contain; }
.auth-logo .logo-apel { height: 70px; width: auto; }
.auth-logo .logo-tuah { height: 90px; width: auto; }
.auth-logo .logo-separator {
    width: 1px;
    height: 60px;
    background: var(--gray-200);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 8px; color: var(--primary); font-weight: 700; letter-spacing: -0.01em; }
.auth-subtitle { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 28px; line-height: 1.6; }
.auth-card .form-group { text-align: left; margin-bottom: 20px; }
.auth-card label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--gray-600); letter-spacing: 0.01em; }
.auth-card input, .auth-card select {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px;
    font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #FFFFFF; color: var(--gray-800);
}
.auth-card input:focus, .auth-card select:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}
.auth-link { margin-top: 24px; color: var(--gray-500); font-size: 0.85rem; }
.auth-link a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 24px 0; color: var(--gray-500); font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.auth-divider::before, .auth-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--gray-200);
}

/* ==================== CARD GRID ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--card-gap);
    margin-bottom: var(--section-gap);
}
.card {
    background: white;
    padding: 36px 30px 32px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--gray-700);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Colored accent strip at top */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--primary);
    transition: height 0.25s ease;
}
.card-primary::before { background: var(--primary); }
.card-success::before { background: var(--success); }
.card-info::before { background: var(--info); }
/* Subtle shine overlay */
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, transparent 50%);
    pointer-events: none;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
}
.card:hover::before {
    height: 6px;
}
/* ==================== ICONS ==================== */
/* Consistent emoji sizing and alignment */
.icon,
h1 em,
h2 em,
h3 em,
h4 em,
.btn em,
.btn:not(.btn-sm) .btn-icon,
.nav-profile::before,
.nav-logout::before {
    font-style: normal;
    display: inline-block;
}
/* Emoji in headings */
h1 .emoji,
h1:first-letter when(h1 starts with emoji),
h2 .emoji {
    font-size: 1.2em;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
    display: inline-block;
}
/* Nav icons */
.nav-profile,
.nav-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Card icon — already has container, just refine */
.card-icon {
    font-size: 1.5rem;
    margin-bottom: 20px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--gray-50);
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
    line-height: 1;
}
.card:hover .card-icon {
    background: var(--primary-light);
    transform: scale(1.05);
}
.card-primary:hover .card-icon { background: var(--primary-light); }
.card-success:hover .card-icon { background: #ECFDF5; }
.card-info:hover .card-icon { background: var(--info-light); }

/* Stat icon — already has container, just refine */
.stat-icon {
    font-size: 1.3rem;
    margin-bottom: 14px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--gray-50);
    transition: all 0.25s ease;
    position: relative;
    z-index: 1;
    line-height: 1;
}
.stat-card:hover .stat-icon {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Champion trophy */
.champion-trophy {
    font-size: 3.5rem;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
}

/* Medal icons in tables */
.medal-icon {
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
}

/* Button icons */
.btn-icon {
    font-size: 1.1em;
    line-height: 1;
    vertical-align: middle;
    margin-right: 2px;
}
.btn-sm .btn-icon {
    font-size: 1em;
}
.card h3 {
    margin-bottom: 10px;
    color: var(--gray-800);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}
.card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 280px;
}

/* ==================== INFO SECTION ==================== */
.info-section {
    background: white; border-radius: 16px; padding: 28px;
    margin-bottom: var(--section-gap); box-shadow: var(--shadow);
}
.info-section h2 { color: var(--gray-800); }

/* ==================== KATEGORI ==================== */
.kategori-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.indikator-card {
    border-radius: 8px; padding: 16px;
    border-left: 4px solid var(--primary); position: relative;
}
.indikator-card h4 { margin-bottom: 4px; font-size: 0.9rem; color: white; font-weight: 600; line-height: 1.4; }
.indikator-card small { color: rgba(255,255,255,0.85); font-size: 0.8rem; }
.kategori-badge {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 0.75rem; font-weight: 600; margin-bottom: 6px; color: white;
}
.kategori-keswan { background: var(--primary); }
.kategori-reproduksi { background: var(--info); }
.kategori-kesmavet { background: var(--success); }
.kategori-surveilans { background: var(--warning); }
.kategori-penyuluhan { background: #F97316; }
.bobot-badge {
    display: inline-block; margin-top: 6px; padding: 2px 8px;
    background: var(--warning-light); color: #744210;
    border-radius: 4px; font-size: 0.75rem; font-weight: 600;
}

/* ==================== RULES ==================== */
.rules-box ul { list-style: none; padding: 0; }
.rules-box li {
    padding: 12px 0; border-bottom: 1px solid var(--gray-100);
    padding-left: 28px; position: relative; color: var(--gray-700); font-size: 0.9rem;
    line-height: 1.6;
}
.rules-box li:last-child { border-bottom: none; }
.rules-box li::before {
    content: '▸'; color: var(--primary); position: absolute; left: 8px; font-weight: bold;
}

/* ==================== TABLES ==================== */
.puskeswan-table,
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
thead {
    position: sticky;
    top: 0;
    z-index: 5;
}
th {
    background: var(--gray-800);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: none;
    vertical-align: middle;
}
tbody tr {
    transition: background-color 0.15s ease;
}
tbody tr:nth-child(even) {
    background: var(--gray-50);
}
tbody tr:hover {
    background: var(--primary-light);
}
tbody tr:last-child td {
    border-bottom: none;
}
/* Border separator between rows */
tbody tr td {
    border-bottom: 1px solid var(--gray-100);
}
tbody tr:last-child td {
    border-bottom: none;
}
/* Header border separator */
thead tr th {
    border-bottom: 2px solid var(--primary);
}

/* ==================== INFO BANNER ==================== */
.info-banner {
    background: var(--info-light);
    border-left: 4px solid var(--info);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #1E40AF;
}

/* ==================== FORM ==================== */
.form-container {
    background: white; border-radius: 16px; padding: 40px; box-shadow: var(--shadow);
}
.form-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.form-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid var(--primary);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}
.form-group {
    margin-bottom: 20px;
}
.form-group:last-child {
    margin-bottom: 0;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    letter-spacing: 0.01em;
}
/* Required asterisk */
.required {
    color: var(--danger);
    font-weight: 700;
    margin-left: 2px;
}

/* Readonly field */
.readonly-input {
    background: var(--gray-50);
    color: var(--gray-500);
    border-color: var(--gray-200);
    cursor: default;
}

/* Placeholder styling */
input::placeholder,
select::placeholder,
textarea::placeholder {
    color: var(--gray-400);
    font-weight: 400;
    opacity: 1;
}

/* Helper text below inputs */
.form-hint,
.input-group small {
    display: block;
    margin-top: 6px;
    color: var(--gray-400);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Input error state */
input.input-error,
select.input-error,
textarea.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}
input.input-error:focus,
select.input-error:focus,
textarea.input-error:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-light);
}

/* Validation message */
.form-error-msg {
    display: block;
    margin-top: 6px;
    color: var(--danger);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}
.form-success-msg {
    display: block;
    margin-top: 6px;
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Inputs */
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 400;
    color: var(--gray-800);
    background: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    min-height: 48px;
}
input:hover, select:hover, textarea:hover {
    border-color: var(--gray-400);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
input:disabled, select:disabled, textarea:disabled {
    background: var(--gray-50);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
}
textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    padding: 14px;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Checkbox & Radio */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    vertical-align: middle;
    margin: 0;
}
input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: var(--gray-400);
}
input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
input[type="radio"] {
    border-radius: 50%;
}
input[type="radio"]:checked {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='white'%3E%3Ccircle cx='12' cy='12' r='8'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Date / DateTime */
input[type="date"],
input[type="datetime-local"] {
    min-height: 48px;
    position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    padding: 4px;
    cursor: pointer;
    opacity: 0.5;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.indikator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.input-group {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 10px 10px 12px;
    border: 1px solid var(--gray-200);
    transition: border-color 0.2s ease;
}
.input-group:hover {
    border-color: var(--gray-300);
}
.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--gray-600);
    line-height: 1.4;
}
.input-group input {
    padding: 8px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    min-height: 44px;
}
.input-group small { display: block; margin-top: 4px; color: var(--gray-500); font-size: 0.75rem; }
.input-group input[readonly], .input-group-primary input[readonly] {
    background: #E2E8F0 !important;
    color: #64748B !important;
    cursor: not-allowed;
    border-color: #CBD5E1 !important;
    opacity: 0.8;
    font-weight: 600 !important;
}
.bobot-tag {
    display: inline-block; margin-left: 6px; padding: 1px 6px;
    background: var(--warning-light); color: #92400E;
    border-radius: 4px; font-size: 0.7rem;
}

/* ==================== UPLOAD ==================== */
.upload-area { margin-top: 10px; }
.upload-btn {
    display: inline-block; padding: 8px 16px; background: var(--gray-100);
    border: 1.5px dashed var(--gray-300); border-radius: 8px; cursor: pointer;
    font-size: 0.85rem; color: var(--gray-600); transition: all 0.2s;
    font-weight: 500;
}
.upload-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.file-list { margin-top: 6px; }
.file-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 8px; background: var(--info-light); border-radius: 4px;
    margin-top: 4px; font-size: 0.75rem;
}
.file-remove { cursor: pointer; color: var(--danger); font-weight: bold; }

/* ==================== SUB-CARD SYSTEM ==================== */
.input-group-primary {
    background: white; border-radius: 10px; padding: 16px 14px;
    border: 2px solid var(--primary);
    box-shadow: 0 1px 3px rgba(79,70,229,0.1);
    text-align: center;
    grid-column: 1 / -1;
}
.input-group-primary label {
    display: block; font-size: 0.85rem; font-weight: 700;
    color: var(--primary); margin-bottom: 6px; letter-spacing: 0.02em;
}
.input-group-primary input {
    padding: 10px 12px; font-size: 1.6rem; font-weight: 800;
    text-align: center; min-height: 56px; border-radius: 8px;
    background: var(--primary-light); color: var(--primary);
    border: 1px solid var(--primary); cursor: default;
}
.input-group-primary .upload-area { margin-top: 10px; }
.input-group-primary small {
    display: block; margin-top: 6px; color: var(--gray-400); font-size: 0.75rem;
}
.sub-grid-inline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 10px 0 6px;
}
.sub-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sub-grid-inline .sub-card {
    padding: 8px 10px;
    border-radius: 8px;
}
.sub-grid-inline .sub-card label {
    font-size: 0.72rem;
    margin-bottom: 5px;
}
.sub-grid-inline .sub-card input {
    font-size: 0.9rem;
    padding: 6px;
    min-height: 30px;
}
.sub-grid-inline .sub-card small {
    font-size: 0.68rem;
}
@media (max-width: 600px) {
    .sub-grid-inline, .sub-grid-3 { grid-template-columns: 1fr; }
}
.sub-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 8px; grid-column: 1 / -1;
}
.sub-card {
    border-radius: 8px; padding: 8px 8px 10px;
    border: 1.5px solid; transition: all 0.2s ease;
}
.sub-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.sub-card label {
    display: block; font-size: 0.72rem; font-weight: 600;
    margin-bottom: 8px; letter-spacing: 0.01em; line-height: 1.3;
}
.sub-card input {
    width: 100%; padding: 6px; font-size: 0.9rem; font-weight: 700;
    text-align: center; min-height: 32px;
    border: 1.5px solid var(--gray-300); border-radius: 8px;
    font-family: inherit; background: white; color: var(--gray-800);
    transition: border-color 0.2s ease; font-variant-numeric: tabular-nums;
}
.sub-card input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.sub-card small {
    display: block; margin-top: 4px;
    font-size: 0.68rem; color: var(--gray-400); line-height: 1.3;
}
/* Sub-card color themes */
.sub-rabies { background: #EFF6FF; border-color: #93C5FD; }
.sub-rabies label { color: #1D4ED8; }
.sub-pmk { background: #F0FDF4; border-color: #86EFAC; }
.sub-pmk label { color: #15803D; }
.sub-lsd { background: #FEFCE8; border-color: #FDE047; }
.sub-lsd label { color: #A16207; }
.sub-jembrana { background: #FAF5FF; border-color: #C4B5FD; }
.sub-jembrana label { color: #7E22CE; }
.sub-se { background: #FFF7ED; border-color: #FDBA74; }
.sub-se label { color: #C2410C; }
.sub-unggas { background: #F0FDFA; border-color: #5EEAD4; }
.sub-unggas label { color: #0F766E; }
.sub-individu { background: #F0FDF4; border-color: #86EFAC; }
.sub-individu label { color: #15803D; }
.sub-kelompok { background: #EFF6FF; border-color: #93C5FD; }
.sub-kelompok label { color: #1D4ED8; }
.sub-pelaku { background: #FAF5FF; border-color: #C4B5FD; }
.sub-pelaku label { color: #7E22CE; }
.sub-pengawasan { background: #F0FDF4; border-color: #86EFAC; }
.sub-pengawasan label { color: #15803D; }
.sub-hewan_kurban { background: #FFF7ED; border-color: #FDBA74; }
.sub-hewan_kurban label { color: #C2410C; }
@media (max-width: 900px) { .sub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sub-grid { grid-template-columns: 1fr; } }
/* ==================== PLATFORM ==================== */
.badge-comingsoon {
    display: inline-block; font-size: 0.55rem; font-weight: 700;
    background: #FEF3C7; color: #92400E; padding: 1px 6px;
    border-radius: 8px; vertical-align: super; line-height: 1.4;
    text-transform: uppercase; letter-spacing: 0.03em;
}
.platform-nav .nav-links a sup { margin-left: 2px; }
.platform-nav .nav-links a {
    font-size: 0.82rem; padding: 6px 10px;
}

/* ==================== TOTAL BOX ==================== */
.total-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; padding: 24px; border-radius: 16px;
    display: flex; justify-content: center; align-items: center;
    margin: 24px 0; font-size: 1.1rem; gap: 12px;
}
.total-box strong { font-size: 2rem; margin-left: 8px; }

/* ==================== BUTTONS ==================== */
.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
    user-select: none;
}
.btn:active {
    transform: scale(0.97);
}
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Primary */
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

/* Secondary (outline style) */
.btn-secondary {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
}
.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-700);
}

/* Info */
.btn-info {
    background: var(--info);
    color: white;
}
.btn-info:hover {
    background: #2563EB;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* Warning */
.btn-warning {
    background: var(--warning);
    color: white;
}
.btn-warning:hover {
    background: #D97706;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}

/* Success */
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

/* Danger */
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* Small variant */
.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Block (full width) */
.btn-block {
    width: 100%;
    padding: 14px 28px;
    margin-top: 8px;
}

/* Sign-up outline button (auth page) */
.btn-signup {
    background: transparent;
    color: #4F46E5;
    border: 2px solid #4F46E5;
    padding: 12px 28px;
    border-radius: 10px;
}
.btn-signup:hover {
    background: rgba(79,70,229,0.08);
    border-color: #4338CA;
}

/* ==================== ALERT ==================== */
.alert {
    padding: 16px 20px 16px 52px;
    border-radius: 10px;
    margin: 24px 0;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    border-left: 4px solid transparent;
}
.alert::before {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}
.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border-left-color: var(--success);
}
.alert-success::before {
    content: '✅';
}
.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border-left-color: var(--danger);
}
.alert-error::before {
    content: '❌';
}

/* ==================== LOADING SPINNER ==================== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.loading::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== NO DATA / EMPTY STATE ==================== */
.no-data {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.6;
    position: relative;
}
.no-data::before {
    content: '📋';
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ==================== HINT ==================== */
.hint {
    font-size: 0.85rem;
    color: var(--gray-400);
    margin-bottom: 16px;
    line-height: 1.6;
    padding-left: 14px;
    border-left: 3px solid var(--gray-200);
}

/* ==================== TOP 5 PER BULAN ==================== */
.top5-table {
    border-collapse: collapse;
}
.top5-table th,
.top5-table td {
    padding: 12px 14px;
    font-size: 0.8rem;
    vertical-align: top;
    border: 1px solid var(--gray-200);
}
.top5-table th {
    background: var(--gray-800);
    color: white;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}
.top5-table .bulan-cell {
    font-weight: 700;
    background: var(--gray-100);
    text-align: center;
    white-space: nowrap;
    color: var(--gray-700);
}
.top5-cell {
    min-width: 140px;
}
.top5-name { font-weight: 600; font-size: 0.82rem; }
.top5-kab { font-size: 0.72rem; color: var(--gray-500); }
.top5-val { font-weight: 700; color: var(--primary); font-size: 0.8rem; margin-top: 2px; }

/* ==================== CHAMPION ==================== */
.champion-panel { padding: 0; overflow: hidden; margin-bottom: var(--section-gap); }
.champion-banner {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 36px 32px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.champion-banner h2 { color: white; font-size: 1rem; margin-bottom: 4px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; }
.champion-name { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.02em; }
.champion-detail { font-size: 0.95rem; opacity: 0.9; }

/* ==================== DASHBOARD ==================== */
.filter-bar {
    background: white; padding: 18px 24px; border-radius: 16px;
    margin-bottom: var(--section-gap); display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow);
    flex-wrap: wrap;
}
.filter-bar label { font-weight: 600; font-size: 0.85rem; color: var(--gray-600); letter-spacing: 0.01em; }
.filter-bar select {
    width: auto;
    min-width: 120px;
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    background-color: white;
}
.filter-bar { gap: 10px; padding: 12px 18px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--card-gap);
    margin-bottom: var(--section-gap);
}
.stat-card {
    background: white;
    padding: 24px 20px 22px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
}
/* Colored top accent */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}
/* Value — numeric */
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
/* Value — for text labels (champion name, kabupaten) */
.stat-value-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.3;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
/* Label */
.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--card-gap);
    margin-bottom: var(--section-gap);
}

.panel {
    background: white; border-radius: 16px; padding: 28px;
    margin-bottom: var(--section-gap); box-shadow: var(--shadow);
}
.table-wrap { overflow-x: auto; }

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 16px;
    font-size: 0.85rem;
}
.leaderboard-table th {
    background: var(--gray-800);
    color: white;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.rank-cell { text-align: center; font-weight: 700; font-size: 1rem; }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gray-800); }
.rank-1 { background: #FEF3C7 !important; }
.rank-2 { background: #FFFBEB !important; }
.rank-3 { background: #FFEDD5 !important; }

/* ==================== CHARTS ==================== */
.chart-container { position: relative; height: 340px; width: 100%; padding: 4px 0; }

/* ==================== CHECKLIST ==================== */
.checklist-table th,
.checklist-table td { padding: 10px 12px; font-size: 0.8rem; text-align: center; }
.checklist-table th {
    background: var(--gray-800);
    color: white;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: center;
}
.checklist-table .pw-name { text-align: left; font-size: 0.8rem; white-space: nowrap; }
.check-ok { background: var(--success-light) !important; }
.check-no { background: var(--danger-light) !important; }

/* ==================== BAR CHART ==================== */
.bar-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.bar-label { width: 200px; font-size: 0.85rem; text-align: right; flex-shrink: 0; }
.bar-track { flex: 1; background: var(--gray-100); border-radius: 4px; height: 24px; overflow: hidden; }
.bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--info));
    height: 100%; border-radius: 4px; transition: width 0.5s ease;
}
.bar-value { width: 60px; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ==================== NOTIFIKASI ==================== */
.notif-bar {
    margin-bottom: var(--section-gap); border-radius: 16px; overflow: hidden;
}
.notif-item {
    padding: 14px 20px; margin-bottom: 2px; font-size: 0.9rem;
}
.notif-item.urgent { background: var(--danger-light); color: #991B1B; }
.notif-item.reminder { background: var(--warning-light); color: #92400E; }

/* ==================== VERIFIKASI ==================== */
.verifikasi-grid { display: grid; gap: 18px; }
.verifikasi-card {
    background: white; border-radius: 16px; padding: 24px;
    box-shadow: var(--shadow); border-left: 4px solid var(--warning);
}
.verifikasi-card.verified { border-left-color: var(--success); }
.verifikasi-card.rejected { border-left-color: var(--danger); }
.verifikasi-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 16px; gap: 12px; }
.verifikasi-header h3 { font-size: 1.1rem; color: var(--gray-800); font-weight: 600; line-height: 1.4; }
.status-badge {
    padding: 4px 14px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    white-space: nowrap;
}
.status-pending { background: var(--warning-light); color: #92400E; }
.status-verified { background: var(--success-light); color: #065F46; }
.status-rejected { background: var(--danger-light); color: #991B1B; }
.verifikasi-info { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 16px; line-height: 1.6; }
.verifikasi-info p { margin-bottom: 6px; }
.verifikasi-stats {
    display: flex; gap: 24px; padding: 14px; background: var(--gray-50);
    border-radius: 8px; margin-bottom: 16px; font-size: 0.85rem;
}
.verifikasi-details { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 16px; line-height: 1.6; }
.verifikasi-catatan { font-size: 0.85rem; color: var(--gray-500); font-style: italic; margin-bottom: 12px; line-height: 1.6; }
.verifikasi-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==================== PROFILE ==================== */
.profile-card {
    background: white; border-radius: 16px; padding: 36px; box-shadow: var(--shadow);
    max-width: 720px;
}
.profile-header { display: flex; align-items: center; gap: 24px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--gray-200); }
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; font-size: 2rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.profile-header h2 { margin-bottom: 4px; }
.profile-role {
    display: inline-block; padding: 2px 10px; background: var(--primary-light);
    color: var(--primary-dark); border-radius: 4px; font-size: 0.75rem; font-weight: 600;
}
.profile-info { margin-bottom: 28px; }
.profile-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--gray-100);
    gap: 16px;
}
.profile-item:last-child { border-bottom: none; }
.profile-item label { font-weight: 600; color: var(--gray-500); font-size: 0.85rem; flex-shrink: 0; letter-spacing: 0.01em; }
.profile-item span { color: var(--gray-700); text-align: right; word-break: break-word; font-size: 0.9rem; }
.profile-stats { margin-top: 28px; }
.profile-stats h3 { margin-bottom: 20px; }

/* ==================== FOOTER ==================== */
footer {
    background: var(--gray-800);
    color: var(--gray-300);
    font-size: 0.85rem;
    margin-top: 48px;
    padding: 0;
}
.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding: 48px 0 40px;
}
.footer-col h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}
.footer-col p {
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: 6px;
    font-size: 0.85rem;
}
.footer-col a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    line-height: 2;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}
.footer-col a:hover {
    color: white;
}

/* Footer logo area */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.footer-logo-apel {
    height: 34px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}
.footer-logo-tuah {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}
.footer-separator {
    width: 1px;
    height: 28px;
    background: var(--gray-600);
}
.footer-brand h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.footer-brand p {
    font-size: 0.82rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Bottom bar */
.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px 0 28px;
    }
    footer {
        margin-top: 32px;
    }
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-box {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
/* Modal scrollbar style */
.modal-box::-webkit-scrollbar {
    width: 6px;
}
.modal-box::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
.modal-box::-webkit-scrollbar-track {
    background: transparent;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px 0;
}
.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.4;
    margin: 0;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-top: 2px;
    line-height: 1;
}
.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Modal Body */
.modal-body {
    padding: 20px 28px 0;
}
.modal-info {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 3px solid var(--primary-light);
}
.modal-info p {
    margin-bottom: 4px;
    color: var(--gray-600);
}
.modal-info p:last-child {
    margin-bottom: 0;
}
.modal-info strong {
    color: var(--gray-700);
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 28px 24px;
    border-top: 1px solid var(--gray-100);
    margin-top: 20px;
}
.modal-footer .btn {
    min-width: 100px;
}

/* ==================== DATA SAYA ==================== */
.data-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border-left: 4px solid var(--primary);
    transition: all 0.2s ease;
}
.data-card:hover {
    box-shadow: var(--shadow-lg);
}
.data-card.pending { border-left-color: var(--warning); }
.data-card.verified { border-left-color: var(--success); }
.data-card.rejected { border-left-color: var(--danger); }

/* Card header row */
.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
    flex-wrap: wrap;
}
.data-card-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    letter-spacing: 0.03em;
}
.data-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Card body grid */
.data-card-body {
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 28px;
}
.data-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.data-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.data-field-value {
    font-size: 0.88rem;
    color: var(--gray-700);
    font-weight: 500;
}
.data-field-value strong {
    font-weight: 700;
    color: var(--gray-800);
}

/* Indicators section */
.data-indikator-section {
    padding: 0 24px 20px;
    border-top: 1px solid var(--gray-100);
    padding-top: 16px;
}
.data-indikator-section summary {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}
.data-indikator-section summary:hover {
    color: var(--primary);
}
.indikator-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.indikator-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
}

/* Card action footer */
.data-card-footer {
    display: flex;
    gap: 8px;
    padding: 14px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
    flex-wrap: wrap;
}
.data-card-footer .btn-sm {
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 8px;
}

/* Status badge refinement */
.data-card .status-badge {
    font-size: 0.7rem;
    padding: 3px 12px;
}

/* Filter search box */
.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.filter-search input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    background: white;
    color: var(--gray-800);
    transition: border-color 0.2s ease;
}
.filter-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.filter-search::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.5;
    pointer-events: none;
}

/* ==================== MOBILE — layout only ==================== */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }
    .nav-brand { font-size: 1rem; width: 100%; justify-content: center; }
    .nav-links {
        justify-content: center;
        gap: 4px;
        width: 100%;
    }
    .nav-links a {
        margin: 0;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .container {
        padding: 20px 16px;
    }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .indikator-grid { grid-template-columns: 1fr 1fr; }
    .kategori-grid { grid-template-columns: 1fr; }
    .bar-label { width: 100px; font-size: 0.75rem; }
    h1 { font-size: 1.5rem; }
    .hero {
        padding: 40px 20px;
        min-height: 240px;
        border-radius: 12px;
    }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-logo-apel { height: 65px; }
    .hero-logo-tuah { height: 75px; }
    .hero-logos { gap: 24px; margin-bottom: 20px; }
    h2 { font-size: 1.25rem; }
    .total-box { flex-direction: column; gap: 8px; text-align: center; }
    .form-container { padding: 28px 24px; }
    .auth-card { padding: 32px 24px; }
    .chart-container { height: 280px; }
    .verifikasi-actions { flex-direction: column; }
    .profile-header { flex-direction: column; text-align: center; }
    .profile-item { flex-direction: column; align-items: flex-start; gap: 4px; }
    .profile-item span { text-align: left; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .card-grid { grid-template-columns: 1fr; gap: 18px; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar select { width: 100%; min-width: unset; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
    .container { padding: 16px 12px; }
    .navbar { padding: 10px 12px; }
    .auth-card { padding: 24px 16px; }
    .indikator-grid { grid-template-columns: 1fr; }
    .card { padding: 28px 22px 26px; }
    .stat-card { padding: 20px 16px 18px; }
    .stat-value { font-size: 1.4rem; }
    .hero {
        padding: 32px 16px;
        min-height: 200px;
        border-radius: 10px;
    }
    .hero-title { font-size: 1.3rem; }
    .hero-subtitle { font-size: 0.85rem; }
    .hero-logo-apel { height: 55px; }
    .hero-logo-tuah { height: 65px; }
    .hero-logos { gap: 20px; margin-bottom: 16px; }
    h1 { font-size: 1.3rem; }
    h2 { font-size: 1.1rem; }
}

/* ── YANDIK PLATFORM REBRANDING ── */
.nav-brand-text-group { display: flex; flex-direction: column; line-height: 1.2; }
.nav-brand-text { font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; color: var(--gray-800); }
.nav-brand-sub { font-size: 0.6rem; font-weight: 400; color: var(--gray-500); letter-spacing: 0.3px; }
.hero-instansi { font-size: 0.85rem; color: var(--gray-400); margin-top: 8px; font-weight: 400; }
.card-grid-yandik { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 40px 0; }
.yandik-card { background: white; border-radius: 20px; padding: 32px 28px; border: 1px solid var(--gray-200); text-decoration: none; color: inherit; transition: all 0.25s ease; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.yandik-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.yandik-card-active::before { background: linear-gradient(90deg, #4F46E5, #6366F1); }
.yandik-card-dev::before { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.yandik-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); border-color: var(--primary); }
.yandik-card-icon { font-size: 2.8rem; margin-bottom: 16px; }
.yandik-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.yandik-card p { font-size: 0.85rem; color: var(--gray-500); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.yandik-card-status { margin-bottom: 16px; }
.status-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-aktif { background: #D1FAE5; color: #065F46; }
.status-dev { background: #FEF3C7; color: #92400E; }
.yandik-card-action { font-size: 0.85rem; font-weight: 600; color: var(--primary); padding-top: 12px; border-top: 1px solid var(--gray-100); }
.layanan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.layanan-item { background: white; border-radius: 16px; padding: 24px; border: 1px solid var(--gray-200); text-align: center; }
.layanan-icon { font-size: 2rem; margin-bottom: 12px; }
.layanan-item h4 { font-size: 0.95rem; font-weight: 600; color: var(--gray-800); margin-bottom: 4px; }
.layanan-item p { font-size: 0.78rem; color: var(--gray-500); }
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; padding: 8px 14px !important; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 320px; background: white; border-radius: 16px; box-shadow: 0 12px 48px rgba(0,0,0,0.12); border: 1px solid var(--gray-200); padding: 12px 0; z-index: 1000; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-group { padding: 4px 0; }
.nav-dropdown-group-title { padding: 8px 20px 4px; font-size: 0.8rem; font-weight: 700; color: var(--gray-700); display: flex; align-items: center; gap: 8px; }
.nav-dropdown-group a { display: block !important; padding: 6px 20px 6px 36px !important; font-size: 0.82rem !important; color: var(--gray-500) !important; font-weight: 400 !important; }
.nav-dropdown-group a:hover { background: var(--gray-50); color: var(--primary) !important; }
.nav-dropdown-divider { height: 1px; background: var(--gray-100); margin: 4px 16px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.62rem; font-weight: 600; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-dev { background: #FEF3C7; color: #92400E; }
@media (max-width: 900px) {
    .nav-dropdown-menu { position: static; box-shadow: none; border: none; background: transparent; padding: 0 0 0 16px; min-width: auto; }
    .nav-dropdown-group-title { color: var(--gray-300); font-size: 0.75rem; }
    .nav-dropdown-group a { color: var(--gray-400) !important; }
    .nav-dropdown-group a:hover { color: white !important; background: rgba(255,255,255,0.05); }
    .nav-dropdown-divider { background: rgba(255,255,255,0.1); }
    .card-grid-yandik { grid-template-columns: 1fr; }
}


/* ── MOBILE FIX: NAVBAR + HERO ── */
@media (max-width: 900px) {
    /* Navbar - fix hamburger and spacing */
    .navbar { padding: 0 12px; min-height: 56px; }
    .nav-brand { height: 56px; gap: 8px; }
    .nav-brand-logos .nav-logo-apel { height: 26px; }
    .nav-brand-logos .nav-logo-tuah { height: 32px; }
    .nav-brand-text { font-size: 0.85rem; }
    .nav-brand-sub { font-size: 0.6rem; }
    .nav-toggle { font-size: 1.5rem; padding: 8px; }
    .nav-links { gap: 0; padding: 4px 0 12px; }
    .nav-links > a { font-size: 0.85rem; padding: 8px 14px; }
    .nav-dropdown-trigger { font-size: 0.85rem !important; padding: 8px 14px !important; }
    .nav-dropdown-group a { font-size: 0.8rem !important; padding: 6px 14px 6px 28px !important; }
    .nav-right a { font-size: 0.85rem; padding: 8px 12px; }
    
    /* Hero - compact for mobile */
    .hero-wrap { padding: 20px 0 0; }
    .hero-inner { flex-direction: column; text-align: center; padding: 0 16px 24px; gap: 16px; }
    .hero-logos { justify-content: center; margin-bottom: 12px; }
    .hero-logos img { height: 40px; }
    .hero-text h1 { font-size: 1.5rem; }
    .hero-text .sub { font-size: 0.85rem; }
    .hero-text .instansi { font-size: 0.7rem; }
    .hero-visual { display: none; }
    .stats-bar { justify-content: center; gap: 8px; padding: 12px 0; }
    .stat-pill { padding: 4px 12px 4px 10px; gap: 6px; }
    .stat-pill .num { font-size: 0.95rem; }
    .stat-pill .lbl { font-size: 0.65rem; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 1.2rem; }
    .hero-text .sub { font-size: 0.75rem; }
    .hero-logos img { height: 32px; }
    .stats-bar { flex-wrap: wrap; }
    .stat-pill { flex: 1 1 auto; min-width: 70px; justify-content: center; }
    .card-grid-yandik { grid-template-columns: 1fr; gap: 12px; }
    .yandik-card { padding: 20px 16px; }
    .yandik-card h3 { font-size: 0.95rem; }
    /* Section containers */
    .container { padding: 16px; }
    .section h2 { font-size: 1rem; }
    .layanan-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .layanan-item { padding: 16px 12px; }
    .rules-box { padding: 16px; font-size: 0.8rem; }
    /* Footer */
    footer { padding: 24px 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* Mobile dropdown: full overlay style */
@media (max-width: 900px) {
    .navbar.nav-open .nav-links {
        background: white;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 16px 48px rgba(0,0,0,0.15);
        padding: 8px 0 16px;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    .nav-dropdown-menu {
        background: #F8FAFC !important;
        border-radius: 12px !important;
        margin: 4px 12px !important;
        padding: 4px 0 !important;
    }
    .nav-dropdown-group-title {
        font-size: 0.72rem !important;
        color: #94A3B8 !important;
        padding: 8px 16px 4px !important;
    }
    .nav-dropdown-group a {
        font-size: 0.82rem !important;
        padding: 8px 16px 8px 28px !important;
    }
    .nav-dropdown-divider {
        margin: 4px 16px !important;
    }
    .nav-links > a, .nav-dropdown-trigger {
        font-size: 0.9rem !important;
        padding: 10px 16px !important;
    }
}

/* ── Page transition halus ── */
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.container, .data-page, .pusat-data-page, .md-page {
    animation: pageFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Kartu & panel muncul halus menyusul konten utama */
.panel, .stat-card, .form-container, .yandik-card, .data-card, .quick-item {
    animation: pageFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.05s;
}
/* Submenu accordion: buka/tutup lebih halus */
.sidebar-sub {
    transition: background 0.25s ease;
}

/* ── DASHBOARD MOBILE: font diperkecil 2 tingkat ── */
@media (max-width: 900px) {
    .container h1 { font-size: 1.1rem; }
    .stat-value { font-size: 1.2rem; }
    .stat-value-text { font-size: 0.74rem; }
    .stat-label { font-size: 0.62rem; }
    .stat-card { padding: 14px 10px 12px; }
    .panel h2 { font-size: 0.9rem; }
    .panel { padding: 14px 12px; }
    .top5-table, .leaderboard-table, .checklist-table, .detail-table { font-size: 0.68rem; }
    .top5-table th, .top5-table td, .leaderboard-table th, .leaderboard-table td { padding: 6px 6px; }
    .top5-name { font-size: 0.72rem; }
    .top5-kab { font-size: 0.6rem; }
    .top5-val { font-size: 0.72rem; }
    .filter-bar label { font-size: 0.72rem; }
    .filter-bar select { font-size: 0.72rem; padding: 5px 24px 5px 8px; min-width: 100px; }
    .champion-banner { padding: 12px 14px; }
    .champion-trophy { font-size: 1.6rem; }
    .num-cell, .rank-cell, .bulan-cell { font-size: 0.66rem; }
    .table-wrap { overflow-x: auto; }
}
