/* ══════════════════════════════════════════════════
   FindYourNextShow — Design System v3
   Modern SaaS · Clean · Professional · Trust
   ══════════════════════════════════════════════════ */

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

:root {
  --bg: #0C0E16;
  --s1: #13151F;
  --s2: #1A1D2B;
  --s3: #232738;
  --accent: #B8EC00;
  --accent-soft: #d4f55a;
  --accent-dim: rgba(184,236,0,.07);
  --accent-glow: rgba(184,236,0,.12);
  --a2: #FF5C5C;
  --a3: #38BDF8;
  --a4: #FBBF24;
  --a5: #A78BFA;
  --text: #F0F2F7;
  --text2: #9CA3B8;
  --muted: #5C6378;
  --border: rgba(255,255,255,.06);
  --border2: rgba(255,255,255,.1);
  --green: #4ADE80;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Syne', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: var(--bg); }

/* ══════════════════════════════════════════════════
   ACCESSIBILITÉ (WCAG AA)
   ══════════════════════════════════════════════════ */

/* Focus visible au clavier — indispensable pour la navigation Tab */
*:focus { outline: none; } /* on retire le focus par défaut au clic souris */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Skip link — saute la navigation au clavier */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--accent);
  color: var(--bg);
  padding: 10px 18px;
  z-index: 99999;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

/* Hide visually but keep for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect des préférences utilisateur — réduire les animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.page { display: none; }
.page.active { display: block; }

/* ── FORM ELEMENTS ── */
label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  display: block;
}

input, select, textarea {
  background: var(--s1);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  border-radius: var(--radius-sm);
}

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

input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: var(--s1); }
textarea { resize: vertical; min-height: 80px; }

.fg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.fg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.fg2 .full { grid-column: 1 / -1; }

/* ══════════════════════════════════════════
   AUTH PAGE
   ══════════════════════════════════════════ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: linear-gradient(160deg, var(--s2) 0%, var(--bg) 100%);
  border-right: 1px solid var(--border);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle at 30% 40%, var(--accent-glow) 0%, transparent 50%);
  pointer-events: none;
}

.auth-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .dot { color: var(--accent); }

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

.auth-pitch h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -2px;
  line-height: .92;
  margin-bottom: 24px;
}

.auth-pitch h2 .y { color: var(--accent); }
.auth-pitch h2 .c { color: var(--a3); }

.auth-pitch p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.7;
  max-width: 400px;
}

.auth-right {
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
}

.auth-inner { max-width: 440px; width: 100%; margin: 0 auto; }

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border2);
  background: var(--s1);
}

.auth-tab {
  flex: 1;
  padding: 13px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.auth-tab.on {
  background: var(--s2);
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.auth-form { display: none; }
.auth-form.on { display: block; }

.auth-form h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-form p { font-size: 14px; color: var(--muted); margin-bottom: 28px; }

.auth-btn {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  margin-top: 8px;
  border-radius: var(--radius-sm);
}

.auth-btn:hover { background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(184,236,0,.25); }
.auth-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.auth-error { background: rgba(255,92,92,.08); border: 1px solid rgba(255,92,92,.2); color: var(--a2); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; display: none; border-radius: var(--radius-sm); }
.auth-error.on { display: block; }
.auth-success { background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.2); color: var(--green); padding: 12px 16px; font-size: 13px; margin-bottom: 16px; display: none; border-radius: var(--radius-sm); }
.auth-success.on { display: block; }
.forgot-link { background: none; border: none; color: var(--muted); cursor: pointer; font-family: var(--font); font-size: 13px; text-align: right; display: block; margin-top: 4px; margin-bottom: 10px; transition: color .2s; }
.forgot-link:hover { color: var(--accent); }
.auth-divider { text-align: center; font-size: 13px; color: var(--muted); margin: 16px 0; }

/* ── ROLE SELECTOR ── */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.role-opt {
  border: 1px solid var(--border2);
  padding: 20px 16px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  border-radius: var(--radius);
  background: var(--s1);
}
.role-opt:hover { border-color: var(--text2); }
.role-opt.on { border-color: var(--accent); background: var(--accent-dim); }
.role-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.role-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.role-opt.on .role-name { color: var(--accent); }
.role-desc { font-size: 12px; color: var(--muted); }

.plan-selector { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }

.plan-opt {
  border: 1px solid var(--border2);
  padding: 16px 10px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--s1);
}

.plan-opt:hover { border-color: var(--text2); }
.plan-opt.on { border-color: var(--accent); background: var(--accent-dim); }
.plan-opt-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; color: var(--text2); }
.plan-opt.on .plan-opt-name { color: var(--accent); }
.plan-opt-price { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--accent); }
.plan-opt-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.stripe-btn { width: 100%; background: var(--a5); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; padding: 14px; border: none; cursor: pointer; transition: all .2s; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-sm); }
.stripe-btn:hover { background: #7e22ce; transform: translateY(-1px); }
.stripe-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ══════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════ */
.app-layout {
  min-height: 100vh;
}

.sidebar {
  background: var(--s1);
  border-right: 1px solid var(--border);
  padding: 28px 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  white-space: nowrap;
}
.sidebar-logo img {
  max-height: 36px;
  max-width: 100%;
  width: auto;
  display: block;
}

.sidebar-logo .dot { color: var(--accent); }

.sidebar-user {
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.sidebar-user-plan {
  font-size: 11px;
  padding: 3px 10px;
  font-weight: 600;
  display: inline-block;
  border-radius: 20px;
}

.plan-free { border: 1px solid var(--border2); color: var(--muted); }
.plan-pro { border: 1px solid var(--accent); color: var(--accent); background: var(--accent-dim); }
.plan-label { border: 1px solid var(--a5); color: var(--a5); }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  transition: all .2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }

.nav-item.on {
  color: var(--accent);
  background: var(--accent-dim);
  border-left: 3px solid var(--accent);
}

.nav-item .icon { font-size: 16px; width: 22px; text-align: center; }

.sidebar-bottom {
  margin-top: auto;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
}

.logout-btn {
  width: 100%;
  background: none;
  border: 1px solid var(--border2);
  color: var(--text2);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 10px;
  cursor: pointer;
  transition: all .2s;
  border-radius: var(--radius-sm);
}

.logout-btn:hover { border-color: var(--a2); color: var(--a2); }

/* ── MAIN CONTENT ── */
.main {
  margin-left: 260px;
  padding: 48px 56px;
  min-height: 100vh;
}

.view { display: none; }
.view.on { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -1px;
}

.btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.btn-y { background: var(--accent); color: var(--bg); }
.btn-y:hover { background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(184,236,0,.2); }
.btn-o { background: none; border: 1px solid var(--border2); color: var(--text); }
.btn-o:hover { border-color: var(--accent); color: var(--accent); }
.btn-c { background: var(--a3); color: var(--bg); }
.btn-r { background: var(--a2); color: #fff; }

/* ══════════════════════════════════════════
   KPI CARDS
   ══════════════════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.kpi {
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 28px 24px;
  border-radius: var(--radius);
  transition: all .25s;
}

.kpi:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}

.kpi-num.y { color: var(--accent); }
.kpi-num.c { color: var(--a3); }
.kpi-num.o { color: var(--a4); }
.kpi-num.g { color: var(--green); }

.kpi-label {
  font-size: 13px;
  color: var(--text2);
  font-weight: 500;
}

/* ── SECTION TITLE ── */
.sec-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  margin-bottom: 16px;
  margin-top: 40px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.sec-title:first-child { margin-top: 0; }

/* ── CAMPAIGN LIST ── */
.camp-list { display: grid; gap: 12px; margin-bottom: 32px; }

.camp {
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 24px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
}

.camp:hover { border-color: var(--border2); background: var(--s2); }
.camp-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.camp-name { font-size: 15px; font-weight: 700; }
.camp-date { font-size: 13px; color: var(--muted); margin-top: 2px; }
.camp-prog { height: 4px; background: var(--s3); margin-bottom: 14px; overflow: hidden; border-radius: 4px; }
.camp-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--a3)); transition: width 1s ease; border-radius: 4px; }
.camp-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.cstat { font-size: 13px; color: var(--text2); }
.cstat strong { color: var(--text); font-weight: 600; }

.badge {
  font-size: 11px;
  padding: 4px 12px;
  font-weight: 600;
  border-radius: 20px;
}

