/* ==========================================================================
   MAS Kediri V5 — MASTER STYLESHEET "Blue Trust"
   Tema Blue Trust — biru kepercayaan + hijau solutif
   Menenangkan, profesional, solutif — untuk masyarakat dalam kepanikan paspor.
   
   Author: Senior UI/UX Developer
   Standard: WCAG 2.1 AA, Mobile-first, BAP-applicant friendly
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS — IDENTITAS BUMI PURA
   ========================================================================== */
:root {
    /* === MAS Kediri V5 — Blue Trust Palette === */
    /* Trust Blue (primary) */
    --navy-deep:      #0a2540;  /* deep navy untuk judul */
    --navy-main:      #0f3b6e;
    --navy-hover:     #1e5aa8;
    --navy-light:     #eff6ff;
    --navy-glow:      rgba(15, 59, 110, 0.12);

    /* Blue alias (mengganti gold lama, untuk kompatibilitas) */
    --gold-main:      #1e5aa8;  /* Trust Blue utama */
    --gold-hover:     #1d4ed8;
    --gold-light:     #dbeafe;
    --gold-soft:      #eff6ff;
    --gold-glow:      rgba(30, 90, 168, 0.20);

    /* Solution Green */
    --solution:       #10b981;
    --solution-bg:    #ecfdf5;
    --solution-light: #d1fae5;
    --solution-deep:  #047857;

    /* === Latar & Permukaan === */
    --bg-body:        #f4f7fb;  /* Light blue-tinted gray */
    --bg-card:        #ffffff;
    --bg-soft:        #f0f6fc;
    --bg-elevated:    #ffffff;

    /* === Semantik === */
    --success:        #10b981;
    --success-bg:     #ecfdf5;
    --success-soft:   #d1fae5;
    --warning:        #f59e0b;
    --warning-bg:     #fffbeb;
    --warning-soft:   #fef3c7;
    --danger:         #dc2626;
    --danger-bg:      #fef2f2;
    --danger-soft:    #fee2e2;
    --info:           #2563eb;
    --info-bg:        #eff6ff;

    /* === Teks === */
    --text-main:      #0f172a;
    --text-body:      #334155;
    --text-muted:     #64748b;
    --text-soft:      #94a3b8;

    /* === Border === */
    --border-color:   #e2e8f0;
    --border-soft:    #f1f5f9;
    --border-strong:  #cbd5e1;

    /* === Geometri === */
    --radius-xs:      6px;
    --radius-sm:      10px;
    --radius-md:      14px;
    --radius-lg:      20px;
    --radius-xl:      28px;
    --radius-pill:    9999px;

    /* === Shadow === */
    --shadow-xs:      0 1px 2px rgba(26, 29, 46, 0.04);
    --shadow-sm:      0 2px 6px rgba(26, 29, 46, 0.06);
    --shadow-md:      0 6px 16px rgba(26, 29, 46, 0.08);
    --shadow-lg:      0 14px 32px -8px rgba(26, 29, 46, 0.12);
    --shadow-float:   0 24px 48px -12px rgba(26, 29, 46, 0.18);
    --shadow-gold:    0 8px 24px rgba(30, 90, 168, 0.25);
    --shadow-navy:    0 8px 24px rgba(11, 28, 58, 0.22);

    /* === Timing === */
    --ease-spring:    cubic-bezier(.16, 1, .3, 1);
    --ease-smooth:    cubic-bezier(.4, 0, .2, 1);
    --transition:     all 0.3s var(--ease-smooth);

    /* === Layout === */
    --sidebar-w:      280px;
    --container-max:  1180px;

    /* === Font === */
    --font-sans:      'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif:     'Playfair Display', Georgia, serif;
    --font-mono:      'SFMono-Regular', Consolas, monospace;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 0;
}
body.bg-light { background-color: var(--bg-body) !important; }

