/* ==========================================================================
   DepositBot Pro SaaS Design System
   Modern FinTech / SaaS Dark Glassmorphism
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Colors - Base Palette */
  --bg-app: #080a0f;
  --bg-mesh: radial-gradient(at 10% 10%, rgba(37, 99, 235, 0.12) 0px, transparent 50%),
             radial-gradient(at 90% 10%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
             radial-gradient(at 50% 90%, rgba(139, 92, 246, 0.08) 0px, transparent 50%),
             #080a0f;

  --surface-base: #0f131c;
  --surface-card: #141a26;
  --surface-elevated: #1a2232;
  --surface-active: #222d42;
  --bg-glass: rgba(255, 255, 255, 0.035);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(255, 255, 255, 0.2);

  /* Brand Accents */
  --blue-primary: #3b82f6;
  --blue-hover: #2563eb;
  --blue-soft: rgba(59, 130, 246, 0.14);

  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --emerald-border: rgba(16, 185, 129, 0.3);

  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.3);

  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.14);
  --rose-border: rgba(244, 63, 94, 0.3);

  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.14);

  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.14);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  /* Dimensions & Shapes */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 24px rgba(59, 130, 246, 0.3);
  --shadow-glow-emerald: 0 0 24px rgba(16, 185, 129, 0.3);

  /* Transitions */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html {
  background: var(--bg-app);
  height: 100%;
  --pwa-top-offset: calc(env(safe-area-inset-top, 0px) + 8px);
}

body {
  min-height: 100%;
  background: var(--bg-mesh);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 96px; /* Space for bottom dock */
}

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s var(--ease-spring), opacity 0.15s ease, background 0.15s ease;
}

button:active {
  transform: scale(0.96);
  opacity: 0.85;
}

a {
  color: var(--blue-primary);
  text-decoration: none;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */

.app-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 14px;
}

html.is-standalone .app-container {
  padding-top: var(--pwa-top-offset);
}

/* ==========================================================================
   Top Header & Brand Bar
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 6px 4px;
  background: rgba(8, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

html.is-standalone .app-header {
  top: var(--pwa-top-offset);
}

.brand-group {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 8px;
}

.brand-avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2563eb, #10b981);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-name {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.pro-tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #ffffff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

#stateText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  position: relative;
}

.status-indicator::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--emerald);
  opacity: 0.35;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.status-pill.warn .status-indicator {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.status-pill.warn .status-indicator::after { background: var(--amber); }

.status-pill.bad .status-indicator {
  background: var(--rose);
  box-shadow: 0 0 8px var(--rose);
}
.status-pill.bad .status-indicator::after { background: var(--rose); }

.header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
}

.header-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  gap: 0;
}

.fab-label {
  display: none;
}

.header-btn.quick-fab {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.header-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.header-icon-btn:hover, .header-icon-btn:active {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.install-app-btn {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(14, 116, 144, 0.18);
}

.install-app-btn[hidden] {
  display: none;
}

.spin-icon {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.is-refreshing .spin-icon {
  animation: spin-loop 0.8s linear infinite;
}

@keyframes spin-loop {
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Hero Portfolio Card
   ========================================================================== */

.hero-portfolio-card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #10192e 0%, #0d1e2b 50%, #0a171d 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: var(--shadow-md), 0 0 40px rgba(37, 99, 235, 0.15);
  margin-bottom: 14px;
}

.hero-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(16, 185, 129, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-primary);
}

.hero-balance-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.hero-currency-prefix {
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.hero-balance {
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.05;
}

.hero-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.hero-meta-badge:active {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(0.96);
}

.hero-crypto-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 6px;
}

.crypto-sub-item {
  display: flex;
  flex-direction: column;
}

.crypto-sub-item.align-right {
  align-items: flex-end;
}

