/* Speak it Global — CRM-inspired design system */
:root {
  --bg: #f0f2f8;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --primary: #1a1a2e;
  --primary-light: #2d2d4a;
  --sidebar: #1a1a2e;
  --accent: #635bff;
  --accent-hover: #5248e6;
  --accent-soft: #ede9fe;
  --accent-glow: rgba(99, 91, 255, 0.25);
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --info: #3b82f6;
  --info-soft: #eff6ff;
  --border: #e5e7eb;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(26, 26, 46, 0.06), 0 4px 20px rgba(26, 26, 46, 0.05);
  --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.12);
  --shadow-card: 0 2px 8px rgba(26, 26, 46, 0.04), 0 8px 24px rgba(26, 26, 46, 0.06);
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --nav-h: 64px;
  --bottom-nav-h: 68px;
  --max-w: 1200px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Typography ── */
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.875rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { color: var(--text-muted); }
.lead { font-size: 1.125rem; color: var(--text-muted); }

/* ── Layout ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 0; }
.section-alt { background: var(--surface); }

/* ── Top nav (public) ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.1rem; color: var(--primary);
}
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: grid; place-items: center; color: #fff; font-size: 1rem; font-weight: 800;
}
.nav-links { display: none; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 0.9375rem; }
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
.menu-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: var(--transition);
}
.mobile-menu {
  display: none; position: fixed; inset: var(--nav-h) 0 0 0; z-index: 99;
  background: var(--surface); padding: 1.5rem; flex-direction: column; gap: 0.25rem;
  border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.875rem 1rem; border-radius: var(--radius-sm);
  color: var(--text); font-weight: 500; font-size: 1rem;
}
.mobile-menu a:hover { background: var(--surface-2); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.9375rem; font-weight: 600; border: none; cursor: pointer;
  transition: var(--transition); white-space: nowrap; text-decoration: none;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-2); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; color: #fff; }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); }

/* ── Cards ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1rem; }
.card-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.card-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block; font-size: 0.875rem; font-weight: 600;
  color: var(--text); margin-bottom: 0.375rem;
}
.form-group .hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
input, select, textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--font); color: var(--text);
  background: var(--surface); transition: var(--transition);
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; min-height: 100px; }
.file-input-wrap {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; cursor: pointer;
  transition: var(--transition);
}
.file-input-wrap:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-input-wrap input { display: none; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.2rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-submitted { background: var(--info-soft); color: var(--info); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-active { background: var(--accent-soft); color: var(--accent); }
.badge-inactive { background: var(--surface-2); color: var(--text-muted); }

/* ── Hero ── */
.hero {
  padding: 3rem 0 4rem;
  background: linear-gradient(160deg, var(--primary) 0%, #0f2744 50%, #0d3d38 100%);
  color: #fff; overflow: hidden; position: relative;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(13,148,136,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .lead { color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .btn-outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

/* ── Feature grid ── */
.features { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem;
}

/* ── Footer ── */
.site-footer {
  background: var(--primary); color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem; margin-top: auto;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .logo { color: #fff; margin-bottom: 0.75rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem; font-size: 0.875rem; text-align: center;
}

/* ── Auth pages ── */
.auth-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem 1rem; background: linear-gradient(160deg, var(--primary), #0d3d38);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-lg);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-card .subtitle { margin-bottom: 1.5rem; font-size: 0.9375rem; }
.auth-error {
  background: var(--danger-soft); color: var(--danger);
  padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 1rem; display: none;
}
.auth-error.show { display: block; }

/* ── App shell (translator/admin) ── */
.app-shell { display: flex; min-height: 100dvh; }
.app-sidebar {
  display: none; width: 270px; flex-shrink: 0;
  background: var(--sidebar); color: #fff;
  flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 200;
  overflow: hidden;
}
.sidebar-glow {
  position: absolute; top: -80px; right: -60px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(99,91,255,0.35) 0%, transparent 70%);
  pointer-events: none; animation: pulseGlow 4s ease-in-out infinite;
}
.app-sidebar .logo { color: #fff; padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); position: relative; z-index: 1; }
.sidebar-widget {
  margin: 1rem 1rem 0.5rem; padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.06); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08); position: relative; z-index: 1;
}
.sw-date { font-size: 0.75rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.05em; }
.sw-time { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 0.25rem; }
.sidebar-nav { flex: 1; padding: 0.75rem; overflow-y: auto; position: relative; z-index: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1rem; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.65); font-weight: 500; font-size: 0.9rem;
  transition: var(--transition); cursor: pointer; border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 0.25rem;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 16px rgba(99,91,255,0.4);
}
.sidebar-nav a.nav-locked { opacity: 0.45; pointer-events: none; }
.sidebar-nav .nav-icon { font-size: 1.125rem; width: 24px; text-align: center; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.08); position: relative; z-index: 1; }
.sidebar-user { font-size: 0.875rem; color: rgba(255,255,255,0.85); font-weight: 600; margin-bottom: 0.35rem; }
.sidebar-status { font-size: 0.75rem; margin-bottom: 0.75rem; }
.sidebar-footer .btn-outline { color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.2); }
.sidebar-footer .btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.35); }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1rem; height: var(--nav-h);
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-kicker { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.app-topbar h1 { font-size: 1.25rem; font-weight: 700; }
.app-content { flex: 1; padding: 1rem; padding-bottom: calc(var(--bottom-nav-h) + 1rem); }
.app-panel { display: none; }
.app-panel.active { display: block; }

/* Bottom nav (mobile) */
.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--surface); border-top: 1px solid var(--border);
  height: var(--bottom-nav-h); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.2rem; background: none; border: none;
  color: var(--text-muted); font-size: 0.6875rem; font-weight: 500;
  cursor: pointer; padding: 0.5rem 0.25rem; transition: var(--transition);
}
.bottom-nav button .bn-icon { font-size: 1.25rem; }
.bottom-nav button.active { color: var(--accent); }