button, input, textarea, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--navy-main); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-hover); }
img, svg { display: block; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

*:focus-visible {
    outline: 3px solid var(--gold-main);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================================================
   3. MOTIF LATAR — PASSPORT, AIRPLANE, GLOBE (pengganti batik kawung)
   ========================================================================== */
html::before {
    content: '';
    position: fixed; inset: 0; z-index: -3;
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%,    rgba(11, 28, 58, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 70% 60% at 100% 0%,  rgba(30, 90, 168, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 90% 60% at 50% 100%, rgba(11, 28, 58, 0.03) 0%, transparent 65%);
    pointer-events: none;
}
html::after {
    content: '';
    position: fixed; inset: -10% 0; z-index: -2;
    pointer-events: none; opacity: 0.05;
    background-repeat: no-repeat;
    background-size: 90px 90px, 80px 80px, 85px 85px, 75px 75px, 70px 70px, 80px 80px;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230b1c3a'><path d='M5 3a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H5zm7 3a4 4 0 1 1 0 8 4 4 0 0 1 0-8zm-5 11c0-2.2 3.3-3.3 5-3.3s5 1.1 5 3.3v1H7v-1z'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230b1c3a'><path d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1c3a' stroke-width='1.6'><circle cx='12' cy='12' r='10'/><ellipse cx='12' cy='12' rx='4.5' ry='10'/><line x1='2' y1='12' x2='22' y2='12'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5a059' stroke-width='1.6'><circle cx='12' cy='12' r='10' stroke-dasharray='2.5 2'/><circle cx='12' cy='12' r='6.5'/><path d='M9 12l2.2 2.2L15.5 10' stroke-linecap='round' stroke-linejoin='round'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1c3a' stroke-width='1.6'><circle cx='12' cy='12' r='10'/><polygon points='16.24,7.76 14.12,14.12 7.76,16.24 9.88,9.88' fill='%23c5a059' stroke='none'/></svg>"),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1c3a' stroke-width='1.6' stroke-linejoin='round' stroke-linecap='round'><path d='M9 2h6a2 2 0 0 1 2 2v0H7v0a2 2 0 0 1 2-2z'/><rect x='5' y='4' width='14' height='18' rx='2'/><line x1='8' y1='10' x2='16' y2='10'/><line x1='8' y1='14' x2='16' y2='14'/></svg>");
    background-position: 8% 120%, 72% 125%, 30% 115%, 90% 130%, 18% 140%, 58% 135%;
    animation: passport-drift 75s linear infinite;
    will-change: background-position;
}
@keyframes passport-drift {
    0%   { background-position: 8% 120%, 72% 125%, 30% 115%, 90% 130%, 18% 140%, 58% 135%; }
    100% { background-position: 8% -25%, 72% -30%, 30% -35%, 90% -25%, 18% -40%, 58% -38%; }
}
@media (prefers-reduced-motion: reduce) { html::after { animation: none; } }
@media (max-width: 768px) {
    html::after { opacity: 0.035; background-size: 60px 60px, 55px 55px, 60px 60px, 50px 50px, 50px 50px, 55px 55px; }
}

.container, .container-fluid, .page-wrap, .main-content, .top-nav, .navbar,
.sidebar, .admin-sidebar, .modal, .dropdown-menu, .toast-container, .fab-cart {
    position: relative; z-index: 1;
}

/* ==========================================================================
   4. UTILITAS UMUM
   ========================================================================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.875rem; }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }
.text-primary, .text-navy { color: var(--navy-main); }
.text-gold { color: var(--gold-hover); }
.font-medium { font-weight: 500; }
.font-mono { font-family: var(--font-mono); letter-spacing: 1.5px; }
.bg-white { background-color: var(--bg-card); }
.border-top { border-top: 1px solid var(--border-color); }
.border-bottom { border-bottom: 1px solid var(--border-color); }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.mt-auto { margin-top: auto; }

.card-shadow {
    background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); border: 1px solid var(--border-soft);
    transition: var(--transition);
}
.card-shadow:hover { box-shadow: var(--shadow-lg); }

/* ==========================================================================
   5. TOMBOL
   ========================================================================== */
.btn-primary, .btn-secondary, .btn-whatsapp, .btn-gold, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; font-size: 0.98rem; font-weight: 700; letter-spacing: 0.02em;
    border-radius: var(--radius-pill); border: none; transition: var(--transition); line-height: 1;
}
.btn-primary {
    background: linear-gradient(135deg, var(--navy-main) 0%, var(--navy-hover) 100%);
    color: white; box-shadow: var(--shadow-navy);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(11, 28, 58, 0.32); color: white; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; background: var(--text-muted); box-shadow: none; }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-main) 0%, var(--gold-hover) 100%);
    color: white; box-shadow: var(--shadow-gold);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(30, 90, 168, 0.4); color: white; }

.btn-secondary {
    background-color: var(--bg-card); color: var(--text-main);
    border: 1px solid var(--border-color); box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background-color: var(--bg-soft); border-color: var(--border-strong); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text-main); }