.sub-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sub-val {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.sub-val-muted {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hero-act-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.hero-act-btn.primary {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.hero-act-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   KPI Metrics Grid
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring), border-color 0.15s ease;
}

.kpi-card:active {
  transform: scale(0.97);
  border-color: var(--border-medium);
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.kpi-icon-wrap.emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.kpi-icon-wrap.blue {
  background: var(--blue-soft);
  color: var(--blue-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.kpi-icon-wrap.amber {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.kpi-icon-wrap.purple {
  background: var(--purple-soft);
  color: var(--purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.kpi-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kpi-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2px 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-value.text-sm {
  font-size: 13px;
}

.kpi-value.profit-value {
  color: var(--emerald);
}

#totalProfit {
  white-space: normal;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.kpi-footer {
  display: flex;
  align-items: center;
}

.kpi-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.kpi-badge.emerald {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.kpi-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   System Status Banner
   ========================================================================== */

.system-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.sys-status-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sys-status-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--emerald-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
}

.sys-status-text {
  display: flex;
  flex-direction: column;
}

.sys-status-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.sys-status-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.badge-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--emerald-soft);
  color: var(--emerald);
}

/* ==========================================================================
   SaaS Generic Card & Card Headers
   ========================================================================== */

.saas-card {
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
}

.saas-card.danger-outline {
  border-color: rgba(244, 63, 94, 0.3);
}

.saas-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.saas-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-primary);
}

.saas-card-title-group.danger-title {
  color: var(--rose);
}

.saas-card-title-group h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.saas-link-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-primary);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.saas-link-btn:active {
  background: var(--blue-soft);
}

.header-count-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Hero Variant Cards in Sub-screens */
.hero-gradient-crypto {
  padding: 20px 18px;
  background: linear-gradient(145deg, #101b33 0%, #0e1526 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero-gradient-sim {
  padding: 20px 18px;
  background: linear-gradient(145deg, #2b1f10 0%, #17130e 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-gradient-bitrefill {
  padding: 20px 18px;
  background: linear-gradient(145deg, #261233 0%, #150e1d 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.crypto-card-head, .sim-hero-head, .bitrefill-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.eyebrow-accent {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: block;
}

.crypto-large-val {
  font-size: 30px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: block;
  margin-top: 2px;
}

.crypto-usdt-badge {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--blue-soft);
  color: var(--blue-primary);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.sim-badge-alert {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--amber-border);
}

.bitrefill-status-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--purple);
}

.crypto-month-meta, .bitrefill-meta-line {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.bitrefill-balance-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bitrefill-balance-strip span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.bitrefill-balance-strip strong {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  text-align: right;
}

.crypto-action-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
  gap: 8px;
}

.pill-act {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  white-space: nowrap;
}

.pill-act.primary {
  background: var(--blue-primary);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.pill-act.danger-soft {
  background: var(--rose-soft);
  border-color: var(--rose-border);
  color: var(--rose);
}

.pill-act.danger {
  background: var(--rose);
  border-color: transparent;
  color: #ffffff;
}

/* Informational allocation of the existing crypto balance */
.fund-locations-card .saas-card-header {
  padding-bottom: 13px;
}

.fund-locations-card .saas-card-title-group > svg {
  flex-shrink: 0;
}

.fund-location-hint {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.25;
}

.fund-add-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--blue-primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.28);
}

.fund-allocation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 18px;
  background: rgba(16, 185, 129, 0.08);
  border-bottom: 1px solid rgba(16, 185, 129, 0.18);
}

.fund-allocation-summary.is-over {
  background: rgba(244, 63, 94, 0.08);
  border-bottom-color: rgba(244, 63, 94, 0.2);
}

.fund-allocation-summary > div:first-child {
  min-width: 0;
}

.fund-summary-label {
  display: block;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.fund-allocation-summary strong {
  display: block;
  margin-top: 1px;
  color: var(--emerald);
  font-size: 18px;
  line-height: 1.2;
}

.fund-allocation-summary.is-over strong {
  color: var(--rose);
}

.fund-summary-right {
  min-width: 0;
  text-align: right;
}

.fund-summary-right span,
.fund-summary-right small {
  display: block;
}

.fund-summary-right span {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.fund-summary-right small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.25;
}

.fund-location-list {
  padding: 0 16px 8px;
}

.fund-location-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.fund-location-row:last-child {
  border-bottom: 0;
}

.fund-location-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--blue-primary);
  background: var(--blue-soft);
  border: 1px solid rgba(59, 130, 246, 0.24);
}

