/* Block Secure Asset Recovery Portal - design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-sidebar: #121212;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;
  --surface-2: #222222;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --text-muted: #a0a0a0;
  --text-dim: #6b6b6b;
  --accent: #3dcc7a;
  --accent-dim: rgba(61, 204, 122, 0.15);
  --accent-glow: rgba(61, 204, 122, 0.35);
  --brand-dark: #001a14;
  --brand-gradient: linear-gradient(145deg, #001a14 0%, #0a1f1a 45%, #0a0a0a 100%);
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

[data-theme="light"] {
  --bg: #f5f7f6;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f0f2f1;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --text: #0f1412;
  --text-muted: #5c6560;
  --text-dim: #8a9490;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Auth split layout ─── */
.auth-page {
  display: flex;
  min-height: 100vh;
}

.auth-brand {
  flex: 0 0 46%;
  max-width: 560px;
  background: var(--brand-gradient);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -35deg,
    transparent,
    transparent 40px,
    rgba(61, 204, 122, 0.04) 40px,
    rgba(61, 204, 122, 0.04) 41px
  );
  pointer-events: none;
}

.auth-brand-inner { position: relative; z-index: 1; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: auto;
}

.portal-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.auth-logo .portal-logo-img {
  max-width: 200px;
  max-height: 54px;
}

.auth-logo-mark {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #001a14;
}

.auth-logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.auth-logo-text span { color: #fff; font-weight: 500; }

.auth-headline {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 16px;
  max-width: 420px;
}

.auth-subcopy {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  max-width: 400px;
  line-height: 1.6;
}

.auth-footer-note {
  position: relative;
  z-index: 1;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.auth-form-panel {
  flex: 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
}

[data-theme="dark"] .auth-form-panel { background: #0f0f0f; }

.auth-form-wrap {
  width: 100%;
  max-width: 440px;
}

.auth-form-wrap.wide { max-width: 520px; }

.auth-form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f1412;
  margin-bottom: 8px;
}

[data-theme="dark"] .auth-form-title { color: #fff; }

.auth-form-sub {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 32px;
}

[data-theme="dark"] .auth-form-sub { color: var(--text-muted); }

/* ─── Forms ─── */
.form-section {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

[data-theme="dark"] .form-section { border-color: var(--border); }

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #333;
  margin-bottom: 8px;
}

[data-theme="dark"] .form-label { color: var(--text-muted); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-textarea {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-textarea { min-height: 120px; resize: vertical; }

.input-wrap { position: relative; }

.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  padding: 4px;
}

.form-hint {
  font-size: 0.8rem;
  color: #888;
  margin-top: 6px;
}

.form-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.form-alert.info {
  background: var(--accent-dim);
  border: none;
  color: #1a5c38;
}

[data-theme="dark"] .form-alert.info { color: var(--accent); }

.form-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border: none;
  color: #b91c1c;
}

.form-alert.success {
  background: rgba(61, 204, 122, 0.12);
  border: none;
  color: #166534;
}

.form-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.875rem;
}

.form-link-row a { color: #333; }
[data-theme="dark"] .form-link-row a { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, background 0.2s;
}

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

.btn.is-loading {
  pointer-events: none;
  cursor: wait;
  opacity: 0.88;
}

.btn.is-loading .arrow {
  display: none;
}

.btn-spinner {
  width: 1.05em;
  height: 1.05em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.65s linear infinite;
  flex-shrink: 0;
}

.btn-sm .btn-spinner {
  width: 0.95em;
  height: 0.95em;
  border-width: 1.5px;
}

.btn-loading-text {
  line-height: 1.2;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-primary {
  width: 100%;
  background: #002323;
  color: #fff;
}

.btn-primary:hover { background: #003d3d; }

.btn-primary .arrow { opacity: 0.8; }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: none;
}

.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }

.btn-sm { padding: 8px 14px; font-size: 0.8rem; }

.btn-accent {
  background: var(--accent);
  color: #001a14;
}

.btn-accent:hover { filter: brightness(1.08); }

.auth-bottom-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: #666;
}

[data-theme="dark"] .auth-bottom-link { color: var(--text-muted); }

/* ─── App shell ─── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.25s;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: block;
}

.sidebar-logo .portal-logo-img {
  max-width: 168px;
  max-height: 46px;
}

.sidebar-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #001a14;
}

.sidebar-logo-text {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-logo-text small {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.nav-section { padding: 16px 12px 8px; }

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 0 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text);
  text-decoration: none;
}

.nav-link.active {
  background: var(--bg-elevated);
  color: var(--text);
}

.nav-link.active::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: -2px;
  margin-right: 2px;
  flex-shrink: 0;
}

.nav-link svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }

.nav-link.active svg { opacity: 1; color: var(--accent); }

.nav-link.logout { color: var(--danger); margin-top: 4px; }
.nav-link.logout:hover { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

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

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.user-email {
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-area {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.search-bar {
  flex: 1;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
}

.search-bar input::placeholder { color: var(--text-dim); }

.search-bar svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
}

.search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: var(--text-dim);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover { background: var(--bg-elevated); color: var(--text); }

.page-content { padding: 28px; flex: 1; }

.page-header { margin-bottom: 28px; }

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* ─── Metrics ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 0 0 0 80px;
  opacity: 0.08;
}

.metric-card.green::after { background: var(--accent); }
.metric-card.blue::after { background: var(--info); }
.metric-card.orange::after { background: var(--warning); }
.metric-card.purple::after { background: var(--purple); }
.metric-card.red::after { background: var(--danger); }

.metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.metric-sub { font-size: 0.75rem; color: var(--text-dim); }

.metric-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon.green { background: rgba(61, 204, 122, 0.15); color: var(--accent); }
.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.metric-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.metric-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.metric-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* ─── Panels & tabs ─── */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--bg-elevated);
  color: var(--text);
}