.btn-whatsapp {
    background-color: #25d366; color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover { background-color: #128c7e; color: white; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35); }

.spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3); border-radius: 50%;
    border-top-color: white; animation: spin 0.8s linear infinite; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   6. FORM
   ========================================================================== */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; font-weight: 700; font-size: 0.92rem; margin-bottom: 0.55rem; color: var(--text-main); }
.form-input {
    width: 100%; padding: 14px 18px; font-size: 1rem;
    color: var(--text-main); background-color: var(--bg-card);
    border: 1.5px solid var(--border-color); border-radius: var(--radius-md);
    transition: var(--transition);
}
.form-input::placeholder { color: var(--text-soft); }
.form-input:focus { outline: none; border-color: var(--gold-main); box-shadow: 0 0 0 4px var(--gold-glow); }
.form-hint { display: block; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; line-height: 1.5; }

/* ==========================================================================
   7. ALERT
   ========================================================================== */
.alert-box {
    display: flex; gap: 14px; padding: 18px 22px;
    border-radius: var(--radius-md); margin-bottom: 20px;
    align-items: flex-start; border: 1px solid; line-height: 1.6;
}
.alert-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; border-color: var(--danger-soft); }
.alert-success { background: var(--success-bg); color: #065f46; border-color: #a7f3d0; }
.alert-warning { background: var(--warning-bg); color: #92400e; border-color: var(--warning-soft); }
.alert-info    { background: var(--info-bg);    color: #075985; border-color: #bae6fd; }

/* ==========================================================================
   8. BADGES
   ========================================================================== */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; font-size: 0.78rem; font-weight: 700;
    border-radius: var(--radius-pill); letter-spacing: 0.02em; border: 1px solid;
}
.badge-primary { background: var(--navy-light); color: var(--navy-main); border-color: rgba(11,28,58,0.1); }
.badge-gold    { background: var(--gold-light); color: var(--gold-hover); border-color: rgba(30,90,168,0.25); }
.badge-success { background: var(--success-bg); color: #065f46; border-color: rgba(22,163,74,0.25); }
.badge-warning { background: var(--warning-bg); color: #92400e; border-color: rgba(217,119,6,0.25); }
.badge-danger  { background: var(--danger-bg); color: #991b1b; border-color: rgba(220,38,38,0.25); }
.badge-info    { background: var(--info-bg); color: #075985; border-color: rgba(2,132,199,0.25); }

/* ==========================================================================
   9. NAVBAR PUBLIK
   ========================================================================== */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 0 rgba(11, 28, 58, 0.06);
    padding: 16px 0;
}
.navbar.sticky-top { position: sticky; top: 0; z-index: 100; }
.navbar-compact { padding: 12px 0; }
.nav-content { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logo-area { display: flex; align-items: center; gap: 14px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.instansi { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.sistem { font-size: 1.45rem; font-weight: 800; color: var(--navy-main); letter-spacing: -0.5px; }
.mini-logo .instansi { font-size: 0.92rem; font-weight: 700; color: var(--text-main); text-transform: none; letter-spacing: 0; }
.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; color: var(--text-muted);
    padding: 8px 18px; border-radius: var(--radius-pill);
    background: var(--bg-card); border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs); transition: var(--transition);
}
.back-link:hover { color: var(--navy-main); border-color: var(--gold-main); transform: translateX(-2px); }

/* ==========================================================================
   10. HERO PUBLIK
   ========================================================================== */
.hero-section { padding: 80px 20px 100px; text-align: center; position: relative; overflow: hidden; }
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 800px; height: 500px;
    background: radial-gradient(ellipse at top, var(--gold-glow) 0%, transparent 60%); z-index: -1;
}
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; color: var(--navy-main); letter-spacing: -1px; line-height: 1.15; margin-bottom: 18px; }
.hero-subtitle { font-size: 1.12rem; color: var(--text-muted); max-width: 620px; margin: 0 auto 40px; line-height: 1.65; }

.form-tracking { max-width: 680px; margin: 0 auto; position: relative; z-index: 2; }
.input-group {
    display: flex; padding: 8px;
    background: var(--bg-card); border-radius: var(--radius-pill);
    box-shadow: var(--shadow-float); border: 1px solid var(--border-soft); overflow: hidden;
}
.input-resi {
    flex: 1; padding: 18px 28px; font-size: 1.1rem; letter-spacing: 1.5px;
    color: var(--text-main); background: transparent; border: none; font-weight: 500;
}
.input-resi::placeholder { color: var(--text-soft); font-weight: 400; letter-spacing: normal; }
.input-resi:focus { outline: none; }
.input-group .btn-primary { border-radius: var(--radius-pill); padding: 0 36px; font-size: 1rem; }
.error-text { color: var(--danger); font-size: 0.92rem; margin-top: 14px; font-weight: 600; }

/* ==========================================================================
   11. INFO CARDS
   ========================================================================== */
.info-section { padding: 60px 20px 100px; margin-top: -40px; position: relative; z-index: 3; }
.info-grid {
    display: grid; gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: var(--container-max); margin: 0 auto;
}
.info-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 36px 32px; border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft); box-shadow: var(--shadow-md);
    transition: var(--transition); display: block; color: var(--text-main);
    position: relative; overflow: hidden;
}
.info-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold-main), var(--gold-light), var(--gold-main));
    transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease-spring);
}
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold-light); }
.info-card:hover::before { transform: scaleX(1); }
.card-icon {
    width: 60px; height: 60px; background: var(--gold-light); color: var(--gold-hover);
    border-radius: var(--radius-md); display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 22px; font-size: 1.8rem;
}
.info-card h3 { font-size: 1.25rem; font-weight: 800; color: var(--navy-main); margin-bottom: 10px; }
.info-card p { color: var(--text-muted); font-size: 0.98rem; line-height: 1.65; }