.fund-location-icon.cash {
  color: var(--emerald);
  background: var(--emerald-soft);
  border-color: var(--emerald-border);
}

.fund-location-icon.bank {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(6, 182, 212, 0.28);
}

.fund-location-icon.exchange {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: var(--amber-border);
}

.fund-location-icon.cold_wallet {
  color: var(--purple);
  background: var(--purple-soft);
  border-color: rgba(168, 85, 247, 0.28);
}

.fund-location-main {
  min-width: 0;
}

.fund-location-title,
.fund-location-category,
.fund-location-track {
  display: block;
}

.fund-location-title {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-location-category {
  overflow: hidden;
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fund-location-track {
  width: 100%;
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.fund-location-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-primary), var(--emerald));
}

.fund-location-amount {
  min-width: 94px;
  text-align: right;
}

.fund-location-amount strong,
.fund-location-amount small {
  display: block;
}

.fund-location-amount strong {
  color: var(--text-primary);
  font-size: 12px;
  white-space: nowrap;
}

.fund-location-amount small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.fund-location-empty {
  padding: 24px 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.sheet-info-note {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--blue-primary);
  color: var(--text-secondary);
  background: var(--blue-soft);
  font-size: 11px;
  line-height: 1.45;
}

/* ==========================================================================
   Filter & Search Bars
   ========================================================================== */

.filter-card {
  padding: 14px 16px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border-radius: var(--radius-md);
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 0.15s ease;
}

.search-input-wrap input:focus {
  border-color: var(--blue-primary);
}

.filter-controls-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.custom-select-wrap {
  flex: 1;
}

.custom-select-wrap select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.segmented-pill-bar {
  display: flex;
  background: var(--surface-base);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.seg-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.seg-btn.active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.filter-status-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   List & Item Component (Transactions, Ledgers, Reminders)
   ========================================================================== */

.transaction-list-container {
  display: flex;
  flex-direction: column;
}

.list-month-divider {
  padding: 8px 18px;
  background: var(--surface-base);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-subtle);
}

.list-shift-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: rgba(59, 130, 246, 0.08);
  border-bottom: 1px solid rgba(59, 130, 246, 0.18);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.3;
}

.list-shift-divider span {
  flex: 0 0 auto;
  color: var(--blue-primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.list-shift-divider strong {
  min-width: 0;
  color: var(--text-primary);
  font-weight: 700;
}

.saas-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  gap: 12px;
  transition: background 0.12s ease;
}

.saas-list-item.is-cancelled {
  opacity: 0.55;
  background: rgba(255, 255, 255, 0.015);
}

.saas-list-item:last-child {
  border-bottom: none;
}

.saas-list-item.clickable:active {
  background: var(--surface-elevated);
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.item-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
}

.item-avatar.income {
  background: var(--emerald-soft);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.item-avatar.expense {
  background: var(--rose-soft);
  color: var(--rose);
  border: 1px solid var(--rose-border);
}

.item-avatar.sim {
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid var(--amber-border);
}

.item-avatar.cancelled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.item-avatar.refund {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.item-avatar.neutral {
  background: var(--surface-elevated);
  color: var(--text-secondary);
}

.item-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.item-primary-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.item-secondary-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.item-amount-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}

.item-amount-val.income {
  color: var(--emerald);
}

.item-amount-val.expense {
  color: var(--rose);
}

.item-amount-val.refund {
  color: #0284c7;
}

.item-amount-val.cancelled {
  color: var(--text-muted);
  text-decoration: line-through;
}

.item-badge-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-elevated);
  color: var(--text-muted);
}

.item-badge-pill.refund {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
}

.item-badge-pill.cancelled {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose);
}