.support-tabs {
  background: var(--bg-card);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.support-tabs .tab-btn {
  flex: 1;
  text-align: center;
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 600;
}
.support-tabs .tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.support-pane[hidden] { display: none !important; }
.support-pane { display: block; }
.home-tabs {
  background: var(--bg-card);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 14px;
}
.home-tabs .tab-btn {
  flex: 1;
  text-align: center;
  border-radius: 999px;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 0.72rem;
  white-space: nowrap;
}
.home-tabs .tab-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}
.home-pane[hidden] { display: none !important; }
.home-pane { margin-bottom: 18px; }
.ticket-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ticket-card:last-child { border-bottom: none; }
.ticket-card h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.ticket-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.ticket-card .ticket-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.ticket-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ticket-status.open { background: rgba(245,158,11,0.15); color: var(--warning); }
.ticket-status.closed { background: rgba(61,204,122,0.15); color: var(--accent); }

.panel {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

.panel-title { font-size: 1rem; font-weight: 600; }

.panel-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ─── Tables ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tr:hover td { background: var(--bg-elevated); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge.active { background: var(--accent-dim); color: var(--accent); }
.badge.review { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge.complete { background: rgba(61, 204, 122, 0.2); color: var(--accent); }
.badge.rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }

/* ─── Progress & timeline ─── */
.progress-block {
  margin: 0 0 28px;
  padding-top: 4px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.progress-track {
  position: relative;
}

.progress-bar {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(61, 204, 122, 0.08);
}

.progress-fill {
  height: 100%;
  width: var(--progress, 30%);
  background: linear-gradient(90deg, #1f9a58 0%, var(--accent) 55%, #7dffb4 100%);
  background-size: 180% 100%;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  animation: progress-flow 2.4s linear infinite;
}

.progress-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,0.38) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: progress-sheen 2.2s ease-in-out infinite;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 1px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(126, 255, 180, 0.7);
  animation: progress-tip 1.1s ease-in-out infinite;
}

.progress-block.is-settled .progress-fill {
  animation: none;
  background-position: 0 0;
}

.progress-block.is-settled .progress-sheen,
.progress-block.is-settled .progress-fill::after,
.progress-block.is-halted .progress-sheen,
.progress-block.is-halted .progress-fill::after {
  display: none;
}

@keyframes progress-flow {
  0% { background-position: 0 0; }
  100% { background-position: -180% 0; }
}

@keyframes progress-sheen {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(180%); }
}

@keyframes progress-tip {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .progress-sheen,
  .progress-fill::after {
    animation: none !important;
  }
}

.timeline { list-style: none; }

.timeline li {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline li:last-child::before { display: none; }

.timeline-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: none;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.timeline-dot .step-check,
.timeline-dot .step-loader {
  display: none;
}
.timeline-dot .step-check {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}
.timeline-dot .step-loader {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 26, 20, 0.25);
  border-top-color: #001a14;
  animation: step-spin 0.75s linear infinite;
}
@keyframes step-spin {
  to { transform: rotate(360deg); }
}

.timeline li.done .timeline-dot {
  background: var(--accent);
  color: #001a14;
  box-shadow: none;
}
.timeline li.done .timeline-dot .step-check { display: block; }
.timeline li.done::before { background: var(--accent); }

.timeline li.current .timeline-dot {
  background: var(--accent);
  color: #001a14;
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.timeline li.current .timeline-dot .step-loader { display: block; }
.timeline li.current .timeline-content h4 { color: var(--text); }
.timeline li:not(.done):not(.current) .timeline-content h4 {
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-content h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.timeline-content .timeline-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0; }

/* Light mode: pending dots/lines were nearly invisible on pale backgrounds */
html[data-theme="light"] .timeline li::before {
  background: rgba(15, 20, 18, 0.22);
  width: 2px;
}
html[data-theme="light"] .timeline li.done::before {
  background: var(--accent);
}
html[data-theme="light"] .timeline-dot {
  background: #ffffff;
  border: 2px solid rgba(15, 20, 18, 0.35);
  box-shadow: 0 0 0 1px rgba(15, 20, 18, 0.06);
}
html[data-theme="light"] .timeline li.done .timeline-dot,
html[data-theme="light"] .timeline li.current .timeline-dot {
  border-color: transparent;
  background: var(--accent);
  color: #001a14;
  box-shadow: 0 0 0 3px rgba(61, 204, 122, 0.28);
}
html[data-theme="light"] .timeline li.current .timeline-dot .step-loader {
  border-color: rgba(0, 26, 20, 0.28);
  border-top-color: #001a14;
}
html[data-theme="light"] .timeline li:not(.done):not(.current) .timeline-content h4 {
  color: #3a433e;
}
html[data-theme="light"] .timeline-content .timeline-date {
  color: #5c6560;
}

.timeline-info-bubble {
  position: relative;
  margin-top: 12px;
  padding: 12px 14px 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: none;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.timeline-info-bubble::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: rgba(59, 130, 246, 0.1);
  border: none;
  transform: rotate(45deg);
}

[data-theme="dark"] .timeline-info-bubble {
  background: rgba(59, 130, 246, 0.14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .timeline-info-bubble::before {
  background: rgba(59, 130, 246, 0.14);
}

.timeline-info-bubble-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--info);
  margin-bottom: 6px;
}

.timeline-info-bubble-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--info);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.timeline-info-bubble-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.info-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.info-item label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.info-item span { font-size: 0.9rem; color: var(--text); word-break: break-word; }

/* ─── Withdraw form in dashboard ─── */
[data-payout-fields] .form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 12px;
}