@media (min-width: 900px) {
  .app-sidebar { display: flex; }
  .app-main { margin-left: 270px; }
  .bottom-nav { display: none; }
  .app-content { padding: 1.5rem 2rem; padding-bottom: 2rem; }
  .app-topbar { display: none; }
}

/* ── Stats row ── */
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1rem; text-align: center;
  box-shadow: var(--shadow-card); transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--stat-accent, var(--accent)); opacity: 0.8;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card--amber { --stat-accent: #f59e0b; }
.stat-card--blue { --stat-accent: #3b82f6; }
.stat-card--green { --stat-accent: #10b981; }
.stat-card--purple { --stat-accent: #635bff; }
.stat-icon { font-size: 1.25rem; margin-bottom: 0.35rem; opacity: 0.85; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-value--sm { font-size: 1rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 500; }

/* ── Timer widget ── */
.timer-widget {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 50%, #3d3a6e 100%);
  color: #fff; border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center;
  margin-bottom: 1.5rem; position: relative; overflow: hidden;
  box-shadow: 0 8px 32px rgba(26,26,46,0.25);
}
.timer-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99,91,255,0.3) 0%, transparent 60%);
  animation: pulseGlow 3s ease-in-out infinite;
}
.timer-label { font-size: 0.8rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.08em; position: relative; }
.timer-display {
  font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums;
  margin: 0.75rem 0; position: relative;
  text-shadow: 0 0 40px rgba(99,91,255,0.5);
}
.timer-actions { position: relative; }
.timer-widget .btn { margin-top: 0.5rem; min-width: 160px; }

/* ── Progress steps ── */
.steps { display: flex; gap: 0; margin-bottom: 1.5rem; overflow-x: auto; }
.step {
  flex: 1; min-width: 80px; text-align: center; position: relative;
  padding-bottom: 1.5rem;
}
.step::after {
  content: ''; position: absolute; top: 16px; left: 50%; right: -50%;
  height: 2px; background: var(--border); z-index: 0;
}
.step:last-child::after { display: none; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); border: 2px solid var(--border);
  display: grid; place-items: center; margin: 0 auto 0.5rem;
  font-size: 0.8125rem; font-weight: 700; position: relative; z-index: 1;
}
.step.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; box-shadow: 0 0 12px rgba(16,185,129,0.4); }
.step.current .step-dot { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 16px var(--accent-glow); animation: pulseDot 2s ease-in-out infinite; }
.step-label { font-size: 0.6875rem; color: var(--text-muted); font-weight: 500; }
.step.done .step-label, .step.current .step-label { color: var(--text); }

/* ── Tables ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 0.75rem 1rem; background: var(--surface-2); font-weight: 600; white-space: nowrap; }
td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--surface-2); }

/* ── Assignment cards ── */
.assignment-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0; margin-bottom: 1rem;
  box-shadow: var(--shadow-card); overflow: hidden; transition: var(--transition);
}
.assignment-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.assignment-card .ac-accent { height: 4px; background: linear-gradient(90deg, var(--accent), #8b5cf6); }
.assignment-card .ac-body { padding: 1.25rem 1.5rem; }
.assignment-card .ac-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.assignment-card .ac-title { font-weight: 700; font-size: 1.05rem; color: var(--text); line-height: 1.3; }
.assignment-card .ac-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 1rem; }
.assignment-card .ac-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.assignment-card .ac-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; padding: 0.75rem 1rem; background: var(--surface-2); border-radius: var(--radius-sm); }
.assignment-card .ac-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }

/* ── Payment provider cards ── */
.provider-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  margin-bottom: 0.75rem; transition: var(--transition);
}
.provider-card.connected { border-color: var(--success); background: var(--success-soft); }
.provider-logo {
  width: 48px; height: 48px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 0.75rem;
  flex-shrink: 0;
}
.provider-logo.stripe { background: #635bff; color: #fff; }
.provider-logo.square { background: #000; color: #fff; }
.provider-logo.moonpay { background: #7b3ff2; color: #fff; }
.provider-info { flex: 1; min-width: 0; }
.provider-info h4 { font-size: 0.9375rem; margin-bottom: 0.125rem; }
.provider-info p { font-size: 0.8125rem; }

/* ── Toast ── */
.toast-container {
  position: fixed; bottom: calc(var(--bottom-nav-h) + 1rem); right: 1rem; z-index: 999;
  display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none;
}
@media (min-width: 900px) { .toast-container { bottom: 1.5rem; } }
.toast {
  background: var(--text); color: #fff; padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); pointer-events: auto;
  animation: toastIn 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,0.5); backdrop-filter: blur(4px);
  align-items: flex-end; justify-content: center; padding: 0;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 560px; max-height: 90dvh; overflow-y: auto;
  padding: 1.5rem; animation: modalUp 0.3s ease;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 1rem; }
  .modal { border-radius: var(--radius); }
}
@keyframes modalUp { from { transform: translateY(100%); } to { transform: none; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); padding: 0.25rem; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state h3 { color: var(--text); margin-bottom: 0.5rem; }

/* ── KYC preview ── */
.kyc-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.kyc-thumb {
  aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface-2);
}
.kyc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.kyc-thumb .placeholder { display: grid; place-items: center; height: 100%; font-size: 0.75rem; color: var(--text-muted); }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Animations ── */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 12px var(--accent-glow); }
  50% { box-shadow: 0 0 24px rgba(99,91,255,0.5); }
}
@keyframes animateIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes animateFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-in { animation: animateIn 0.5s ease both; }
.animate-float { animation: animateFloat 6s ease-in-out infinite; }

/* ── Translator portal extras ── */
.translator-portal .app-content { background: var(--bg); min-height: calc(100dvh - var(--nav-h)); }
.translator-portal .card { box-shadow: var(--shadow-card); border: 1px solid var(--border); }
.panel-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.panel-header h2 { font-size: 1.35rem; font-weight: 700; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.filter-pill {
  padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }
.section-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; }
.info-callout {
  background: var(--warning-soft); border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm); padding: 0.875rem 1rem; margin-bottom: 1.25rem;
  font-size: 0.875rem; color: #92400e; line-height: 1.5;
}
.form-grid-2 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }
.form-grid-full { grid-column: 1 / -1; }
.upload-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 1rem; }
.upload-tile {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 1rem;
  text-align: center; cursor: pointer; transition: var(--transition); position: relative;
}
.upload-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-tile span { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); }
.upload-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-placeholder { font-size: 1.5rem; color: var(--text-muted); }
.upload-tile.has-file .upload-placeholder { font-size: 0.8125rem; color: var(--success); }
.upload-tile.has-file img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; margin-top: 0.5rem; }
.kyc-sections { display: flex; flex-direction: column; gap: 1.25rem; }
.submitted-banner {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem;
  background: var(--success-soft); border-radius: var(--radius-sm); margin-bottom: 1rem;
  border: 1px solid rgba(16,185,129,0.2);
}
.submitted-banner-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--success); color: #fff;
  display: grid; place-items: center; font-weight: 700; flex-shrink: 0;
}
.submitted-banner p { font-size: 0.8125rem; color: var(--text-muted); margin: 0; }
.kyc-details-grid { display: grid; gap: 0.5rem; font-size: 0.875rem; }
.kyc-details-grid p { color: var(--text); margin: 0; }
.recent-item {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem;
}
.recent-item:last-child { border-bottom: none; }

