/* ============================================================
   WA Slip - Stylesheet
   Mirror dari Android Color.kt + Compose layouts
   ============================================================ */

:root {
  --primary:        #4A6FA5;
  --primary-dark:   #1E3A5F;
  --primary-light:  #6B8CBF;
  --secondary:      #2E5090;
  --secondary-dark: #162D50;
  --accent-blue:    #3B6DB3;
  --accent-gold:    #D4AF37;
  --bg:             #F5F7FA;
  --surface:        #FFFFFF;
  --surface-alt:    #F0F5FB;
  --text-primary:   #1A2332;
  --text-secondary: #5D6B7A;
  --text-tertiary:  #8794A4;
  --success:        #4CAF50;
  --warning:        #FF9800;
  --error:          #E53935;
  --info:           #2196F3;
  --whatsapp:       #25D366;
  --whatsapp-biz:   #128C7E;
  --unread-bg:      #F0F5FB;
  --unread-dot:     #5C7BA8;
  --badge:          #FF5252;
  --gradient: linear-gradient(135deg, #1E3A5F 0%, #2E5090 50%, #4A6FA5 100%);
  --shadow-sm: 0 1px 3px rgba(30,58,95,0.08);
  --shadow-md: 0 4px 12px rgba(30,58,95,0.12);
  --shadow-lg: 0 8px 24px rgba(30,58,95,0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: linear-gradient(135deg, #1E3A5F 0%, #0D1B2A 100%);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

/* App container: boxed di desktop browser, full-screen di installed PWA & mobile */
.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.25);
  overflow-x: hidden;
}
@media (max-width: 600px) {
  .app-shell { box-shadow: none; max-width: 100%; }
}

/* ============================================================
   PWA STANDALONE MODE (installed app)
   - Full-screen, no shadow
   - Safe-area-insets untuk notch / dynamic island / home indicator
   - Native-feel: no tap highlight, no text select on chrome
   - Overscroll behavior contained
   ============================================================ */
@media all and (display-mode: standalone),
       all and (display-mode: fullscreen),
       all and (display-mode: minimal-ui) {
  html, body {
    background: var(--bg) !important;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
  }
  body {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
  }
  .app-shell,
  .auth-screen,
  .lock-screen {
    max-width: 100% !important;
    box-shadow: none !important;
    min-height: 100vh;
    min-height: 100dvh;
  }
  /* Chrome UI: tidak boleh ke-select / ke-drag */
  .topbar, .pdf-topbar, .pdf-toolbar,
  .bottom-nav, .stats-card, .setting-row,
  .section-label, .notif-section,
  .auth-header, .lock-screen h1, .lock-screen p {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
  }
  /* Sembunyikan baris install kalau sudah ter-install */
  #installAppRow { display: none !important; }
}

/* ============================================================
   iOS-specific PWA polish
   ============================================================ */
@supports (-webkit-touch-callout: none) {
  /* Disable bounce di pull-to-refresh untuk feel native */
  body { overscroll-behavior-y: contain; }
  /* iOS button styling reset */
  button, input, select, textarea {
    -webkit-appearance: none;
    appearance: none;
  }
  input[type="tel"], input[type="text"], input[type="number"] {
    -webkit-appearance: none;
  }
}

/* ============================================================
   INSTALL GATE SCREEN (index.php)
   - Tampil untuk user yang akses lewat browser (belum install)
   - Auto-hide saat di-launch dari installed PWA (display-mode: standalone)
   ============================================================ */
.install-screen {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--gradient);
  padding: 40px 20px 24px;
  padding-top: calc(40px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  .install-screen { box-shadow: none; max-width: 100%; }
}

.install-hero {
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}
.install-logo {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
  backdrop-filter: blur(10px);
}
.install-logo img {
  width: 72px; height: 72px;
  border-radius: 16px;
}
.install-title {
  font-size: 30px; font-weight: 800; margin: 0;
  letter-spacing: 0.5px;
}
.install-tagline {
  font-size: 14px; opacity: 0.88;
  margin: 6px 0 0;
}

.install-card {
  background: var(--surface);
  width: 100%;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
}
.install-card h2 {
  font-size: 20px; font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
  text-align: center;
}
.install-lead {
  font-size: 13px; color: var(--text-secondary);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Benefit list */
.install-benefits {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.benefit-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface-alt);
  border-radius: 12px;
}
.benefit-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.benefit-title {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  line-height: 1.3;
}
.benefit-desc {
  font-size: 11px; color: var(--text-secondary); margin-top: 2px;
}

/* Loader saat detect platform */
.install-loader {
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Tombol install Chrome (BIG CTA) */
.install-btn-big {
  width: 100%;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-biz) 100%);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(37,211,102,0.40);
  transition: all .2s;
  animation: pulseInstall 2s ease-in-out infinite;
}
.install-btn-big:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,211,102,0.50); }
.install-btn-big:active { transform: translateY(0); }
.install-btn-big:disabled { opacity: .7; cursor: not-allowed; animation: none; }
@keyframes pulseInstall {
  0%, 100% { box-shadow: 0 8px 20px rgba(37,211,102,0.40); }
  50%      { box-shadow: 0 8px 28px rgba(37,211,102,0.65); }
}
.install-btn-android {
  background: linear-gradient(135deg, #00875F 0%, #006C4D 100%) !important;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,135,95,0.40) !important;
  animation: pulseInstallAndroid 2s ease-in-out infinite !important;
}

/* Tombol secondary di install screen (Copy URL, dll) */
.install-btn-secondary {
  width: 100%;
  background: var(--surface-alt);
  color: var(--primary-dark);
  border: 1.5px solid #DCE3EC;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  transition: all .15s;
}
.install-btn-secondary:hover {
  background: #E5EBF2;
  transform: translateY(-1px);
}

/* Warning untuk iOS version lama */
.install-warning {
  background: #FFEBEE;
  border: 1px solid #FFCDD2;
  border-left: 4px solid var(--error);
  color: #B71C1C;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}
.install-warning strong { font-weight: 700; }
@keyframes pulseInstallAndroid {
  0%, 100% { box-shadow: 0 8px 20px rgba(0,135,95,0.40); }
  50%      { box-shadow: 0 8px 28px rgba(0,135,95,0.65); }
}

/* Instruksi card per platform */
.install-instructions {
  background: var(--surface-alt);
  border: 1px solid #DCE3EC;
  border-radius: 14px;
  padding: 16px;
}
.instr-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #DCE3EC;
}
.instr-platform-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-dark);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.instr-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.instr-sub {
  font-size: 11px; color: var(--text-secondary); margin-top: 2px;
}
.instr-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.instr-steps li {
  display: flex; gap: 10px;
  font-size: 13px; color: var(--text-primary);
  line-height: 1.45;
}
.instr-steps .step-num {
  background: var(--primary-dark);
  color: #fff;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
}

