/* ============================================================
   PERSONAL ACCOUNTS - APPLE DESIGN SYSTEM (SF WEALTH)
   Refined, clean Apple aesthetic with frosted glass,
   micro-radii, tight typography, compact statement print,
   and fluid iOS mobile responsiveness.
   ============================================================ */

:root {
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Apple Palette */
  --bg-canvas: #f5f5f7;
  --bg-card: #ffffff;
  --bg-subtle: #fbfbfd;
  --border-light: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  
  /* Typography */
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #a1a1a6;

  /* Apple System Colors */
  --apple-green: #34c759;
  --apple-green-bg: #edf9f0;
  --apple-green-border: #baf0c8;
  --apple-green-text: #248a3d;

  --apple-red: #ff3b30;
  --apple-red-bg: #fff0ef;
  --apple-red-border: #ffc6c3;
  --apple-red-text: #d70015;

  --apple-blue: #007aff;
  --apple-blue-bg: #edf5ff;
  --apple-blue-border: #b8d8ff;
  --apple-blue-text: #005ecb;

  --apple-gray: #8e8e93;

  /* Apple Radii & Depth */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-apple-card: 0 2px 12px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-apple-float: 0 12px 32px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-apple);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.47;
  font-size: 15px;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
}

.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ============================================================
   APPLE LIGHT SIDEBAR (DESKTOP)
   ============================================================ */
.sidebar {
  width: 250px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  z-index: 30;
}

.sidebar-header {
  padding: 24px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-apple-badge {
  width: 36px;
  height: 36px;
  background: #1d1d1f;
  color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-caption {
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  font-weight: 700;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.sidebar-footer {
  padding: 16px 14px;
  border-top: 1px solid var(--border-light);
}

.btn-lock-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-lock-sidebar:hover {
  background: rgba(0,0,0,0.03);
  color: var(--text-primary);
}

/* ============================================================
   APPLE FROSTED TOPBAR
   ============================================================ */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-canvas);
}

.apple-topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-heading {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.page-container {
  padding: 24px 28px 60px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   DASHBOARD: 3 BIG ACTION CARDS (APPLE NATIVE FEEL)
   ============================================================ */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.apple-hero-btn {
  border-radius: var(--radius-md);
  padding: 20px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-apple-card);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
  user-select: none;
}

.apple-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-apple-float);
}

.apple-hero-btn:active {
  transform: scale(0.98);
}

/* Green Income Card */
.apple-hero-btn.income {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf6 100%);
  border-color: var(--apple-green-border);
}

.apple-hero-btn.income .hero-icon-bubble {
  background: var(--apple-green-bg);
  color: var(--apple-green);
  border: 1px solid var(--apple-green-border);
}

.apple-hero-btn.income .hero-title {
  color: var(--apple-green-text);
}

/* Red Expense Card */
.apple-hero-btn.expense {
  background: linear-gradient(180deg, #ffffff 0%, #fff7f7 100%);
  border-color: var(--apple-red-border);
}

.apple-hero-btn.expense .hero-icon-bubble {
  background: var(--apple-red-bg);
  color: var(--apple-red);
  border: 1px solid var(--apple-red-border);
}

.apple-hero-btn.expense .hero-title {
  color: var(--apple-red-text);
}

/* Blue Transfer Card */
.apple-hero-btn.transfer {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fe 100%);
  border-color: var(--apple-blue-border);
}

.apple-hero-btn.transfer .hero-icon-bubble {
  background: var(--apple-blue-bg);
  color: var(--apple-blue);
  border: 1px solid var(--apple-blue-border);
}

.apple-hero-btn.transfer .hero-title {
  color: var(--apple-blue-text);
}

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

.hero-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Period Filter Pills (Apple Segmented Control) */
.apple-segmented-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  flex-wrap: wrap;
}

.apple-segments {
  display: inline-flex;
  background: #e5e5ea;
  padding: 2px;
  border-radius: 9px;
  gap: 2px;
}

.apple-segment-pill {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.15s ease;
}

.apple-segment-pill.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* ============================================================
   APPLE WALLET STYLE CARDS & PORTFOLIO
   ============================================================ */
