/* CSS DESIGN SYSTEM - WARUNG KASIR UMI */

:root {
  /* Colors */
  --bg-primary: #FAF6F0; /* Soft warm cream */
  --bg-card: #FFFFFF;
  --text-main: #2C1E1A; /* Dark brown-black for high contrast */
  --text-muted: #6E5E5A;

  --primary-accent: #E0533C; /* Warm Terracotta / Chili Orange */
  --primary-accent-light: #FDF0EE;
  --primary-accent-2: #FF7A54; /* Lighter end of accent gradient */
  --primary-gradient: linear-gradient(135deg, #FF7A54 0%, #E0533C 55%, #C4402C 100%);

  --color-cash: #27A052; /* Emerald Green */
  --color-cash-light: #E8F6ED;
  --color-cash-gradient: linear-gradient(135deg, #34C275 0%, #27A052 60%, #1E8A43 100%);

  --color-qris: #4E60D6; /* Deep Blue (QRIS style) */
  --color-qris-light: #EDEFFB;
  --color-qris-gradient: linear-gradient(135deg, #6B7CF0 0%, #4E60D6 60%, #3C4CB8 100%);

  --color-expense: #D93838; /* Crimson Red */
  --color-expense-light: #FDECEC;
  --color-expense-gradient: linear-gradient(135deg, #EF5350 0%, #D93838 60%, #B92A2A 100%);

  --color-gray: #F2EEEC;
  --color-border: #E8E2DF;

  /* Fonts */
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing & Borders */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(44, 30, 26, 0.035), 0 3px 10px rgba(44, 30, 26, 0.045);
  --shadow-md: 0 4px 14px rgba(44, 30, 26, 0.05), 0 10px 28px rgba(44, 30, 26, 0.06);
  --shadow-lg: 0 12px 28px rgba(44, 30, 26, 0.08), 0 20px 44px rgba(44, 30, 26, 0.1);
  --shadow-glow-accent: 0 10px 22px -6px rgba(224, 83, 60, 0.45);
  --shadow-glow-cash: 0 10px 22px -6px rgba(39, 160, 82, 0.4);

  /* Motion tokens (2026 spring-driven system) */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-instant: 100ms;
  --dur-fast: 160ms;
  --dur-base: 240ms;
  --dur-slow: 360ms;
}

/* Respect user preference for reduced motion across the entire app */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visible focus ring for keyboard navigation (accessibility) */
:focus-visible {
  outline: 2.5px solid var(--primary-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* Disable blue highlight on tap */
  user-select: none; /* Disable text selection for app-like experience */
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.4;
  height: 100vh;
  height: 100dvh; /* dynamic viewport height: adapts as mobile browser chrome shows/hides, so content never gets cut off */
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* App Shell container */
#app {
  width: 100%;
  max-width: 480px; /* Mobile constraint */
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Compact date bar (replaces the old topbar to maximize screen space) */
.date-bar {
  text-align: center;
  padding: 8px 12px 2px;
  flex-shrink: 0;
}

.date-bar p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Main Content Area */
.app-content {
  flex: 1;
  overflow: hidden; /* Prevent global scroll */
  padding: 6px 12px 10px;
  display: flex;
  flex-direction: column;
}

/* Screen Transitions */
.app-screen {
  display: none;
  height: 100%;
  flex-direction: column;
  gap: 6px;
  animation: screenEnter var(--dur-slow) var(--ease-out);
}

.app-screen.active {
  display: flex;
}

@keyframes screenEnter {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered list entrance utility (JS sets --stagger-i per item) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-item {
  animation: fadeInUp var(--dur-base) var(--ease-out) both;
  animation-delay: calc(var(--stagger-i, 0) * 35ms);
}

/* Tab Toggle Button Row (Kasir: Masuk/Keluar) */
.transaction-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background-color: var(--color-gray);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  flex-shrink: 0;
}

.type-btn {
  border: none;
  background: none;
  padding: 8px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-spring), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
}

.type-btn:active {
  transform: scale(0.97);
}

.type-btn.active {
  background-color: var(--bg-card);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

#toggle-masuk.active {
  color: var(--color-cash);
}

#toggle-keluar.active {
  color: var(--color-expense);
}

/* Container inside Kasir screen */
.tx-input-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  height: 100%;
  overflow: hidden;
}

/* Slider Menu Lauk (Horizontal) */
.menu-slider-wrapper {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-slider {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.menu-slider::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.menu-slider {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.menu-btn-item {
  flex: 0 0 auto;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-spring);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn-item:active {
  transform: scale(0.95);
}

.menu-btn-item.selected {
  background-color: var(--primary-accent-light);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

/* Selected tags indicator list — single scrollable row so it NEVER grows
   the layout vertically, no matter how many lauk are selected (that growth
   was pushing the numpad off-screen behind the bottom nav). */
.selected-tags-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--color-border);
  flex-shrink: 0;
}

.selected-tags-list::-webkit-scrollbar {
  display: none;
}

.selected-tags-list {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.tag-badge {
  background-color: var(--primary-accent-light);
  color: var(--primary-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tag-badge .remove-tag {
  font-weight: 700;
  font-size: 12px;
  margin-left: 2px;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Display Panel (Kalkulator Screen) - Compact, no flex grow */
.display-panel {
  background-color: var(--color-cash-light);
  border: 2px solid var(--color-cash);
  border-radius: var(--radius-md);
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  min-height: 58px;
}

.display-panel.expense-theme {
  background-color: var(--color-expense-light);
  border-color: var(--color-expense);
}

.display-top {
  min-height: 16px;
  margin-bottom: 1px;
}

.formula-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.display-main {
  display: flex;
  align-items: baseline;
  color: var(--text-main);
  max-width: 100%;
  overflow: hidden;
}

.currency-symbol {
  font-size: 18px;
  font-weight: 700;
  margin-right: 3px;
  opacity: 0.8;
}

.amount-text {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  white-space: nowrap;
}

/* Template Harga Pintar */
.price-templates-wrapper {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.price-templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.template-btn {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 2px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
  text-align: center;
}

.template-btn:active {
  background-color: var(--color-border);
  transform: scale(0.93);
}

/* Numpad & Pembayaran Panel — FLEX GROW to fill remaining space */
.numpad-and-actions {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 8px;
  flex: 1; /* ← KEY: grow to fill all remaining vertical space */
  min-height: 0;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr); /* 4 equal rows that stretch */
  gap: 6px;
  min-height: 0;
}

.num-btn {
  background-color: var(--bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  /* NO fixed height — buttons stretch to fill grid rows AND shrink when
     vertical space is tight (e.g. Brave's taller toolbar) so the last row
     never gets clipped behind the bottom nav. */
  font-family: var(--font-family);
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-instant) var(--ease-spring), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  min-height: 0;
  touch-action: manipulation;
}

.num-btn:active {
  background-color: var(--color-gray);
  transform: scale(0.92);
  box-shadow: none;
}

/* Numpad Control buttons */
.ctrl-btn {
  background-color: var(--color-gray);
}

.ctrl-btn.delete-btn {
  color: var(--color-expense);
  background-color: var(--color-expense-light);
  border-color: var(--color-expense-light);
}

.ctrl-btn.math-btn {
  color: var(--primary-accent);
  background-color: var(--primary-accent-light);
  border-color: var(--primary-accent-light);
}

.ctrl-btn.helper-btn {
  font-size: 14px;
}

.zero-btn {
  grid-column: span 3;
}

/* Payment & Action Column */
.payment-action-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}

.payment-method-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.pay-method-btn {
  flex: 1;
  border: 1.5px solid var(--color-border);
  background-color: var(--bg-card);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-spring);
  padding: 4px 0;
  box-shadow: var(--shadow-sm);
}

.pay-method-btn:active {
  transform: scale(0.95);
}

.pay-method-btn .icon {
  font-size: 20px;
  margin-bottom: 1px;
}

.pay-method-btn .label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Active State for Payment Mode */
.pay-method-btn#pay-cash.active {
  background-color: var(--color-cash-light);
  border-color: var(--color-cash);
}
.pay-method-btn#pay-cash.active .label {
  color: var(--color-cash);
}

.pay-method-btn#pay-qris.active {
  background-color: var(--color-qris-light);
  border-color: var(--color-qris);
}
.pay-method-btn#pay-qris.active .label {
  color: var(--color-qris);
}

/* Save Buttons */
.btn-primary-save {
  height: 56px; /* Reduced from 76px */
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 800;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-glow-cash);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
  line-height: 1.2;
  touch-action: manipulation;
}

.btn-primary-save:active {
  transform: scale(0.95);
  box-shadow: var(--shadow-sm);
  filter: brightness(0.94);
}

.save-masuk {
  background: var(--color-cash-gradient);
}

.save-keluar {
  background: var(--color-expense-gradient);
  height: 48px;
  box-shadow: 0 10px 22px -6px rgba(217, 56, 56, 0.4);
}

/* Expense (Belanja) specific styles */
.expense-categories-wrapper {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.expense-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.category-btn {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 2px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-spring);
  text-align: center;
}

.category-btn.active {
  background-color: var(--color-expense-light);
  border-color: var(--color-expense);
  color: var(--color-expense);
}

.large-input {
  width: 100%;
  height: 42px; /* Reduced from 54px */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  background-color: var(--bg-primary);
  outline: none;
  transition: border-color 0.2s;
}

.large-input:focus {
  border-color: var(--primary-accent);
  background-color: #FFFFFF;
}

/* Bottom Navigation Bar */
.app-navigation {
  height: 64px; /* Reduced from 76px */
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--color-border);
  display: flex; /* Changed from grid to flex for dynamic 3/4 tabs */
  z-index: 10;
  flex-shrink: 0;
  position: relative;
}

.nav-item {
  flex: 1; /* Automatically stretches to fill space */
  background: none;
  border: none;
  font-family: var(--font-family);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  transition: color var(--dur-base) var(--ease-out);
  touch-action: manipulation;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 44px;
  height: 30px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-accent-light);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-base) var(--ease-spring), transform var(--dur-base) var(--ease-spring);
  z-index: -1;
}

