/* ============================================================
   AccountPWR Mobile — Liquid Glass Design System
   ============================================================ */

:root {
  --bg-primary-gradient: linear-gradient(135deg, #f9fafc 0%, #f2f4f8 100%);
  --bg-soft-white: #fcfcfd;
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --brand-color: #4f46e5;
  --brand-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 100%);
  --glass-bg-accent: linear-gradient(135deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.45) 100%);
  --glass-border: rgba(255, 255, 255, 0.48);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --glass-shadow-large: 0 16px 48px 0 rgba(31, 38, 135, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 16px);
  --safe-top: env(safe-area-inset-top, 20px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', 'Google Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-primary-gradient);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism primitives */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(210%);
  -webkit-backdrop-filter: blur(24px) saturate(210%);
  border: 1px solid var(--glass-border);
  border-top: 1.5px solid rgba(255, 255, 255, 0.75); /* Specular top edge highlight */
  box-shadow: 
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 4px 12px -2px rgba(255, 255, 255, 0.35),
    var(--glass-shadow);
  border-radius: 20px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-panel-active:active {
  transform: scale(0.97);
  background: var(--glass-bg-accent);
}

.glass-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(60px + var(--safe-top));
  padding-top: var(--safe-top);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.22) 100%);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 20px;
  padding-right: 20px;
}

.glass-nav-bar {
  position: fixed;
  bottom: calc(12px + var(--safe-bottom));
  left: 16px;
  right: 16px;
  height: 68px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 100%);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 
    inset 0 1px 0 0 rgba(255, 255, 255, 0.7), /* Specular top highlight */
    inset 0 8px 16px -4px rgba(255, 255, 255, 0.45), /* Top refraction glow */
    inset 0 -8px 16px -4px rgba(0, 0, 0, 0.02),
    0 16px 36px 0 rgba(31, 38, 135, 0.08); /* Soft drop shadow */
  border-radius: 34px;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}

/* Nav Item States */
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin: 0 6px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 26px;
  border: 1px solid transparent;
}

.nav-btn.active {
  color: var(--brand-color);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 100%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    inset 0 1px 1px 0 rgba(255, 255, 255, 1), /* Inner capsule reflection */
    0 4px 12px 0 rgba(31, 38, 135, 0.03);
}

.nav-btn svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-btn.active svg {
  transform: scale(1.1);
}

/* Page containers */
.page-container {
  padding-top: calc(75px + var(--safe-top));
  padding-bottom: calc(105px + var(--safe-bottom));
  padding-left: 16px;
  padding-right: 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Bottom Sheet (Actions & Reports Overlays) */
.bottom-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.bottom-sheet-content {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.25) 100%);
  backdrop-filter: blur(35px) saturate(220%);
  -webkit-backdrop-filter: blur(35px) saturate(220%);
  border-top: 1.5px solid rgba(255, 255, 255, 0.7);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  padding-bottom: calc(24px + var(--safe-bottom));
  box-shadow: 
    inset 0 1px 3px 0 rgba(255, 255, 255, 0.65),
    0 -10px 40px rgba(0, 0, 0, 0.04);
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

/* Bottom Sheet slider bar */
.bottom-sheet-drag-handle {
  width: 40px;
  height: 5px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 99px;
  margin: 12px auto;
}

/* Cards & KPI grid */
.kpi-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Soft Glow highlights */
.glow-success {
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
}
.glow-danger {
  box-shadow: 0 10px 30px -10px rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
}
.glow-brand {
  box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.25);
}

/* Button scaling active states */
.btn-tactile {
  background: var(--brand-gradient);
  color: white;
  border-radius: 16px;
  padding: 14px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.btn-tactile:active {
  transform: scale(0.95);
  filter: brightness(0.95);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
}

.btn-tactile-secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.25) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 14px 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    0 6px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
}

.btn-tactile-secondary:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.45);
}

/* Custom list row item */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.list-row:last-child {
  border-bottom: none;
}

/* iPhone Notch / Landscape protection */
@supports (padding: max(0px)) {
  .page-container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

/* Modal and slide overs */
.slide-over-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary-gradient);
  z-index: 100;
  overflow-y: auto;
  padding-top: calc(20px + var(--safe-top));
  padding-bottom: calc(40px + var(--safe-bottom));
}

.slide-over-header {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.25) 100%);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.3);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

/* Inputs and Forms styled for clean mobile interaction */
.input-mobile {
  width: 100%;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px; /* Prevents auto-zoom on iOS */
  color: var(--text-main);
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.input-mobile:focus {
  outline: none;
  border-color: var(--brand-color);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    0 0 0 3px rgba(79, 70, 229, 0.15);
}

.label-mobile {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.card-mobile-form {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(31, 38, 135, 0.03);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

/* Custom switch toggle */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