/* ==========================================================================
   12. KOMPONEN PEMOHON BAP (Empathy, Next-Action, Doc-Checklist)
   ========================================================================== */
.empathy-banner {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-main) 100%);
    color: white; padding: 32px 28px;
    border-radius: var(--radius-lg);
    position: relative; overflow: hidden; margin-bottom: 28px;
}
.empathy-banner::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
}
.empathy-banner h3 { font-size: 1.35rem; font-weight: 800; color: var(--gold-light); margin-bottom: 10px; position: relative; z-index: 1; }
.empathy-banner p { color: rgba(255,255,255,0.85); line-height: 1.65; position: relative; z-index: 1; font-size: 0.98rem; }

.next-action-card {
    background: var(--bg-card); border: 2px solid var(--gold-main);
    border-radius: var(--radius-lg); padding: 28px;
    position: relative; box-shadow: var(--shadow-gold); margin-bottom: 24px;
}
.next-action-card::before {
    content: 'LANGKAH ANDA SELANJUTNYA';
    position: absolute; top: -10px; left: 24px;
    background: var(--gold-main); color: white;
    padding: 4px 14px; font-size: 0.72rem; font-weight: 800;
    letter-spacing: 1px; border-radius: var(--radius-pill);
}
.next-action-card .action-title { font-size: 1.2rem; font-weight: 800; color: var(--navy-main); margin: 10px 0 12px; }
.next-action-card .action-desc { color: var(--text-body); line-height: 1.7; font-size: 0.98rem; margin-bottom: 20px; }

.doc-checklist {
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft); padding: 28px; box-shadow: var(--shadow-sm);
}
.doc-checklist h4 { display: flex; align-items: center; gap: 10px; color: var(--navy-main); font-weight: 800; margin-bottom: 18px; font-size: 1.1rem; }
.doc-checklist ul { list-style: none; padding: 0; }
.doc-checklist li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px dashed var(--border-soft);
    font-size: 0.96rem; color: var(--text-body); line-height: 1.55;
}
.doc-checklist li:last-child { border-bottom: none; }
.doc-checklist li::before {
    content: ''; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--success-bg);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
    background-size: 14px; background-position: center; background-repeat: no-repeat; margin-top: 1px;
}

.help-cta-fab {
    position: fixed; bottom: 24px; right: 24px;
    background: #25d366; color: white;
    padding: 14px 22px; border-radius: var(--radius-pill);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
    font-weight: 700; font-size: 0.95rem;
    display: inline-flex; align-items: center; gap: 10px;
    z-index: 999; transition: var(--transition);
}
.help-cta-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 30px rgba(37, 211, 102, 0.45); color: white; }
.help-cta-fab .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: white; animation: livePulse 2s infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.office-status {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; background: var(--success-bg); color: var(--success);
    border-radius: var(--radius-pill); font-size: 0.78rem; font-weight: 700;
    letter-spacing: 0.3px; border: 1px solid rgba(22,163,74,0.2);
}
.office-status.closed { background: var(--bg-soft); color: var(--text-muted); border-color: var(--border-color); }
.office-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: livePulse 2s infinite; }

/* ==========================================================================
   13. TIMELINE PELACAKAN (hasil.php)
   ========================================================================== */