.nav-item.active::before {
  opacity: 1;
  transform: scale(1);
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform var(--dur-base) var(--ease-spring);
}

.nav-item span {
  font-size: 11px;
  font-weight: 700;
  transition: transform var(--dur-base) var(--ease-spring);
}

.nav-item.active {
  color: var(--primary-accent);
}

.nav-item.active svg {
  transform: translateY(-1px) scale(1.05);
}

/* SCREEN: LAPORAN, TUTUP BUKU, LAUK & PENGATURAN (REPORTS & CONFIG) styling */
#screen-laporan, #screen-tutup-buku, #screen-lauk, #screen-pengaturan {
  height: 100%;
  overflow-y: auto; /* Enable scroll only for lists/reports */
  padding-bottom: 12px;
}

#screen-pengaturan {
  gap: 12px;
}

/* Report Controls Bar (Unified Period Dropdown + Popular Btn) */
.report-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.period-select-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 180px;
  min-width: 0;
}

.period-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.period-dropdown {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background-color: var(--bg-primary);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-spring);
  text-overflow: ellipsis;
}

.period-dropdown:focus {
  border-color: var(--color-qris);
  box-shadow: 0 0 0 3px var(--color-qris-light);
}

.btn-popular-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background-color: #FFF2E5;
  border: 1px solid #FFB870;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  color: #D96B00;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--dur-base) var(--ease-spring);
  flex: 0 0 auto;
}

