@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }


:root {
    --primary-dark: #0f172a; /* Deep Navy dari gambar */
    --accent-gold: #c49a6c;  /* Warna emas teks */
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    background: #d0dce8;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================
   LAYOUT 2 KOLOM
   ===================== */
.split-page {
    display: flex;
    width: 900px;
    max-width: 98vw;
    height: 620px;         /* Fixed height besar agar stabil */
    max-height: 96vh;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 40px 100px rgba(2, 20, 60, 0.42),
        0 8px 32px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ── KOLOM KIRI ── */
.split-left {
    width: 320px;
    min-width: 280px;
    background: linear-gradient(155deg, #010e20 0%, #021830 35%, #032d58 70%, #053f7a 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Dekorasi lingkaran besar */
.split-left::before {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.04);
    bottom: -130px; right: -130px;
    pointer-events: none;
}
.split-left::after {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.035);
    top: -70px; left: -70px;
    pointer-events: none;
}

/* Lingkaran dekorasi tengah */
.split-left-deco {
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.03);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Garis cahaya diagonal */
.split-left-shine {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255,255,255,0.018) 30%,
        transparent 60%
    );
    pointer-events: none;
}

.split-left-inner {
    padding: 38px 32px 34px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ── LOGO AREA ── */
.sl-logo {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 0;
}
.sl-logo img {
    width: 64px; height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
    flex-shrink: 0;
}
/* Divider vertikal antar logo seperti image 2 */
.sl-logo-divider {
    display: block;
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.22);
    margin: 0 16px;
    flex-shrink: 0;
}
.sl-logo img.logo-tanjak {
    width: 56px; height: 56px;
}

/* Badge "INOVASI DIGITAL" */
.sl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 5px 13px 5px 10px;
    margin-bottom: 16px;
    width: fit-content;
}
.sl-badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4cff91;
    box-shadow: 0 0 6px rgba(76,255,145,0.7);
    flex-shrink: 0;
}
.sl-badge span {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
}

.sl-negara {
    font-size: 9.5px;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
    display: none; /* disembunyikan di versi baru */
}

.sl-instansi {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 14px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.4);
    letter-spacing: -0.3px;
}

.sl-tagline {
    font-size: 12px;
    color: rgba(255,255,255,0.48);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 0;
}

.sl-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.10);
    margin: 20px 0;
}

/* Deskripsi layanan */
.sl-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.52);
    line-height: 1.75;
    margin-bottom: 20px;
}

/* Pill/chip fitur */
.sl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: auto;
}
.sl-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}
.sl-chip svg { opacity: 0.7; }

.sl-footer {
    margin-top: 28px;
    font-size: 10.5px;
    color: rgba(255,255,255,0.22);
    line-height: 1.8;
}
.sl-footer strong {
    color: rgba(255,255,255,0.38);
    font-weight: 600;
}

/* ── KOLOM KANAN ── */
.split-right {
    flex: 1;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Subtle top accent */
.split-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #043666, #0a5ca8, #2d8ef0);
}

.split-right-inner {
    padding: 44px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 1;
}

/* Kunci icon */
.sr-icon-wrap {
    width: 62px; height: 62px;
    border-radius: 18px;
    background: #fff;
    border: 1.5px solid #e0eaf5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(4,54,102,0.10);
}
.sr-icon-wrap svg {
    width: 28px; height: 28px;
}