[data-payout-fields] .req {
  color: var(--danger);
}

.payout-details-cell {
  min-width: 200px;
  max-width: 280px;
  vertical-align: top;
}

.payout-details-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.payout-details-list li {
  margin-bottom: 6px;
}

.payout-details-list li:last-child {
  margin-bottom: 0;
}

.payout-detail-label {
  display: block;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.payout-detail-value {
  color: var(--text);
  word-break: break-word;
}

.payout-details-legacy,
.text-dim {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.withdraw-card {
  max-width: 520px;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--accent-dim);
  border: none;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.status-banner[hidden] {
  display: none !important;
}

.status-banner.warning {
  background: rgba(245, 158, 11, 0.1);
}

.status-banner p { font-size: 0.875rem; color: var(--text-muted); }
.status-banner strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .auth-brand { display: none; }
  .auth-form-panel { flex: 1; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .menu-toggle { display: flex; }
  .search-bar { display: none; }
  .page-content { padding: 20px 16px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}
.overlay.visible { display: block; }

/* ─── CRUD & modals ─── */
.crud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: none;
}

.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.modal.wide { max-width: 640px; }

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

.modal-header h3 { font-size: 1.1rem; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.activity-list { list-style: none; }

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.activity-body h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }
.activity-body p { font-size: 0.8rem; color: var(--text-muted); }
.activity-body time { font-size: 0.7rem; color: var(--text-dim); }

.split-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .split-panels { grid-template-columns: 1fr; }
}

.status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-chip {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: none;
  font-size: 0.8rem;
}

.status-chip strong { color: var(--accent); margin-left: 6px; }

.crud-form .form-group { margin-bottom: 14px; }

.crud-form .form-input,
.crud-form .form-select,
.crud-form .form-textarea {
  background: var(--bg-elevated);
  border: none;
  color: var(--text);
}

.timeline-editor .timeline-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.timeline-editor .timeline-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.timeline-editor .timeline-row-main {
  display: grid;
  grid-template-columns: 1fr 140px 80px 80px 40px;
  gap: 8px;
  align-items: center;
}

.timeline-editor .timeline-row-message {
  width: 100%;
  min-height: 56px;
  resize: vertical;
}

.timeline-editor input[type="text"],
.timeline-editor input[type="date"] {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
}

.badge.approved { background: rgba(61, 204, 122, 0.15); color: var(--accent); }
.badge.rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge.cancelled { background: rgba(107, 107, 107, 0.2); color: var(--text-dim); }

.panel-editable .form-label { color: var(--text-muted); }

.tabs-content { display: none; }
.tabs-content.active { display: block; }

/* ─── Toast notifications ─── */
.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.toast-stack .toast {
  pointer-events: auto;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  animation: toast-in 0.35s ease;
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
}

.toast-stack .toast:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  transform: translateX(-4px);
}