.btn-popular-trigger:hover, .btn-popular-trigger:active {
  background-color: #FFE4CC;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .report-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }
  .period-select-wrapper {
    width: 100%;
    flex: none;
  }
  .btn-popular-trigger {
    width: 100%;
    justify-content: center;
  }
}

.report-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards Summary */
.summary-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.summary-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--color-border);
}

.summary-card.card-income {
  border-left-color: var(--color-cash);
}

.summary-card.card-expense {
  border-left-color: var(--color-expense);
}

.summary-card.card-profit {
  border-left-color: var(--primary-accent);
}

.card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 28px;
  font-weight: 800;
  display: block;
  margin-top: 4px;
}

.card-sub-values {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  border-top: 1px solid var(--color-border);
  padding-top: 4px;
}

/* Chart Card & Legends */
.chart-container-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.chart-container-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.payment-bar-chart {
  display: flex;
  height: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
  background-color: var(--color-gray);
}

.bar {
  height: 100%;
  transition: width var(--dur-base) var(--ease-out);
}

.bar-cash-fill {
  background-color: var(--color-cash);
}

.bar-qris-fill {
  background-color: var(--color-qris);
}

.payment-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}

.dot-cash { background-color: var(--color-cash); }
.dot-qris { background-color: var(--color-qris); }