.b-sent { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(184,236,0,.2); }
.b-rep { background: rgba(74,222,128,.08); color: var(--green); border: 1px solid rgba(74,222,128,.2); }
.b-wait { background: rgba(251,191,36,.08); color: var(--a4); border: 1px solid rgba(251,191,36,.2); }
.b-conf { background: rgba(56,189,248,.08); color: var(--a3); border: 1px solid rgba(56,189,248,.2); }

/* ── INBOX ── */
.inbox-list { background: var(--s1); border: 1px solid var(--border); margin-bottom: 32px; border-radius: var(--radius); overflow: hidden; }
.inbox-item { padding: 18px 24px; display: flex; align-items: flex-start; gap: 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .2s; }
.inbox-item:last-child { border-bottom: none; }
.inbox-item:hover { background: var(--s2); }
.inbox-from { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.inbox-preview { font-size: 13px; color: var(--muted); line-height: 1.5; }
.inbox-time { font-size: 12px; color: var(--muted); white-space: nowrap; margin-left: auto; }

/* ── TIMELINE ── */
.timeline { display: grid; gap: 10px; margin-bottom: 32px; }
.tl-item { background: var(--s1); border: 1px solid var(--border); padding: 16px 24px; display: flex; align-items: center; gap: 16px; border-radius: var(--radius); }
.tl-date { font-size: 13px; color: var(--accent); font-weight: 600; min-width: 80px; }
.tl-venue { font-size: 14px; flex: 1; font-weight: 500; }
.tl-flag { font-size: 18px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tl-dot.new { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.tl-dot.read { background: var(--s3); }

/* ── CONFIRMED ── */
.conf-list { display: grid; gap: 10px; margin-bottom: 32px; }
.conf-item { background: var(--s1); border: 1px solid var(--border); padding: 18px 24px; display: flex; align-items: center; gap: 16px; border-radius: var(--radius); }
.conf-date { font-size: 13px; color: var(--green); font-weight: 600; min-width: 80px; }
.conf-venue { font-size: 14px; flex: 1; font-weight: 500; }

/* ══════════════════════════════════════════
   CAMPAIGN FORM
   ══════════════════════════════════════════ */
.camp-form {
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 36px;
  border-radius: var(--radius);
}

.prog-bar { display: flex; gap: 6px; margin-bottom: 24px; }
.prog-s { flex: 1; height: 4px; background: var(--s3); transition: background .3s; border-radius: 4px; }
.prog-s.done { background: var(--accent); }
.prog-s.act { background: var(--a3); }

.ptabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.ptab {
  flex: 1;
  padding: 14px 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}

.ptab .ti { display: block; font-size: 16px; margin-bottom: 4px; }
.ptab.on { background: var(--s2); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

.fpanel { display: none; padding: 32px 0 0; }
.fpanel.on { display: block; }

.fsh {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 16px;
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.fsh:first-child { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.chip {
  border: 1px solid var(--border2);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  transition: all .2s;
  user-select: none;
  border-radius: 24px;
  font-weight: 500;
}

.chip:hover { border-color: var(--text2); color: var(--text); }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.fmt-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }

.fmt-card {
  border: 1px solid var(--border2);
  padding: 18px 12px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
  border-radius: var(--radius);
  background: var(--bg);
}

.fmt-card:hover { border-color: var(--text2); }
.fmt-card.on { border-color: var(--accent); background: var(--accent-dim); }
.fmt-icon { font-size: 24px; display: block; margin-bottom: 8px; }
.fmt-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.fmt-card.on .fmt-label { color: var(--accent); }

.dt-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 16px; }
.dt-card { border: 1px solid var(--border2); padding: 18px; cursor: pointer; transition: all .2s; border-radius: var(--radius); background: var(--bg); }
.dt-card:hover { border-color: var(--text2); }
.dt-card.on { border-color: var(--a3); background: rgba(56,189,248,.05); }
.dt-icon { font-size: 22px; margin-bottom: 8px; display: block; }
.dt-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.dt-card.on .dt-title { color: var(--a3); }
.dt-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }

.cg5 { display: grid; grid-template-columns: repeat(5,1fr); gap: 10px; margin-bottom: 16px; }
.cc { border: 1px solid var(--border2); padding: 14px 8px; text-align: center; cursor: pointer; transition: all .2s; font-size: 13px; font-weight: 500; color: var(--text2); user-select: none; border-radius: var(--radius); background: var(--bg); }
.cc .fl { font-size: 22px; display: block; margin-bottom: 6px; }
.cc.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.sg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.si { position: relative; }
.sp { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.si input { padding-left: 38px; }

.tch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
.tch-list { display: grid; gap: 8px; }
.tch { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 12px 14px; border: 1px solid var(--border2); transition: all .2s; border-radius: var(--radius-sm); background: var(--bg); }
.tch:hover { border-color: var(--accent); }
.cb { width: 18px; height: 18px; border: 2px solid var(--border2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; transition: all .2s; border-radius: 4px; }
.tch.on .cb { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.cl { font-size: 13px; font-weight: 500; }

.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.uz { border: 2px dashed var(--border2); padding: 24px; text-align: center; cursor: pointer; transition: all .2s; position: relative; border-radius: var(--radius); }
.uz:hover { border-color: var(--accent); background: rgba(184,236,0,.02); }
.uz input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ui { font-size: 24px; display: block; margin-bottom: 8px; }
.ul { font-size: 13px; color: var(--muted); }
.ul strong { color: var(--accent); }
.uf-item { background: var(--bg); border: 1px solid var(--border2); padding: 12px 16px; display: flex; align-items: center; gap: 10px; border-radius: var(--radius-sm); }
.fn { flex: 1; }
.fn-name { font-size: 13px; font-weight: 600; }
.fn-size { font-size: 12px; color: var(--muted); }
.fr-btn { background: none; border: none; color: var(--a2); cursor: pointer; font-size: 14px; }
.gen-btn { width: 100%; background: var(--accent); color: var(--bg); font-family: var(--font); font-size: 14px; font-weight: 700; padding: 16px; border: none; cursor: pointer; transition: all .2s; margin-top: 10px; border-radius: var(--radius-sm); }
.gen-btn:hover { background: var(--accent-soft); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(184,236,0,.2); }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

/* ── RESULTS ── */
.res-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.res-hdr h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.5px; }
.fbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.fc { padding: 8px 16px; border: 1px solid var(--border2); background: none; color: var(--text2); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; border-radius: 24px; }
.fc.on { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.vlist { display: grid; gap: 10px; margin-bottom: 20px; }
.vc-card { background: var(--bg); border: 1px solid var(--border); padding: 20px 24px; display: flex; align-items: flex-start; gap: 14px; cursor: pointer; transition: all .2s; border-radius: var(--radius); }
.vc-card:hover { background: var(--s2); border-color: var(--border2); }
.vcheck { width: 20px; height: 20px; border: 2px solid var(--border2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; transition: all .2s; margin-top: 2px; border-radius: 5px; }
.vcheck.on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.vi { flex: 1; }
.vn { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.vd { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.vtags { display: flex; gap: 6px; flex-wrap: wrap; }
.vtag { font-size: 11px; padding: 3px 10px; border: 1px solid var(--border2); color: var(--text2); border-radius: 20px; font-weight: 500; }
.vtag.vf { border-color: var(--a3); color: var(--a3); }
.vscore { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1; color: var(--accent); }
.vscore-sub { font-size: 11px; color: var(--muted); text-align: right; }

.mrow { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mrow:last-child { margin-bottom: 0; }
.mlabel { font-size: 12px; color: var(--muted); width: 110px; flex-shrink: 0; }
.mbar-w { flex: 1; height: 4px; background: var(--s3); border-radius: 4px; }
.mbar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--a3)); border-radius: 4px; }
.mpct { font-size: 12px; color: var(--accent); width: 32px; text-align: right; font-weight: 600; }

/* ── EMAIL PREVIEW ── */
.etabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; overflow-x: auto; }
.etab { padding: 12px 18px; background: var(--s1); border: none; color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: all .2s; }
.etab.on { background: var(--s2); color: var(--accent); }
.epreview { background: var(--s1); border: 1px solid var(--border); border-top: none; padding: 28px; border-radius: 0 0 var(--radius) var(--radius); }
.emeta { font-size: 13px; color: var(--muted); margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); line-height: 2.2; }
.emeta strong { color: var(--text); }
.ebody { font-size: 14px; line-height: 1.8; color: var(--text2); white-space: pre-line; }
.lbadge { display: inline-block; border: 1px solid var(--accent); color: var(--accent); font-size: 11px; padding: 2px 10px; font-weight: 600; margin-left: 5px; vertical-align: middle; border-radius: 20px; }

.att-bar { background: var(--s1); border: 1px solid var(--border); border-top: none; padding: 14px 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; border-radius: 0 0 var(--radius) var(--radius); }
.att-chip { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border2); padding: 6px 12px; font-size: 12px; color: var(--a3); border-radius: 20px; font-weight: 500; }
.act-row { display: flex; gap: 10px; }
.btn-send { flex: 1; background: var(--accent); color: var(--bg); font-family: var(--font); font-size: 14px; font-weight: 700; padding: 16px; border: none; cursor: pointer; transition: all .2s; border-radius: var(--radius-sm); }
.btn-send:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn-ed { padding: 16px 24px; background: none; border: 1px solid var(--border2); color: var(--text); font-family: var(--font); font-size: 14px; font-weight: 500; cursor: pointer; transition: all .2s; border-radius: var(--radius-sm); }
.btn-ed:hover { border-color: var(--accent); color: var(--accent); }

/* ── SUCCESS ── */
.suc-wrap { text-align: center; padding: 64px 24px; }
.suc-icon { font-size: 56px; display: block; margin-bottom: 20px; }
.suc-wrap h3 { font-family: var(--font-display); font-weight: 800; font-size: 44px; letter-spacing: -2px; color: var(--accent); margin-bottom: 12px; }
.suc-wrap p { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 36px; max-width: 420px; margin-left: auto; margin-right: auto; }
.suc-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 28px; text-align: left; }
.ss { background: var(--bg); border: 1px solid var(--border); padding: 20px; border-radius: var(--radius); }
.ss-num { font-family: var(--font-display); font-weight: 800; font-size: 28px; color: var(--accent); }
.ss-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cb-list { display: grid; gap: 10px; margin-bottom: 24px; }
.cb-row { background: var(--bg); border: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; gap: 14px; font-size: 14px; border-radius: var(--radius); }
.cb-cnt { color: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: 20px; margin-left: auto; }

/* ══════════════════════════════════════════
   PRICING
   ══════════════════════════════════════════ */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 28px; }

.plan {
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 36px 28px;
  position: relative;
  transition: all .25s;
  border-radius: var(--radius);
}

.plan:hover { border-color: var(--border2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.plan.featured { background: linear-gradient(135deg, var(--s2) 0%, var(--s1) 100%); border-color: rgba(184,236,0,.25); }
.plan-badge { position: absolute; top: 14px; right: 18px; background: var(--accent); color: var(--bg); font-size: 11px; padding: 4px 12px; font-weight: 700; border-radius: 20px; }
.plan-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; color: var(--text2); }
.plan-price { font-family: var(--font-display); font-weight: 800; font-size: 48px; line-height: 1; color: var(--accent); margin-bottom: 6px; letter-spacing: -2px; }
.plan-price .per { font-size: 14px; color: var(--muted); font-family: var(--font); letter-spacing: 0; font-weight: 400; }
.plan-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.6; min-height: 40px; }
.plan-features { list-style: none; margin-bottom: 28px; }
.plan-features li { font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text2); display: flex; gap: 10px; align-items: flex-start; }
.plan-features li::before { content: '✓'; color: var(--accent); flex-shrink: 0; font-weight: 700; }
.plan-features li.no { color: var(--muted); }
.plan-features li.no::before { content: '–'; color: var(--muted); }
.plan-btn { width: 100%; padding: 14px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; border-radius: var(--radius-sm); }
.pb-y { background: var(--accent); color: var(--bg); }
.pb-y:hover { background: var(--accent-soft); }
.pb-o { background: none; border: 1px solid var(--border2); color: var(--text); }
.pb-o:hover { border-color: var(--accent); color: var(--accent); }
.pb-p { background: var(--a5); color: #fff; }
.pb-p:hover { background: #7e22ce; }

.current-plan {
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  border-radius: var(--radius);
}

.cp-label { font-size: 13px; color: var(--muted); }
.cp-plan { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); }

/* ══════════════════════════════════════════
   BOT CHAT
   ══════════════════════════════════════════ */
.bot-wrap { display: flex; flex-direction: column; height: calc(100vh - 160px); }
.bot-header { background: var(--s1); border: 1px solid var(--border); padding: 18px 24px; display: flex; align-items: center; gap: 14px; border-radius: var(--radius) var(--radius) 0 0; }
.bot-avatar { width: 40px; height: 40px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; border-radius: 10px; }
.bot-name { font-size: 15px; font-weight: 700; }
.bot-status { font-size: 13px; color: var(--green); display: flex; align-items: center; gap: 6px; }
.bot-status::before { content: ''; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.bot-messages { flex: 1; background: var(--s1); border: 1px solid var(--border); border-top: none; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; align-items: flex-start; animation: fadeUp .3s ease; }
.msg.user { flex-direction: row-reverse; }
.msg-avatar { width: 32px; height: 32px; border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; border-radius: 8px; }
.msg.bot .msg-avatar { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.msg.user .msg-avatar { background: var(--s3); }
.msg-bubble { background: var(--s2); border: 1px solid var(--border); padding: 16px 20px; max-width: 75%; font-size: 14px; line-height: 1.7; color: var(--text2); border-radius: var(--radius); }
.msg.user .msg-bubble { background: var(--s3); border-color: rgba(184,236,0,.2); color: var(--text); }
.msg-time { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bot-typing { display: none; align-items: center; gap: 6px; padding: 10px 18px; }
.bot-typing.on { display: flex; }
.typing-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: bounce .8s infinite; }
.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.bot-input-area { background: var(--s1); border: 1px solid var(--border); border-top: none; padding: 16px 20px; display: flex; gap: 12px; border-radius: 0 0 var(--radius) var(--radius); }
.bot-input { flex: 1; background: var(--bg); border: 1px solid var(--border2); color: var(--text); font-family: var(--font); font-size: 14px; padding: 12px 16px; outline: none; transition: all .2s; border-radius: var(--radius-sm); }
.bot-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.bot-send { background: var(--accent); color: var(--bg); border: none; padding: 12px 24px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s; border-radius: var(--radius-sm); }
.bot-send:hover { background: var(--accent-soft); }
.bot-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px; background: var(--s1); border: 1px solid var(--border); border-top: none; }
.bot-sug { border: 1px solid var(--border2); padding: 8px 16px; font-size: 13px; color: var(--text2); cursor: pointer; transition: all .2s; border-radius: 24px; font-weight: 500; }
.bot-sug:hover { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════════
   PROFILE
   ══════════════════════════════════════════ */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.profile-sec { background: var(--s1); border: 1px solid var(--border); padding: 28px; border-radius: var(--radius); }
.profile-sec-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.profile-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-item:last-child { border-bottom: none; }
.profile-val { color: var(--accent); font-weight: 600; }

/* ══════════════════════════════════════════
   LOADING & ANIMATIONS
   ══════════════════════════════════════════ */
.loading-overlay { display: none; position: fixed; inset: 0; background: rgba(12,14,22,.98); z-index: 999; align-items: center; justify-content: center; flex-direction: column; gap: 18px; }
.loading-overlay.on { display: flex; }
.lt { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: 2px; color: var(--accent); }
.lb { width: 280px; height: 4px; background: var(--s3); overflow: hidden; border-radius: 4px; }
.lf { height: 100%; background: linear-gradient(90deg, var(--accent), var(--a3)); border-radius: 4px; }
@keyframes lf { from { width: 0; } to { width: 100%; } }
.ls { font-size: 13px; color: var(--muted); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── UPGRADE BANNER ── */
.upgrade-banner {
  background: linear-gradient(135deg, var(--s2) 0%, var(--s1) 100%);
  border: 1px solid rgba(184,236,0,.15);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  border-radius: var(--radius);
}

.upgrade-text h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.upgrade-text p { font-size: 14px; color: var(--muted); }

/* ── TOAST ── */
.toast { position: fixed; top: 24px; right: 24px; background: var(--s2); border: 1px solid var(--border); padding: 16px 24px; font-size: 14px; z-index: 1000; transform: translateX(120%); transition: transform .3s ease; max-width: 400px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.toast.on { transform: translateX(0); }
.toast.success { border-color: rgba(74,222,128,.3); color: var(--green); }
.toast.error { border-color: rgba(255,92,92,.3); color: var(--a2); }
.toast.info { border-color: rgba(184,236,0,.3); color: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; padding: 36px 32px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; }
  .profile-grid { grid-template-columns: 1fr; }
  .upgrade-banner { flex-direction: column; align-items: flex-start; }
  .suc-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .sidebar { position: fixed; left: -280px; width: 260px; transition: left .3s ease; z-index: 100; }
  .sidebar.open { left: 0; }
  .main { margin-left: 0; padding: 24px 20px; padding-top: 68px; }
  .mobile-menu-btn { display: flex !important; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-num { font-size: 28px; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header h1 { font-size: 24px; }
  .fg2, .sg, .tch-grid, .up-grid, .profile-grid { grid-template-columns: 1fr; }
  .fmt-grid, .dt-grid { grid-template-columns: repeat(2, 1fr); }
  .cg5 { grid-template-columns: repeat(3, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .suc-stats { grid-template-columns: repeat(2, 1fr); }
  .upgrade-banner { flex-direction: column; align-items: flex-start; }
  .camp-stats { flex-wrap: wrap; gap: 10px; }
  .bot-wrap { height: calc(100vh - 120px); }
}

/* Mobile menu */
.mobile-menu-btn { display: none; position: fixed; top: 16px; left: 16px; z-index: 101; background: var(--s1); border: 1px solid var(--border2); color: var(--accent); width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; border-radius: var(--radius-sm); }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 99; backdrop-filter: blur(4px); }
.mobile-overlay.on { display: block; }

/* ── General responsive helpers (outside media queries) ── */
.msg-bubble { overflow-wrap: break-word; }
.view img, .section img { max-width: 100%; height: auto; }
.modal-content, .cal-modal { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ══════════════════════════════════════════
   768px ENHANCEMENTS
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Auth */
  .auth-right { padding: 32px 20px; }

  /* Campaign form */
  .camp-form { padding: 24px; }
  .camp { padding: 20px; }

  /* Email preview */
  .epreview { padding: 16px; }

  /* Chatbot */
  .bot-messages { padding: 16px; }
  .msg-bubble { max-width: 80%; }

  /* Inbox */
  .inbox-item { flex-direction: column; gap: 8px; }

  /* Pricing */
  .plan-selector { grid-template-columns: 1fr; }
  .plan-price { font-size: 40px; }

  /* Success / analytics */
  .suc-wrap h3 { font-size: 32px; }

  /* Profile */
  .profile-sec { padding: 20px; }

  /* About / contact photos */
  .photos-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }

  /* Calendar cells */
  .cal-grid .cal-cell { padding: 6px 4px; font-size: 12px; }

  /* Modals */
  .modal-content, .cal-modal { max-width: 95vw; max-height: 80vh; }

  /* Email tabs */
  .etabs { flex-wrap: wrap; gap: 4px; }
  .ptab { font-size: 12px; }

  /* Toast */
  .toast { max-width: calc(100vw - 48px); right: 24px; left: 24px; transform: translateY(-150%); }
  .toast.on { transform: translateY(0); }
}

/* ══════════════════════════════════════════
   375px — SMALL PHONES
   ══════════════════════════════════════════ */
@media (max-width: 375px) {
  /* Layout */
  .main { padding: 16px 12px; padding-top: 60px; }

  /* KPI grid */
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { padding: 16px; }
  .kpi-num { font-size: 24px; }

  /* Page header */
  .page-header h1 { font-size: 20px; }

  /* Campaign form & card */
  .camp-form { padding: 20px; }
  .camp { padding: 16px; }

  /* Pricing */
  .plan-price { font-size: 36px; }

  /* Chatbot */
  .bot-wrap { height: calc(100vh - 100px); }
  .msg-bubble { max-width: 85%; }

  /* Success */
  .suc-stats { grid-template-columns: 1fr; }
  .suc-wrap h3 { font-size: 28px; }

  /* Format / datetime pickers */
  .fmt-grid, .dt-grid { grid-template-columns: 1fr; }

  /* Countries grid */
  .cg5 { grid-template-columns: repeat(2, 1fr); }

  /* Email tabs */
  .ptab { font-size: 11px; }
  .etabs { flex-wrap: wrap; gap: 4px; }

  /* Toast — full-width with side margin */
  .toast { max-width: calc(100vw - 32px); left: 16px; right: 16px; transform: translateY(-150%); }
  .toast.on { transform: translateY(0); }

  /* Calendar cells */
  .cal-grid .cal-cell { padding: 4px 2px; font-size: 10px; }
}