.toast-stack .toast.toast-success { background: rgba(61, 204, 122, 0.12); }
.toast-stack .toast.toast-error { background: rgba(239, 68, 68, 0.12); }
.toast-stack .toast.toast-warning { background: rgba(245, 158, 11, 0.12); }
.toast-stack .toast.toast-info { background: rgba(59, 130, 246, 0.12); }

[data-theme="dark"] .toast-stack .toast.toast-success { background: rgba(61, 204, 122, 0.16); }
[data-theme="dark"] .toast-stack .toast.toast-error { background: rgba(239, 68, 68, 0.16); }
[data-theme="dark"] .toast-stack .toast.toast-warning { background: rgba(245, 158, 11, 0.16); }
[data-theme="dark"] .toast-stack .toast.toast-info { background: rgba(59, 130, 246, 0.16); }

.toast-stack .toast.toast-notice {
  cursor: pointer;
}

.toast-stack .toast.toast-notice:hover {
  transform: translateX(-4px);
}

.toast-stack .toast strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text);
}

.toast-stack .toast p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 6px;
  line-height: 1.4;
}

.toast-stack .toast .toast-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.toast-stack .toast.toast-out {
  opacity: 0;
  transform: translateX(12px);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #001a14;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge[hidden] { display: none; }

/* ─── Pagination ─── */
.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pagination-bar[hidden] {
  display: none;
}

.pagination-summary {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-status {
  font-size: 0.8rem;
  color: var(--text-dim);
  min-width: 88px;
  text-align: center;
}

.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-link .nav-badge { flex-shrink: 0; margin-left: auto; }

.activity-item.unread {
  background: var(--accent-dim);
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  border: none;
}

.activity-item.unread .activity-body h4::after {
  content: ' · New';
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── Compliance & dashboard UX ─── */
.compliance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.compliance-banner[hidden] { display: none; }

.compliance-banner.kyc-pending,
.compliance-banner.kyc-not_started {
  border-left: 4px solid var(--warning, #f59e0b);
}

.compliance-banner.kyc-rejected {
  border-left: 4px solid var(--danger, #ef4444);
}

.compliance-banner.kyc-verified {
  border-left: 4px solid var(--accent);
}

.compliance-banner p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.case-overview-grid {
  margin-bottom: 24px;
}

.info-item-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dash-updates-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-update-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  background: var(--surface-2);
}

.dash-update-item:hover {
  background: var(--accent-dim);
}

.dash-update-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.dash-update-item--success .dash-update-icon {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.dash-update-item--pending .dash-update-icon {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.dash-update-item--warning .dash-update-icon {
  background: rgba(251, 146, 60, 0.12);
  color: #fb923c;
}

.dash-update-item--error .dash-update-icon {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.dash-update-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dash-update-text > span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.doc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.doc-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.doc-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-doc-row {
  flex-wrap: wrap;
}

.doc-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.export-bar .export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 4px;
}

.internal-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.internal-note {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.internal-note header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.internal-note p {
  margin: 0;
  font-size: 0.9rem;
}

/* ─── Cookie consent (portal dashboards) ─── */
.recovery-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  padding: 16px 20px;
  background: var(--bg-card);
  color: var(--text);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.recovery-cookie-banner--visible {
  transform: translateY(0);
  opacity: 1;
}

.recovery-cookie-banner--hidden {
  transform: translateY(100%);
  opacity: 0;
}

.recovery-cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.recovery-cookie-text {
  margin: 0;
  flex: 1 1 260px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.recovery-cookie-text a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

.recovery-cookie-text a:hover {
  color: var(--accent);
  opacity: 0.9;
}

.recovery-cookie-actions {
  flex-shrink: 0;
}

.recovery-cookie-banner .recovery-cookie-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.recovery-cookie-banner .recovery-cookie-accept:hover {
  filter: brightness(1.08);
}

.recovery-cookie-banner .recovery-cookie-accept:active {
  transform: scale(0.98);
}

body.portal-cookie-banner-open .main-area {
  padding-bottom: 88px;
}

body.portal-cookie-banner-open.auth-page .auth-form-panel {
  padding-bottom: 88px;
}

@media (max-width: 767px) {
  .recovery-cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .recovery-cookie-banner .recovery-cookie-accept {
    width: 100%;
  }

  body.portal-cookie-banner-open .main-area,
  body.portal-cookie-banner-open.auth-page .auth-form-panel {
    padding-bottom: 120px;
  }
}

.mail-compose {
  max-width: 720px;
}

.recipient-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recipient-toggle-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.recipient-toggle-option:has(input:checked) {
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.recipient-toggle-option input {
  accent-color: var(--accent);
}

.client-picker-results {
  margin-top: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.client-picker-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.client-picker-item:last-child { border-bottom: none; }

.client-picker-item:hover { background: var(--accent-dim); }

.client-picker-item small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.client-picker-selected {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--text);
  font-size: 0.88rem;
}

.client-picker-selected button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
}

.rich-editor {
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.rich-editor-toolbar button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.rich-editor-toolbar button:hover {
  background: var(--accent-dim);
}

.rich-editor-sep {
  width: 1px;
  margin: 4px 6px;
  background: var(--border-strong);
}

.rich-editor-area {
  min-height: 220px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
}

.rich-editor-area:focus {
  box-shadow: inset 0 0 0 1px var(--accent);
}

.rich-editor-area:empty:before {
  content: attr(data-placeholder);
  color: var(--text-dim);
}

.rich-editor-area ul,
.rich-editor-area ol {
  padding-left: 22px;
  margin: 8px 0;
}

.mail-cta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
}

.mail-cta-row input {
  accent-color: var(--accent);
}

.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
  pointer-events: none;
}

.hp-field label,
.hp-field input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

.bot-captcha {
  margin: 0 0 18px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.bot-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.bot-captcha-row img {
  display: block;
  height: 60px;
  width: auto;
  border-radius: 6px;
  background: #111;
}

.bot-captcha .btn {
  width: auto;
}

/* ─── CT Digital mobile app shell ─── */
html, body { height: 100%; }
html.app-scroll-hide,
body.app-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html.app-scroll-hide::-webkit-scrollbar,
body.app-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
body.app-body {
  background: #050505;
  overflow: hidden;
}
html[data-theme="light"] body.app-body {
  background: #e7ebe9;
}
body.app-body.a11y-lg { font-size: 18px; }
body.app-body.reduce-motion *,
body.app-body.reduce-motion *::before,
body.app-body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}

.phone-shell {
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 768px) {
  .phone-shell {
    min-height: 100vh;
    box-shadow: 0 0 0 1px var(--border), 0 24px 80px rgba(0,0,0,0.55);
  }
}

.app-preload {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.35s ease;
}
.app-preload.hide { opacity: 0; pointer-events: none; }
.app-preload img { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.pulse-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 14px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .app-top {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 20px rgba(15, 20, 18, 0.06);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.app-brand img {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
}
img.app-brand-mark {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
  border-radius: 14px;
  object-fit: cover;
  background: none;
}
.app-brand-text { min-width: 0; }
.app-brand-text strong { display: block; font-size: 0.92rem; letter-spacing: -0.02em; }
.app-brand-text span { font-size: 0.7rem; color: var(--text-muted); }
.app-top-actions { display: flex; align-items: center; gap: 8px; }

.lang-switch { position: relative; z-index: 70; }
.lang-switch.open { z-index: 80; }
.lang-flag-btn .lang-flag {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 248px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 6px 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
}
.lang-menu[hidden] { display: none !important; }
.lang-search {
  width: 100%;
  flex-shrink: 0;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}
.lang-search:focus {
  outline: none;
  border-color: var(--accent);
}
.lang-options {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 0 2px 2px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}
html[data-theme="light"] .lang-options {
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}
.lang-options::-webkit-scrollbar {
  width: 6px;
}
.lang-options::-webkit-scrollbar-track {
  background: transparent;
}
.lang-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}
html[data-theme="light"] .lang-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] .lang-menu {
  box-shadow: 0 16px 32px rgba(15, 20, 18, 0.12);
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  text-align: left;
}
.lang-option:hover,
.lang-option.active {
  background: var(--bg-elevated);
}
.lang-option.active { color: var(--accent); }
.lang-option-flag {
  font-size: 1.15rem;
  line-height: 1;
  width: 1.4em;
  text-align: center;
}

.views {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0 calc(var(--nav-h) + var(--safe-bottom) + 20px);
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.views::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.view { display: none; animation: view-in 0.28s ease; }
.view.active { display: block; }

/* Home keeps flush hero under the app header */
#view-home {
  padding: 16px 16px 0;
}

/* Other pages: clear page-head band under the sticky header */
.page-head {
  margin: 0 0 18px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
}
html[data-theme="light"] .page-head {
  background: linear-gradient(180deg, rgba(15, 20, 18, 0.03), transparent);
}
.page-head .page-title {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.15;
}
.page-head .page-subtitle {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

#view-activity,
#view-inbox,
#view-support,
#view-you {
  padding: 0 0 8px;
}
#view-activity > :not(.page-head),
#view-inbox > :not(.page-head),
#view-support > :not(.page-head),
#view-you > :not(.page-head) {
  margin-left: 16px;
  margin-right: 16px;
}
#view-support > .tabs {
  margin-top: 0;
  margin-bottom: 16px;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.hero-card {
  background: var(--brand-gradient);
  border-radius: 20px;
  padding: 22px 20px 18px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(-35deg, transparent, transparent 40px, rgba(61,204,122,0.05) 40px, rgba(61,204,122,0.05) 41px);
  pointer-events: none;
}
.hero-kicker { font-size: 0.75rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; position: relative; }
.hero-amount {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
  color: #ffffff;
}
.hero-amount small { font-size: 0.9rem; font-weight: 600; color: #3dcc7a; }
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 10px;
  position: relative;
  flex-wrap: nowrap;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(61,204,122,0.15);
  background-image: linear-gradient(110deg, rgba(61,204,122,0.12) 0%, rgba(61,204,122,0.12) 38%, rgba(255,255,255,0.28) 50%, rgba(61,204,122,0.12) 62%, rgba(61,204,122,0.12) 100%);
  background-size: 220% 100%;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex: 0 0 auto;
  max-width: none;
  line-height: 1.2;
  animation: pill-shimmer 2.6s ease-in-out infinite, pill-glow 2.2s ease-in-out infinite;
}
.live-pill > span:last-child {
  white-space: nowrap;
}
.live-pill.warn {
  background: rgba(245,158,11,0.15);
  background-image: linear-gradient(110deg, rgba(245,158,11,0.12) 0%, rgba(245,158,11,0.12) 38%, rgba(255,255,255,0.28) 50%, rgba(245,158,11,0.12) 62%, rgba(245,158,11,0.12) 100%);
  background-size: 220% 100%;
  color: var(--warning);
  animation: pill-shimmer 2.6s ease-in-out infinite, pill-glow-warn 2.2s ease-in-out infinite;
}
.live-pill.done {
  background: rgba(61,204,122,0.2);
  background-image: none;
  color: var(--accent);
  animation: none;
  box-shadow: none;
}
.live-pill.danger {
  background: rgba(239,68,68,0.15);
  background-image: none;
  color: var(--danger);
  animation: none;
  box-shadow: none;
}
@keyframes pill-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -40% 0; }
}
@keyframes pill-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61,204,122,0.0); }
  50% { box-shadow: 0 0 0 6px rgba(61,204,122,0.12); }
}
@keyframes pill-glow-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.0); }
  50% { box-shadow: 0 0 0 6px rgba(245,158,11,0.14); }
}
@media (prefers-reduced-motion: reduce) {
  .live-pill { animation: none !important; box-shadow: none; }
}
.eta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  text-align: right;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eta.eta-overdue { color: #f5d08a; }
html[data-theme="light"] .eta { color: rgba(15, 20, 18, 0.62); }
html[data-theme="light"] .eta.eta-overdue { color: #9a6b12; }
.progress-header .eta-overdue { color: var(--warning); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.action-chip {
  background: var(--bg-card);
  border: none;
  border-radius: 14px;
  padding: 12px 6px 10px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s;
}
.action-chip:active { transform: scale(0.96); }
.action-chip svg { width: 22px; height: 22px; color: var(--accent); stroke-width: 1.75; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 12px;
  font-size: 0.95rem; font-weight: 700;
}
.section-title button, .link-btn {
  background: none; border: none; color: var(--accent);
  font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}

.kv {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.kv:last-child { border-bottom: none; }
.kv span { color: var(--text-muted); }
.kv strong { color: var(--text); text-align: right; word-break: break-word; }
.amt-in {
  color: #3dcc7a !important;
}
.amt-sent {
  color: #f4f7f5 !important;
}
.amt-fee {
  color: var(--text-muted) !important;
}
html[data-theme="light"] .amt-sent {
  color: #0f1412 !important;
}
html[data-theme="light"] .amt-fee {
  color: #5c6560 !important;
}
.masked { letter-spacing: 0.12em; }

.expand-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.expand-head {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px;
  background: none; border: none; color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.expand-head svg { width: 18px; height: 18px; color: var(--text-muted); transition: transform 0.2s; flex-shrink: 0; }
.expand-card.open .expand-head svg { transform: rotate(180deg); }
.expand-body { display: none; padding: 0 16px 16px; }
.expand-card.open .expand-body { display: block; }

.verify-box {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}
.verify-box label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; }
.verify-row { display: flex; gap: 8px; }
.verify-row input {
  flex: 1; letter-spacing: 0.2em; text-align: center; font-weight: 700;
}

.gtranslate_wrapper,
.gtranslate_wrapper select,
.gt_selector {
  position: fixed !important;
  left: -9999px !important;
  top: 0 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
}

.footer-nav {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(18,18,18,0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
}
.nav-item {
  background: none; border: none; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; font-family: inherit; font-size: 0.62rem; font-weight: 600;
  cursor: pointer; position: relative;
}
.nav-item svg { width: 22px; height: 22px; stroke-width: 1.75; }
.nav-item.active { color: var(--accent); }
.nav-dot {
  position: absolute; top: 8px; right: 22%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); display: none;
}
.nav-dot.show { display: block; }

.sheet-backdrop {
  position: absolute; inset: 0; background: transparent;
  z-index: 80; display: none; align-items: flex-end;
}
.sheet-backdrop.open { display: flex; animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  background: rgba(26, 26, 26, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px 20px 0 0;
  padding: 12px 16px calc(20px + var(--safe-bottom));
  max-height: 88%;
  overflow-y: auto;
  animation: sheet-up 0.32s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -18px 48px rgba(0,0,0,0.28);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sheet::-webkit-scrollbar { width: 0; height: 0; display: none; }
html[data-theme="light"] .sheet {
  background: rgba(255, 255, 255, 0.82);
  border-top-color: rgba(0,0,0,0.06);
}
@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}
.sheet-handle {
  width: 40px; height: 4px; border-radius: 99px;
  background: var(--border-strong); margin: 4px auto 14px;
}
.sheet h3 { font-size: 1.05rem; margin-bottom: 6px; }
.sheet p.muted { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }

.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.list-ico {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg-elevated); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--accent);
}
.list-ico svg { width: 20px; height: 20px; display: block; }
.list-ico.ico-accent { background: var(--accent-dim); color: var(--accent); }
.list-ico.ico-warn { background: rgba(245, 158, 11, 0.14); color: var(--warning); }
.list-ico.ico-info { background: rgba(59, 130, 246, 0.14); color: var(--info); }
.list-ico.ico-danger { background: rgba(239, 68, 68, 0.14); color: var(--danger); }

.more-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.more-row:last-of-type { border-bottom: none; }
.more-row:active { background: var(--bg-elevated); border-radius: 12px; }
.more-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.more-title { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.more-sub { font-size: 0.75rem; color: var(--text-muted); margin: 0; line-height: 1.35; }
.more-row .more-chevron,
.more-row svg.more-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
  stroke-width: 1.75;
}

.icon-btn svg { width: 18px; height: 18px; }
html[data-theme="light"] .theme-icon-sun { display: none !important; }
html:not([data-theme="light"]) .theme-icon-moon { display: none !important; }
.list-row h4 { font-size: 0.88rem; font-weight: 600; }
.list-row p { font-size: 0.75rem; color: var(--text-muted); }
.list-row time, .list-amt { margin-left: auto; font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }
.list-amt { color: var(--text); font-weight: 600; }

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-row::-webkit-scrollbar { width: 0; height: 0; display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-elevated); border: none; color: var(--text-muted);
  font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.filter-chip.on { background: var(--accent-dim); color: var(--accent); }

.search-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--bg-card);
  border: none;
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  margin-bottom: 12px;
}
.search-wrap { position: relative; }
.search-wrap [data-lucide],
.search-wrap svg {
  position: absolute; left: 12px; top: 12px; width: 16px; height: 16px; color: var(--text-dim);
}

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.switch-row span { font-size: 0.9rem; }
.switch {
  width: 44px; height: 26px; border-radius: 99px;
  background: var(--bg-elevated); position: relative; border: none; cursor: pointer;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform 0.2s;
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text); font: inherit; font-weight: 600; font-size: 0.88rem;
  padding: 14px 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-q svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; color: var(--text-muted); font-size: 0.84rem; padding: 0 0 14px; line-height: 1.55; }