/* Popular Items List bar visual */
.popular-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popular-item-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.popular-item-info {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.popular-item-bar-bg {
  width: 100%;
  height: 12px;
  background-color: var(--bg-primary);
  border-radius: 6px;
  overflow: hidden;
}

.popular-item-bar-fill {
  height: 100%;
  background-color: var(--primary-accent);
  border-radius: 6px;
  width: 0%;
  transition: width var(--dur-slow) var(--ease-out);
}

.empty-state {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
  font-style: italic;
}

/* History lists (Transactions) */
.transaction-list-card {
  padding-bottom: 8px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-text-action {
  background: none;
  border: none;
  color: var(--primary-accent);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.btn-text-action:active {
  opacity: 0.8;
}

.tx-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-border);
}

.tx-item.tx-in {
  border-left-color: var(--color-cash);
}

.tx-item.tx-out {
  border-left-color: var(--color-expense);
}

.tx-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-title {
  font-size: 14px;
  font-weight: 700;
}

.tx-tags {
  font-size: 11px;
  color: var(--primary-accent);
  font-weight: 600;
}

.tx-notes {
  font-size: 12px;
  color: var(--text-muted);
}

.tx-time {
  font-size: 11px;
  color: var(--text-muted);
}

.tx-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tx-val {
  font-size: 15px;
  font-weight: 800;
}

.tx-val.val-in { color: var(--color-cash); }
.tx-val.val-out { color: var(--color-expense); }

.tx-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-cash { background-color: var(--color-cash-light); color: var(--color-cash); }
.badge-qris { background-color: var(--color-qris-light); color: var(--color-qris); }
.badge-out { background-color: var(--color-expense-light); color: var(--color-expense); }

.btn-delete-tx {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
}

.btn-delete-tx:active {
  color: var(--color-expense);
}

/* SCREEN: TUTUP BUKU (CLOSING) styling */
.closing-panel-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.status-banner h4 {
  font-size: 15px;
  font-weight: 700;
}

.status-banner p {
  font-size: 12px;
}

.banner-open {
  background-color: var(--color-cash-light);
  color: var(--color-cash);
  border: 1px solid var(--color-cash);
}

.banner-closed {
  background-color: var(--primary-accent-light);
  color: var(--primary-accent);
  border: 1px solid var(--primary-accent);
}

.closing-main-card {
  display: flex;
  flex-direction: column;
}

.help-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.closing-numbers-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.closing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-border);
}

.closing-row.highlight-row {
  border-bottom: none;
  background-color: var(--bg-primary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.closing-row strong {
  font-size: 16px;
  font-weight: 800;
}

.val-qris { color: var(--color-qris); }
.val-cash { color: var(--color-cash); }

.laci-input-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.laci-input-section label {
  font-size: 14px;
  font-weight: 600;
}

.input-with-button {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
}

.rp-prefix {
  position: absolute;
  left: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

#input-uang-laci {
  width: 100%;
  height: 60px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding-left: 45px;
  padding-right: 16px;
  font-family: var(--font-family);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  background-color: var(--bg-primary);
  outline: none;
}

#input-uang-laci:focus {
  border-color: var(--primary-accent);
  background-color: #FFFFFF;
}

.closing-diff-box {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-top: 10px;
}

.closing-diff-box.diff-zero {
  background-color: var(--color-cash-light);
  color: var(--color-cash);
}

.closing-diff-box.diff-warning {
  background-color: var(--color-expense-light);
  color: var(--color-expense);
}

.closing-diff-box strong {
  font-size: 18px;
  font-weight: 800;
  margin: 2px 0;
}

.diff-desc {
  font-size: 11px;
}

.btn-closing-submit {
  width: 100%;
  height: 60px;
  border: none;
  background-color: var(--primary-accent);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--dur-base) var(--ease-spring);
}

.btn-closing-submit:active {
  transform: scale(0.98);
}

.btn-closing-submit:disabled {
  background-color: var(--color-border);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.closing-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.close-hist-item {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.close-hist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
}

.close-hist-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.close-hist-body span strong {
  color: var(--text-main);
}

.close-hist-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
}

.status-ok { background-color: var(--color-cash-light); color: var(--color-cash); }
.status-missing { background-color: var(--color-expense-light); color: var(--color-expense); }

/* SETTINGS & POPULAR MODAL OVERLAY */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(44, 30, 26, 0.5);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Slides up from bottom like native drawer */
  animation: fadeInOverlay var(--dur-base) var(--ease-out);
}

.modal-overlay.closing {
  animation: fadeOutOverlay var(--dur-fast) var(--ease-in) forwards;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to { opacity: 0; }
}

.modal-card {
  width: 100%;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-lg);
  padding: 24px 20px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUpCard var(--dur-slow) var(--ease-spring);
}

