/* =====================================================
   BIZ1 CUSTOMER PORTAL — UNIFIED PREMIUM DESIGN SYSTEM
   Supports: Light Mode / Dark Mode / All Pages
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ─── LIGHT MODE TOKENS ─── */
:root {
  color-scheme: light;
  font-family: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Brand */
  --brand:          #2563eb;
  --brand-deep:     #1d4ed8;
  --brand-soft:     rgba(37, 99, 235, 0.10);
  --accent:         #6366f1;
  --success:        #10b981;
  --success-soft:   rgba(16, 185, 129, 0.12);
  --warn:           #f59e0b;
  --danger:         #ef4444;
  --danger-soft:    rgba(239, 68, 68, 0.10);

  /* Surfaces */
  --bg-page:        #f1f5f9;
  --bg-card:        rgba(255, 255, 255, 0.85);
  --bg-card-solid:  #ffffff;
  --bg-muted:       rgba(241, 245, 249, 0.8);
  --bg-hero:        linear-gradient(135deg, #2563eb 0%, #6366f1 100%);
  --bg-status:      #1e3a5f;

  /* Glass */
  --glass-bg:       rgba(255, 255, 255, 0.75);
  --glass-border:   rgba(255, 255, 255, 0.7);
  --glass-shadow:   0 8px 32px rgba(15, 30, 60, 0.10), 0 1.5px 0 rgba(255,255,255,0.8) inset;

  /* Header */
  --header-bg:      rgba(255, 255, 255, 0.82);
  --header-border:  rgba(226, 232, 240, 0.9);

  /* Text */
  --text:           #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  /* Borders & Dividers */
  --border:         rgba(203, 213, 225, 0.8);
  --border-row:     rgba(226, 232, 240, 0.6);

  /* Inputs */
  --input-bg:       rgba(248, 250, 252, 0.9);
  --input-border:   #cbd5e1;
  --input-focus:    #2563eb;

  /* Shadows */
  --shadow-soft:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-card:    0 4px 24px rgba(15, 30, 60, 0.08);
  --shadow-lg:      0 12px 40px rgba(15, 30, 60, 0.12);

  /* Misc */
  --ease:           cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm:      10px;
  --radius:         16px;
  --radius-lg:      24px;
  --radius-xl:      32px;

  /* Compat aliases for Archive 11 classes */
  --primary:        var(--brand);
  --primary-hover:  var(--brand-deep);
  --primary-soft:   var(--brand-soft);
  --bg-app:         var(--bg-page);
  --bg-screen:      var(--bg-page);
  --border-soft:    var(--border);
}

/* ─── DARK MODE TOKENS ─── */
[data-theme="dark"] {
  color-scheme: dark;

  /* Brand */
  --brand:          #60a5fa;
  --brand-deep:     #3b82f6;
  --brand-soft:     rgba(96, 165, 250, 0.12);
  --accent:         #818cf8;
  --success:        #34d399;
  --success-soft:   rgba(52, 211, 153, 0.12);
  --warn:           #fbbf24;
  --danger:         #f87171;
  --danger-soft:    rgba(248, 113, 113, 0.12);

  /* Surfaces */
  --bg-page:        #060c18;
  --bg-card:        rgba(16, 26, 46, 0.75);
  --bg-card-solid:  #101a2e;
  --bg-muted:       rgba(255, 255, 255, 0.03);
  --bg-hero:        linear-gradient(135deg, #1e3a6e 0%, #312e81 100%);
  --bg-status:      #050b14;

  /* Glass */
  --glass-bg:       rgba(16, 26, 46, 0.72);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --glass-shadow:   0 8px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255,255,255,0.06) inset;

  /* Header */
  --header-bg:      rgba(6, 12, 24, 0.80);
  --header-border:  rgba(255, 255, 255, 0.07);

  /* Text */
  --text:           #f0f6fc;
  --text-secondary: #b0bec5;
  --text-muted:     #64748b;

  /* Borders */
  --border:         rgba(255, 255, 255, 0.08);
  --border-row:     rgba(255, 255, 255, 0.05);

  /* Inputs */
  --input-bg:       rgba(255, 255, 255, 0.04);
  --input-border:   rgba(255, 255, 255, 0.10);
  --input-focus:    #60a5fa;

  /* Shadows */
  --shadow-soft:    0 1px 4px rgba(0,0,0,0.35);
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.40);
  --shadow-lg:      0 12px 40px rgba(0, 0, 0, 0.55);

  /* Compat aliases */
  --primary:        var(--brand);
  --primary-hover:  var(--brand-deep);
  --primary-soft:   var(--brand-soft);
  --bg-app:         var(--bg-page);
  --bg-screen:      var(--bg-page);
  --border-soft:    var(--border);
  --input-bg:       var(--input-bg);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Dark mode body background glow */
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 12% 8%, rgba(37, 99, 235, 0.13) 0%, transparent 35%),
    radial-gradient(ellipse at 88% 88%, rgba(99, 102, 241, 0.10) 0%, transparent 35%),
    #060c18;
}

