/* =============================================================
   KILATCASH — STYLESHEET
   Versi   : 2.0
   Dibuat  : 2026
   ============================================================= */

/* ─────────────────────────────────────────────
   1. CUSTOM PROPERTIES (CSS Variables)
───────────────────────────────────────────── */
:root {
  --navy:         #0D1B3E;
  --blue:         #1B4FD8;
  --teal:         #00C896;
  --teal-dark:    #00875A;
  --green:        #10B981;
  --orange:       #FF6B35;
  --orange-dark:  #D95A28;
  --orange-light: #FFF3EF;
  --warn:         #F59E0B;
  --danger:       #EF4444;
  --gray:         #8896AB;
  --border:       #E4EAF3;
  --bg:           #F5F7FF;
  --white:        #FFFFFF;
  --text:         #0D1B3E;
  --card-shadow:  0 2px 16px rgba(13, 27, 62, 0.08);
  --focus-ring:   0 0 0 4px rgba(27, 79, 216, 0.12);
}

/* ─────────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html { font-size: 16px; scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a    { color: inherit; text-decoration: none; }
img  { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; line-height: 1.25; }

/* ─────────────────────────────────────────────
   3. APP SHELL (Mobile – maks 430px)
───────────────────────────────────────────── */
.app-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.06);
  position: relative;
}