.modal-overlay.closing .modal-card {
  animation: slideDownCard var(--dur-fast) var(--ease-in) forwards;
}

@keyframes slideUpCard {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideDownCard {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(60%); opacity: 0; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: var(--color-gray);
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-close-modal:active {
  background-color: var(--color-border);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.divider {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-text label {
  font-size: 15px;
  font-weight: 700;
  display: block;
}

.setting-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.button-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.btn-secondary {
  width: 100%;
  height: 48px;
  background-color: var(--color-gray);
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--dur-base) var(--ease-spring);
}

.btn-secondary:active {
  background-color: var(--color-border);
}

.btn-secondary.btn-outline {
  background: none;
  border: 2px dashed var(--color-border);
}

.btn-danger {
  width: 100%;
  height: 48px;
  background-color: var(--color-expense-light);
  border: 1px solid var(--color-expense);
  color: var(--color-expense);
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-spring);
}

.btn-danger:active {
  background-color: var(--color-expense);
  color: #FFFFFF;
}

/* Switch styling for settings */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-border);
  transition: background-color var(--dur-base) var(--ease-out);
  border-radius: 34px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: transform var(--dur-base) var(--ease-spring);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .slider-round {
  background-color: var(--primary-accent);
}

input:focus + .slider-round {
  box-shadow: 0 0 1px var(--primary-accent);
}

input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* Toast Notifications Styling */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  background-color: var(--text-main);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: slideDownFadeIn var(--dur-base) var(--ease-spring);
  text-align: center;
}

.toast-success {
  background-color: var(--color-cash);
}

.toast-error {
  background-color: var(--color-expense);
}

@keyframes slideDownFadeIn {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUpFadeOut {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-16px); opacity: 0; }
}
/* SCREEN: ATUR LAUK — Shared Styles (Days Grid, Template Row) */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-bottom: 8px;
}

.day-btn {
  background-color: var(--color-gray);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
  text-align: center;
}

.day-btn.active {
  background-color: var(--primary-accent-light);
  border-color: var(--primary-accent);
  color: var(--primary-accent);
}

.template-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding-top: 8px;
  border-top: 1px dashed var(--color-border);
}

.add-master-lauk-form {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}

.btn-accent-fill {
  background-color: var(--primary-accent) !important;
  color: #FFFFFF !important;
  height: 42px;
}

/* ================================================
   NEW: EXPENSE CART (Keranjang Belanja)
   ================================================ */

.expense-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}

.price-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.rp-prefix-sm {
  position: absolute;
  left: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.price-field {
  padding-left: 32px !important;
}

.btn-add-cart {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background-color: var(--primary-accent);
  color: #FFF;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease-spring);
}

.btn-add-cart:active {
  transform: scale(0.9);
  opacity: 0.8;
}

.expense-cart-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
}

.cart-count {
  font-size: 11px;
  font-weight: 600;
  background-color: var(--color-gray);
  padding: 2px 8px;
  border-radius: 20px;
  color: var(--text-muted);
}

.expense-cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  animation: fadeIn 0.2s ease;
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 700;
}

.cart-item-price {
  font-size: 12px;
  color: var(--color-expense);
  font-weight: 600;
}

.cart-item-remove {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease-spring);
}

.cart-item-remove:active {
  color: var(--color-expense);
  transform: scale(0.85);
}

.cart-footer {
  padding: 10px 14px;
  border-top: 1.5px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
}

.cart-total-row strong {
  color: var(--color-expense);
  font-size: 18px;
}

/* ================================================
   NEW: DATE PICKER ROW (Laporan Custom)
   ================================================ */

.date-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background-color: var(--bg-card);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.date-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.date-field input[type="date"] {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  color: var(--text-main);
  -webkit-appearance: none;
}

/* Tab icon button (🔥) */
.tab-btn-icon {
  flex: 0 0 auto !important;
  padding: 6px 10px !important;
  font-size: 16px !important;
}

/* ================================================
   NEW: LAUK CANVAS (Chip System)
   ================================================ */

.lauk-canvas-card {
  display: flex;
  flex-direction: column;
}

.lauk-canvas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 50px;
  padding: 10px;
  background-color: var(--bg-primary);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  align-content: flex-start;
  transition: all 0.2s ease;
}

.lauk-canvas:empty + .canvas-empty-msg,
.lauk-canvas .canvas-empty-msg {
  display: block;
}