[data-theme="light"] body {
  background:
    radial-gradient(ellipse at 12% 8%, rgba(37, 99, 235, 0.06) 0%, transparent 35%),
    radial-gradient(ellipse at 88% 88%, rgba(99, 102, 241, 0.04) 0%, transparent 35%),
    #f1f5f9;
}

button, input, select, textarea, summary { font-family: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
img, svg { display: block; }

/* ─── APP SHELL ─── */
.page-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.app-frame, .phone-outer {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  animation: screenIn 0.4s var(--ease) both;
}

.screen.hidden { display: none !important; }

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

/* ─── UNIFIED TOPBAR / HEADER ─── */
/* Used on BOTH dashboard and invoice pages */
.topbar, .app-topbar {
  flex: none;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--header-border);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--text);
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #60a5fa, #6366f1);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.logo svg { width: 20px; height: 20px; }
.brand small {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── OLD LANG-BAR (Dashboard compat) ─── */
.lang-bar {
  flex: none;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--header-border);
  gap: 8px;
  transition: background 0.3s ease;
}

.lang-bar-left { display: flex; align-items: center; gap: 8px; }
.lang-bar-right { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.lang-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── LANGUAGE SWITCH ─── */
.lang-switch {
  display: flex;
  background: var(--border);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.05em;
}

.lang-btn.is-active, .lang-btn[data-active] {
  background: var(--bg-card-solid);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

[data-theme="dark"] .lang-btn.is-active {
  background: var(--brand);
  color: #fff;
}

/* ─── THEME TOGGLE ─── */
.theme-toggle, .icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover, .icon-button:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: scale(1.05);
}

/* Show/hide sun-moon icons based on theme */
.icon-sun { display: block; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ─── BUTTONS ─── */
.btn-primary, .pay-button {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 13px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, filter 0.2s ease;
}

.btn-primary:hover, .pay-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
  filter: brightness(1.08);
}

.btn-primary:active, .pay-button:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary:disabled, .pay-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-ghost, .small-button, .pill, .text-button {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(8px);
}

.btn-ghost:hover, .small-button:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-logout-top { 
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-top:hover {
  background: var(--danger);
  color: #fff;
}

/* ─── INPUTS ─── */
.input, .ds-input {
  width: 100%;
  height: 48px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:focus, .ds-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  background: var(--bg-card-solid);
}

.input::placeholder, .ds-input::placeholder {
  color: var(--text-muted);
}

/* ─── CARDS (Glass) ─── */
.card, .status-panel, .action-card, .login-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

/* ─── SCROLL ─── */
.dc-scroll, .dash-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  min-height: 0;
}

.dc-scroll::-webkit-scrollbar { width: 5px; }
.dc-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}

/* ─── LIVE SOCKET CHIP ─── */
.live-socket-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.live-socket-chip.live-on {
  background: var(--success-soft);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--success);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.live-on .live-dot {
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: livePulse 1.6s ease-out infinite;
}

.live-socket-chip.live-off { opacity: 0.7; }

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ─── DASHBOARD HERO ─── */
.dash-hero {
  flex: none;
  background: var(--bg-hero);
  color: #fff;
  padding: 28px 20px 36px;
  position: relative;
  overflow: hidden;
}

.dash-hero::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  right: -60px;
  top: -120px;
  pointer-events: none;
}

.dash-hero::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  left: -50px;
  bottom: -80px;
  pointer-events: none;
}