.apple-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.apple-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.apple-stat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-apple-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 104px;
  box-sizing: border-box;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apple-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card-number {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.card-foot {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Category Spending Progress Bar */
.apple-breakdown-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-apple-card);
}

.breakdown-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.progress-track {
  height: 8px;
  background: #f2f2f7;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 6px 0 12px;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* ============================================================
   COMPACT ACCOUNT STATEMENT (OPTIMIZED TO PREVENT PAPER WASTE)
   ============================================================ */
.statement-sheet-compact {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-apple-card);
}

/* Compact header */
.stmt-head-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #1d1d1f;
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.stmt-head-title {
  font-size: 18px;
  font-weight: 800;
  color: #1d1d1f;
  letter-spacing: -0.02em;
}

.stmt-head-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* 1-Line Compact Summary Strip */
.stmt-strip-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f5f5f7;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 8px 14px;
  margin-bottom: 16px;
  gap: 8px;
}

.strip-item-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.strip-item-val {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* Dense Statement Table */
.stmt-table-dense {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.25;
}

.stmt-table-dense th {
  background-color: #f2f2f7;
  border-top: 1px solid #1d1d1f;
  border-bottom: 1px solid #1d1d1f;
  padding: 6px 8px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  color: #1d1d1f;
  text-transform: uppercase;
}

.stmt-table-dense td {
  padding: 6px 8px;
  border-bottom: 1px solid #e5e5ea;
  color: #1d1d1f;
}

.stmt-table-dense td.numeric, .stmt-table-dense th.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   A4 PRINT STYLESHEET (NO WASTED PAPER, TIGHT MARGINS)
   ============================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    display: block !important;
    font-size: 10pt !important;
    line-height: 1.2 !important;
  }

  .sidebar,
  .mobile-nav,
  .apple-topbar,
  .btn,
  .apple-segmented-bar,
  .lock-screen-overlay,
  .modal-backdrop,
  #view-dashboard,
  #view-transactions,
  #view-accounts,
  #view-settings,
  .report-toolbar {
    display: none !important;
  }

  #view-reports {
    display: block !important;
  }

  .main-wrapper, .page-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .statement-sheet-compact {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .stmt-head-compact {
    border-bottom: 1.5pt solid #000000 !important;
    padding-bottom: 6pt !important;
    margin-bottom: 8pt !important;
  }

  .stmt-head-title {
    font-size: 15pt !important;
  }

  .stmt-strip-compact {
    background: #f8f8f8 !important;
    border: 0.5pt solid #000000 !important;
    padding: 4pt 8pt !important;
    margin-bottom: 8pt !important;
  }

  .strip-item-val {
    font-size: 11pt !important;
  }

  .stmt-table-dense {
    font-size: 8.5pt !important;
  }

  .stmt-table-dense th {
    background: #f0f0f0 !important;
    border-top: 1pt solid #000000 !important;
    border-bottom: 1pt solid #000000 !important;
    padding: 3pt 5pt !important;
  }

  .stmt-table-dense td {
    padding: 3pt 5pt !important;
    border-bottom: 0.5pt solid #cccccc !important;
  }

  .stmt-table-dense tr {
    page-break-inside: avoid !important;
  }

  .print-footer {
    display: block !important;
    margin-top: 10pt;
    padding-top: 4pt;
    border-top: 0.5pt solid #000000;
    font-size: 8pt;
    text-align: center;
    color: #666666;
  }
}

.print-footer {
  display: none;
}

/* ============================================================
   TRANSACTION ROWS & PILLS
   ============================================================ */
.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.tx-row:hover {
  background-color: var(--bg-subtle);
}