.lauk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: var(--primary-accent-light);
  border: 1.5px solid var(--primary-accent);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-accent);
  animation: fadeIn 0.2s ease;
  cursor: default;
}

.lauk-chip .chip-remove {
  background: none;
  border: none;
  color: var(--primary-accent);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: all var(--dur-fast) var(--ease-spring);
}

.lauk-chip .chip-remove:active {
  opacity: 1;
  transform: scale(0.85);
}

/* Master Grid Buttons */
.lauk-master-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.lauk-master-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background-color: var(--bg-primary);
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
}

.lauk-master-btn:active {
  transform: scale(0.93);
}

.lauk-master-btn .plus-icon {
  color: var(--color-cash);
  font-weight: 800;
}

/* Greyed out when already in canvas (the delete badge stays clickable below) */
.lauk-master-btn.in-canvas {
  opacity: 0.6;
  pointer-events: none;
  border-style: dashed;
}

/* Always-visible delete badge — hover doesn't exist on touchscreens, so this
   can't be hidden-until-hover like it used to be, or it's undiscoverable. */
.lauk-master-btn .delete-icon {
  pointer-events: auto; /* stays tappable even when the parent button is disabled (in-canvas) */
  color: #FFFFFF;
  background-color: var(--color-expense);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  margin-left: 4px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-spring);
}

.lauk-master-btn .delete-icon:active {
  transform: scale(0.85);
  background-color: #B92A2A;
}

/* Inline SVG Icon formatting */
.inline-icon, [data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.inline-icon svg, [data-icon] svg {
  flex-shrink: 0;
  vertical-align: middle;
}

/* ================================================
   LOGIN / LOCK SCREEN (2026 refresh)
   ================================================ */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 122, 84, 0.16), transparent 55%),
    radial-gradient(circle at 85% 90%, rgba(39, 160, 82, 0.12), transparent 50%),
    var(--bg-primary);
  animation: fadeInOverlay var(--dur-base) var(--ease-out);
}

.login-screen.closing {
  animation: fadeOutOverlay var(--dur-fast) var(--ease-in) forwards;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: loginCardIn var(--dur-slow) var(--ease-spring);
}

@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card.shake {
  animation: shakeError 0.4s var(--ease-out);
}

@keyframes shakeError {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

.login-brand-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: var(--primary-gradient);
  box-shadow: var(--shadow-glow-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.login-brand-icon svg {
  width: 32px;
  height: 32px;
}

.login-card h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.login-card .login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

.login-input-wrap {
  width: 100%;
  position: relative;
  margin-bottom: 10px;
}

.login-input-wrap input {
  width: 100%;
  height: 54px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 46px 0 18px;
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text-main);
  background-color: var(--bg-primary);
  outline: none;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}

.login-input-wrap input:focus {
  border-color: var(--primary-accent);
  background-color: #FFFFFF;
}

.login-toggle-visibility {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.login-toggle-visibility:active {
  background-color: var(--color-gray);
  color: var(--primary-accent);
}

.login-error-msg {
  width: 100%;
  min-height: 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-expense);
  text-align: left;
  margin-bottom: 12px;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.login-error-msg.visible {
  opacity: 1;
}

.btn-login-submit {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #FFFFFF;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-glow-accent);
  transition: transform var(--dur-fast) var(--ease-spring), filter var(--dur-fast) var(--ease-out);
  touch-action: manipulation;
}

.btn-login-submit:active {
  transform: scale(0.97);
  filter: brightness(0.95);
}

.login-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 18px;
  line-height: 1.5;
}

/* ================================================
   SETTINGS: SECURITY SECTION
   ================================================ */

.security-form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.security-form-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-logout {
  width: 100%;
  height: 48px;
  background-color: var(--color-gray);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--dur-base) var(--ease-spring);
}

.btn-logout:active {
  background-color: var(--color-border);
  transform: scale(0.98);
}

/* ================================================
   AUDIT LOG MODAL
   ================================================ */

.audit-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.audit-log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh;
  overflow-y: auto;
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-border);
}

.audit-item.audit-success { border-left-color: var(--color-cash); }
.audit-item.audit-warning { border-left-color: var(--primary-accent); }
.audit-item.audit-danger { border-left-color: var(--color-expense); }
.audit-item.audit-info { border-left-color: var(--color-qris); }

.audit-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}

.audit-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.audit-action {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.audit-detail {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-word;
}

.audit-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}