.item-badge-pill.ok {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.item-badge-pill.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.item-badge-pill.danger {
  background: var(--rose-soft);
  color: var(--rose);
}

.empty-state-box {
  padding: 36px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* ==========================================================================
   SIM Card Grid Component
   ========================================================================== */

.sim-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 16px;
}

.sim-visual-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.sim-visual-card:active {
  transform: scale(0.98);
}

.sim-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sim-phone-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.sim-card-mid {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.sim-progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.sim-progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--emerald);
}

.sim-progress-fill.warn { background: var(--amber); }
.sim-progress-fill.danger { background: var(--rose); }

.sim-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sim-mini-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: var(--surface-elevated);
  color: var(--text-secondary);
}

/* ==========================================================================
   Bitrefill Voucher Grid
   ========================================================================== */

.pin-pair-grid-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px 16px;
}

.pin-pair-voucher {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-base);
  border: 1px solid rgba(168, 85, 247, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: default;
}

.voucher-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voucher-title {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.voucher-pills-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.voucher-sub-pill {
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voucher-sub-pill strong {
  color: var(--purple);
  font-size: 13px;
}

.voucher-sub-pill span {
  font-size: 11px;
  color: var(--text-muted);
}

.pin-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.pin-card-actions.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 12px 12px;
}

.pin-card-actions button {
  min-height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.pin-card-actions button:active {
  transform: translateY(1px);
  background: rgba(59, 130, 246, 0.18);
}

.pin-card-actions button[data-action="pin-open"] {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.28);
  color: #fb7185;
}

.pin-card-actions button[data-action="pin-status"] {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.pin-inline-card {
  margin: 0;
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
}

.pin-inline-card:last-child {
  border-bottom: none;
}

.pin-inline-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  text-align: left;
}

.pin-inline-main .item-left {
  min-width: 0;
}

.pin-inline-main .item-badge-pill {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Reports Hub & Exports
   ========================================================================== */

.reports-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px 16px;
}

.report-export-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  text-align: left;
}

.report-export-tile:active {
  background: var(--surface-elevated);
}

.rep-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.rep-icon.pdf {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border: 1px solid var(--rose-border);
}

.rep-icon.xls {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid var(--emerald-border);
}

.rep-info strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.rep-info small {
  font-size: 11px;
  color: var(--text-muted);
}

.backup-actions-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

.backup-act-btn {
  padding: 12px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  text-align: center;
}

.backup-act-btn.export {
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
}

.backup-act-btn.import {
  background: var(--amber-soft);
  border: 1px solid var(--amber-border);
  color: var(--amber);
}

/* ==========================================================================
   Service Section & Command Grid
   ========================================================================== */

.service-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.service-quick-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.service-quick-tile .tile-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}

.service-quick-tile.emerald .tile-icon-wrap { background: var(--emerald-soft); color: var(--emerald); }
.service-quick-tile.amber .tile-icon-wrap { background: var(--amber-soft); color: var(--amber); }
.service-quick-tile.blue .tile-icon-wrap { background: var(--blue-soft); color: var(--blue-primary); }
.service-quick-tile.purple .tile-icon-wrap { background: var(--purple-soft); color: var(--purple); }

.tile-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.tile-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.command-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px 16px;
}

.command-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.command-tile code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 2px;
}

.command-tile span {
  font-size: 11px;
  color: var(--text-muted);
}

.command-tile.danger-soft code {
  color: var(--rose);
}

.danger-box-content {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-box-content p {
  font-size: 12px;
  color: var(--text-secondary);
}

.danger-btn-wide {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--rose-soft);
  border: 1px solid var(--rose-border);
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

/* ==========================================================================
   Bottom Floating Navigation Dock
   ========================================================================== */

.bottom-dock {
  position: fixed;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 14px;
  pointer-events: none;
}

.dock-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  background: rgba(15, 19, 28, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(59, 130, 246, 0.1);
}

.dock-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all 0.2s var(--ease-spring);
}

