:root {
  --blue-dark: #0d2a8c;
  --blue: #1a56e8;
  --blue-light: #3d7bff;
  --blue-soft: #eaf0ff;
  --navy: #0f1a3d;
  --gray-text: #7a86a8;
  --bg: #f2f4fa;
  --card: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 26, 61, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--navy);
}

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

/* ---------- App shell (mimics phone frame, centers on desktop) ---------- */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 90px;
}

/* ---------- Header ---------- */
.header {
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
  color: #fff;
  padding: 22px 20px 70px;
  border-radius: 0 0 28px 28px;
  position: relative;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.menu-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.date-pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-tools { display: flex; align-items: center; gap: 8px; }
.sso-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.32);
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.sso-btn:hover { background: rgba(255,255,255,0.3); }
.greeting h1 {
  font-size: 22px;
  margin: 0 0 4px;
  font-weight: 800;
}
.greeting p {
  margin: 0;
  font-size: 14px;
  opacity: 0.85;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 58px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 30;
  min-width: 170px;
}
.dropdown-menu.open { display: block; }
.dropdown-menu-left { left: 20px; }
.dropdown-menu-right { right: 20px; }
.dropdown-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.dropdown-menu a:not(:last-child) { border-bottom: 1px solid #f0f2f9; }
.dropdown-menu a.danger { color: var(--red); font-weight: 700; }
.dropdown-menu a.is-active { background: var(--blue-soft); color: var(--blue); }

/* ---------- Saldo card (overlaps header) ---------- */
.saldo-card {
  margin: -55px 20px 0;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(26, 86, 232, 0.28);
}
.saldo-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.saldo-amount {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 6px;
  word-break: break-all;
}
.saldo-sub {
  font-size: 13px;
  opacity: 0.85;
}
.saldo-icon {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-size: 54px;
  opacity: 0.9;
}

/* ---------- Content sections ---------- */
.content { padding: 20px; }

.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.stat-body { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.stat-amount {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}
.stat-change {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
}
.stat-change.down { color: var(--red); }
.stat-chart { width: 90px; height: 44px; flex-shrink: 0; }

.section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin: 0 0 12px;
  text-transform: uppercase;
}

.list-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: transform .15s ease;
}
.list-card:active { transform: scale(0.98); }