.sr-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px; /* Jarak huruf lebih lebar untuk teks label kecil */
    margin-bottom: 8px;
    text-align: center;
}
.sr-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-dark);
    text-transform: uppercase;
    /* Tambahkan atau ubah bagian ini */
    letter-spacing: 2px; /* Memberikan ruang antar huruf agar tidak rapat */
    line-height: 1.2;
    margin-bottom: 4px;
    text-align: center;
}
.sr-title span { color: #043666; }
.sr-sub {
    font-size: 13px;
    color: #5a80a0;
    margin-bottom: 0;
    font-weight: 500;
}
.sr-hint {
    font-size: 12px;
    color: #a0b8cc;
    margin-bottom: 30px;
}

/* ── FORM ── */
.reg-form { display: flex; flex-direction: column; gap: 16px; }
.reg-field { display: flex; flex-direction: column; gap: 5px; }
.reg-field label {
    font-size: 10px;
    font-weight: 700;
    color: #2a4a6a;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.reg-input-wrap {
    display: flex; align-items: center; gap: 10px;
    border: 1.5px solid #dce8f5;
    border-radius: 12px;
    padding: 13px 16px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(4,54,102,0.05);
}
.reg-input-wrap:focus-within {
    border-color: #043666;
    box-shadow: 0 0 0 3px rgba(4,54,102,0.10);
    background: #fff;
}
.reg-input-wrap svg { flex-shrink: 0; opacity: 0.45; }
.reg-input-wrap input {
    border: none; outline: none; background: transparent;
    font-size: 13.5px; color: #0a1f3a; width: 100%;
    font-family: inherit;
}
.reg-input-wrap input::placeholder { color: #b0c8e0; font-size: 13px; }
.reg-err { font-size: 11px; color: #e03a3a; min-height: 14px; }

.reg-btn {
    margin-top: 6px; width: 100%;
    background: linear-gradient(135deg, #021830, #043666);
    color: #fff; border: none; border-radius: 13px;
    padding: 15px; font-size: 14px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    transition: all 0.2s;
    box-shadow: 0 8px 24px rgba(4,54,102,0.38);
    font-family: inherit;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}
.reg-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, transparent 60%);
    pointer-events: none;
}
.reg-btn:hover  {
    background: linear-gradient(135deg, #032040, #054a8a);
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(4,54,102,0.45);
}
.reg-btn:active { transform: scale(0.98) translateY(0); }
.reg-btn:disabled { background: #6a90b8; cursor: not-allowed; box-shadow: none; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin-icon { animation: spin 0.8s linear infinite; }

.reg-note {
    font-size: 11px; color: #a0b8cc;
    text-align: center; margin-top: 18px; line-height: 1.55;
}
.reg-note a { color: #4a90d9; text-decoration: none; }

/* Butuh akses link */
.reg-access-note {
    font-size: 11.5px;
    color: #8aabcc;
    text-align: center;
    margin-top: 14px;
}
.reg-access-note a {
    color: #c4901a;
    font-weight: 700;
    text-decoration: none;
}
.reg-access-note a:hover { text-decoration: underline; }

/* Fade out */
.split-page.fade-out { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; pointer-events: none; } }


/* =====================
   MODAL POPUP
   ===================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(1, 15, 40, 0.60);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 16px;
}
.modal-overlay.aktif {
    opacity: 1;
    pointer-events: all;
}
.modal-card {
    background: #fff;
    border-radius: 22px;
    width: 100%;
    max-width: 370px;
    overflow: hidden;
    box-shadow: 0 36px 90px rgba(2, 20, 60, 0.45), 0 8px 28px rgba(2, 20, 60, 0.22);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    opacity: 0;
}
.modal-overlay.aktif .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal-header-decor {
    background: linear-gradient(135deg, #011a38 0%, #043666 55%, #0a5ca8 100%);
    padding: 24px 26px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.modal-header-decor::before {
    content: '';
    position: absolute;
    width: 170px; height: 170px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.07);
    bottom: -70px; right: -40px;
}
.modal-icon-wrap {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.13);
    border: 1.5px solid rgba(255,255,255,0.20);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.modal-header-text { position: relative; z-index: 1; }
.modal-label { font-size: 9px; letter-spacing: 2.5px; color: rgba(255,255,255,0.5); text-transform: uppercase; margin-bottom: 4px; font-weight: 600; }
.modal-title { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.3; }
.modal-body { padding: 22px 26px 24px; }
.modal-sub { font-size: 13px; color: #1a3a5c; line-height: 1.65; margin-bottom: 16px; }
.modal-info-box {
    background: #f0f7ff;
    border: 1px solid #c8dffa;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-info-row { display: flex; align-items: center; gap: 8px; }
.modal-info-label { font-size: 11.5px; color: #5a80a0; flex: 1; }
.modal-info-val { font-size: 11.5px; font-weight: 700; color: #043666; }
.modal-question { font-size: 12.5px; color: #7a9cc0; margin-bottom: 16px; text-align: center; }
.modal-btns { display: flex; gap: 10px; margin-bottom: 10px; }
.modal-btn-lanjut {
    flex: 1;
    background: linear-gradient(135deg, #043666, #0a5ca8);
    color: #fff; border: none; border-radius: 12px;
    padding: 13px 10px; font-size: 13px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 16px rgba(4,54,102,0.32);
    font-family: inherit;
}
.modal-btn-lanjut:hover { opacity: 0.88; }
.modal-btn-lanjut:active { transform: scale(0.97); }
.modal-btn-baru {
    flex: 1;
    background: #fff; color: #2a4a6a;
    border: 1.5px solid #c8dffa; border-radius: 12px;
    padding: 13px 10px; font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    font-family: inherit;
}
.modal-btn-baru:hover { background: #eef5ff; border-color: #90b8e8; }
.modal-btn-baru:active { transform: scale(0.97); }
.modal-btn-close {
    display: block; width: 100%; background: none; border: none;
    font-size: 12px; color: #a0b8cc; cursor: pointer; padding: 5px;
    text-align: center; transition: color 0.2s; font-family: inherit;
}
.modal-btn-close:hover { color: #5a80a0; }


/* =====================
   HALAMAN CHAT — PANEL
   ===================== */
.chat-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    flex: 1;
}

/* Header */
.chat-header {
    background: linear-gradient(90deg, #021830 0%, #032e5c 50%, #043e78 100%);
    padding: 12px 18px;
    display: flex; align-items: center; gap: 13px;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(2,20,60,0.25);
}
.chat-header .avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.chat-header .avatar img { width: 30px; height: 30px; object-fit: contain; }
.chat-header-info h3 { color: #ffffff !important; font-size: 14px; margin: 0; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.chat-header-info span { color: rgba(255,255,255,0.80) !important; font-size: 11px; }
.header-status {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: rgba(255,255,255,0.7);
}
.status-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #4cff91;
    box-shadow: 0 0 0 2px rgba(76,255,145,0.3);
    animation: pulse-status 2s infinite;
}
@keyframes pulse-status {
    0%,100% { box-shadow: 0 0 0 2px rgba(76,255,145,0.3); }
    50%      { box-shadow: 0 0 0 5px rgba(76,255,145,0.1); }
}
.header-icons { margin-left: auto; display: flex; gap: 14px; }
.header-icons svg { fill: rgba(255,255,255,0.75); width: 18px; height: 18px; cursor: pointer; transition: fill 0.2s; }
.header-icons svg:hover { fill: #fff; }

/* Badge hari */
.badge-day {
    background: linear-gradient(90deg, #e6f0fa, #f0f6ff);
    border-bottom: 1px solid #d4e6f8;
    color: #4a6a90; font-size: 11px; font-weight: 600;
    padding: 5px 0; text-align: center;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

/* =====================
   AREA CHAT — SCROLL
   ===================== */
.chat-area {
    flex: 1;
    min-height: 0;
    padding: 16px 14px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;

    background-image: url('../img/background_chat.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.chat-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='220'%3E%3Cg transform='rotate(-35 160 110)' opacity='0.06'%3E%3Ctext x='50%25' y='80' text-anchor='middle' font-family='Arial' font-size='22' font-weight='800' fill='%23032e5c' letter-spacing='3'%3EDITJENIM RIAU%3C/text%3E%3Ctext x='50%25' y='115' text-anchor='middle' font-family='Arial' font-size='11' font-weight='600' fill='%23032e5c' letter-spacing='2'%3EKEMENTERIAN IMIGRASI%3C/text%3E%3Ctext x='50%25' y='140' text-anchor='middle' font-family='Arial' font-size='9' fill='%23032e5c' letter-spacing='1'%3E%26 PEMASYARAKATAN%3C/text%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 320px 220px;
    pointer-events: none;
    z-index: 0;
}
.chat-area > * { position: relative; z-index: 1; }

.chat-area::-webkit-scrollbar { width: 5px; }
.chat-area::-webkit-scrollbar-track { background: transparent; }
.chat-area::-webkit-scrollbar-thumb { background: rgba(4,54,102,0.2); border-radius: 3px; }

/* =====================
   BUBBLE CHAT
   ===================== */
.message { display: flex; flex-direction: column; max-width: 86%; }
.message.bot  { align-self: flex-start; }
.message.user { align-self: flex-end; }

.message.bot .bubble {
    background: #fff;
    border-radius: 4px 18px 18px 18px;
    padding: 10px 14px;
    font-size: 13.5px; line-height: 1.65; white-space: pre-line;
    color: #0a1f3a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10), 0 0 0 1px rgba(4,54,102,0.04);
}
.message.user .bubble {
    background: linear-gradient(135deg, #c6ddf8, #aecdf5);
    border-radius: 18px 4px 18px 18px;
    padding: 10px 14px;
    font-size: 13.5px; line-height: 1.65; white-space: pre-line;
    color: #031e40;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.msg-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 3px;
}
.message.bot  .msg-meta { justify-content: flex-start; padding-left: 2px; }
.message.user .msg-meta { justify-content: flex-end; padding-right: 2px; }

.timestamp { font-size: 10.5px; color: #7a9cc0; }
.message.user .timestamp { color: #5a80a0; }

.msg-check { display: flex; align-items: center; }
.msg-check svg { width: 16px; height: 16px; }

/* =====================
   MENU — TOMBOL LEVEL 1
   ===================== */
.menu-list {
    display: flex; flex-direction: column;
    gap: 7px; margin-top: 8px;
    background: transparent;
    overflow: visible;
}
.menu-btn {
    background: #f4f9ff;
    border: 1.5px solid #c0d8f5;
    border-radius: 12px;
    padding: 11px 14px; cursor: pointer;
    display: flex; align-items: center; gap: 11px;
    width: 100%; text-align: left;
    transition: background 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(4,54,102,0.07);
    position: relative;
}
.menu-btn:hover {
    background: #deeeff;
    border-color: #7ab0e8;
    transform: translateX(3px);
    box-shadow: 0 3px 12px rgba(4,54,102,0.13);
}
.menu-btn:active { transform: scale(0.98); }

.menu-btn .menu-icon-wrap {
    width: 30px; height: 30px; border-radius: 8px;
    background: rgba(4,54,102,0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.18s;
}
.menu-btn:hover .menu-icon-wrap { background: rgba(4,54,102,0.14); }
.menu-btn > span:not(.check-terpilih) {
    font-size: 13px; color: #1a4a80; font-weight: 600;
    flex: 1;
}

/* =====================
   STATE TERPILIH — menu-btn
   ===================== */
.menu-btn.terpilih {
    background: #f0f7ff !important;
    border-color: #7ab8e8 !important;
    border-left: 3px solid #043666 !important;
    box-shadow: 0 1px 6px rgba(4,54,102,0.10) !important;
    transform: none !important;
    cursor: default;
    pointer-events: none;
    padding-left: 12px;
}
.menu-btn.terpilih .menu-icon-wrap { background: rgba(4,54,102,0.10); }
.menu-btn.terpilih > span:not(.check-terpilih) { color: #043666 !important; font-weight: 700; }
.menu-btn.terpilih .check-terpilih { display: flex !important; }

/* =====================
   SUB-MENU — TOMBOL LEVEL 2
   ===================== */
.sub-list {
    display: flex; flex-direction: column;
    gap: 7px; margin-top: 8px;
    padding: 0;
}
.sub-btn {
    background: #f4f9ff;
    border: 1.5px solid #c0d8f5;
    border-radius: 12px;
    padding: 11px 14px; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    width: 100%; text-align: left;
    transition: background 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(4,54,102,0.07);
}
.sub-btn:hover {
    background: #deeeff;
    border-color: #7ab0e8;
    transform: translateX(3px);
    box-shadow: 0 3px 12px rgba(4,54,102,0.13);
}
.sub-btn:active { transform: scale(0.98); }

.sub-btn .sub-icon-wrap {
    width: 28px; height: 28px; border-radius: 7px;
    background: rgba(4,54,102,0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background 0.18s;
}
.sub-btn:hover .sub-icon-wrap { background: rgba(4,54,102,0.14); }
.sub-btn > span:not(.sub-arrow):not(.check-terpilih) {
    font-size: 13px; color: #1a4a80; font-weight: 600;
    flex: 1;
}
.sub-btn .sub-arrow {
    flex-shrink: 0;
    opacity: 0; transform: translateX(-4px);
    transition: opacity 0.15s, transform 0.15s;
}
.sub-btn:hover .sub-arrow { opacity: 1; transform: translateX(0); }
.sub-btn .sub-arrow svg { width: 13px; height: 13px; fill: none; stroke: #4a90c4; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* STATE TERPILIH — sub-btn */
.sub-btn.terpilih {
    background: #f0f7ff !important;
    border-color: #7ab8e8 !important;
    border-left: 3px solid #043666 !important;
    box-shadow: 0 1px 6px rgba(4,54,102,0.10) !important;
    transform: none !important;
    cursor: default;
    pointer-events: none;
    padding-left: 12px;
}
.sub-btn.terpilih .sub-icon-wrap { background: rgba(4,54,102,0.10); }
.sub-btn.terpilih > span:not(.sub-arrow):not(.check-terpilih) { color: #043666 !important; font-weight: 700; }
.sub-btn.terpilih .sub-arrow { display: none !important; }
.sub-btn.terpilih .check-terpilih { display: flex !important; }

/* Centang terpilih */
.check-terpilih {
    display: none;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    width: 22px; height: 22px;
}
.check-terpilih svg { width: 16px; height: 16px; display: block; }

/* =====================
   KONTEN CARD
   ===================== */
.konten-card {
    background: #fff; border-left: 3px solid #043666;
    border-radius: 0 14px 14px 0; padding: 13px 15px;
    font-size: 13px; color: #0a1f3a; line-height: 1.8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.konten-card .ktitle { font-weight: 700; color: #043666; margin-bottom: 8px; font-size: 13.5px; }

/* =====================
   TYPING INDICATOR
   ===================== */
.typing-row {
    display: flex; gap: 5px; padding: 12px 16px;
    background: #fff; border-radius: 4px 18px 18px 18px;
    width: fit-content;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}
.dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #6a9cc8; animation: bop 1.2s infinite;
}
.dot:nth-child(2) { animation-delay: .22s; }
.dot:nth-child(3) { animation-delay: .44s; }
@keyframes bop {
    0%,60%,100% { transform: translateY(0); opacity: 0.7; }
    30% { transform: translateY(-7px); opacity: 1; }
}

/* =====================
   TANYA LAIN
   ===================== */
.tanya-lain-wrap { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tanya-lain-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 16px; border-radius: 22px; border: none;
    font-size: 12.5px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.tanya-lain-btn:active { transform: scale(0.95); }
.tanya-lain-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tanya-lain-btn.ya {
    background: linear-gradient(135deg, #043666, #0a5ca8);
    color: #fff;
    box-shadow: 0 3px 12px rgba(4,54,102,0.32);
}
.tanya-lain-btn.ya:hover:not(:disabled) { box-shadow: 0 5px 16px rgba(4,54,102,0.4); transform: translateY(-1px); }
.tanya-lain-btn.tidak {
    background: #f0f4f8; color: #4a5568;
    border: 1.5px solid #d0dce8;
}
.tanya-lain-btn.tidak:hover:not(:disabled) { background: #e2eaf3; border-color: #a0b8cc; }

/* =====================
   BACK AREA
   ===================== */
.chat-back-area {
    background: #fff;
    border-top: 1px solid #dce8f5;
    padding: 10px 14px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    min-height: 50px;
}
.back-btn {
    display: flex; align-items: center; gap: 8px;
    background: none; color: #5a80a0;
    border: 1.5px solid #d0e3f5; border-radius: 10px;
    padding: 9px 22px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.back-btn:hover { background: #f0f6ff; color: #043666; border-color: #90b8e8; }
.back-btn:active { transform: scale(0.97); }

/* =====================
   HISTORY BANNER
   ===================== */
.history-banner {
    background: linear-gradient(90deg, #e4f0ff, #eef7ff);
    border-bottom: 1px solid #c2d8f5;
    padding: 8px 14px;
    font-size: 11.5px;
    color: #043666;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    line-height: 1.55;
    word-break: break-word;
}
.history-banner span { font-weight: 700; }

/* =====================
   RATING CARD
   ===================== */
.rating-card {
    background: #fff; border-radius: 16px; padding: 18px 18px 16px; margin-top: 8px;
    box-shadow: 0 3px 16px rgba(4,54,102,0.12); border: 1.5px solid #dce8f5; max-width: 310px;
}
.rating-title {
    font-size: 14px; font-weight: 800; color: #0a1f3a;
    margin-bottom: 16px; display: flex; align-items: center; gap: 7px;
}
.rating-group { margin-bottom: 14px; }
.rating-label {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
    color: #7a9cc0; text-transform: uppercase; margin-bottom: 6px;
}
.star-row {
    display: flex; gap: 5px; padding: 4px 0;
    border-radius: 8px; transition: background 0.2s;
}
.star-row.star-error { background: rgba(224,58,58,0.08); animation: pulse-red 0.4s ease; }
@keyframes pulse-red {
    0%,100% { background: rgba(224,58,58,0.08); }
    50% { background: rgba(224,58,58,0.18); }
}
.star {
    width: 30px; height: 30px; fill: #d0dce8;
    cursor: pointer; transition: fill 0.15s, transform 0.12s;
}
.star:hover, .star.filled { fill: #f5a623; }
.star:hover { transform: scale(1.2); }
.star.empty { fill: #d0dce8; }
.star-row:hover .star { fill: #d0dce8; }
.star-row:hover .star:not(:hover ~ .star) { fill: #f5a623; }
.rating-komentar {
    width: 100%; border: 1.5px solid #d0e3f5; border-radius: 12px;
    padding: 10px 13px; font-size: 12.5px; color: #0a1f3a; background: #f7fbff;
    resize: none; outline: none; font-family: inherit; margin-bottom: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.rating-komentar:focus { border-color: #043666; box-shadow: 0 0 0 3px rgba(4,54,102,0.08); background: #fff; }
.rating-komentar::placeholder { color: #b8cfe0; }
.rating-submit-btn {
    width: 100%; background: linear-gradient(135deg, #043666, #0a5ca8);
    color: #fff; border: none; border-radius: 12px; padding: 12px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
    box-shadow: 0 4px 14px rgba(4,54,102,0.3);
}
.rating-submit-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.rating-submit-btn:active { transform: scale(0.98); }
.rating-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.shake { animation: shake 0.45s ease; }

.rating-result { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 4px 0; }
.rating-result-icon { font-size: 30px; line-height: 1; }
.rating-result-title { font-size: 14px; font-weight: 800; color: #0a1f3a; text-align: center; }
.rating-result-rows { width: 100%; display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.rating-result-row {
    display: flex; align-items: center; gap: 9px;
    background: #f0f7ff; border-radius: 10px; padding: 8px 12px;
}
.rr-label { font-size: 11px; font-weight: 700; color: #7a9cc0; text-transform: uppercase; letter-spacing: 1px; min-width: 62px; }
.rr-stars { flex: 1; font-size: 14px; letter-spacing: 1px; }
.rr-val { font-size: 12px; font-weight: 700; color: #043666; }
.rr-komentar {
    font-size: 12px; color: #5a80a0; font-style: italic;
    text-align: center; padding: 7px 10px; background: #f7fbff;
    border-radius: 10px; border-left: 3px solid #c2d8f5;
}
.rating-result-sub { font-size: 12px; color: #7a9cc0; text-align: center; margin-top: 2px; }

/* =====================
   TOMBOL BACK HEADER
   ===================== */
#backBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #fff;
    transition: background 0.18s, opacity 0.18s;
    flex-shrink: 0;
}
#backBtn:hover:not(.inactive) { background: rgba(255,255,255,0.15); }
#backBtn:active:not(.inactive) { background: rgba(255,255,255,0.25); transform: scale(0.93); }
#backBtn.inactive { opacity: 0.28; cursor: default; pointer-events: none; }
#backBtn svg { width: 18px; height: 18px; display: block; }

/* =====================
   RATING PREFILLED
   ===================== */
.rating-card .star.filled { fill: #f6b93b; stroke: #e07c00; }
.rating-card .star.empty { fill: none; stroke: #b0b0b0; }
.rating-prefilled-badge {
    display: inline-block;
    font-size: 10px;
    background: rgba(21, 40, 72, 0.08);
    color: #152848; border-radius: 20px;
    padding: 2px 8px; margin-bottom: 6px;
    font-weight: 600; letter-spacing: 0.3px;
}

/* =====================
   RENDER RIWAYAT DISABLED
   ===================== */
.renderRiwayatAllDisabled .message.bot button { opacity: 0.38 !important; pointer-events: none !important; }

:root {
    --primary-dark: #0f172a; 
    --accent-gold: #c49a6c;  
    --bg-light: #ffffff;
    --border-color: #f1f5f9;
    --text-muted: #64748b;
}

.sl-appname {
    font-family: 'Times New Roman', serif; /* Atau serif elegan lainnya */
    font-size: 42px;
    letter-spacing: 2px;
    font-weight: 700;
    color: white;
    margin-top: 20px;
}

.sl-tagline-italic {
    color: #94a3b8;
    font-style: italic;
    font-size: 14px;
    border-left: 2px solid var(--accent-gold);
    padding-left: 15px;
    margin: 20px 0;
}

.sl-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #cbd5e1;
}

/* Sisi Kanan (Form) */
.sr-title {
    font-family: 'Times New Roman', serif;
    font-size: 28px;
    color: var(--primary-dark);
    text-align: center;
}

.sr-sub {
    text-align: center;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 30px;
}

.reg-field label {
    font-size: 11px;
    color: var(--primary-dark);
    font-weight: 700;
}

.reg-input-wrap {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fdfdfd;
}

.reg-btn {
    background: var(--primary-dark);
    border-radius: 8px;
    padding: 18px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.gold-text {
    color: var(--accent-gold);
    font-weight: 700;
}

.sl-tagline-italic {
    color: #94a3b8;
    font-style: italic;
    font-size: 14px;
    border-left: 2px solid var(--accent-gold);
    padding-left: 15px;
    margin: 20px 0;
    line-height: 1.5;
}

.sl-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
}

.sl-footer-sub {
    color: var(--accent-gold);
    font-weight: 600;
}

.split-right-inner {
    padding: 44px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertikal tengah */
    align-items: center;     /* Horizontal tengah - INI KUNCINYA */
    height: 100%;
    z-index: 1;
}

/* Pastikan form tetap melebar penuh meskipun container-nya center */
.reg-form { 
    width: 100%; 
    max-width: 400px; /* Batasi lebar maksimal form agar estetik */
    display: flex; 
    flex-direction: column; 
    gap: 16px; 
}

.sr-icon-wrap {
    width: 64px;
    height: 64px;
    background: #f1f5f9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto; /* Centering horizontal */
    color: var(--primary-dark);
}

/* Container judul agar selalu di tengah */
.sr-header-center {
    text-align: center;
    margin-bottom: 32px;
    width: 100%;
}

.sr-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.sr-title {
    font-size: 26px; /* Ukuran proporsional */
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.5px; /* Sedikit rapat untuk kesan modern */
}

.sr-sub {
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
}

/* Hilangkan gaya gembok jika masih ada sisa CSS-nya */
.sr-icon-wrap {
    display: none;
}

/* =====================
   RESPONSIVE MOBILE
   ===================== */
@media (max-width: 640px) {
    body { background: #fff; align-items: flex-start; height: 100%; }
    .split-page {
        flex-direction: column;
        width: 100vw; max-width: 100vw;
        height: 100vh; height: 100dvh;
        max-height: none;
        border-radius: 0; box-shadow: none;
    }

    #pageRegistrasi .split-left { width: 100%; min-width: unset; height: auto; flex-shrink: 0; }
    #pageRegistrasi .split-left-inner {
        padding: 14px 20px; flex-direction: row;
        align-items: center; gap: 14px;
    }
    #pageRegistrasi .sl-logo { margin-bottom: 0; gap: 0; }
    #pageRegistrasi .sl-logo img { width: 30px; height: 30px; }
    #pageRegistrasi .sl-logo img.logo-tanjak { width: 26px; height: 26px; }
    #pageRegistrasi .sl-logo-divider { height: 28px; margin: 0 10px; }
    #pageRegistrasi .sl-badge,
    #pageRegistrasi .sl-negara,
    #pageRegistrasi .sl-tagline,
    #pageRegistrasi .sl-desc,
    #pageRegistrasi .sl-chips,
    #pageRegistrasi .sl-footer,
    #pageRegistrasi .sl-divider { display: none; }
    #pageRegistrasi .sl-instansi { font-size: 13px; margin-bottom: 0; line-height: 1.2; }
    #pageRegistrasi .split-right-inner { padding: 28px 22px; }
    #pageRegistrasi .sr-icon-wrap { display: none; }

    #pageChat .split-left { display: none; }
    #pageChat {
        height: 100vh; height: 100dvh;
        max-height: 100vh; max-height: 100dvh;
        overflow: hidden;
    }
    #pageChat .split-right {
        width: 100vw; flex: 1; min-height: 0;
        overflow: hidden; display: flex; flex-direction: column;
    }
    #pageChat .chat-panel {
        height: 100%; overflow: hidden;
        display: flex; flex-direction: column;
        flex: 1; min-height: 0;
    }

    .chat-header { padding: 9px 13px; flex-shrink: 0; }
    .chat-header h3 { font-size: 13px; }
    .chat-header span { font-size: 10px; }
    .chat-header .avatar { width: 34px; height: 34px; }
    .badge-day { flex-shrink: 0; }

    .history-banner { font-size: 10.5px; padding: 7px 12px; gap: 5px; }

    .chat-area {
        flex: 1; min-height: 0;
        overflow-y: auto; -webkit-overflow-scrolling: touch;
    }
    .chat-back-area { flex-shrink: 0; }
    .modal-card { max-width: 100%; border-radius: 18px; }
    .modal-btns { flex-direction: column; }
    .message { max-width: 92%; }

    body { 
        background: #f8fafc; 
        align-items: flex-start; 
    }

    .split-page {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
    }

    /* Branding di atas (Navy Section) */
    #pageRegistrasi .split-left {
        width: 100%;
        height: auto;
        padding: 40px 20px 60px 20px; /* Beri padding bawah lebih untuk efek overlap */
        clip-path: ellipse(150% 100% at 50% 0%); /* Efek melengkung di bawah */
    }

    #pageRegistrasi .split-left-inner {
        padding: 0;
        align-items: center;
        text-align: center;
    }

    /* Logo dibuat baris */
    #pageRegistrasi .sl-logo {
        justify-content: center;
        margin-bottom: 20px;
    }

    /* Tampilkan kembali elemen penting tapi ringkas */
    #pageRegistrasi .sl-appname {
        display: block;
        font-size: 28px;
        margin-top: 10px;
    }

    #pageRegistrasi .sl-tagline-italic {
        display: block;
        border-left: none;
        padding-left: 0;
        margin: 10px 0;
        font-size: 13px;
        opacity: 0.8;
    }

    /* Sembunyikan yang terlalu memakan tempat */
    #pageRegistrasi .sl-desc, 
    #pageRegistrasi .sl-chips, 
    #pageRegistrasi .sl-footer, 
    #pageRegistrasi .sl-divider,
    #pageRegistrasi .sl-badge { 
        display: none; 
    }

    /* Form di bawah (White Section) */
    #pageRegistrasi .split-right {
        width: 100%;
        background: #ffffff;
        margin-top: -30px; /* Menumpuk ke atas background navy */
        border-radius: 30px 30px 0 0;
        padding-bottom: 40px;
    }

    #pageRegistrasi .split-right-inner {
        padding: 40px 24px;
    }

    .sr-title {
        font-size: 24px;
    }

    /* Tombol lebih besar di HP agar mudah ditekan */
    .reg-btn {
        padding: 18px;
    }

    .split-page {
        flex-direction: column;
        height: auto;
        border-radius: 0;
    }

    /* Bagian Navy di atas */
    #pageRegistrasi .split-left {
        width: 100%;
        padding: 40px 24px 60px;
        min-height: auto;
    }

    #pageRegistrasi .sl-appname {
        font-size: 32px;
        text-align: center;
    }

    /* Bagian Form (Putih) menumpuk ke atas */
    #pageRegistrasi .split-right {
        width: 100%;
        margin-top: -40px;
        border-radius: 32px 32px 0 0;
        background: white;
    }

    #pageRegistrasi .split-right-inner {
        padding: 40px 24px;
    }

    /* Penyesuaian judul di Mobile */
    .sr-title {
        font-size: 22px;
    }

    .sr-sub {
        font-size: 14px;
        padding: 0 10px;
    }
}