.faq-item.open .faq-a { display: block; }

.chat-log {
  min-height: 180px; max-height: 280px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chat-log::-webkit-scrollbar { width: 0; height: 0; display: none; }
.bubble {
  max-width: 82%; padding: 10px 12px; border-radius: 14px;
  font-size: 0.85rem; line-height: 1.45;
}
.bubble.bot { background: var(--bg-elevated); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--accent); color: #001a14; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }

.confirm-screen {
  text-align: center;
  padding: 22px 20px 20px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.confirm-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.confirm-screen .confirm-check,
.confirm-screen h2,
.confirm-screen .muted {
  position: relative;
  z-index: 2;
}
.confirm-screen h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.confirm-screen .muted {
  margin: 10px 0 0;
  line-height: 1.45;
  padding: 0 8px;
  color: var(--text-muted);
}
.reduce-motion .confirm-confetti {
  display: none;
}
.confirm-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  animation: pop 0.45s cubic-bezier(.2,.8,.2,1);
}
.confirm-check svg { width: 28px; height: 28px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

.qr-box {
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  display: inline-block;
  position: relative;
  line-height: 0;
}
.qr-box > #qr-img {
  display: block;
  width: 200px;
  height: 200px;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.qr-box.is-loading > #qr-img {
  opacity: 0;
}
.qr-box.is-loading .qr-logo {
  opacity: 0;
}
.qr-skeleton {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 200px;
  height: 200px;
  border-radius: 4px;
  background:
    linear-gradient(110deg, #e8ece9 25%, #f5f7f6 37%, #e8ece9 63%);
  background-size: 200% 100%;
  animation: qr-shimmer 1.2s ease-in-out infinite;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.qr-box:not(.is-loading) .qr-skeleton {
  display: none;
}
.qr-skel-corner {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 3px solid rgba(15, 20, 18, 0.12);
  border-radius: 4px;
}
.qr-skel-tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.qr-skel-tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.qr-skel-bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.qr-skel-grid {
  position: absolute;
  inset: 62px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 9px, rgba(15, 20, 18, 0.06) 9px, rgba(15, 20, 18, 0.06) 11px),
    repeating-linear-gradient(90deg, transparent, transparent 9px, rgba(15, 20, 18, 0.06) 9px, rgba(15, 20, 18, 0.06) 11px);
}
@keyframes qr-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.reduce-motion .qr-skeleton {
  animation: none;
  background: #e8ece9;
}
.qr-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px #fff;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.25s ease;
}
.qr-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.rate-line { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; }

.device-row small { display: block; color: var(--text-dim); font-size: 0.72rem; }

.file-chip { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn-row .btn { flex: 1; }

body.app-body .toast-stack {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  bottom: auto;
  z-index: 120;
  max-width: none;
  margin: 0;
  width: auto;
  pointer-events: none;
}
body.app-body .toast-stack .toast {
  pointer-events: auto;
  background: rgba(16, 18, 17, 0.64);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  backdrop-filter: blur(20px) saturate(1.4);
  border: none;
  outline: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
body.app-body .toast-stack .toast:hover {
  transform: none;
  outline: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
body.app-body .toast-stack .toast.toast-success,
body.app-body .toast-stack .toast.toast-error,
body.app-body .toast-stack .toast.toast-warning,
body.app-body .toast-stack .toast.toast-info,
html[data-theme="dark"] body.app-body .toast-stack .toast.toast-success,
html[data-theme="dark"] body.app-body .toast-stack .toast.toast-error,
html[data-theme="dark"] body.app-body .toast-stack .toast.toast-warning,
html[data-theme="dark"] body.app-body .toast-stack .toast.toast-info {
  background: rgba(16, 18, 17, 0.64);
  border: none;
}
html[data-theme="light"] body.app-body .toast-stack .toast,
html[data-theme="light"] body.app-body .toast-stack .toast.toast-success,
html[data-theme="light"] body.app-body .toast-stack .toast.toast-error,
html[data-theme="light"] body.app-body .toast-stack .toast.toast-warning,
html[data-theme="light"] body.app-body .toast-stack .toast.toast-info {
  background: rgba(255, 255, 255, 0.72);
  border: none;
}

[data-theme="light"] .phone-shell { background: var(--bg); }
[data-theme="light"] .footer-nav { background: rgba(255,255,255,0.94); }

@media print {
  .app-top, .footer-nav, .action-grid, .app-preload, .sheet-backdrop, .toast-stack, .lang-menu { display: none !important; }
  .views { padding: 0; overflow: visible; }
  .view { display: none !important; }
  .view.active, #receipt-print { display: block !important; }
  body, .phone-shell { background: #fff; color: #111; max-width: none; }
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.875rem;
}
.alert-success { background: rgba(61,204,122,0.12); color: var(--accent); }
.alert-danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.alert-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.alert-info { background: rgba(59,130,246,0.12); color: var(--info); }

.empty-state { text-align: center; padding: 36px 16px; color: var(--text-dim); }
.empty-state svg { width: 40px; height: 40px; margin-bottom: 10px; opacity: 0.45; }

.failed-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 32px 24px 100px; max-width: 430px; margin: 0 auto;
}
.failed-wrap h1 { font-size: 1.5rem; margin: 16px 0 8px; }
.failed-wrap p { color: var(--text-muted); margin-bottom: 24px; }

.table-wrap { overflow-x: auto; }