.dock-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.dock-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dock-tab.active {
  color: var(--blue-primary);
  background: rgba(59, 130, 246, 0.14);
}

.dock-tab.active .dock-icon-wrap {
  transform: translateY(-2px);
}

/* ==========================================================================
   Speed-Dial / Quick Action Modal
   ========================================================================== */

.modal-backdrop, .sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop:not([hidden]), .sheet-backdrop:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.quick-modal-sheet, .action-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 51;
  max-width: 600px;
  margin: 0 auto;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  border-bottom: none;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.7);
  transform: translateY(100%);
  transition: transform 0.28s var(--ease-smooth);
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 18px max(24px, env(safe-area-inset-bottom));
}

.quick-modal-sheet:not([hidden]), .action-sheet:not([hidden]) {
  transform: translateY(0);
}

.sheet-drag-handle {
  width: 40px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-medium);
  margin: 0 auto 14px;
}

.quick-modal-head, .sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.quick-modal-title, .sheet-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.eyebrow, .sheet-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-primary);
}

.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-card);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.quick-tile-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  text-align: left;
}

.quick-tile-btn .q-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quick-tile-btn.emerald .q-icon-box { background: var(--emerald-soft); color: var(--emerald); }
.quick-tile-btn.blue .q-icon-box { background: var(--blue-soft); color: var(--blue-primary); }
.quick-tile-btn.purple .q-icon-box { background: var(--purple-soft); color: var(--purple); }
.quick-tile-btn.amber .q-icon-box { background: var(--amber-soft); color: var(--amber); }
.quick-tile-btn.rose .q-icon-box { background: var(--rose-soft); color: var(--rose); }
.quick-tile-btn.cyan .q-icon-box { background: var(--cyan-soft); color: var(--cyan); }

.q-text-box strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.q-text-box small {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   Form Styling inside Sheets
   ========================================================================== */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-stack label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-stack input, .form-stack select, .form-stack textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  transition: border-color 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus {
  border-color: var(--blue-primary);
  background: var(--surface-elevated);
}

.check-row {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
}

.check-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--blue-primary);
}

.submit-button {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--blue-primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-top: 6px;
  box-shadow: var(--shadow-glow-blue);
}