.dash-hello {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.dash-name {
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.dash-meta {
  font-size: 13px;
  opacity: 0.7;
  font-weight: 400;
}

/* ─── DASHBOARD CONTENT ─── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 20px 16px 8px;
}

/* Status Panel */
.status-panel {
  margin: 0 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.status-panel.is-active .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
  animation: livePulse 2s ease-out infinite;
}

.status-panel.is-error .status-dot {
  background: var(--danger);
  animation: none;
}

.status-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

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

/* Action Filters */
.action-filters {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
  flex-wrap: wrap;
}

.action-filter {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.action-filter.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.30);
}

.action-filter:hover:not(.is-active) {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

/* Actions List */
.actions-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.action-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.action-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  background: var(--brand-soft);
  color: var(--brand);
}

.action-icon.icon-sign { background: var(--success-soft); color: var(--success); }
.action-icon.icon-invoice { background: var(--brand-soft); color: var(--brand); }

.action-info { flex: 1; min-width: 0; }

.action-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.action-cta {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--brand);
  border-radius: 99px;
  background: var(--brand-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.action-cta:hover {
  background: var(--brand);
  color: #fff;
}

.action-delete {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid var(--danger);
  border-radius: 99px;
  background: var(--danger-soft);
  color: var(--danger);
  cursor: pointer;
  font: 700 12px 'Outfit', sans-serif;
  transition: all 0.2s ease;
}

.action-delete:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.action-delete:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Loading & Error states */
.loading-msg {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 24px 0;
}

.error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--danger-soft);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 12px;
}

.error-text { font-size: 13px; color: var(--text); flex: 1; }

/* Done list */
.done-list .action-card { opacity: 0.55; }
.done-list .action-card:hover { opacity: 0.8; }

/* Pager — matches portal dark UI */
.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 4px 4px;
}

.list-pager.hidden { display: none !important; }

.list-pager .page-info {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  padding: 0 4px;
}

.list-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.list-pager .page-btn,
.list-pager .page-num {
  appearance: none;
  border: 1px solid var(--glass-border);
  background: var(--bg-page);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.list-pager .page-num {
  min-width: 34px;
  padding: 8px 10px;
  text-align: center;
}

.list-pager .page-num.is-active,
.list-pager .page-num[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  cursor: default;
}

.list-pager .page-btn:hover:not(:disabled),
.list-pager .page-num:hover:not(.is-active):not([aria-current="page"]) {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.list-pager .page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.list-pager .page-dots {
  color: var(--text-muted);
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}

/* ─── LOGIN PAGE ─── */
#screenLogin,
.screen-login {
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100dvh;
  max-height: 100dvh;
  height: 100%;
  width: 100%;
  overflow: hidden;
  padding: 0 !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
}

/* Login Hero Banner */
.brand-hero {
  background: var(--bg-hero);
  padding: clamp(20px, 3.5vh, 36px) clamp(16px, 3.5vw, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #fff;
  flex: none;
  z-index: 1;
  transition: all 0.3s ease;
}

/* Ambient glowing orbs */
.brand-hero::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  right: -90px;
  top: -120px;
  pointer-events: none;
}

.brand-hero::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
  left: -80px;
  bottom: -80px;
  pointer-events: none;
}

.brand-blob { display: none; }

.brand-hero-inner {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

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

.brand-title {
  font-size: clamp(22px, 3.5vw, 34px);
  font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin: 0 0 6px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.brand-sub {
  font-size: clamp(13px, 1.4vw, 15px);
  font-weight: 400;
  opacity: 0.88;
  margin: 0;
  color: #e0e7ff;
  line-height: 1.4;
}

.brand-features {
  display: none; /* revealed on desktop layout */
  list-style: none;
  padding: 0;
  margin: 28px 0 0 0;
  width: 100%;
}

.brand-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  margin-bottom: 14px;
}

.brand-feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #93c5fd;
}

/* Right Side: Form Panel */
.login-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
}

/* Header with Language switcher & Theme toggle */
.login-topbar,
.login-status-bar {
  flex: none;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3.5vw, 36px);
  background: transparent !important;
  border-bottom: 1px solid var(--border-row);
  z-index: 10;
  width: 100%;
}