.tx-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.tx-avatar.income { background: var(--apple-green-bg); color: var(--apple-green-text); }
.tx-avatar.expense { background: var(--apple-red-bg); color: var(--apple-red-text); }
.tx-avatar.transfer { background: var(--apple-blue-bg); color: var(--apple-blue-text); }

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.category-pill.income { background: var(--apple-green-bg); color: var(--apple-green-text); }
.category-pill.expense { background: var(--apple-red-bg); color: var(--apple-red-text); }
.category-pill.transfer { background: var(--apple-blue-bg); color: var(--apple-blue-text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

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

.btn-primary {
  background-color: #007aff;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #006be0;
}

.btn-secondary {
  background-color: #ffffff;
  color: #1d1d1f;
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background-color: #f2f2f7;
}

.btn-danger {
  background-color: #ffffff;
  color: var(--apple-red);
  border-color: var(--apple-red-border);
}

.btn-danger:hover {
  background-color: var(--apple-red-bg);
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #48484a;
}

.form-input, .form-select, .form-textarea {
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-size: 15px;
  color: var(--text-primary);
  background-color: #ffffff;
  outline: none;
  width: 100%;
}

.form-textarea {
  height: 72px;
  padding: 10px 12px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-apple-float);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  background: #e5e5ea;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  color: #636366;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

/* Immediate suppression on refresh if session is active */
html.session-unlocked .lock-screen-overlay {
  display: none !important;
}

/* ============================================================
   AUTHENTIC APPLE PASSCODE LOCK SCREEN
   ============================================================ */
.lock-screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245, 245, 247, 0.94);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.lock-screen-overlay.unlocking {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}

.lock-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

.apple-padlock-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d1d1f;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}

.apple-padlock-icon.unlocked {
  background: #34c759;
  color: #ffffff;
  border-color: #34c759;
  transform: scale(1.08);
}

.apple-padlock-icon.unlocked #padlock-shackle {
  transform: translateY(-3px) rotate(-20deg);
  transform-origin: 17px 7px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lock-title {
  font-size: 21px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.lock-error-text {
  font-size: 13px;
  font-weight: 600;
  color: #ff3b30;
  min-height: 18px;
  margin: 0 0 16px 0;
  transition: opacity 0.15s ease;
}

.pin-dots {
  display: flex;
  gap: 18px;
  margin-bottom: 32px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #8e8e93;
  background: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-dot.filled {
  background-color: #1d1d1f;
  border-color: #1d1d1f;
  transform: scale(1.15);
}

.pin-dot.success {
  background-color: #34c759 !important;
  border-color: #34c759 !important;
}

.pin-dots.shake {
  animation: appleShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.pin-dots.shake .pin-dot {
  border-color: #ff3b30;
  background-color: #ff3b30;
}

@keyframes appleShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-12px); }
  30% { transform: translateX(10px); }
  45% { transform: translateX(-8px); }
  60% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
  90% { transform: translateX(2px); }
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 22px;
  width: 100%;
  max-width: 290px;
  justify-items: center;
}

.keypad-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.88);
  color: #1d1d1f;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: background-color 0.08s ease, transform 0.08s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.keypad-btn:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.keypad-btn:active,
.keypad-btn.pressed {
  background-color: #d1d1d6 !important;
  transform: scale(0.92);
}

.keypad-num {
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  color: #1d1d1f;
}

.keypad-letters {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: #8e8e93;
  line-height: 1;
  text-transform: uppercase;
  margin-top: 1px;
  padding-left: 1.8px;
}

.keypad-btn-util {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.keypad-btn-util:hover {
  background: transparent !important;
  color: #007aff;
}

.keypad-btn-util:active {
  transform: scale(0.92);
  opacity: 0.6;
}

@media (max-width: 360px) {
  .keypad-btn {
    width: 66px;
    height: 66px;
  }
  .keypad-num {
    font-size: 24px;
  }
  .pin-keypad {
    gap: 14px 18px;
  }
}

/* ============================================================
   MOBILE RESPONSIVENESS (iOS EXPERIENCE)
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: 50;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 4px;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 600;
  padding: 6px;
  cursor: pointer;
}

.mobile-nav-btn.active {
  color: #007aff;
  font-weight: 700;
}

@media (max-width: 900px) {
  .dashboard-actions-grid,
  .apple-card-grid,
  .apple-analytics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .apple-topbar {
    padding: 12px 16px;
  }

  .page-container {
    padding: 16px 14px 84px;
  }

  .stmt-strip-compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-dialog {
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    margin-top: auto;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }
}

.hidden {
  display: none !important;
}