.submit-button.danger {
  background: var(--rose);
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

/* Detail Card in Sheet */
.detail-card {
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  margin-bottom: 14px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.detail-line:last-child {
  border-bottom: none;
}

.detail-line span {
  color: var(--text-muted);
  font-weight: 600;
}

.detail-line strong {
  color: #ffffff;
  font-weight: 700;
  max-width: 65%;
  text-align: right;
  word-break: break-word;
}

.copyable-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 30px;
  margin: -5px -8px -5px 0;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s var(--ease-spring);
}

.copyable-value::after {
  content: "⧉";
  font-size: 12px;
  line-height: 1;
  color: var(--blue-primary);
  opacity: 0.75;
}

.copyable-value:active {
  transform: scale(0.96);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.sim-phone-copy {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.sheet-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.pill-button {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.pill-button.danger {
  background: var(--rose-soft);
  border-color: var(--rose-border);
  color: var(--rose);
}

.secret-box {
  margin: 12px 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #000000;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald);
  text-align: center;
  letter-spacing: 0.15em;
  border: 1px solid var(--emerald-border);
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */

.toast-container {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(90%, 400px);
}

.toast-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: rgba(20, 26, 38, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  animation: toast-in 0.3s var(--ease-spring);
}

.toast-message.toast-success {
  border-color: var(--emerald-border);
}
.toast-message.toast-success .toast-dot { background: var(--emerald); }

.toast-message.toast-warn {
  border-color: var(--amber-border);
}
.toast-message.toast-warn .toast-dot { background: var(--amber); }

.toast-message.toast-bad {
  border-color: var(--rose-border);
}
.toast-message.toast-bad .toast-dot { background: var(--rose); }

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-primary);
  flex-shrink: 0;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-16px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Screen Switch Animations
   ========================================================================== */

.screens-wrapper {
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: screen-fade-in 0.25s var(--ease-smooth);
}

.screens-wrapper.is-tab-swipe {
  position: relative;
  overflow: hidden;
  contain: layout paint;
}

.screens-wrapper.is-tab-swipe .screen-swipe-current,
.screens-wrapper.is-tab-swipe .screen-swipe-preview {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  margin: 0;
  animation: none !important;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.screens-wrapper.is-tab-swipe-settling .screen-swipe-current,
.screens-wrapper.is-tab-swipe-settling .screen-swipe-preview {
  transition: transform 280ms cubic-bezier(0.22, 0.8, 0.2, 1),
    opacity 220ms ease-out;
}

@keyframes screen-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  padding: 0;
}

body.is-busy button {
  pointer-events: none;
  opacity: 0.7;
}

/* ==========================================================================
   Premium Proofs Module (Mini App)
   ========================================================================== */
.proof-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(128,128,128,0.15);
}

.proof-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.proof-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.proof-count-badge {
  background: var(--blue-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

.proof-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proof-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-card);
  border: 1px solid rgba(128,128,128,0.1);
  padding: 12px 14px;
  border-radius: 16px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  cursor: pointer;
}

.proof-card:active {
  transform: scale(0.98);
  background: rgba(128,128,128,0.05);
}

.proof-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proof-icon-box.image {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

.proof-icon-box.file {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue-primary);
}

.proof-icon-box.text {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
}

.proof-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-filename {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proof-note {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proof-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(128,128,128,0.6);
  font-weight: 500;
  margin-top: 2px;
}

.proof-download-btn {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: rgba(128,128,128,0.1);
  color: var(--text-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.proof-download-btn:active {
  background: rgba(128,128,128,0.2);
}

.proof-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.proof-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-card);
  border: 1px solid rgba(128,128,128,0.1);
  padding: 12px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.proof-action-btn:active {
  transform: scale(0.96);
  background: rgba(128,128,128,0.05);
}

.proof-action-btn svg {
  width: 18px;
  height: 18px;
  color: var(--blue-primary);
}

/* ==========================================================================
   Premium Media Viewer (Lightbox)
   ========================================================================== */
.media-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.96);
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-sizing: border-box;
}

.media-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.media-viewer-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(4,7,12,0.95) 0%, rgba(4,7,12,0.6) 70%, transparent 100%);
  box-sizing: border-box;
}

.media-viewer-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
}

.media-viewer-back-btn:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.96);
}

.media-viewer-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 600;
  max-width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.media-viewer-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.15s ease;
}

.media-viewer-close-btn:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.94);
}

.media-viewer-content {
  flex: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 16px 85px;
  box-sizing: border-box;
  overflow: hidden;
}

.media-viewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  user-select: none;
  -webkit-user-select: none;
}

.media-viewer-content video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.media-viewer-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom, 20px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 100;
  background: linear-gradient(to top, rgba(4,7,12,0.95) 0%, rgba(4,7,12,0.6) 70%, transparent 100%);
  box-sizing: border-box;
}

.media-viewer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.15s ease;
}

.media-viewer-action-btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.96);
}

.media-viewer-action-btn.delete-btn {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}

.media-viewer-action-btn.delete-btn:active {
  background: rgba(244, 63, 94, 0.35);
}

.proof-icon-box.video {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.proof-card {
  position: relative;
  overflow: hidden;
}

.proof-image-thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}
.proof-card > div, .proof-card > button {
  z-index: 1;
}


.proof-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  z-index: 2;
  position: relative;
}

.proof-action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: rgba(128,128,128,0.1);
  color: var(--text-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.proof-action-icon-btn:active {
  background: rgba(128,128,128,0.2);
}

.proof-delete-btn {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.1);
}

.proof-delete-btn:active {
  background: rgba(244, 63, 94, 0.2);
}

/* Refined proof pack UX */
.proof-section {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(15, 19, 28, 0.92)),
    var(--surface-card);
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.proof-section-header {
  margin-bottom: 12px;
}