/* Login Scroll / Form Area */
.login-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(20px, 3vh, 32px) clamp(16px, 3.5vw, 36px) 44px;
  min-height: 0;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Login Card Form */
.login-card {
  width: 100%;
  max-width: 460px;
  padding: clamp(24px, 3.5vw, 36px) clamp(20px, 3vw, 32px);
  border-radius: var(--radius-xl) !important;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
  margin: 0 0 16px;
}

.login-title {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  word-break: break-word;
}

.login-hint {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 22px;
  word-break: break-word;
}

/* Channel selection row */
.channel-row {
  display: flex;
  gap: 10px;
  width: 100%;
  align-items: center;
  flex-wrap: wrap;
}

.channel-btns {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
}

.channel-btn {
  flex: 1 1 calc(50% - 5px);
  min-width: 120px;
  min-height: 46px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  user-select: none;
}

.channel-btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

.channel-btn.is-active {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

/* Form Fields */
.field {
  margin-bottom: 16px;
  width: 100%;
}

.field-label, label:not(.agree-row):not([style*="gap"]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.agree-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  margin-bottom: 0 !important;
}

.field-label svg {
  color: var(--brand);
  flex-shrink: 0;
}

.field-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.input-wrap {
  position: relative;
  width: 100%;
}

/* Auth Details Accordion */
.auth-details {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-details[open] {
  border-color: var(--input-border);
}

.auth-details summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.auth-details summary::-webkit-details-marker {
  display: none;
}

.auth-details summary:hover {
  color: var(--text);
}

.field--tight {
  margin-top: 12px;
  margin-bottom: 12px;
}

.field--tight:last-of-type {
  margin-bottom: 4px;
}

/* ─── OTP STEP STYLING ─── */
.login-step {
  width: 100%;
  animation: screenIn 0.3s var(--ease) both;
}

.otp-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--success-soft);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius);
}

.otp-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.16);
  color: var(--success);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.otp-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.otp-banner-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  font-weight: 500;
}

/* OTP Digits Input */
.input--otp {
  text-align: center !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  letter-spacing: 8px !important;
  height: 56px !important;
  font-family: 'Outfit', monospace, system-ui, sans-serif !important;
  background: var(--bg-card-solid) !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-soft) !important;
  transition: all 0.2s ease !important;
}

.input--otp:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 4px var(--brand-soft) !important;
}

/* Submit & verify buttons */
#loginForm .btn-primary {
  width: 100%;
  margin-top: 8px;
  min-height: 48px;
}

#verifyOtpBtn {
  width: 100%;
  min-height: 48px;
  font-size: 14.5px;
  font-weight: 700;
  margin-top: 8px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#backPhoneBtn,
.btn-back-phone {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#backPhoneBtn:hover,
.btn-back-phone:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}

[dir="rtl"] #backPhoneBtn svg {
  transform: rotate(180deg);
}

/* Demo Users Box */
.demo-users {
  width: 100%;
  max-width: 460px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-top: 4px;
  box-sizing: border-box;
}

.demo-users-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.demo-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.demo-user-creds {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: inherit;
  word-break: break-all;
  line-height: 1.4;
}

.demo-user-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 14px;
  border: 1px solid var(--border);
  background: var(--glass-bg);
  border-radius: 99px;
  cursor: pointer;
  color: var(--brand);
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
}

.demo-user-btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-deep);
  transform: translateY(-1px);
}

/* Trust Row & Footer */
.trust-row, .footer-note {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
}

.footer-note {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.75;
}

/* ─── INVOICE PAGE ─── */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app main, #screenInvoice {
  width: 100%;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 52px) 60px;
  flex: 1;
  overflow-y: auto;
}

/* Invoice hero banner */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 32px 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #1e3a6e 0%, #312e81 100%);
  border: 1px solid rgba(255,255,255,0.10);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.07);
  right: 5%;
  top: -180px;
  box-shadow: 0 0 0 35px rgba(255,255,255,0.03), 0 0 0 75px rgba(255,255,255,0.015);
  pointer-events: none;
}

.hero-copy, .amount { position: relative; z-index: 1; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.35);
  color: #fcd34d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251,191,36,0.25);
}

.app h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 8px;
  line-height: 1.1;
  color: #fff;
}