/* Onboarding gate */
.onboarding-gate { margin-bottom: 1.5rem; }
.onboarding-card {
  background: var(--surface); border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.onboarding-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6, var(--accent));
  background-size: 200% 100%; animation: shimmer 3s linear infinite;
}
.onboarding-header { text-align: center; margin-bottom: 2rem; }
.onboarding-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.steps-onboarding { margin-bottom: 2rem; }
.onboarding-step-panel { max-width: 520px; margin: 0 auto; }

/* ══════════════════════════════════
   Bonus Program
══════════════════════════════════ */
.bonus-content { position: relative; min-height: 480px; }
.bonus-content.bonus-active .bp-locked-overlay { display: none !important; }

/* Locked overlay */
.bp-locked-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.bp-locked-overlay::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(243,244,248,0.82); backdrop-filter: blur(8px);
  border-radius: var(--radius);
}
.bp-locked-card {
  position: relative; z-index: 6;
  text-align: center; max-width: 400px; padding: 2.5rem 2rem;
  background: white; border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}
.bp-locked-icon-wrap { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.bp-locked-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.625rem; color: var(--text); }
.bp-locked-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.75rem; }
.bp-locked-providers { display: flex; justify-content: center; gap: 2rem; }
.bp-locked-provider { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.bp-locked-prov-logo {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.bp-locked-prov-logo img { width: 28px; height: 28px; object-fit: contain; }
.bp-locked-prov-logo--moonpay { background: #7b3fe4; }
.bp-locked-prov-logo--moonpay img { filter: brightness(0) invert(1); }
.bp-locked-prov-logo--stripe { background: #635bff; }
.bp-locked-prov-logo--stripe img { filter: brightness(0) invert(1); }
.bp-locked-prov-logo--square { background: #1a1a1a; }
.bp-locked-prov-logo--square img { filter: brightness(0) invert(1); }
.bp-locked-provider span { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }

/* Hero */
.bp-hero {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
  border-radius: 16px; padding: 1.375rem 1.75rem; margin-bottom: 1rem;
  color: white; box-shadow: 0 4px 20px rgba(49,46,129,0.35);
}
.bp-hero-left { display: flex; align-items: center; gap: 1rem; }
.bp-hero-emblem {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  background: rgba(255,255,255,0.14); display: grid; place-items: center;
  font-size: 1.4rem; backdrop-filter: blur(4px);
}
.bp-hero-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.15rem; }
.bp-hero-sub { font-size: 0.8rem; color: rgba(255,255,255,0.65); }

/* Progress */
.bp-progress-track {
  position: relative; height: 7px; background: var(--border);
  border-radius: 999px; margin-bottom: 1.5rem; overflow: visible;
}
.bp-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}
.bp-progress-label {
  position: absolute; right: 0; top: -20px;
  font-size: 0.7rem; font-weight: 700; color: var(--accent);
}

/* Status pills */
.bp-pill {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.65rem; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.bp-pill--ok      { background: #dcfce7; color: #15803d; }
.bp-pill--review  { background: #fef9c3; color: #854d0e; }
.bp-pill--pending { background: var(--surface-2); color: var(--text-muted); }

/* 3-column provider grid */
.bp-prov-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 680px) {
  .bp-prov-grid { grid-template-columns: 1fr; }
}

/* Provider card */
.bp-prov-card {
  background: white; border: 1.5px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.15s;
  display: flex; flex-direction: column;
}
.bp-prov-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.09); transform: translateY(-2px); }
.bp-prov-card.bp-prov-card--done { border-color: #bbf7d0; }

/* Provider card header — colored accent strip */
.bp-prov-header {
  padding: 1rem 1.125rem 0.875rem;
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  border-top: 4px solid var(--prov-color, #7c3aed);
}
.bp-prov-card.bp-prov-card--done .bp-prov-header { border-bottom-color: #bbf7d0; }
.bp-prov-name {
  font-size: 1rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.01em;
}

/* Provider form body */
.bp-prov-form {
  padding: 1rem 1.125rem; display: flex; flex-direction: column;
  gap: 0.75rem; flex: 1;
}

/* Link fields */
.bp-link-field { display: flex; flex-direction: column; gap: 0.3rem; }
.bp-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.bp-url-input {
  width: 100%; padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 0.8375rem; font-family: inherit;
  background: var(--surface); transition: border-color 0.2s;
  box-sizing: border-box;
}
.bp-url-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }

/* Upload box */
.bp-upload-label { cursor: pointer; display: block; }
.bp-upload-box {
  border: 2px dashed #d1d5db; border-radius: 12px;
  padding: 1.25rem 1rem; text-align: center;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.bp-upload-box:hover { border-color: var(--accent); background: rgba(124,58,237,0.03); }
.bp-upload-box.has-file { border-style: solid; border-color: #22c55e; background: #f0fdf4; }
.bp-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bp-upload-ico { color: #9ca3af; }
.bp-upload-text { font-size: 0.8125rem; color: var(--text); font-weight: 500; }
.bp-upload-hint { font-size: 0.72rem; color: var(--text-muted); }
.bp-file-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.bp-file-check { font-size: 0.775rem; color: #15803d; font-weight: 600; }

/* Submit button */
.bp-submit-btn {
  display: block; width: 100%; margin-top: auto;
  padding: 0.7rem; border-radius: 11px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: white; font-size: 0.85rem; font-weight: 700;
  transition: opacity 0.2s, transform 0.1s;
}
.bp-submit-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.bp-submit-btn:active { transform: translateY(0); }

/* Approved done body */
.bp-done-body {
  padding: 0.875rem 1.125rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.bp-done-thumb { width: 100%; max-height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid #bbf7d0; }
.bp-done-link {
  font-size: 0.8rem; color: #4f46e5; text-decoration: none;
  background: #ede9fe; padding: 0.3rem 0.65rem; border-radius: 8px;
  word-break: break-all; display: block;
}
.bp-done-link:hover { text-decoration: underline; }

/* Welcome modal */
.welcome-modal { text-align: center; position: relative; overflow: hidden; }
.welcome-icon { font-size: 3rem; margin-bottom: 1rem; animation: animateFloat 2s ease-in-out infinite; }
.welcome-email { text-align: left; background: var(--surface-2); padding: 1.25rem; border-radius: var(--radius-sm); margin: 1.25rem 0; font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.welcome-confetti {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(99,91,255,0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 30%, rgba(16,185,129,0.12) 0%, transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(245,158,11,0.1) 0%, transparent 50%);
}

/* Provider logos fallback text */
.provider-logo-img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

.pending-change-banner {
  background: var(--warning-soft); border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm); padding: 0.75rem 1rem; margin-bottom: 1rem;
  font-size: 0.875rem; color: #92400e;
}
.pending-change-banner strong { display: block; margin-bottom: 0.25rem; }

/* ═══════════════════════════════════════════════
   ADMIN PANEL — Monday.com inspired design
   ═══════════════════════════════════════════════ */

/* ── Admin content area ── */
#panel-translators,
#panel-active,
#panel-assignments,
#panel-management {
  animation: animateIn 0.25s ease both;
}

/* ── Panel header toolbar ── */
.adm-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.25rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.adm-panel-header h2 {
  font-size: 1.125rem; font-weight: 700; white-space: nowrap;
  padding-right: 1rem; border-right: 1px solid var(--border);
}
.adm-ph-left { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; flex-wrap: wrap; }
.adm-filters { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.adm-search-wrap { position: relative; }
.adm-search-wrap::before {
  content: '🔍'; position: absolute; left: 0.65rem; top: 50%;
  transform: translateY(-50%); font-size: 0.8rem; pointer-events: none;
}
.adm-search {
  padding: 0.45rem 0.875rem 0.45rem 2rem;
  border: 1.5px solid var(--border); border-radius: 999px;
  font-size: 0.8125rem; min-width: 220px; width: auto;
  background: var(--surface-2); transition: var(--transition);
}
.adm-search:focus { border-color: var(--accent); background: #fff; outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

.adm-filter-sel {
  padding: 0.4rem 0.875rem; border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 0.8125rem; width: auto; cursor: pointer;
  background: var(--surface-2); font-weight: 500; transition: var(--transition);
}
.adm-filter-sel:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

.adm-count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.75rem; font-weight: 700; padding: 0 6px;
}

/* ── Spreadsheet container ── */
.spreadsheet-outer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.spreadsheet-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Spreadsheet table ── */
.spreadsheet-table {
  width: max-content; min-width: 100%;
  border-collapse: collapse; font-size: 0.8125rem;
  table-layout: fixed;
}
.spreadsheet-table thead { position: sticky; top: 0; z-index: 10; }
.spreadsheet-table th {
  background: #f4f5f8;
  padding: 0 0.875rem;
  height: 38px;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #8b93a7;
  border-bottom: 2px solid #e8eaef;
  white-space: nowrap; user-select: none;
}
.spreadsheet-table th:not(:first-child) {
  border-left: 1px solid #e8eaef;
}
.spreadsheet-table td {
  padding: 0 0.875rem; height: 46px;
  border-bottom: 1px solid #f0f1f5;
  vertical-align: middle; white-space: nowrap;
}
.spreadsheet-table td:not(:first-child) {
  border-left: 1px solid #f0f1f5;
}
.spreadsheet-table tbody tr { transition: background 0.12s; }
.spreadsheet-table tbody tr:hover td { background: #f5f7ff !important; }
.spreadsheet-table tbody tr:hover td.ss-sticky-col { background: #f5f7ff !important; }
.spreadsheet-table tbody tr:last-child td { border-bottom: none; }

/* ── Group header rows ── */
.ss-group-row td {
  background: #f4f5f8 !important; padding: 0 1rem;
  height: 34px; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #6b7280; border-bottom: 2px solid #e8eaef;
  border-left: none !important;
}
.ss-group-row:hover td { background: #f4f5f8 !important; }
.ss-group-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* ── Sticky first column ── */
.ss-sticky-col {
  position: sticky; left: 0; z-index: 5;
  background: var(--surface);
  border-right: 2px solid #e8eaef !important;
  min-width: 220px;
}
.spreadsheet-table th.ss-sticky-col {
  background: #f4f5f8; z-index: 11;
  border-right: 2px solid #e8eaef !important;
}

/* ── Name cell ── */
.ss-name-cell {
  display: flex; align-items: center; gap: 0.625rem; padding: 0;
}
.tr-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.6875rem;
  font-weight: 800; color: #fff; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0;
}
.ss-name { font-weight: 600; font-size: 0.875rem; color: #1a1a2e; line-height: 1.2; }
.ss-sub  { font-size: 0.75rem; color: #8b93a7; line-height: 1.2; }

/* ── Sort indicator ── */
.ss-sort { cursor: pointer; display: flex; align-items: center; gap: 4px; }
.ss-sort:hover { color: var(--accent); }
.ss-sort-icon { font-size: 0.6rem; opacity: 0.45; }
.ss-sort.ss-sort--asc .ss-sort-icon,
.ss-sort.ss-sort--desc .ss-sort-icon { opacity: 1; color: var(--accent); }

/* ── Status badge (inline select styled) ── */
.ss-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0.25rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
  cursor: pointer; border: none;
  font-family: var(--font); transition: opacity 0.15s;
}
.ss-status-pill:hover { opacity: 0.85; }
.ss-status-pill--active { background: #dcfce7; color: #15803d; }
.ss-status-pill--inactive { background: #f1f2f5; color: #6b7280; }
.ss-status-pip { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ss-status-pill--active .ss-status-pip { background: #22c55e; }
.ss-status-pill--inactive .ss-status-pip { background: #9ca3af; }

/* ── KYC badge in table ── */
.kyc-cell { display: flex; align-items: center; gap: 0.375rem; }
.kyc-approve-btn {
  padding: 2px 8px; font-size: 0.7rem; font-weight: 700;
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; cursor: pointer; transition: opacity 0.15s;
}
.kyc-approve-btn:hover { opacity: 0.85; }

/* ── Inline editable fields ── */
.ss-inline-sel, .ss-inline-date, .ss-inline-txt {
  padding: 0.3rem 0.5rem; border: 1.5px solid transparent;
  border-radius: 6px; font-size: 0.8rem; font-family: var(--font);
  background: transparent; width: 100%; min-width: 0; color: var(--text);
  transition: border-color 0.15s, background 0.15s; cursor: pointer;
}
.ss-inline-sel:hover, .ss-inline-date:hover, .ss-inline-txt:hover { border-color: #d1d5db; background: #fff; }
.ss-inline-sel:focus, .ss-inline-date:focus, .ss-inline-txt:focus {
  border-color: var(--accent); background: #fff; outline: none; cursor: text;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.ss-inline-date { min-width: 108px; }
.ss-inline-txt  { min-width: 88px; }
.ss-inline-sel  { min-width: 90px; }

/* ── Day chips ── */
.days-inline { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
.day-chip {
  display: inline-block; padding: 2px 5px; border-radius: 4px;
  font-size: 0.625rem; font-weight: 700;
  background: #f0f1f5; color: #9ca3af; white-space: nowrap;
}
.day-chip--on { background: #ede9fe; color: #7c3aed; }

/* ── File/link chips ── */
.file-chip {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.2rem 0.625rem; border-radius: 999px;
  background: #eff6ff; color: #2563eb;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
  text-decoration: none; transition: background 0.15s;
}
.file-chip:hover { background: #2563eb; color: #fff; }
.file-chip--none { color: #c4c9d4; font-size: 0.8rem; }

/* ── Toggle switch ── */
.toggle-sw { display: inline-flex; align-items: center; cursor: pointer; }
.toggle-sw input { display: none; }
.toggle-track {
  width: 36px; height: 20px; border-radius: 10px;
  background: #d1d5db; transition: background 0.2s; position: relative;
}
.toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.2s;
}
.toggle-sw input:checked + .toggle-track { background: var(--accent); }
.toggle-sw input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle-sw.toggle-sm .toggle-track { width: 28px; height: 16px; }
.toggle-sw.toggle-sm .toggle-track::after { width: 12px; height: 12px; }
.toggle-sw.toggle-sm input:checked + .toggle-track::after { transform: translateX(12px); }

/* ── Edit modal — tabbed ── */
.modal-xl { max-width: 740px; }
.edit-tabs {
  display: flex; gap: 0; flex-wrap: wrap;
  border-bottom: 2px solid var(--border); margin-bottom: 1.25rem;
}
.edit-tab {
  padding: 0.6rem 1.1rem; border: none; background: transparent;
  font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s; white-space: nowrap;
}
.edit-tab:hover { color: var(--text); background: var(--surface-2); }
.edit-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }
.edit-tab-panel { display: none; }
.edit-tab-panel.active { display: block; animation: animateIn 0.2s ease both; }
.doc-links-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0; }
.doc-link-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.5rem 0.875rem;
}

/* ── Day toggle labels ── */
.day-toggle-label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.75rem; border: 1.5px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 0.875rem; font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.day-toggle-label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.day-toggle-label input { display: none; }

/* ── Active Now ── */
.active-section { margin-bottom: 2rem; }
.active-section-header {
  display: flex; align-items: center; gap: 0.625rem; margin-bottom: 1rem;
}
.active-section-header h3 { font-size: 1rem; font-weight: 700; }
.active-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
}
.active-count--green { background: #dcfce7; color: #15803d; }
.active-count--blue  { background: #dbeafe; color: #1d4ed8; }
.active-count--amber { background: #fef3c7; color: #92400e; }
.active-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.active-dot--green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); animation: pulseDot 2s ease-in-out infinite; }
.active-dot--blue  { background: var(--info); }
.active-dot--amber { background: var(--warning); }
.active-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.875rem; }
.active-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.125rem 1.25rem;
  position: relative; overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.active-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.active-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; border-radius: 2px 0 0 2px;
}
.active-card--green::before { background: #22c55e; }
.active-card--blue::before  { background: var(--info); }
.active-card--amber::before { background: var(--warning); }
.active-card-header { display: flex; align-items: center; gap: 0.625rem; margin-bottom: 0.5rem; }
.active-card-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.75rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.active-card-name { font-weight: 700; font-size: 0.9375rem; color: var(--text); }
.active-card-sub  { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.active-card-time {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.8125rem; font-weight: 700; padding: 0.2rem 0.625rem;
  border-radius: 999px;
}
.active-card--green .active-card-time { background: #dcfce7; color: #15803d; }
.active-card--blue  .active-card-time { background: #dbeafe; color: #1d4ed8; }
.active-card--amber .active-card-time { background: #fef3c7; color: #92400e; }

/* ── Assignments stats ── */
.asg-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
@media (max-width: 640px) { .asg-stats { grid-template-columns: repeat(2,1fr); } }
.asg-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.125rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.asg-stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 1.125rem; flex-shrink: 0;
}
.asg-stat-val { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.asg-stat-lbl { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* ── Management section cards ── */
.mgmt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
@media (max-width: 700px) { .mgmt-grid { grid-template-columns: 1fr; } }

/* ── Row action buttons (on hover) ── */
.ss-row-actions {
  display: flex; gap: 4px; margin-top: 5px;
  opacity: 0; transition: opacity 0.15s;
}
.spreadsheet-table tbody tr:hover .ss-row-actions { opacity: 1; }
.ss-action-btn {
  padding: 2px 9px; border-radius: 6px; font-size: 0.7rem; font-weight: 700;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer; transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.ss-action-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ss-action-btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* ── Completed row highlight ── */
.ss-row-completed td.ss-sticky-col { border-left: 3px solid #f59e0b !important; }
.tr-complete-star { font-size: 0.75rem; }

/* ── Completed Translators Banner ── */
.completed-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 1rem; margin-bottom: 1rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
  border-radius: var(--radius); padding: 1.125rem 1.5rem;
  box-shadow: 0 4px 24px rgba(99,91,255,0.2);
  position: relative; overflow: hidden;
}
.completed-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(99,91,255,0.3) 0%, transparent 60%);
  pointer-events: none;
}
.completed-banner-left { display: flex; align-items: center; gap: 1rem; z-index: 1; }
.completed-trophy { font-size: 2rem; line-height: 1; animation: animateFloat 3s ease-in-out infinite; }
.completed-headline { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem; }
.completed-num {
  font-size: 2.25rem; font-weight: 900; color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.completed-label {
  font-size: 0.9375rem; font-weight: 700; color: rgba(255,255,255,0.9);
}
.completed-of {
  font-size: 0.8125rem; color: rgba(255,255,255,0.5); font-weight: 500;
}
.completed-progress-bar-wrap {
  width: 220px; height: 6px; background: rgba(255,255,255,0.15);
  border-radius: 999px; overflow: hidden;
}
.completed-progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 999px; transition: width 0.5s ease;
}
.completed-criteria { display: flex; flex-wrap: wrap; gap: 0.4rem; z-index: 1; }
.cc-pill {
  padding: 0.3rem 0.7rem; border-radius: 999px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  font-size: 0.75rem; font-weight: 600; border: 1px solid rgba(255,255,255,0.15);
}

/* ── Registration link card ── */
.reg-link-card {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd; border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.reg-link-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; margin-top: 0.125rem; }
.reg-link-body { flex: 1; min-width: 0; }
.reg-link-title { font-weight: 700; font-size: 1rem; color: #0c4a6e; margin-bottom: 0.25rem; }
.reg-link-desc { font-size: 0.875rem; color: #075985; margin-bottom: 0.875rem; }
.reg-link-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.reg-link-input {
  flex: 1; min-width: 200px; padding: 0.5rem 0.875rem;
  border: 1.5px solid #7dd3fc; border-radius: var(--radius-sm);
  font-size: 0.8125rem; font-family: monospace; background: #fff;
  color: #0369a1; letter-spacing: 0; cursor: text;
}
.reg-link-input:focus { outline: none; border-color: var(--accent); }

/* ── Hide-inactive filter pill ── */
.filter-pill {
  padding: 0.4rem 0.875rem; border: 1.5px solid var(--border);
  border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  color: var(--text-muted); background: var(--surface-2); cursor: pointer;
  transition: var(--transition); white-space: nowrap;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--accent-glow); }

/* ── Onboarding banner (Overview & Assignments panels) ── */
.onboarding-banner {
  display: flex; align-items: center; gap: 1.25rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(139,92,246,0.08) 100%);
  border: 1px solid rgba(99,102,241,0.3); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.onboarding-banner-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.onboarding-banner-body { flex: 1; min-width: 200px; }
.onboarding-banner-body strong { display: block; font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.onboarding-banner-body p { font-size: 0.875rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ── Admin mailbox ── */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
  border-radius: 999px; background: #ef4444; color: #fff;
  font-size: 0.7rem; font-weight: 800; margin-left: 0.35rem;
}
.mailbox-shell {
  display: grid; grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 0; min-height: 62vh; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.mailbox-list {
  border-right: 1px solid var(--border); background: #fafafa;
  max-height: 70vh; overflow: auto;
}
.mailbox-item {
  display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--border);
  background: transparent; padding: 0.9rem 1rem; cursor: pointer;
}
.mailbox-item:hover { background: #f3f4f8; }
.mailbox-item.active { background: #eef0ff; border-left: 3px solid var(--accent); }
.mailbox-item.queued .mi-status { color: #b45309; }
.mailbox-item.sent .mi-status { color: #047857; }
.mi-top { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.2rem; }
.mi-name { font-weight: 700; font-size: 0.875rem; color: var(--text); }
.mi-status { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.mi-subject { font-size: 0.8125rem; color: #374151; margin-bottom: 0.15rem; }
.mi-meta { font-size: 0.75rem; color: var(--text-muted); }
.mailbox-preview { padding: 1.25rem; overflow: auto; max-height: 70vh; background: #f5f6fb; }
.mailbox-preview-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem;
}
.mailbox-letter-card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(26,26,46,0.1);
}
.mailbox-letter-meta {
  font-size: 0.8125rem; color: #4b5563; margin-bottom: 0.85rem;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 0.85rem 1rem;
}
@media (max-width: 900px) {
  .mailbox-shell { grid-template-columns: 1fr; }
  .mailbox-list { max-height: 34vh; border-right: 0; border-bottom: 1px solid var(--border); }
}