/* QR code untuk desktop */
.qr-box {
  text-align: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #E5EBF2;
}
.qr-box img {
  border-radius: 8px;
  display: inline-block;
  max-width: 100%;
  height: auto;
}
.qr-url {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 8px;
  word-break: break-all;
}

.install-footer {
  margin-top: 24px;
  text-align: center;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  line-height: 1.6;
}

/* Loading splash (first paint sebelum CSS load) */
.app-shell::before {
  content: '';
  position: fixed; inset: 0;
  background: var(--gradient);
  z-index: -1;
  pointer-events: none;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============== Auth gradient screens (Login / OTP / Lock) ============== */

.auth-screen {
  min-height: 100vh;
  background: var(--gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 24px;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  .auth-screen { box-shadow: none; max-width: 100%; }
}

.auth-header {
  text-align: center;
  color: #fff;
  margin-bottom: 32px;
}
.auth-header .app-logo {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 2px solid rgba(255,255,255,0.3);
}
.auth-header .app-logo img { width: 64px; height: 64px; border-radius: 50%; }
.auth-header .app-title    { font-size: 32px; font-weight: 700; margin: 0; letter-spacing: 0.5px; }
.auth-header .app-subtitle { font-size: 14px; opacity: 0.85; margin-top: 6px; }

.auth-card {
  background: var(--surface);
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}
.auth-card h2 { font-size: 22px; margin: 0 0 4px; color: var(--text-primary); }
.auth-card .lead { color: var(--text-secondary); margin: 0 0 24px; font-size: 14px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input {
  width: 100%;
  border: 1.5px solid #D5DCE5;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,111,165,0.15);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--primary);
  width: 20px; height: 20px;
}
.input-icon-wrap input { padding-left: 42px; }

.btn-primary, .btn-secondary, .btn-danger, .btn-outline {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  transition: all .2s ease;
}
.btn-primary { background: var(--primary-dark); color: #fff; }
.btn-primary:hover  { background: var(--secondary); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary { background: var(--whatsapp); color: #fff; }
.btn-danger   { background: var(--error); color: #fff; }
.btn-danger:hover { background: #C62828; }
.btn-outline  {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.error-msg {
  background: #FFEBEE;
  color: var(--error);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin: 12px 0;
  border: 1px solid #FFCDD2;
}
.auth-footnote {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}
.auth-footer {
  margin-top: auto;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  padding-top: 24px;
}

/* ============== OTP boxes ============== */

.otp-input-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 20px 0;
}
.otp-box {
  width: 56px; height: 56px;
  border-radius: 12px;
  border: 1.5px solid var(--primary-light);
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--surface);
  outline: none;
  transition: all .15s;
}
.otp-box:focus  { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(46,80,144,0.18); }
.otp-box.filled { border-color: var(--secondary); }

.otp-countdown      { text-align: center; color: var(--text-secondary); font-size: 13px; margin: 8px 0; }
.otp-countdown.expiring { color: var(--error); font-weight: 600; }

/* ============== Top bar (Home / History / PDF / Settings) ============== */

/* Hero header wrapper - gradient extends with curved bottom, contains topbar + spacing */
.hero-header {
  background: var(--gradient);
  color: #fff;
  padding: 16px 18px 44px;
  position: relative;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 4px 20px rgba(13,27,42,0.18);
}
.hero-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,0.08), transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.topbar {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   SAFE-AREA INSETS (always apply, tidak hanya di standalone mode)
   Di browser: env() = 0 → tidak ada efek
   Di installed PWA / iOS: hindari overlap dengan notch/dynamic island
   ============================================================ */
.hero-header {
  padding-top: calc(16px + env(safe-area-inset-top, 0px));
}
.pdf-topbar {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.auth-screen {
  padding-top: calc(40px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.lock-screen {
  padding-top:    calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.install-screen {
  padding-top:    calc(40px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav {
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}
.with-bottom-nav {
  padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}
.topbar .logo-tile {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar .titles .t1 { font-size: 16px; font-weight: 700; line-height: 1.15;
  letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .titles .t2 { font-size: 12px; opacity: 0.85;
  display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.topbar .titles .online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.25);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
  50%     { box-shadow: 0 0 0 5px rgba(74,222,128,0.10); }
}
.topbar .actions { display: flex; gap: 4px; align-items: center; }
.topbar .icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;
}
.topbar .icon-btn:hover { background: rgba(255,255,255,0.15); }
.topbar .badge-pill {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--badge);
  color: #fff;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
  box-shadow: 0 0 0 2px var(--secondary);
}
.topbar .back-btn { color: #fff; }

/* ============== Stats / filter chips ============== */

.stats-card {
  background: #fff;
  margin: -28px 14px 20px;
  border-radius: 18px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  box-shadow: 0 10px 30px rgba(13,27,42,0.18), 0 2px 6px rgba(30,58,95,0.06);
  position: relative;
  z-index: 5;
  border: 1px solid rgba(255,255,255,0.6);
  text-decoration: none;
}
.stat-tile {
  text-align: center;
  padding: 14px 4px;
  border-radius: 14px;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid transparent;
  text-decoration: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.stat-tile + .stat-tile::before {
  content: '';
  position: absolute;
  left: 0; top: 25%; height: 50%;
  width: 1px;
  background: #E8EEF5;
}
.stat-tile:hover { background: var(--surface-alt); }
.stat-tile:hover + .stat-tile::before,
.stat-tile.active::before,
.stat-tile.active + .stat-tile::before { display: none; }
.stat-tile.active {
  background: linear-gradient(135deg, #EAF1FB 0%, #DEE9F6 100%);
  border-color: rgba(74,111,165,0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,111,165,0.18);
}
.stat-tile .stat-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 2px;
}
.stat-tile.tile-all    .stat-icon { background: rgba(74,111,165,0.12);  color: var(--primary-dark); }
.stat-tile.tile-unread .stat-icon { background: rgba(229,57,53,0.10);   color: var(--error); }
.stat-tile.tile-read   .stat-icon { background: rgba(76,175,80,0.12);   color: var(--success); }
.stat-tile .stat-num   { font-size: 22px; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.stat-tile .stat-label { font-size: 11px; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.2px; }

/* ============== Notification cards (WhatsApp-style) ============== */

.notif-section {
  padding: 8px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notif-section .title  {
  font-size: 17px; font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.2px;
  display: flex; align-items: center; gap: 8px;
}
.notif-section .title::before {
  content: '';
  width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 2px;
}
.notif-section .subtitle {
  font-size: 12px; color: var(--text-secondary); margin-top: 2px;
  padding-left: 12px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--success); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  letter-spacing: 0.5px;
  animation: pulseLive 1.6s ease-in-out infinite;
}
.live-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
@keyframes pulseLive {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.55; }
}

.notif-list { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 10px; }

.notif-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(30,58,95,0.06), 0 1px 2px rgba(30,58,95,0.04);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  border: 1px solid #ECF1F7;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.notif-card:hover { box-shadow: 0 6px 18px rgba(30,58,95,0.12); transform: translateY(-2px); }
.notif-card.unread {
  background: linear-gradient(135deg, #F4F8FD 0%, #FFFFFF 100%);
  border-color: #D5E2F2;
  border-left: 4px solid var(--primary);
  padding-left: 11px;
}
.notif-card .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-card .body { flex: 1; min-width: 0; }
.notif-card .row-1 {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.notif-card .judul {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-card .periode-badge {
  font-size: 10px;
  background: var(--unread-bg);
  color: var(--primary-dark);
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.notif-card .isi {
  font-size: 13px; color: var(--text-secondary); line-height: 1.45;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-card .isi strong { color: var(--text-primary); }
.notif-card .isi code   { background: #EEF3F8; padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.notif-card .pdf-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px;
  padding: 8px;
  background: #FAFBFD;
  border: 1px solid #E5EBF2;
  border-radius: 10px;
}
.notif-card .pdf-tile {
  width: 36px; height: 36px;
  background: var(--error); color: #fff;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.notif-card .pdf-name {
  font-size: 13px; color: var(--text-primary); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-card .pdf-hint { font-size: 11px; color: var(--text-tertiary); }
.notif-card .row-3 {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.notif-card .status {
  display: inline-flex; align-items: center; gap: 4px;
}
.notif-card .check-read   { color: var(--info); }
.notif-card .check-unread { color: var(--text-tertiary); }
.file-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
}
.file-status.checking    { background: #ECEFF1; color: #607D8B; }
.file-status.saved       { background: #E8F5E9; color: var(--success); }
.file-status.not-downloaded { background: #FFF3E0; color: var(--warning); }
.file-status.unavailable { background: #FFEBEE; color: var(--error); }

/* ============== Bottom nav (Home <-> History) ============== */

.bottom-nav {
  position: sticky;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -4px 20px rgba(30,58,95,0.10);
  display: flex;
  z-index: 9;
  border-top: 1px solid rgba(30,58,95,0.06);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
}
@media (min-width: 601px) {
  .bottom-nav {
    position: fixed; bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 560px;
  }
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 6px;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  position: relative;
  border-radius: 12px;
  transition: all .2s;
}
.bottom-nav a:hover { color: var(--primary); background: var(--surface-alt); }
.bottom-nav a.active {
  color: var(--primary-dark);
}
.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0; left: 30%; right: 30%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}
.bottom-nav a .icon  {
  font-size: 22px; margin-bottom: 3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.bottom-nav a.active .icon { transform: scale(1.08); }
.bottom-nav .badge-pill {
  position: absolute; top: 6px; left: 50%;
  margin-left: 4px;
  background: var(--badge); color: #fff;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  font-size: 10px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.with-bottom-nav { padding-bottom: 70px; }

/* ============== Empty states ============== */

.empty-state {
  text-align: center;
  padding: 60px 24px 40px;
  color: var(--text-secondary);
}
.empty-state .icon-circle {
  width: 110px; height: 110px;
  background: linear-gradient(135deg, #EAF1FB 0%, #D4E1F4 100%);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(74,111,165,0.18), inset 0 -4px 8px rgba(255,255,255,0.5);
  position: relative;
}
.empty-state .icon-circle::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(74,111,165,0.20);
}
.empty-state h3 {
  font-size: 17px; color: var(--text-primary); margin: 0 0 8px;
  font-weight: 700;
}
.empty-state p  {
  font-size: 13px; margin: 4px 0;
  max-width: 280px;
  margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

.loader {
  text-align: center; padding: 40px;
  color: var(--text-secondary);
}
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #E0E6ED;
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============== Modal / dialog ============== */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,27,42,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { margin: 0 0 6px; font-size: 18px; color: var(--text-primary); }
.modal .modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #FFEBEE; color: var(--error);
  display: inline-flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.modal .center { text-align: center; }
.warning-box {
  background: #FFF8E1;
  border: 1px solid #FFE082;
  color: #6D4C00;
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 13px;
}
.warning-box .head { font-weight: 700; margin-bottom: 4px; }
.modal-actions {
  display: flex; gap: 10px; margin-top: 16px;
}
.modal-actions button { flex: 1; }

/* ============== WhatsApp chooser overlay ============== */

.wa-chooser .wa-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  border: 1px solid #E5EBF2;
  margin-bottom: 8px;
  cursor: pointer;
}
.wa-chooser .wa-option:hover { background: var(--surface-alt); }
.wa-chooser .wa-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.wa-chooser .wa-icon.wa { background: var(--whatsapp); }
.wa-chooser .wa-icon.wb { background: var(--whatsapp-biz); }

/* ============== Settings page ============== */

/* Profile inline di dalam hero-header (mirror Android SettingsScreen) */
.settings-hero { padding-bottom: 28px; }
.settings-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 4px 4px;
  position: relative;
  z-index: 2;
}
.settings-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, #E8EFF7 100%);
  color: var(--primary-dark);
  font-size: 26px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,0.20), inset 0 -3px 6px rgba(74,111,165,0.10);
  position: relative;
  border: 3px solid rgba(255,255,255,0.25);
}
.settings-avatar .badge-verified {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 22px; height: 22px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2.5px solid var(--secondary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.20);
}
.settings-profile-info { flex: 1; min-width: 0; color: #fff; }
.settings-profile-info .name {
  font-size: 17px; font-weight: 700; letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.settings-profile-info .company,
.settings-profile-info .phone {
  font-size: 12px; opacity: 0.88;
  margin-top: 3px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Section grouping (settings sections) */
.section-label {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
  letter-spacing: 0.8px;
  padding: 18px 20px 8px;
}
.settings-group {
  background: var(--surface);
  margin: 0 14px 4px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(30,58,95,0.06), 0 1px 0 rgba(255,255,255,0.5) inset;
  border: 1px solid #ECF1F7;
}
.settings-group .setting-row {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid #F0F4FA;
  background: transparent;
}
.settings-group .setting-row:last-child { border-bottom: none; }

.setting-row {
  background: var(--surface);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}
.setting-row:hover { background: #F8FAFD; }
.setting-row .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.setting-row .icon-info     { background: rgba(33,150,243,0.12);  color: var(--info); }
.setting-row .icon-status   { background: rgba(76,175,80,0.12);   color: var(--success); }
.setting-row .icon-security { background: rgba(74,111,165,0.12);  color: var(--primary-dark); }
.setting-row .icon-notif    { background: rgba(212,175,55,0.15);  color: #B8941F; }
.setting-row .icon-sound    { background: rgba(37,211,102,0.12);  color: var(--whatsapp-biz); }
.setting-row .icon-help     { background: rgba(156,39,176,0.10);  color: #8E24AA; }

.setting-row .body { flex: 1; min-width: 0; }
.setting-row .body .t1 {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  line-height: 1.3;
}
.setting-row .body .t2 {
  font-size: 12px; color: var(--text-secondary); margin-top: 3px;
  line-height: 1.4;
}
.setting-row .switch {
  width: 44px; height: 24px;
  background: #D5DCE5; border-radius: 12px;
  position: relative;
  transition: background .25s;
  flex-shrink: 0;
}
.setting-row .switch.on { background: var(--success); }
.setting-row .switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff; border-radius: 50%;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.setting-row .switch.on::after { transform: translateX(20px); }
.setting-row .chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  display: inline-flex; align-items: center;
}
.setting-row.info-row { cursor: default; }
.setting-row.info-row:hover { background: transparent; }
.setting-row.danger .icon { background: #FFEBEE; color: var(--error); }
.setting-row.danger .body .t1 { color: var(--error); }

.footer-version {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 11px;
  padding: 28px 20px 20px;
  line-height: 1.7;
}

/* ============== Toast ============== */
.toast {
  position: fixed;
  bottom: 80px; left: 50%;
  transform: translateX(-50%);
  background: #2A2A2A;
  color: #fff;
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, bottom .2s;
  z-index: 200;
}
.toast.show { opacity: 1; bottom: 100px; }

/* ============== Lock screen ============== */
.lock-screen {
  min-height: 100vh;
  background: var(--gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  .lock-screen { box-shadow: none; max-width: 100%; }
}
.lock-screen .lock-logo {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.3);
  margin-bottom: 24px;
}
.lock-screen .lock-logo img { width: 64px; height: 64px; border-radius: 50%; }
.lock-screen h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.lock-screen p  { font-size: 14px; opacity: 0.85; margin: 0 0 32px; }
.lock-screen .fingerprint-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.lock-screen .actions { width: 100%; max-width: 320px; }
.lock-screen .actions button { margin-bottom: 12px; background: #fff; color: var(--primary-dark); }
.lock-screen .err-text { color: #FFCDD2; font-size: 13px; margin-top: 8px; }

/* ============================================================
   PDF Viewer (mirror Android PdfViewerScreen.kt)
   ============================================================ */

.pdf-screen {
  min-height: 100vh;
  background: #1F2933;
  display: flex;
  flex-direction: column;
  color: #fff;
  position: relative;
}

/* Topbar khusus pdf — slim, dark, no gradient agar PDF terlihat */
.pdf-topbar {
  background: var(--gradient);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.pdf-topbar .pdf-titles { flex: 1; min-width: 0; }
.pdf-topbar .pdf-titles .t1 {
  font-size: 15px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdf-topbar .pdf-titles .t2 {
  font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 2px;
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdf-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.10);
  border: none;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  flex-shrink: 0;
}
.pdf-icon-btn:hover { background: rgba(255,255,255,0.20); }

/* Toolbar di bawah topbar - zoom + download + meta */
.pdf-toolbar {
  background: #2C3742;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 62px;
  z-index: 15;
  box-shadow: 0 2px 4px rgba(0,0,0,0.20);
  flex-wrap: wrap;
}
.pdf-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.pdf-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 5px 10px;
  border-radius: 10px;
  letter-spacing: 0.3px;
}
.pdf-chip-light {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.10);
  padding: 5px 10px;
  border-radius: 10px;
}
.pdf-actions-bar {
  display: flex; align-items: center; gap: 6px;
}
.pdf-btn-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.90);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .15s;
}
.pdf-btn-icon:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
}
.pdf-btn-icon:active { transform: scale(0.92); }
.pdf-zoom-label {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.85);
  min-width: 44px; text-align: center;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}
.pdf-divider {
  width: 1px; height: 22px;
  background: rgba(255,255,255,0.15);
  margin: 0 4px;
}
.pdf-btn-download {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--whatsapp);
  color: #fff;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(37,211,102,0.32);
  transition: all .15s;
}
.pdf-btn-download:hover {
  background: #1FB855;
  box-shadow: 0 4px 12px rgba(37,211,102,0.45);
  transform: translateY(-1px);
}
.pdf-btn-download:active { transform: translateY(0); }

/* PDF stage - dark canvas, iframe centered with shadow card */
.pdf-frame {
  flex: 1;
  background: #1F2933;
  position: relative;
  min-height: calc(100vh - 130px);
  overflow: auto;
}
.pdf-stage {
  width: 100%;
  height: calc(100vh - 130px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(ellipse at center, rgba(74,111,165,0.08), transparent 70%),
    #1F2933;
}
.pdf-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
  display: block;
  transition: transform .25s ease;
}
.pdf-fallback {
  display: flex;
  align-items: center; justify-content: center;
  min-height: calc(100vh - 130px);
  padding: 24px;
}

/* Floating download FAB (mobile shortcut) */
.pdf-fab {
  position: fixed;
  right: max(20px, calc((100vw - 560px) / 2 + 20px));
  bottom: 24px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-biz) 100%);
  color: #fff;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.45), 0 2px 6px rgba(0,0,0,0.25);
  z-index: 25;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s;
}
.pdf-fab:hover { transform: scale(1.08); }
.pdf-fab:active { transform: scale(0.96); }
@media (max-width: 600px) {
  .pdf-fab { right: 20px; }
}

/* Responsive toolbar */
@media (max-width: 480px) {
  .pdf-toolbar { padding: 8px 12px; gap: 6px; }
  .pdf-meta { gap: 6px; }
  .pdf-chip, .pdf-chip-light { font-size: 10px; padding: 4px 8px; }
  .pdf-btn-download { padding: 6px 10px; font-size: 12px; }
  .pdf-btn-download svg { display: none; }
}

/* ============== Filter chips (History) ============== */
.chip-row {
  display: flex; gap: 8px;
  padding: 16px;
  flex-wrap: wrap;
}
.chip {
  background: var(--surface);
  border: 1.5px solid #DCE3EC;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============== Misc ============== */
.icon-svg { width: 20px; height: 20px; fill: currentColor; }
.flex-grow { flex: 1; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* Page background tint above bottom nav */
.page-bg { background: var(--bg); min-height: 100vh; }

/* ============================================================
   PWA: Permission Banner, In-App Notification, Install Row
   ============================================================ */

/* Install PWA banner di home.php — lebih prominent karena CTA utama */
.install-pwa-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(30,58,95,0.32);
  position: relative;
  animation: slideDownFade .45s ease;
}
.install-pwa-banner .ipb-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: bounceDown 2.5s ease-in-out infinite;
}
@keyframes bounceDown {
  0%, 70%, 100% { transform: translateY(0); }
  78% { transform: translateY(3px); }
  86% { transform: translateY(-2px); }
  94% { transform: translateY(0); }
}
.install-pwa-banner .ipb-body { flex: 1; min-width: 0; }
.install-pwa-banner .ipb-title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.install-pwa-banner .ipb-desc  { font-size: 11px; opacity: .85; margin-top: 3px; line-height: 1.4; }
.install-pwa-banner .ipb-btn {
  background: #fff;
  color: var(--primary-dark);
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.install-pwa-banner .ipb-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.22); }
.install-pwa-banner .ipb-close {
  position: absolute;
  top: 4px; right: 6px;
  background: transparent;
  border: none;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* iOS step number badge (di modal install) */
.ios-step-num {
  background: var(--primary-dark);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Permission banner di home.php */
.notif-permission-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
  border: 1px solid #FFD54F;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(255,167,38,0.18);
  position: relative;
  animation: slideDownFade .4s ease;
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-permission-banner .npb-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--warning);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: bellShake 2s ease-in-out infinite;
}
@keyframes bellShake {
  0%, 60%, 100% { transform: rotate(0); }
  65% { transform: rotate(-12deg); }
  75% { transform: rotate(10deg); }
  85% { transform: rotate(-6deg); }
  95% { transform: rotate(0); }
}
.notif-permission-banner .npb-body { flex: 1; min-width: 0; }
.notif-permission-banner .npb-title {
  font-size: 13px; font-weight: 700; color: #6D4C00;
  line-height: 1.3;
}
.notif-permission-banner .npb-desc {
  font-size: 11px; color: #8B6914; margin-top: 2px; line-height: 1.4;
}
.notif-permission-banner .npb-btn {
  background: var(--primary-dark);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .15s;
}
.notif-permission-banner .npb-btn:hover { background: var(--secondary); }
.notif-permission-banner .npb-btn:disabled { opacity: .6; cursor: not-allowed; }
.notif-permission-banner .npb-close {
  position: absolute;
  top: 4px; right: 6px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #B8941F;
  cursor: pointer;
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* In-app notification banner (foreground push) */
.inapp-notif {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: calc(100% - 32px);
  max-width: 460px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(13,27,42,0.4), 0 4px 12px rgba(13,27,42,0.25);
  z-index: 300;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.inapp-notif.show { transform: translateX(-50%) translateY(0); }
.inapp-notif-icon {
  width: 40px; height: 40px;
  background: var(--whatsapp);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,211,102,0.4);
}
.inapp-notif-body { flex: 1; min-width: 0; }
.inapp-notif-body .t1 {
  font-size: 14px; font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inapp-notif-body .t2 {
  font-size: 12px; opacity: 0.92; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.inapp-notif-close {
  background: rgba(255,255,255,0.18);
  border: none;
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 18px; line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

/* Install row di Settings */
.setting-row .icon-install {
  background: rgba(37,211,102,0.12);
  color: var(--whatsapp-biz);
}

/* Badge status di setting row (Aktif/Ditolak/dll) */
.badge-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.badge-status.active { background: rgba(76,175,80,0.15);  color: var(--success); }
.badge-status.warn   { background: rgba(255,152,0,0.15);  color: var(--warning); }
.badge-status.danger { background: rgba(229,57,53,0.12);  color: var(--error); }
.badge-status.muted  { background: rgba(135,148,164,0.15); color: var(--text-tertiary); }