.result-container { max-width: 880px; margin: 50px auto 100px; padding: 0 20px; }
.result-header {
    padding: 32px 36px; margin-bottom: 28px;
    background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border-soft); box-shadow: var(--shadow-md);
    position: relative; overflow: hidden;
}
.result-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--gold-main), var(--navy-main)); }
.result-title { font-size: 1.4rem; font-weight: 800; color: var(--navy-main); margin-bottom: 20px; }
.applicant-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.info-group {
    display: flex; flex-direction: column; background: var(--bg-soft);
    padding: 18px 20px; border-radius: var(--radius-md); border: 1px solid var(--border-soft);
}
.info-label { font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.info-value { font-size: 1.1rem; color: var(--navy-main); margin-top: 6px; font-weight: 800; }

.timeline-section {
    padding: 40px 36px; background: var(--bg-card);
    border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
}
.timeline-title { font-size: 1.35rem; font-weight: 800; color: var(--navy-main); margin-bottom: 32px; }
.stepper { position: relative; }
.stepper::before { content: ''; position: absolute; top: 0; left: 24px; height: 100%; width: 3px; background: var(--border-color); border-radius: 3px; }
.step { display: flex; margin-bottom: 36px; position: relative; }
.step:last-child { margin-bottom: 0; }
.step-indicator {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--bg-card); border: 3px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.05rem; color: var(--text-soft);
    z-index: 2; transition: var(--transition); flex-shrink: 0;
}
.step-content { margin-left: 24px; flex: 1; padding-top: 6px; }
.step-content h4 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 6px; font-weight: 800; }
.step-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }
.step-date {
    display: inline-block; margin-top: 12px; font-size: 0.85rem; font-weight: 700;
    background: var(--bg-soft); color: var(--text-body);
    padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border-soft);
}
.step.completed .step-indicator { background: var(--success); border-color: var(--success); color: white; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3); }
.step.active .step-indicator { background: var(--bg-card); border-color: var(--gold-main); color: var(--gold-hover); box-shadow: 0 0 0 6px var(--gold-glow); animation: livePulse 2s infinite; }
.step.active .step-content h4 { color: var(--gold-hover); }
.step.step-bap .bap-indicator { border-color: var(--danger); color: var(--danger); }
.step.step-bap.active .bap-indicator { background: var(--danger); color: white; box-shadow: 0 0 0 6px var(--danger-soft); }

/* ==========================================================================
   14. INFO & FAQ
   ========================================================================== */
.layout-doc { display: flex; gap: 50px; margin-top: 50px; margin-bottom: 80px; align-items: flex-start; }
.doc-sidebar { flex: 0 0 260px; position: sticky; top: 100px; }
.toc-title { font-size: 0.82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 800; margin-bottom: 16px; }
.toc-list { list-style: none; border-left: 2px solid var(--border-color); }
.toc-list li { margin-bottom: 4px; }
.toc-list a { display: block; padding: 9px 16px; color: var(--text-muted); font-size: 0.95rem; font-weight: 600; border-left: 2px solid transparent; margin-left: -2px; transition: var(--transition); }
.toc-list a:hover { color: var(--navy-main); border-left-color: var(--gold-main); background: var(--gold-soft); }
.doc-content { flex: 1; padding: 50px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-soft); box-shadow: var(--shadow-md); }
.doc-header h1 { font-size: 2.2rem; font-weight: 800; color: var(--navy-main); letter-spacing: -1px; margin-bottom: 14px; }
.doc-header p { font-size: 1.08rem; color: var(--text-muted); }
.doc-section { margin-bottom: 50px; }
.doc-section h2 { font-size: 1.45rem; color: var(--navy-main); margin-bottom: 18px; font-weight: 800; }
.divider { border: 0; height: 1px; background: linear-gradient(90deg, var(--border-color) 0%, transparent 100%); margin: 40px 0; }
.doc-list { margin-left: 22px; margin-top: 16px; }
.doc-list li { margin-bottom: 10px; font-size: 1rem; line-height: 1.6; }
.doc-steps { counter-reset: step; list-style: none; margin-top: 16px; }
.doc-steps li {
    counter-increment: step; padding: 14px 16px 14px 56px; position: relative;
    background: var(--bg-soft); border-radius: var(--radius-md); margin-bottom: 10px;
    border: 1px solid var(--border-soft);
}
.doc-steps li::before {
    content: counter(step); position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; background: var(--gold-main); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.9rem; box-shadow: var(--shadow-sm);
}