/* ─────────────────────────────────────────────
   4. KOMPONEN BERSAMA
───────────────────────────────────────────── */
.top-bar {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.page-header .top-bar { background: transparent; border-bottom: none; }

.top-bar h1, .top-bar-title {
  font-size: 1rem; font-weight: 700; color: var(--text);
}
.page-header .top-bar-title { color: #fff; }

.back-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: #F0F4FF; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; text-decoration: none; color: var(--text);
  flex-shrink: 0; transition: background 0.2s;
}
.back-btn:hover { background: #DDE6FF; }
.page-header .back-btn { background: rgba(255,255,255,0.15); color: #fff; border-radius: 12px; }

.error-msg {
  background: #FFF0F0; border: 1px solid #FFD0D0; border-radius: 10px;
  padding: 11px 14px; font-size: 0.82rem; color: #C53030;
  margin-bottom: 16px; display: flex; align-items: flex-start;
  gap: 8px; text-align: left; line-height: 1.5;
}

.btn-primary {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, #1B4FD8, #0D1B3E);
  border: none; border-radius: 14px; color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary:hover   { opacity: 0.92; }
.btn-primary:active  { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.badge-app { padding: 4px 10px; border-radius: 8px; font-size: 0.72rem; font-weight: 700; }
.badge-app.success { background: #ECFDF5; color: #059669; }
.badge-app.warn    { background: #FFFBEB; color: #D97706; }
.badge-app.danger  { background: #FFF5F5; color: #DC2626; }
.badge-app.info    { background: #EEF2FF; color: #4F46E5; }
.badge-app.orange  { background: var(--orange-light); color: var(--orange-dark); }

.card-app {
  background: var(--white); border-radius: 16px; padding: 18px;
  box-shadow: var(--card-shadow); border: none; margin-bottom: 14px;
}
.card-app.flat { box-shadow: none; border: 1px solid var(--border); }

/* ─────────────────────────────────────────────
   5. FORM ELEMENTS
───────────────────────────────────────────── */
.form-wrap { padding: 0 16px; }
.form-grp  { margin-bottom: 16px; }

.form-label, .form-grp label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: #44546A; margin-bottom: 6px;
}

.form-input, .phone-input {
  width: 100%; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: 14px;
  font-size: 1rem; font-family: 'DM Sans', sans-serif; font-weight: 500;
  color: var(--text); background: #F8FAFF;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none; appearance: none; -webkit-appearance: none;
}
.form-input:focus, .phone-input:focus {
  border-color: var(--blue); background: var(--white); box-shadow: var(--focus-ring);
}
.form-input::placeholder, .phone-input::placeholder { color: #BCC5D6; }

.input-wrap { position: relative; margin-bottom: 18px; }
.input-prefix {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 0.9rem; font-weight: 600; color: var(--navy);
  display: flex; align-items: center; gap: 6px; pointer-events: none; z-index: 1;
}
.input-prefix .flag { font-size: 1.1rem; }
.sep, .input-prefix .sep { width: 1px; height: 18px; background: var(--border); margin-left: 2px; }
.phone-input { padding-left: 88px !important; }

/* ─────────────────────────────────────────────
   6. LOGIN / REGISTER — HERO
───────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, #0D1B3E 0%, #1B4FD8 60%, #00C896 130%);
  padding: 40px 24px 70px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.05); top: -80px; right: -80px; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%;
  background: rgba(0,200,150,0.15); bottom: 20px; left: -40px; pointer-events: none;
}

.hero-logo { display: flex; align-items: center; margin-bottom: 24px; position: relative; z-index: 1; }
.hero-logo img { height: 45px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); object-fit: contain; }

.hero h1 { font-size: clamp(1.4rem, 5vw, 1.6rem); font-weight: 700; color: #fff; position: relative; z-index: 1; }
.hero h1 span { color: var(--teal); }
.hero p { color: rgba(255,255,255,0.8); margin-top: 8px; font-size: 0.9rem; position: relative; z-index: 1; }

.promo-banner {
  position: relative; z-index: 1; margin-top: 24px; border-radius: 16px;
  overflow: hidden; box-shadow: 0 8px 24px rgba(13,27,62,0.3);
  border: 2px solid rgba(255,255,255,0.1);
}
.promo-banner img { width: 100%; object-fit: cover; }

.form-card {
  flex: 1; background: var(--white); border-radius: 28px 28px 0 0;
  margin-top: -28px; padding: 32px 24px 40px;
  position: relative; z-index: 2; box-shadow: 0 -4px 30px rgba(13,27,62,0.08);
}
.form-card h2 { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.form-card .sub { font-size: 0.875rem; color: var(--gray); margin-bottom: 24px; }

.or-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--gray); font-size: 0.8rem; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-register {
  width: 100%; padding: 15px; background: transparent;
  border: 2px solid var(--border); border-radius: 14px; color: var(--navy);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-decoration: none; display: block; text-align: center;
}
.btn-register:hover { border-color: var(--blue); color: var(--blue); background: #F8FAFF; }

.terms { text-align: center; font-size: 0.75rem; color: var(--gray); margin-top: 24px; line-height: 1.6; }
.terms a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.provider-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EEF2FF; border-radius: 20px; padding: 5px 12px;
  font-size: 0.72rem; font-weight: 700; color: var(--blue); margin-bottom: 16px;
}

.footer-logos {
  margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--border);
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.footer-logos span { font-size: 0.7rem; color: var(--gray); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.footer-logos img  { max-width: 200px; height: auto; }

/* ─────────────────────────────────────────────
   7. REGISTER — PROGRESS & STEP
───────────────────────────────────────────── */
.prog-wrap { padding: 16px 24px 0; display: flex; gap: 6px; }
.prog-seg  { flex: 1; height: 4px; border-radius: 4px; background: var(--border); transition: background 0.3s; }
.prog-seg.active { background: var(--blue); }

.content-reg { flex: 1; padding: 24px 24px 40px; }
.step-label  { font-size: 0.72rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.step-title  { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.step-sub    { font-size: 0.875rem; color: var(--gray); margin-bottom: 24px; }

.login-link  { text-align: center; margin-top: 20px; font-size: 0.875rem; color: var(--gray); }
.login-link a { color: var(--blue); font-weight: 600; }

.benefit-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.benefit-item .ico { font-size: 1.2rem; width: 28px; text-align: center; }

/* ─────────────────────────────────────────────
   8. POPUP GAMBAR (Modal Promo)
───────────────────────────────────────────── */
.img-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,62,0.85);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 99999; display: flex; align-items: center;
  justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.img-popup-overlay.active { opacity: 1; visibility: visible; }

.img-popup-content {
  position: relative; width: 90%; max-width: 320px; border-radius: 16px;
  transform: scale(0.7) translateY(20px); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175,0.885,0.32,1.275), opacity 0.4s ease;
}
.img-popup-overlay.active .img-popup-content { transform: scale(1) translateY(0); opacity: 1; }
.img-popup-content img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.img-popup-close {
  position: absolute; top: -14px; right: -14px; width: 34px; height: 34px;
  background: var(--white); border: 2px solid var(--border); border-radius: 50%;
  color: var(--text); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.img-popup-close:hover { background: var(--blue); color: #fff; border-color: var(--blue); transform: scale(1.1); }

/* ─────────────────────────────────────────────
   9. VERIFIKASI OTP
───────────────────────────────────────────── */
.content-otp { flex: 1; padding: 32px 24px 40px; text-align: center; }

.otp-icon {
  width: 72px; height: 72px; border-radius: 22px;
  background: linear-gradient(135deg, #EEF2FF, #DBEAFE);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 24px;
}

.content-otp h2  { font-size: 1.35rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.content-otp p   { font-size: 0.875rem; color: var(--gray); margin-bottom: 4px; }
.hp-num          { font-weight: 700; color: var(--text); }

.dev-box {
  background: #FFFBEB; border: 1.5px dashed #F59E0B;
  border-radius: 14px; padding: 14px 18px; margin: 20px 0; text-align: left;
}
.dev-box .dev-label { font-size: 0.7rem; color: #92400E; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.dev-box .dev-code  { font-family: 'Space Mono', monospace; font-size: 2rem; font-weight: 700; color: #D97706; letter-spacing: 8px; }
.dev-box small      { font-size: 0.7rem; color: #92400E; display: block; margin-top: 4px; }

.provider-info {
  display: flex; align-items: center; gap: 8px;
  background: #F0F4FF; border-radius: 10px; padding: 10px 14px;
  margin: 16px 0; font-size: 0.8rem; color: var(--gray); text-align: left;
}
.provider-info strong { color: var(--blue); }

.resent-note {
  background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 10px;
  padding: 10px 14px; font-size: 0.82rem; color: #065F46; margin: 12px 0; text-align: left;
}

.otp-boxes { display: flex; gap: 8px; justify-content: center; margin: 28px 0 20px; }
.otp-box {
  width: clamp(40px, 13vw, 52px); height: clamp(50px, 16vw, 62px);
  border: 2px solid var(--border); border-radius: 14px;
  font-family: 'Space Mono', monospace; font-size: 1.5rem; font-weight: 700;
  text-align: center; color: var(--text); background: #F8FAFF;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: transparent;
}
.otp-box:focus  { border-color: var(--blue); background: var(--white); box-shadow: var(--focus-ring); }
.otp-box.filled { border-color: var(--teal); background: #F0FDF8; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}
.otp-box.shake { animation: shake 0.4s ease; }

.btn-verify       { opacity: 0.5; }
.btn-verify.ready { opacity: 1; }

.resend-wrap { margin-top: 22px; font-size: 0.875rem; color: var(--gray); }
.countdown   { font-weight: 700; color: var(--navy); }
.btn-resend  { background: none; border: none; color: var(--blue); font-family: 'DM Sans', sans-serif; font-size: 0.875rem; font-weight: 700; cursor: pointer; display: none; padding: 0; }
.btn-resend.show { display: inline; }

/* ─────────────────────────────────────────────
   10. HALAMAN LEGAL (Privasi & Syarat)
───────────────────────────────────────────── */
.page-header {
  background: linear-gradient(145deg, #0D3A8A 0%, #1B4FD8 60%, #00C896 130%);
  padding: 0; position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,0.05); top: -80px; right: -60px; pointer-events: none;
}
.page-header::after {
  content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: rgba(0,200,150,0.1); bottom: 10px; left: -40px; pointer-events: none;
}

.hero-content { padding: 24px 24px 36px; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,200,150,0.2); border: 1px solid rgba(0,200,150,0.3);
  border-radius: 20px; padding: 5px 12px; font-size: 0.72rem; font-weight: 700;
  color: rgba(255,255,255,0.95); margin-bottom: 10px;
}
.hero-title { font-size: clamp(1.3rem, 5vw, 1.5rem); font-weight: 800; color: #fff; line-height: 1.2; }
.hero-sub   { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin-top: 6px; }

.content-wrap {
  padding: 24px 20px 60px; background: var(--white);
  border-radius: 28px 28px 0 0; margin-top: -16px; position: relative; z-index: 2;
}

.effective-date {
  display: flex; align-items: center; gap: 8px;
  background: #EDFBF5; border-radius: 10px; padding: 10px 14px;
  margin-bottom: 24px; font-size: 0.78rem; color: #00875A; font-weight: 600;
}

.sk-section { margin-bottom: 24px; }
.sk-section h2 {
  font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.sk-section h2 .num {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #00C896, #00875A);
  color: #fff; font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sk-section p { font-size: 0.85rem; line-height: 1.7; color: #3A4A6B; margin-bottom: 8px; }

.sk-list     { list-style: none; margin: 0 0 8px; padding: 0; }
.sk-list li  { font-size: 0.85rem; line-height: 1.65; color: #3A4A6B; padding: 4px 0 4px 20px; position: relative; }
.sk-list li::before { content: '→'; position: absolute; left: 0; color: var(--teal); font-weight: 700; font-size: 0.75rem; }

.highlight-box { background: #EDFBF5; border: 1px solid #A8EDD4; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 0.82rem; color: #005C3A; line-height: 1.65; }
.warning-box   { background: #FFF0F0; border: 1px solid #FFB3B3; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 0.82rem; color: #7A0000; line-height: 1.65; }
.info-box      { background: #EEF5FF; border: 1px solid #B3CEFF; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 0.82rem; color: #0D3A8A; line-height: 1.65; }

.data-table, .fee-table {
  width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 0.82rem;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.data-table th, .fee-table th { background: #EDFBF5; color: #005C3A; font-weight: 700; padding: 8px 10px; text-align: left; border-bottom: 2px solid #A8EDD4; white-space: nowrap; }
.data-table td, .fee-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); color: #3A4A6B; vertical-align: top; }
.data-table tr:last-child td, .fee-table tr:last-child td { border-bottom: none; }

.rights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.right-card  { background: #F8FAFF; border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; }
.right-card .rc-ico   { font-size: 1.4rem; margin-bottom: 6px; }
.right-card .rc-title { font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; font-weight: 700; color: var(--navy); }
.right-card .rc-sub   { font-size: 0.68rem; color: var(--gray); margin-top: 3px; line-height: 1.4; }

.sk-footer   { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px dashed var(--border); }
.sk-footer p { font-size: 0.75rem; color: var(--gray); line-height: 1.6; }
.sk-footer a { color: var(--teal); font-weight: 600; }

.contact-card { background: #F8FAFF; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 16px; }
.contact-card .cc-label { font-size: 0.72rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.contact-item { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text); margin-bottom: 6px; }
.contact-item:last-child { margin-bottom: 0; }
.contact-item span.ico { width: 26px; height: 26px; border-radius: 8px; background: #EDFBF5; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }

/* ─────────────────────────────────────────────
   11. ADMIN / DESKTOP — SIDEBAR & LAYOUT
───────────────────────────────────────────── */
body.admin-dashboard { display: flex; background: #f8f9fa; }

.sidebar { width: 250px; background: #343a40; color: #fff; padding: 20px 0; flex-shrink: 0; min-height: 100vh; }
.sidebar h4 { text-align: center; margin-bottom: 20px; }
.sidebar a  { color: #fff; text-decoration: none; display: block; padding: 10px 20px; transition: background 0.2s; }
.sidebar a:hover { background: #495057; }

.content             { flex: 1; padding: 20px; }
.dashboard-container { flex: 1; padding: 20px; }

.stats-box { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.stats-box > div {
  background: #fff; border: 1px solid #dee2e6; border-radius: 8px;
  padding: 15px; flex: 1; min-width: 140px; text-align: center;
  font-weight: 700; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

canvas { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 10px; margin-bottom: 30px; max-width: 100%; height: auto !important; }
table th, table td { vertical-align: middle !important; }

/* ─────────────────────────────────────────────
   12. RESPONSIVE — BREAKPOINTS
───────────────────────────────────────────── */
@media (max-width: 360px) {
  .form-card, .content-reg, .content-otp { padding-left: 18px; padding-right: 18px; }
  .otp-box     { border-radius: 10px; font-size: 1.3rem; }
  .hero h1     { font-size: 1.3rem; }
  .rights-grid { grid-template-columns: 1fr; }
}

@media (min-width: 640px) {
  .app-shell {
    max-width: 480px; border-radius: 24px;
    margin: 24px auto; min-height: auto;
  }
  .form-card, .content-reg, .content-otp { padding-left: 32px; padding-right: 32px; }
  .content-wrap   { padding: 28px 28px 64px; }
  .rights-grid    { grid-template-columns: repeat(3, 1fr); }
  .stats-box > div { min-width: 180px; }
}

@media (min-width: 1024px) {
  .sidebar { width: 260px; }
  .data-table, .fee-table { display: table; overflow-x: visible; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