.aishcell-item { margin-bottom: 12px; }
.aishcell-item .list-card { margin-bottom: 0; }
.aishcell-item .list-card:has(+ .note-marquee) {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.note-marquee {
  background: linear-gradient(90deg, #fff4d6, #ffe9b3);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  padding: 7px 0;
  box-shadow: var(--shadow);
  position: relative;
}
.note-marquee-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  font-size: 12px;
  font-weight: 700;
  color: #92620a;
  animation: marquee-scroll 14s linear infinite;
}
@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .note-marquee-track {
    animation: none;
    padding-left: 12px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
.list-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.list-icon.muted {
  background: #e6ebf7;
  color: var(--gray-text);
}
.list-body { flex: 1; min-width: 0; }
.list-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.list-body .amount {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
}
.progress-track {
  background: #e9edf7;
  height: 5px;
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  height: 100%;
  border-radius: 4px;
}
.pct-pill {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.chevron { color: #b7c0dc; font-size: 18px; }

.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: #eef1f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.icon-btn-edit { background: var(--blue-soft); }
.icon-btn-delete { background: #fdecec; }
.icon-btn-delete:hover { background: #fbd7d7; }
.icon-btn-edit:hover { background: #dbe6ff; }

.note-box {
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 6px;
  line-height: 1.5;
}

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #fff;
  display: flex;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(15,26,61,0.06);
  border-radius: 22px 22px 0 0;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-text);
  padding: 4px 10px;
}
.nav-item .icon { font-size: 19px; }
.nav-item.active { color: var(--blue); }

/* ---------- Generic page header (non-dashboard pages) ---------- */
.page-header {
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
  color: #fff;
  padding: 20px 20px 28px;
  border-radius: 0 0 28px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.page-header a.back {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.page-header h1 { margin: 0; font-size: 18px; font-weight: 800; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.form-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin: 14px 0 6px;
}
.form-card label:first-child { margin-top: 0; }
.form-card input,
.form-card select,
.form-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #dde3f2;
  background: #f8f9fd;
  font-size: 14px;
  color: var(--navy);
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: 2px solid var(--blue-light);
  background: #fff;
}
.field-hint {
  font-size: 11.5px;
  color: var(--gray-text);
  margin: 6px 2px 0;
  line-height: 1.5;
}
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  margin-top: 20px;
  box-shadow: 0 10px 20px rgba(26,86,232,0.25);
}
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  width: 100%;
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--blue-light);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  margin-top: 10px;
}

.alert-error {
  background: #fdecec;
  color: var(--red);
  border: 1px solid #f6c7c7;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-success {
  background: #e9f9ef;
  color: var(--green);
  border: 1px solid #bfe9cd;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---------- Login page ---------- */
.login-body {
  background:
    radial-gradient(120% 60% at 50% 0%, #2f66f5 0%, #0d2a8c 48%, #060f38 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Dot-grid texture across whole screen, gives depth without noise */
.login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

/* Signal rings — the signature element: concentric arcs radiating like
   a cellular signal / pulsa top-up, echoing the Aishcell phone-credit identity */
.signal-rings {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 640px;
  height: 640px;
  pointer-events: none;
}
.signal-rings svg { width: 100%; height: 100%; }
.signal-rings circle {
  fill: none;
  stroke: rgba(255,255,255,0.16);
  stroke-width: 1.5;
}
.signal-rings .ring-pulse {
  transform-origin: center;
  animation: ringPulse 3.6s ease-out infinite;
}
.signal-rings .ring-pulse:nth-child(2) { animation-delay: 1.2s; }
.signal-rings .ring-pulse:nth-child(3) { animation-delay: 2.4s; }
@keyframes ringPulse {
  0%   { opacity: 0.55; transform: scale(0.7); }
  70%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  .signal-rings .ring-pulse { animation: none; opacity: 0.35; }
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  text-align: center;
  margin-bottom: 26px;
}
.brand-mark .logo-badge {
  width: 76px;
  height: 76px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, #4f86ff 0%, #1a56e8 60%, #0d2a8c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 16px 32px rgba(13, 42, 140, 0.45),
    inset 0 1px 1px rgba(255,255,255,0.4);
}
.brand-mark .logo-badge svg { width: 34px; height: 34px; }
.brand-mark h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}
.brand-mark p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.login-card {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  border-radius: 26px;
  padding: 30px 26px 26px;
  width: 100%;
  max-width: 380px;
  box-shadow:
    0 24px 60px rgba(3, 10, 41, 0.35),
    0 2px 0 rgba(255,255,255,0.6) inset;
}

.field-group { margin-bottom: 16px; }
.field-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-wrap svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #9aa5c7;
  pointer-events: none;
}
.input-icon-wrap input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 13px;
  border: 1.5px solid #e2e7f5;
  background: #f8f9fd;
  font-size: 14.5px;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
}
.input-icon-wrap input:focus {
  outline: none;
  border-color: var(--blue-light);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 123, 255, 0.12);
}
.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  display: flex;
  color: #9aa5c7;
}
.toggle-pass svg { position: static; width: 18px; height: 18px; }

.btn-login {
  width: 100%;
  background: linear-gradient(135deg, #2f66f5, #1a56e8);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin-top: 6px;
  box-shadow: 0 12px 24px rgba(26,86,232,0.32);
  transition: transform .12s ease, box-shadow .12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-login:hover { box-shadow: 0 14px 28px rgba(26,86,232,0.4); }
.btn-login:active { transform: translateY(1px) scale(0.99); }

.login-hint {
  text-align: center;
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 20px;
}
.login-footer-note {
  text-align: center;
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  margin-top: 22px;
  letter-spacing: 0.02em;
}

/* ---------- Table (riwayat / laporan) ---------- */
.table-wrap {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-bottom: 16px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 480px; }
th, td { text-align: left; padding: 12px 14px; }
thead th {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:not(:last-child) td { border-bottom: 1px solid #eef1f9; }
.badge-outlet {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.btn-del {
  background: #fdecec;
  color: var(--red);
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.btn-edit {
  background: var(--blue-soft);
  color: var(--blue);
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.daily-chart-wrap {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 12px 12px;
  margin-bottom: 8px;
  overflow-x: auto;
}
.daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 150px;
  width: max-content;
  min-width: 100%;
}
.daily-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 30px;
  flex-shrink: 0;
}
.daily-value {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 4px;
  white-space: nowrap;
}
.daily-bar {
  width: 14px;
  background: linear-gradient(180deg, #3d7bff, #1a56e8);
  border-radius: 3px 3px 0 0;
}
.daily-bar.empty {
  background: #e9edf7;
}
.daily-day {
  font-size: 9.5px;
  color: var(--gray-text);
  margin-top: 6px;
  font-weight: 600;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #dde3f2;
  background: #fff;
  font-size: 13px;
  color: var(--navy);
}
.filter-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-date-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-text);
  margin-bottom: 4px;
}
.filter-date-field input {
  width: 100%;
  padding: 11px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #dde3f2;
  background: #fff;
  font-size: 13px;
  color: var(--navy);
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.filter-bar select, .filter-bar input {
  flex: 1;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #dde3f2;
  background: #fff;
  font-size: 13px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-text);
}
.empty-state .icon { font-size: 40px; margin-bottom: 10px; }

@media (min-width: 481px) {
  .app { box-shadow: 0 0 60px rgba(0,0,0,0.08); }
}

/* ===== dari index.php ===== */

  /* Fallback inline: memastikan dropdown menempel di bawah tombol walau style.css belum ter-update */
  .header { position: relative; }
  .dropdown-menu { display: none; position: absolute; top: 58px; background: #fff; border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,0.2); overflow: hidden; z-index: 30; min-width: 170px; }
  .dropdown-menu.open { display: block; }
  .dropdown-menu-left { left: 20px; }
  .dropdown-menu-right { right: 20px; }
  .dropdown-menu a { display: block; padding: 12px 16px; font-size: 13px; font-weight: 600; color: #0f1a3d; box-sizing: border-box; }
  .dropdown-menu a:not(:last-child) { border-bottom: 1px solid #f0f2f9; }
  .dropdown-menu a.danger { color: #dc2626; font-weight: 700; }
  .dropdown-menu a.is-active { background: #eaf0ff; color: #1a56e8; }

  .aishcell-item { margin-bottom: 12px; }
  .aishcell-item .list-card { margin-bottom: 0; }
  .note-marquee { background: linear-gradient(90deg, #fff4d6, #ffe9b3); border-radius: 0 0 16px 16px; overflow: hidden; padding: 7px 0; box-shadow: 0 8px 24px rgba(15,26,61,0.06); position: relative; cursor: pointer; }
  .note-marquee:active { transform: scale(.99); }
  .note-marquee-track { display: inline-block; white-space: nowrap; padding-left: 100%; font-size: 12px; font-weight: 700; color: #92620a; animation: marquee-scroll 14s linear infinite; }
  .note-marquee-hint { position: absolute; right: 0; top: 0; bottom: 0; display: flex; align-items: center; padding: 0 9px; background: linear-gradient(90deg, rgba(255,233,179,0), #ffe9b3 35%); color: #92620a; font-size: 10px; font-weight: 800; z-index: 2; }

  /* Popup detail catatan berjalan */
  .note-modal { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(10,18,45,.55); padding: 20px; box-sizing: border-box; align-items: center; justify-content: center; }
  .note-modal.open { display: flex; }
  .note-modal-box { width: min(100%, 360px); background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; animation: note-pop .18s ease-out; }
  @keyframes note-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
  .note-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; background: linear-gradient(135deg, #1a56e8, #3d7bff); color: #fff; }
  .note-modal-title { font-size: 14px; font-weight: 800; }
  .note-modal-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
  .note-modal-content { padding: 18px; color: #17213f; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 55vh; overflow-y: auto; }
  .note-modal-label { font-size: 10px; font-weight: 800; color: #7a86a8; text-transform: uppercase; margin-bottom: 7px; letter-spacing: .04em; }
  .note-modal-ok { margin: 0 18px 18px; width: calc(100% - 36px); border: 0; border-radius: 11px; padding: 10px; background: #eef3ff; color: #1a56e8; font-size: 12px; font-weight: 800; cursor: pointer; }
  @keyframes marquee-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

  /* Opsi tanggal kustom di dropdown periode */
  .dropdown-menu-right { min-width: 220px; }
  .custom-range-toggle { display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: 12px 16px; font-size: 13px; font-weight: 600; color: #0f1a3d; border-bottom: 1px solid #f0f2f9; box-sizing: border-box; }
  .custom-range-toggle.is-active { background: #eaf0ff; color: #1a56e8; }
  .custom-range-form { display: none; padding: 12px 16px 16px; border-top: 1px solid #f0f2f9; background: #f8f9fd; }
  .custom-range-form.open { display: block; }
  .custom-range-form label { display: block; font-size: 10px; font-weight: 700; color: #7a86a8; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: .02em; }
  .custom-range-form label:first-child { margin-top: 0; }
  .custom-range-form input[type="date"] { width: 100%; padding: 8px 9px; border-radius: 10px; border: 1px solid #dde3f2; background: #fff; font-size: 12px; color: #0f1a3d; box-sizing: border-box; }
  .custom-range-form button { width: 100%; margin-top: 12px; padding: 9px; border: none; border-radius: 10px; background: linear-gradient(135deg, #1a56e8, #3d7bff); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }


  /* Jadwal sholat Tuban */
  .prayer-card {
    margin-top: 14px;
    padding: 14px 14px 11px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    color: #fff;
    overflow: hidden;
  }
  .prayer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 11px;
  }
  .prayer-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
  }
  .prayer-location {
    margin-top: 4px;
    font-size: 11px;
    opacity: .84;
  }
  .prayer-date {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    opacity: .9;
    text-align: right;
    line-height: 1.35;
  }
  .prayer-times {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }
  .prayer-item {
    min-width: 0;
    text-align: center;
    padding: 8px 3px 9px;
    border-radius: 12px;
    background: rgba(255,255,255,.075);
    transition: .2s ease;
  }
  .prayer-item.active {
    background: #fff;
    color: #1a56e8;
    box-shadow: 0 7px 18px rgba(5,31,100,.20);
    transform: translateY(-1px);
  }
  .prayer-icon {
    display: block;
    height: 18px;
    font-size: 14px;
    line-height: 18px;
    margin-bottom: 2px;
  }
  .prayer-item b {
    display: block;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
  }
  .prayer-item strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
  }
  .prayer-next {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    opacity: .95;
  }
  .prayer-source {
    margin-top: 5px;
    font-size: 8px;
    opacity: .62;
  }
  @media (max-width: 380px) {
    .prayer-card { padding: 12px 9px 9px; }
    .prayer-times { gap: 3px; }
    .prayer-item { padding-left: 1px; padding-right: 1px; }
    .prayer-item b { font-size: 8px; }
    .prayer-item strong { font-size: 12px; }
    .prayer-icon { font-size: 12px; }
    .prayer-date { font-size: 9px; }
  }

  /* Ikon jam analog untuk kartu total saldo */
  .saldo-icon.saldo-clock {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .clock-face {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 5px solid rgba(255,255,255,.95);
    background:
      radial-gradient(circle at 35% 28%, rgba(255,255,255,.95) 0 2px, transparent 3px),
      linear-gradient(135deg, #5f8cff, #2f64c8);
    box-shadow:
      0 10px 20px rgba(15,45,110,.28),
      inset 0 0 0 3px rgba(255,255,255,.18);
  }
  .clock-mark {
    position: absolute;
    width: 3px;
    height: 8px;
    background: #fff;
    border-radius: 3px;
  }
  .mark-12 { top: 4px; left: 50%; transform: translateX(-50%); }
  .mark-3  { right: 4px; top: 50%; transform: translateY(-50%) rotate(90deg); }
  .mark-6  { bottom: 4px; left: 50%; transform: translateX(-50%); }
  .mark-9  { left: 4px; top: 50%; transform: translateY(-50%) rotate(90deg); }
  .clock-hand {
    position: absolute;
    left: 50%;
    bottom: 50%;
    width: 4px;
    transform-origin: bottom center;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.16);
  }
  .hour-hand { height: 18px; transform: translateX(-50%) rotate(0deg); width: 5px; }
  .minute-hand { height: 25px; transform: translateX(-50%) rotate(0deg); width: 4px; }
  .second-hand {
    height: 27px;
    width: 2px;
    background: #ff5a5f;
    box-shadow: none;
    z-index: 3;
    transform: translateX(-50%) rotate(0deg);
  }
  .clock-center {
    position: absolute;
    width: 9px;
    height: 9px;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(47,100,200,.35);
  }


/* ===== dari riwayat.php ===== */

  /* Fallback inline: memastikan filter tampil benar walau style.css eksternal belum ter-update */
  .filter-form { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
  .filter-select { width:100%; padding:11px 12px; border-radius:16px; border:1px solid #dde3f2; background:#fff; font-size:13px; color:#0f1a3d; box-sizing:border-box; }
  .filter-dates { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .filter-date-field label { display:block; font-size:11px; font-weight:700; color:#7a86a8; margin-bottom:4px; }
  .filter-date-field input { width:100%; padding:11px 10px; border-radius:16px; border:1px solid #dde3f2; background:#fff; font-size:13px; color:#0f1a3d; box-sizing:border-box; }
  .btn-edit { background:#eaf0ff; color:#1a56e8; border:none; padding:6px 10px; border-radius:8px; font-size:12px; font-weight:700; white-space:nowrap; display:inline-block; }
  .row-actions { display:flex; gap:6px; }
  .icon-btn { width:30px; height:30px; border-radius:9px; border:none; display:flex; align-items:center; justify-content:center; font-size:13px; cursor:pointer; flex-shrink:0; text-decoration:none; }
  .icon-btn-edit { background:#eaf0ff; }
  .icon-btn-delete { background:#fdecec; }
  .table-wrap { overflow-x:auto; }

  /* Baris riwayat bisa diklik untuk lihat detail */
  tbody tr.row-clickable { cursor:pointer; transition:background .15s ease; }
  tbody tr.row-clickable:hover { background:#f5f8ff; }
  tbody tr.row-clickable:active { background:#eaf0ff; }

  /* Modal detail transaksi */
  .detail-overlay {
    display:none; position:fixed; inset:0; background:rgba(15,26,61,.45);
    z-index:1000; align-items:flex-end; justify-content:center;
  }
  .detail-overlay.open { display:flex; }
  .detail-sheet {
    background:#fff; width:100%; max-width:480px; border-radius:22px 22px 0 0;
    padding:22px 20px calc(22px + env(safe-area-inset-bottom));
    box-shadow:0 -8px 30px rgba(15,26,61,.18);
    animation:slideUpSm .2s ease;
    max-height:85vh; overflow-y:auto;
  }
  @keyframes slideUpSm { from { transform:translateY(24px); opacity:0; } to { transform:translateY(0); opacity:1; } }
  .detail-handle { width:40px; height:4px; background:#dde3f2; border-radius:99px; margin:0 auto 16px; }
  .detail-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
  .detail-header h2 { font-size:16px; margin:0; color:var(--navy); }
  .detail-close { border:none; background:#f2f4fa; width:30px; height:30px; border-radius:9px; font-size:15px; cursor:pointer; color:#7a86a8; }
  .detail-amount { font-size:26px; font-weight:800; color:var(--navy); margin-bottom:18px; }
  .detail-rows { display:flex; flex-direction:column; gap:14px; margin-bottom:20px; }
  .detail-row-item { display:flex; justify-content:space-between; gap:12px; font-size:13px; }
  .detail-row-item .k { color:#7a86a8; font-weight:600; flex-shrink:0; }
  .detail-row-item .v { color:var(--navy); font-weight:700; text-align:right; }
  .detail-note { background:#f2f4fa; border-radius:14px; padding:12px 14px; font-size:13px; color:var(--navy); margin-bottom:20px; }
  .detail-note .k { color:#7a86a8; font-weight:700; display:block; margin-bottom:4px; font-size:11px; text-transform:uppercase; letter-spacing:.03em; }
  .detail-meta { font-size:11px; color:#a4adc6; text-align:center; margin-bottom:18px; }
  .detail-actions { display:flex; gap:10px; }
  .detail-actions a, .detail-actions button { flex:1; }

/* ===== dari laporan.php ===== */

  .mini-stats-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
  }
  .mini-stat-card{
    background:#fff;
    border-radius:14px;
    padding:14px 10px;
    text-align:center;
    box-shadow:0 2px 8px rgba(0,0,0,0.06);
  }
  .mini-stat-label{
    font-size:11px;
    font-weight:600;
    color:#8a93a3;
    text-transform:uppercase;
    letter-spacing:.3px;
    margin-bottom:6px;
  }
  .mini-stat-value{
    font-size:15px;
    font-weight:700;
    color:#1e2a4a;
    line-height:1.25;
    word-break:break-word;
  }
  .mini-stat-value.up{ color:#1e9e5a; }
  .mini-stat-value.down{ color:#e0473c; }
  .mini-stat-sub{
    margin-top:4px;
    font-size:11px;
    color:#9aa3b2;
  }
  .mini-stat-transaksi{
    margin-top:5px;
    font-size:10px;
    font-weight:700;
    color:#3570d8;
    white-space:nowrap;
  }
  .transaction-total-line{
    text-align:center;
    margin-top:8px;
    font-size:11px;
    font-weight:600;
    color:#8b94a5;
  }

  /* Diagram harian bisa diklik */
  .daily-col{
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
    position:relative;
  }
  .daily-col:active{
    transform:scale(.97);
  }
  .daily-bar{
    transition:transform .15s, opacity .15s;
  }
  .daily-col:hover .daily-bar{
    opacity:.82;
    transform:scaleX(1.06);
  }

  .day-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
    align-items:flex-end;
    justify-content:center;
    background:rgba(15,23,42,.48);
    padding:0;
  }
  .day-modal.show{
    display:flex;
  }
  .day-modal-box{
    width:100%;
    max-width:520px;
    max-height:82vh;
    overflow:auto;
    background:#fff;
    border-radius:24px 24px 0 0;
    padding:20px 18px 28px;
    box-shadow:0 -10px 35px rgba(0,0,0,.18);
    animation:slideUp .22s ease-out;
  }
  @keyframes slideUp{
    from{transform:translateY(100%);opacity:.5}
    to{transform:translateY(0);opacity:1}
  }
  .day-modal-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:16px;
  }
  .day-modal-title{
    font-size:20px;
    font-weight:800;
    color:#17233f;
  }
  .day-modal-close{
    width:38px;
    height:38px;
    border:0;
    border-radius:50%;
    background:#f1f4f9;
    color:#44506a;
    font-size:22px;
    cursor:pointer;
  }
  .day-info-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-bottom:16px;
  }
  .day-info-card{
    background:#f5f7fb;
    border-radius:14px;
    padding:13px;
  }
  .day-info-label{
    font-size:11px;
    color:#8b94a5;
    margin-bottom:4px;
  }
  .day-info-value{
    font-size:17px;
    font-weight:800;
    color:#1e2a4a;
  }
  .day-detail-title{
    font-size:13px;
    font-weight:800;
    color:#17233f;
    margin:10px 0;
    text-transform:uppercase;
  }
  .day-detail-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 0;
    border-bottom:1px solid #edf0f5;
  }
  .day-detail-name{
    font-size:14px;
    font-weight:700;
    color:#263451;
  }
  .day-detail-sub{
    margin-top:3px;
    font-size:11px;
    color:#9aa3b2;
  }
  .day-detail-total{
    text-align:right;
    font-size:14px;
    font-weight:800;
    color:#1e9e5a;
    white-space:nowrap;
  }
  .day-empty{
    text-align:center;
    padding:22px 10px;
    color:#929bab;
    font-size:13px;
  }

/* ===== dari kalkulator.php ===== */

  .calc-card{
    background:var(--card);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow);
    padding:16px;
  }
  .calc-display{
    background:linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
    border-radius:var(--radius-md);
    padding:20px 18px;
    color:#fff;
    text-align:right;
    margin-bottom:16px;
    overflow:hidden;
  }
  .calc-expr{
    font-size:13px;
    min-height:18px;
    opacity:0.75;
    white-space:nowrap;
    overflow-x:auto;
    font-weight:600;
  }
  .calc-result{
    font-size:34px;
    font-weight:800;
    margin-top:6px;
    white-space:nowrap;
    overflow-x:auto;
    line-height:1.2;
  }
  .calc-grid{
    display:grid;
    grid-template-columns:repeat(4, 1fr);
    gap:10px;
  }
  .calc-btn{
    border:none;
    background:#eef1f9;
    color:var(--navy);
    font-size:19px;
    font-weight:700;
    border-radius:var(--radius-sm);
    padding:16px 0;
    transition:transform .08s ease, background .15s ease;
  }
  .calc-btn:active{ transform:scale(0.94); }
  .calc-btn.op{
    background:var(--blue-soft);
    color:var(--blue);
  }
  .calc-btn.func{
    background:#fdecec;
    color:var(--red);
  }
  .calc-btn.equal{
    background:linear-gradient(135deg, var(--blue), var(--blue-light));
    color:#fff;
    grid-column:span 2;
    box-shadow:0 10px 20px rgba(26,86,232,0.25);
  }
  .calc-btn.zero{ grid-column:span 2; }

/* ===== dari alquran.php ===== */

  .quran-search{
    width:100%;
    border:none;
    background:var(--card);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow);
    padding:14px 16px;
    font-size:15px;
    color:var(--navy);
    margin-bottom:14px;
    box-sizing:border-box;
  }
  .quran-search::placeholder{ color:var(--gray-text); }

  .surat-list{ display:flex; flex-direction:column; gap:10px; }
  .surat-item{
    display:flex;
    align-items:center;
    gap:14px;
    background:var(--card);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow);
    padding:14px 16px;
    text-decoration:none;
    color:inherit;
  }
  .surat-num{
    width:38px; height:38px;
    flex:0 0 auto;
    border-radius:10px;
    background:linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
    color:#fff;
    display:flex; align-items:center; justify-content:center;
    font-weight:800; font-size:13px;
  }
  .surat-info{ flex:1; min-width:0; }
  .surat-info .nama-latin{ font-weight:700; color:var(--navy); font-size:15px; }
  .surat-info .meta{ font-size:12.5px; color:var(--gray-text); margin-top:2px; }
  .surat-arab{
    font-size:20px;
    color:var(--blue);
    font-family: 'Traditional Arabic','Scheherazade New','Amiri',serif;
    flex:0 0 auto;
  }

  .quran-state{ text-align:center; color:var(--gray-text); padding:40px 10px; font-size:14px; }

  /* ---- detail surat ---- */
  .surat-header-card{
    background:linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 55%, var(--blue-light) 100%);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow);
    padding:20px 18px;
    color:#fff;
    margin-bottom:16px;
    text-align:center;
  }
  .surat-header-card .arab{ font-size:26px; font-family:'Traditional Arabic','Scheherazade New','Amiri',serif; margin-bottom:4px; }
  .surat-header-card .latin{ font-size:17px; font-weight:800; }
  .surat-header-card .sub{ font-size:12.5px; opacity:.85; margin-top:2px; }

  .ayat-card{
    background:var(--card);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow);
    padding:16px;
    margin-bottom:12px;
  }
  .ayat-nomor{
    display:inline-flex; align-items:center; justify-content:center;
    width:26px; height:26px;
    border-radius:50%;
    background:var(--blue-soft);
    color:var(--blue);
    font-size:12px; font-weight:800;
    margin-bottom:10px;
  }
  .ayat-arab{
    font-size:24px;
    line-height:2;
    text-align:right;
    direction:rtl;
    color:var(--navy);
    font-family:'Traditional Arabic','Scheherazade New','Amiri',serif;
    margin-bottom:10px;
  }
  .ayat-latin{
    font-size:13px;
    color:var(--blue);
    font-style:italic;
    margin-bottom:8px;
    line-height:1.6;
  }
  .ayat-idn{
    font-size:13.5px;
    color:var(--gray-text);
    line-height:1.6;
  }

  .quran-topbar{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:14px;
  }
  .quran-topbar select{
    flex:1;
    border:none;
    background:var(--card);
    box-shadow:var(--shadow);
    border-radius:var(--radius-sm);
    padding:10px 12px;
    font-size:13px;
    color:var(--navy);
  }

  /* ---- toggle mode tampilan ---- */
  .mode-switch{
    display:flex;
    background:var(--card);
    border-radius:999px;
    box-shadow:var(--shadow);
    padding:4px;
    margin-bottom:14px;
    gap:4px;
  }
  .mode-switch button{
    flex:1;
    border:none;
    background:transparent;
    color:var(--gray-text);
    font-size:12.5px;
    font-weight:700;
    padding:9px 6px;
    border-radius:999px;
    transition:background .15s ease, color .15s ease;
  }
  .mode-switch button.active{
    background:linear-gradient(135deg, var(--blue), var(--blue-light));
    color:#fff;
    box-shadow:0 6px 14px rgba(26,86,232,0.25);
  }

  /* ---- mode mushaf: teks arab saja, mengalir satu layar ---- */
  .mushaf-card{
    background:var(--card);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow);
    padding:24px 20px;
  }
  .mushaf-text{
    direction:rtl;
    text-align:justify;
    font-family:'Traditional Arabic','Scheherazade New','Amiri',serif;
    font-size:26px;
    line-height:2.4;
    color:var(--navy);
  }
  /* ---- kontrol audio ---- */
  .audio-bar{
    display:flex;
    align-items:center;
    gap:8px;
    background:var(--card);
    border-radius:var(--radius-md);
    box-shadow:var(--shadow);
    padding:10px 12px;
    margin-bottom:14px;
  }
  .audio-bar select{
    flex:1;
    border:none;
    background:var(--blue-soft);
    color:var(--navy);
    border-radius:var(--radius-sm);
    padding:9px 10px;
    font-size:12.5px;
  }
  .audio-bar button{
    border:none;
    border-radius:var(--radius-sm);
    padding:9px 14px;
    font-size:12.5px;
    font-weight:700;
    white-space:nowrap;
    background:linear-gradient(135deg, var(--blue), var(--blue-light));
    color:#fff;
  }
  .audio-bar button.stop{ background:#fdecec; color:var(--red); }

  .ayat-top-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:10px;
  }
  .ayat-play-btn{
    flex:0 0 auto;
    width:26px; height:26px;
    border:none;
    border-radius:50%;
    background:var(--blue-soft);
    color:var(--blue);
    font-size:11px;
    display:flex; align-items:center; justify-content:center;
  }
  .ayat-card.is-playing{
    box-shadow:0 0 0 2px var(--blue), var(--shadow);
  }
  .ayat-card.is-playing .ayat-play-btn{
    background:var(--blue);
    color:#fff;
  }
  .mushaf-ayat-num{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    margin:0 4px;
    border-radius:50%;
    background:var(--blue-soft);
    color:var(--blue);
    font-size:13px;
    font-weight:800;
    font-family:'Segoe UI',sans-serif;
    direction:ltr;
    vertical-align:middle;
    cursor:pointer;
  }
  .mushaf-ayat-num.is-playing{
    background:var(--blue);
    color:#fff;
  }

/* ===== tambahan SPA ===== */
.view-fade { animation: viewFade .18s ease; }
@keyframes viewFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg,#e9edf7,#f6f8fd,#e9edf7); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 16px; }
@keyframes sk { to { background-position: -200% 0; } }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: #0f1a3d; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; z-index: 10000; max-width: 90%; box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.toast.err { background: #dc2626; }
.btn-primary:disabled, .btn-login:disabled { opacity: .6; pointer-events: none; }
.load-more { margin-bottom: 20px; }
.nav-item { background: none; border: 0; }