.faq-container { max-width: 880px; margin: 50px auto 80px; padding: 0 20px; }
.page-title { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; color: var(--navy-main); letter-spacing: -1px; margin-bottom: 14px; }
.page-subtitle { font-size: 1.1rem; color: var(--text-muted); }
.faq-header { padding: 20px 0 40px; }
.faq-section { margin-bottom: 40px; }
.faq-category-title {
    font-size: 1.3rem; font-weight: 800; color: var(--navy-main);
    margin: 40px 0 20px; padding-bottom: 10px;
    border-bottom: 2px solid var(--gold-main); display: inline-block;
}
.faq-item { margin-bottom: 14px; background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border-soft); box-shadow: var(--shadow-xs); transition: var(--transition); overflow: hidden; }
.faq-item:hover { border-color: var(--gold-main); box-shadow: var(--shadow-sm); }
.faq-toggle {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 22px 24px; background: transparent; border: none;
    font-size: 1.05rem; font-weight: 700; color: var(--text-main); text-align: left; cursor: pointer;
}
.faq-toggle:hover { color: var(--navy-main); }
.faq-icon { transition: transform 0.4s var(--ease-spring); color: var(--gold-main); flex-shrink: 0; }
.faq-toggle[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-toggle[aria-expanded="true"] { color: var(--navy-main); }
.faq-content { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease-smooth); }
.faq-content.open { border-top: 1px solid var(--border-soft); }
.faq-body { padding: 20px 24px 24px; color: var(--text-body); line-height: 1.75; font-size: 1rem; }

.help-desk-banner {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-main) 100%);
    padding: 50px 36px; border-radius: var(--radius-lg);
    color: white; text-align: center; margin-top: 50px;
    position: relative; overflow: hidden;
}
.help-desk-banner::before { content: ''; position: absolute; top: -80px; right: -80px; width: 280px; height: 280px; background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%); }
.help-desk-banner > * { position: relative; z-index: 1; }
.help-desk-banner h3 { font-size: 1.6rem; font-weight: 800; color: var(--gold-light); margin-bottom: 12px; }
.help-desk-banner p { color: rgba(255,255,255,0.85); font-size: 1.05rem; margin-bottom: 24px; max-width: 480px; margin-left: auto; margin-right: auto; }

.table-responsive { overflow-x: auto; margin-top: 22px; border-radius: var(--radius-md); border: 1px solid var(--border-color); box-shadow: var(--shadow-xs); }
.pnbp-table, .admin-table { width: 100%; border-collapse: collapse; background: var(--bg-card); }
.pnbp-table th, .admin-table th {
    background: var(--bg-soft); padding: 16px 22px; text-align: left;
    font-weight: 800; color: var(--navy-main);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase; font-size: 0.78rem; letter-spacing: 1px;
}
.pnbp-table td, .admin-table td { padding: 16px 22px; border-bottom: 1px solid var(--border-soft); color: var(--text-body); font-size: 1rem; }
.table-warning td { background: var(--warning-bg); color: #92400e; font-weight: 600; }

/* ==========================================================================
   15. FOOTER
   ========================================================================== */
.site-footer { background: var(--bg-card); padding: 60px 20px 30px; border-top: 1px solid var(--border-color); margin-top: auto; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; max-width: var(--container-max); margin-left: auto; margin-right: auto; }
.footer-brand h4 { font-size: 1.6rem; font-weight: 800; color: var(--navy-main); margin-bottom: 12px; letter-spacing: -0.5px; }
.badge-akhlak { display: inline-block; background: var(--gold-main); color: white; padding: 5px 14px; border-radius: var(--radius-pill); font-weight: 800; margin-bottom: 12px; letter-spacing: 1px; font-size: 0.8rem; }
.footer-compact { text-align: center; padding: 22px; font-size: 0.88rem; color: var(--text-muted); border-top: 1px solid var(--border-color); background: var(--bg-card); font-weight: 500; margin-top: auto; }

/* ==========================================================================
   16. LOGIN ADMIN
   ========================================================================== */
.bg-login {
    background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-main) 100%);
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px; position: relative; overflow: hidden;
}
.bg-login::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(30, 90, 168, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(30, 90, 168, 0.10) 0%, transparent 40%);
    pointer-events: none;
}
.login-container { width: 100%; max-width: 440px; position: relative; z-index: 1; }
.login-card {
    padding: 44px 36px; border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: var(--shadow-float);
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo-placeholder {
    width: 76px; height: 76px;
    background: linear-gradient(135deg, var(--navy-main), var(--navy-hover));
    color: var(--gold-light); border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; box-shadow: var(--shadow-navy);
}
.login-title { font-size: 1.65rem; font-weight: 800; color: var(--navy-main); letter-spacing: -0.5px; margin-bottom: 6px; }
.password-wrapper { position: relative; }
.btn-toggle-password { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); }
.btn-block { width: 100%; padding: 16px; font-size: 1.05rem; }