.hero p { margin: 0; color: rgba(255,255,255,0.65); font-size: 14px; }

.amount { text-align: right; white-space: nowrap; }
.amount-label { font-size: 11px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.amount-value {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-top: 6px;
  color: #fff;
}
.amount-value span { font-size: 0.52em; vertical-align: top; margin-right: 2px; opacity: 0.7; }

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #6366f1 100%);
}

/* Workspace layout (2-col) */
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.invoice-document-column {
  min-width: 0;
}

/* Document + Payment Cards */
.document-card, .payment-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.document-card:hover, .payment-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.section-head {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.section-title svg { color: var(--brand); }
.subtle { font-size: 12px; color: var(--text-muted); }

.doc-body { padding: 0; }

.payment-card { padding: 0; }
.payment-inner { padding: 24px 28px; }

.secure-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
}
.secure-tag svg { color: var(--success); }

.payment-intro {
  margin: 0 0 22px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

/* Payment form fields */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pay-method {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.pay-fields { margin-top: 8px; display: flex; flex-direction: column; gap: 12px; }
.workspace.is-view-only {
  grid-template-columns: 1fr;
}

.input-wrap { position: relative; }
.card-input { padding-left: 44px !important; letter-spacing: 0.08em; }
.card-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Demo note */
.demo-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--brand-soft);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.demo-note svg { flex-shrink: 0; color: var(--brand); margin-top: 1px; }

/* Pay button */
.pay-button {
  width: 100%;
  border-radius: var(--radius);
  padding: 16px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 14px;
}
.trust svg { color: var(--success); }

.fineprint {
  text-align: center;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 16px 4px 0;
}

/* Invoice footer */
.app footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 16px clamp(16px, 4vw, 52px);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.app footer a { color: var(--text-secondary); text-decoration: none; }
.app footer a:hover { color: var(--brand); }

/* Crumb breadcrumb */
.crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 24px;
}
.crumb strong { color: var(--text); font-weight: 600; }
.crumb a { color: var(--brand); }

/* ─── HIDDEN UTILITY ─── */
.hidden { display: none !important; }

/* ─── DASHBOARD SECTION BLOCKS ─── */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 14px 20px;
}

.dash-section {
  margin: 0;
}

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 0 10px;
}

.dash-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.1px;
  text-transform: none;
}

.dash-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.pending-icon {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warn);
}

.done-icon {
  background: var(--success-soft);
  color: var(--success);
}

.dash-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 99px;
  min-width: 22px;
  text-align: center;
}