.proof-section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

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

.proof-count-badge {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 12px;
}

.proof-list {
  gap: 8px;
}

.proof-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(8, 10, 15, 0.32);
  border: 1px dashed rgba(148, 163, 184, 0.22);
}

.proof-empty-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-primary);
}

.proof-empty strong,
.proof-empty span {
  display: block;
}

.proof-empty strong {
  font-size: 13px;
  color: var(--text-primary);
}

.proof-empty span {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.proof-card {
  min-height: 76px;
  gap: 10px;
  padding: 9px;
  border-radius: var(--radius-md);
  background: rgba(8, 10, 15, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: none;
}

.proof-card:active {
  background: rgba(15, 23, 42, 0.7);
}

.proof-preview {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.proof-preview.image {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.18);
}

.proof-image-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  z-index: 0;
}

.proof-preview.image .proof-icon-box {
  opacity: 0;
}

.proof-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 1;
}

.proof-type-line {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue-primary);
}

.proof-filename {
  font-size: 13px;
  font-weight: 800;
}

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

.proof-meta-row {
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
}

.proof-actions-row {
  gap: 5px;
  align-self: center;
}

.proof-action-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.proof-action-icon-btn.proof-download-btn {
  color: #bfdbfe;
}

.proof-delete-btn {
  background: rgba(244, 63, 94, 0.11);
  border-color: rgba(244, 63, 94, 0.16);
}

.proof-actions-grid {
  gap: 8px;
  margin-top: 12px;
}

.proof-action-btn {
  min-height: 46px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.proof-action-btn svg {
  width: 17px;
  height: 17px;
}

/* ==========================================================================
   Shift Points (B1-B5) Breakdown & Quick Point Selector
   ========================================================================== */

.shift-points-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 14px 16px;
}

.shift-point-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: transform 0.14s var(--ease-spring), border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.shift-point-card.has-orders {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(15, 19, 28, 0.95));
  border-color: rgba(59, 130, 246, 0.25);
}

.shift-point-card.active-filter {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(15, 19, 28, 0.95));
  border-color: var(--emerald);
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.22);
}

.shift-point-card:active {
  transform: scale(0.96);
}

.sp-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sp-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--blue-primary);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  background: var(--blue-soft);
}

.shift-point-card.active-filter .sp-name {
  color: var(--emerald);
  background: var(--emerald-soft);
}

.sp-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.sp-aed {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.sp-usdt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 1px;
}

.sp-bar {
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  margin-top: 8px;
  overflow: hidden;
}

.sp-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--blue-primary), var(--emerald));
  transition: width 0.3s ease;
}

/* Point Selector inside Operation Sheet */
.point-selector-section {
  margin-bottom: 14px;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(20, 26, 38, 0.92));
  border: 1px solid rgba(16, 185, 129, 0.22);
}

.point-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.point-selector-header strong {
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 13px;
}

.point-selector-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.point-chip-btn {
  padding: 10px 0;
  border-radius: var(--radius-sm);
  background: var(--surface-base);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition: all 0.15s var(--ease-spring);
}

.point-chip-btn.active {
  background: var(--emerald);
  border-color: #34d399;
  color: #04130d;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Live AED -> USDT Form Calculator Preview */
.live-rate-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 12px;
  color: var(--text-secondary);
}

.live-rate-preview strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: #93c5fd;
}

/* Service API Status & Utility Classes */
.api-status-control-row {
  margin: 10px 16px 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.api-status-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}

.api-status-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reminder-create-bar {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.reminder-create-bar .ghost-chip-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.monospace {
  font-family: var(--font-mono);
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11.5px;
}

.text-muted {
  color: var(--text-muted);
}

.copyable {
  cursor: pointer;
}

@media (max-width: 390px) {
  .proof-section {
    padding: 12px;
  }

  .proof-card {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .proof-preview {
    width: 52px;
    height: 52px;
  }

  .proof-actions-row {
    flex-direction: column;
  }

  .shift-points-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