/* ==========================================================================
   17. ADMIN DASHBOARD
   ========================================================================== */
.admin-body { display: flex; min-height: 100vh; overflow: hidden; background: #0a1424; }
.admin-sidebar { width: var(--sidebar-w); background: #0a1424; color: white; display: flex; flex-direction: column; transition: transform 0.3s ease; z-index: 1000; box-shadow: 4px 0 24px rgba(0,0,0,0.2); border-right: 1px solid rgba(255,255,255,0.05); }
.sidebar-header { padding: 24px 28px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.brand-title { font-size: 1.4rem; font-weight: 800; color: var(--gold-light); letter-spacing: 1px; }
.sidebar-nav { flex: 1; padding: 22px 14px; overflow-y: auto; }
.nav-list { list-style: none; }
.nav-link {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 18px; color: rgba(255,255,255,0.65);
    border-radius: var(--radius-md); margin-bottom: 6px;
    font-weight: 600; font-size: 0.95rem; transition: var(--transition);
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-link.active { background: var(--gold-main); color: var(--navy-deep); box-shadow: var(--shadow-gold); }
.nav-icon { opacity: 0.8; flex-shrink: 0; }
.nav-link.active .nav-icon { opacity: 1; }
.sidebar-footer { padding: 18px 28px; border-top: 1px solid rgba(255,255,255,0.06); }
.btn-logout { display: flex; align-items: center; gap: 10px; color: #f87171; font-weight: 700; font-size: 0.95rem; }
.btn-logout:hover { color: #fca5a5; }

.admin-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-body); }
.admin-topbar {
    background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
    padding: 16px 32px; display: flex; justify-content: space-between; align-items: center;
    z-index: 10; border-bottom: 1px solid var(--border-color);
}
.topbar-title { font-size: 1.25rem; font-weight: 800; color: var(--navy-main); margin: 0; }
.user-profile { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; background: var(--bg-card); border-radius: var(--radius-pill); border: 1px solid var(--border-color); }
.avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--gold-main), var(--gold-hover));
    color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.95rem;
}
.admin-content { flex: 1; overflow-y: auto; padding: 32px; }
.stats-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 32px; }
.stat-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px; background: var(--bg-card); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--gold-main); }
.stat-number { font-size: 2.2rem; font-weight: 800; margin-top: 4px; color: var(--navy-main); letter-spacing: -1px; }
.stat-icon { width: 54px; height: 54px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }

.table-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm); }
.table-header { padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-soft); background: var(--bg-soft); }
.table-title { font-size: 1.1rem; font-weight: 800; color: var(--navy-main); }
.search-box { position: relative; width: 280px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.input-search { width: 100%; padding: 11px 16px 11px 42px; border: 1px solid var(--border-color); border-radius: var(--radius-pill); background: var(--bg-card); font-size: 0.93rem; transition: var(--transition); }
.input-search:focus { outline: none; border-color: var(--gold-main); box-shadow: 0 0 0 3px var(--gold-glow); }
.btn-action { color: var(--navy-main); font-weight: 700; font-size: 0.88rem; padding: 6px 14px; background: var(--navy-light); border-radius: var(--radius-pill); transition: var(--transition); display: inline-block; }
.btn-action:hover { background: var(--navy-main); color: white; }
.table-footer { padding: 18px 28px; display: flex; justify-content: space-between; align-items: center; background: var(--bg-soft); border-top: 1px solid var(--border-soft); font-size: 0.92rem; font-weight: 500; }

/* ==========================================================================
   18. MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(11, 28, 58, 0.6);
    backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
    padding: 20px; z-index: 2000; opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal {
    background: var(--bg-card); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-float); width: 100%; max-width: 500px;
    transform: translateY(20px); opacity: 0;
    transition: transform 0.35s var(--ease-spring), opacity 0.3s;
}
.modal-overlay.show .modal { transform: translateY(0); opacity: 1; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 28px 16px; }
.modal-title { font-size: 1.25rem; font-weight: 800; color: var(--navy-main); }
.modal-subtitle { font-size: 0.92rem; color: var(--text-muted); margin-top: 4px; }
.modal-close { color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--bg-soft); color: var(--text-main); }
.modal-body { padding: 4px 28px 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 28px 24px; border-top: 1px solid var(--border-soft); }

/* ==========================================================================
   19. TOAST
   ========================================================================== */
#toast-container { position: fixed; top: 24px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 9999; pointer-events: none; }
.toast {
    background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 14px 20px; display: flex; align-items: center; gap: 12px;
    font-weight: 600; min-width: 280px; max-width: 420px;
    border-left: 4px solid var(--navy-main); pointer-events: auto;
    animation: toastIn 0.4s var(--ease-spring);
}
.toast.success { border-left-color: var(--success); color: #065f46; }
.toast.error   { border-left-color: var(--danger);  color: #991b1b; }
.toast.info    { border-left-color: var(--info);    color: #075985; }
.toast .ico { flex-shrink: 0; }
.toast.exit { animation: toastOut 0.3s forwards; }
@keyframes toastIn  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to   { transform: translateX(120%); opacity: 0; } }

/* ==========================================================================
   20. RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
    .layout-doc { flex-direction: column; gap: 24px; }
    .doc-sidebar { position: static; width: 100%; flex: none; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; }
    .toc-list { display: flex; overflow-x: auto; white-space: nowrap; border-left: none; padding-bottom: 8px; gap: 12px; }
    .toc-list a { border-left: none; border-bottom: 2px solid transparent; padding: 8px 4px; }
    .toc-list a:hover { background: transparent; border-bottom-color: var(--gold-main); }
    .doc-content { padding: 32px 24px; }
}
@media (max-width: 768px) {
    .nav-content { flex-direction: column; gap: 14px; align-items: flex-start; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .input-group { flex-direction: column; border-radius: var(--radius-md); padding: 0; }
    .input-resi { border-bottom: 1px solid var(--border-soft); padding: 14px 18px; font-size: 1rem; }
    .input-group .btn-primary { padding: 16px; border-radius: 0; width: 100%; }
    
    .admin-sidebar { position: fixed; top: 0; left: -100%; height: 100vh; box-shadow: 10px 0 30px rgba(0,0,0,0.3); }
    .admin-sidebar.show, .admin-sidebar.open { left: 0; }
    .admin-content { padding: 20px; }
    .admin-topbar { padding: 14px 18px; }
    .table-header { flex-direction: column; align-items: stretch; gap: 12px; }
    .search-box { width: 100%; }
    
    .help-cta-fab { bottom: 16px; right: 16px; padding: 12px 18px; font-size: 0.9rem; }
    .result-container, .faq-container { padding: 0 16px; }
    .timeline-section, .result-header, .doc-content { padding: 28px 22px; }
}

/* ==========================================================================
   21. PRINT
   ========================================================================== */
@media print {
    html::before, html::after { display: none !important; }
    body { background: white !important; color: black; }
    .navbar, .footer-compact, .site-footer, .help-cta-fab,
    .admin-sidebar, .admin-topbar, .modal-overlay, #toast-container,
    .btn-primary, .btn-secondary, .btn-whatsapp, .back-link { display: none !important; }
    .card-shadow, .result-header, .timeline-section, .doc-content { box-shadow: none !important; border: 1px solid #ccc !important; }
    @page { size: A4 portrait; margin: 15mm; }
}
/* ==========================================================================
   22. RESPONSIF — Penyempurnaan Mobile (PC & HP)
   Ditambahkan untuk memastikan tampilan optimal di semua perangkat.
   ========================================================================== */

/* Media fluid: gambar, svg, video, dan kanvas tidak pernah melebihi lebar layar */
img, svg, video, canvas, iframe { max-width: 100%; height: auto; }

/* Cegah scroll horizontal tak sengaja di perangkat sempit */
body { overflow-x: hidden; }

/* Tabel besar tetap bisa di-scroll horizontal dalam wadahnya */
table { max-width: 100%; }

@media (max-width: 768px) {
    /* Cegah iOS/Android memperbesar teks otomatis */
    html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

    /* Padding container lebih pas di layar kecil */
    .container { padding-left: 16px; padding-right: 16px; }

    /* Target sentuh minimal 44px (standar aksesibilitas Apple/Google) */
    button, .btn, a.btn, .btn-primary, .btn-secondary, .btn-whatsapp,
    input[type="submit"], input[type="button"] { min-height: 44px; }

    /* Input minimal 16px → mencegah Safari iOS auto-zoom saat fokus */
    input, select, textarea { font-size: 16px; }
}

@media (max-width: 480px) {
    .container { padding-left: 14px; padding-right: 14px; }
    /* Heading sedikit lebih kecil agar tidak terpotong di HP mungil */
    h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
}