.pending-badge {
  background: rgba(251, 191, 36, 0.18);
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ─── DASHBOARD DROPDOWN FILTERS ─── */
.dash-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dash-filter-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 5px 28px 5px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dash-filter-select:hover {
  border-color: var(--brand);
  color: var(--text);
  background: var(--brand-soft);
}

.dash-filter-select:focus {
  border-color: var(--brand);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.dash-filter-select option {
  background: var(--bg-card-solid);
  color: var(--text);
  font-weight: 500;
  padding: 6px 10px;
}

.dash-filter-arrow {
  position: absolute;
  right: 9px;
  pointer-events: none;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.dash-filter-select:focus + .dash-filter-arrow,
.dash-filter-wrap:hover .dash-filter-arrow {
  color: var(--brand);
}

/* RTL adjustment for Arabic / Hebrew */
[dir="rtl"] .dash-filter-select {
  padding: 5px 12px 5px 28px;
}

[dir="rtl"] .dash-filter-arrow {
  right: auto;
  left: 9px;
}

/* ─── DESKTOP LOGIN SPLIT LAYOUT ─── */
@media (min-width: 900px) {
  #screenLogin,
  .screen-login {
    flex-direction: row !important;
    overflow: hidden !important;
    align-items: stretch !important;
  }

  .brand-hero {
    flex: 1 1 50%;
    width: 50%;
    max-width: 50%;
    min-width: 380px;
    height: 100%;
    min-height: 100%;
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(48px, 6vw, 84px) clamp(36px, 5vw, 64px);
  }

  .brand-hero-inner {
    align-items: flex-start;
    text-align: left;
    max-width: 440px;
  }

  .brand-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    margin: 0 0 28px 0;
  }

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

  .brand-title {
    font-size: clamp(34px, 3.2vw, 48px);
    margin-bottom: 10px;
  }

  .brand-sub {
    font-size: 16px;
    margin-bottom: 0;
  }

  .brand-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .login-panel {
    flex: 1 1 50%;
    width: 50%;
    max-width: 50%;
    min-width: 380px;
    height: 100%;
    min-height: 0;
  }

  .login-topbar,
  .login-status-bar {
    height: 68px;
    background: transparent !important;
    border-bottom: 1px solid var(--border-row);
    padding: 0 clamp(24px, 4vw, 48px);
  }

  .login-scroll {
    padding: clamp(24px, 3vh, 48px) clamp(24px, 4vw, 48px) 48px;
  }

  .login-card {
    margin: auto 0;
  }
}

/* RTL Support for Login Page */
[dir="rtl"] .brand-hero {
  text-align: right;
  align-items: flex-end;
}

[dir="rtl"] .brand-hero-inner {
  align-items: flex-end;
  text-align: right;
}

[dir="rtl"] .brand-feature-item {
  flex-direction: row-reverse;
}

/* Tablet Layout (641px - 899px) */
@media (max-width: 899px) and (min-width: 641px) {
  #screenLogin,
  .screen-login {
    flex-direction: column;
    height: 100%;
    max-height: 100dvh;
    overflow-y: auto;
  }

  .brand-hero {
    padding: 24px 32px;
  }

  .brand-hero-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-features {
    display: none !important;
  }

  .login-card {
    max-width: 500px;
  }
}

/* Mobile Layout (<= 640px) */
@media (max-width: 640px) {
  #screenLogin,
  .screen-login {
    height: 100%;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .brand-hero {
    padding: 14px 16px;
  }

  .brand-hero-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .brand-text-group {
    text-align: left;
    display: flex;
    flex-direction: column;
  }

  [dir="rtl"] .brand-text-group {
    text-align: right;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    margin: 0;
  }

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

  .brand-title {
    font-size: 19px;
    margin: 0;
  }

  .brand-sub {
    font-size: 11.5px;
    margin: 2px 0 0;
  }

  .brand-features {
    display: none !important;
  }

  .login-topbar,
  .login-status-bar {
    height: 48px;
    padding: 0 16px;
  }

  .login-scroll {
    padding: 14px 14px 36px;
    overflow-y: visible;
  }

  .login-card {
    padding: 22px 16px !important;
    border-radius: 18px !important;
    margin: 0 0 14px;
  }

  .login-title {
    font-size: 19px;
    margin-bottom: 4px;
  }

  .login-hint {
    font-size: 12px;
    margin-bottom: 18px;
  }

  /* Prevent iOS zoom on inputs */
  .input, .ds-input {
    font-size: 16px;
  }

  .channel-row {
    gap: 8px;
  }

  .channel-btn {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 12.5px;
  }

  .demo-users {
    padding: 14px;
  }

  .demo-user-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .demo-user-btn {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .demo-user-creds {
    font-size: 11.5px;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .workspace, .dash-two-col { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .amount { padding-top: 10px; text-align: left; }
}

@media (max-width: 560px) {
  .topbar { height: 58px; }
  .brand { font-size: 13px; }
  .brand small { font-size: 9px; }
  .hero { padding: 22px 20px; display: block; }
  .amount { text-align: left; margin-top: 18px; }
  .workspace { gap: 16px; }
  .section-head { padding: 16px; }
  .payment-inner { padding: 20px 16px; }
  .field-row { gap: 10px; }
  .app footer { flex-direction: column; align-items: flex-start; }
  .dash-name { font-size: 28px; }
}

/* Success Pages */
.success-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  background: var(--glass-bg);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  margin: auto;
  width: 100%;
  max-width: 400px;
}
.success-orb {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.success-orb--sign, .success-orb--sage { background: linear-gradient(135deg, var(--success), #059669); }
.success-orb--pay { background: linear-gradient(135deg, var(--brand), #4f46e5); }
.success-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.success-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.screen--enter:not(#screenLogin) { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }

@media (max-width: 600px) {
  .success-panel { padding: 30px 20px; border-radius: 16px; }
  .success-title { font-size: 20px; }
}
