:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2433;
  --ink-soft: #5b6678;
  --line: #e4e8f0;
  --brand: #1f3a8a;
  --brand-2: #2f6fed;
  --accent: #00b3a4;
  --ok: #1aa251;
  --warn: #e8a200;
  --danger: #d23b3b;
  --shadow: 0 1px 3px rgba(20,30,60,.08), 0 6px 24px rgba(20,30,60,.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; background: #16213e; color: #c7d0e4;
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px; }
.brand-logo { width: 42px; height: auto; display: block; }
.brand-icon { font-size: 22px; color: #fff; transform: rotate(-12deg); }
.brand-name { font-family: 'Great Vibes', cursive; font-weight: 400; letter-spacing: 1px; color: #fff; font-size: 32px; line-height: 1; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; color: #c7d0e4;
  padding: 8px 12px; border-radius: 9px; font-weight: 500; font-size: 22px;
}
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.activ { background: var(--brand-2); color: #fff; }
.nav .ic { width: 28px; display: inline-flex; align-items: center; justify-content: center; opacity: .95; }
.nav a svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.sidebar-jos { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 10px 6px 0; }
.mod-badge { font-size: 12px; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.mod-simulat { background: rgba(232,162,0,.16); color: #ffce5a; }
.mod-real { background: rgba(26,162,81,.18); color: #6ee79f; }
.logout { color: #9aa6c0; font-size: 14px; padding: 4px 6px; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.logout:hover { color: #fff; text-decoration: none; }
.contapro-jos { display: flex; flex-direction: column; align-items: center; gap: 5px; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.contapro-logo { width: 46px; height: auto; border-radius: 0; }
.semper-fi { color: #fff; font-size: 11px; letter-spacing: 1.5px; font-style: italic; opacity: .85; }

.continut { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 30px; border-bottom: 1px solid var(--line); background: var(--card);
}
.topbar h1 { font-size: 21px; margin: 0; }
.pagina-corp { padding: 26px 30px; }

/* ---------- KPI ---------- */
.carduri-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.kpi-val { font-size: 30px; font-weight: 800; color: var(--brand); }
.kpi-lbl { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

/* ---------- Sectiuni ---------- */
.sectiune { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-top: 22px; box-shadow: var(--shadow); }
.sectiune-titlu { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.info-randuri { display: flex; flex-direction: column; }
.info-rand { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info-rand:last-child { border-bottom: none; }
.info-rand span { color: var(--ink-soft); }

.gol-mesaj { background: #eef3ff; border: 1px dashed #b9ccf2; border-radius: 12px; padding: 22px; margin-top: 22px; color: #34507e; }
.gol-mesaj p { margin: 0; }

/* ---------- Butoane ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 9px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: #c8d2e6; text-decoration: none; }
.btn-primar { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn-primar:hover { background: #2560d8; }
.btn-bloc { width: 100%; justify-content: center; }
.btn svg { pointer-events: none; vertical-align: middle; }
.ic-test { font-size: 20px; line-height: 1; vertical-align: middle; }
.ic-buton-logo { height: 22px; width: auto; vertical-align: middle; margin-right: 3px; pointer-events: none; }
.btn-pericol { color: var(--danger); border-color: #f1c5c5; }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #16213e, #1f3a8a); }
.login-card { background: #fff; border-radius: 18px; padding: 36px 34px; width: 360px; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.login-brand { display: flex; align-items: center; gap: 10px; justify-content: center; }
.login-brand .brand-icon { color: var(--brand); font-size: 26px; transform: rotate(-12deg); }
.login-brand .brand-name { color: var(--brand); font-family: 'Great Vibes', cursive; font-weight: 400; letter-spacing: 1px; font-size: 44px; line-height: 1; }
.brand-logo-login { width: 60px; }
.login-sub { text-align: center; color: var(--ink-soft); margin: 6px 0 22px; font-size: 14px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.login-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 15px; }
.login-form input:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47,111,237,.15); }
.alerta-eroare { background: #fdeaea; color: var(--danger); border: 1px solid #f3c4c4; padding: 10px 12px; border-radius: 9px; font-size: 14px; margin-bottom: 6px; }

/* ---------- Tabele / forme (pentru module) ---------- */
table.tabel { width: 100%; border-collapse: collapse; background: var(--card); }
.tabel th, .tabel td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tabel th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); }
.eticheta { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.et-activ { background: #e3f6ec; color: var(--ok); }
.et-dezabonat { background: #fdeaea; color: var(--danger); }
.et-bounced { background: #fff3da; color: var(--warn); }

/* ---------- Formulare & componente module ---------- */
.ascuns { display: none; }
.alerta-info { background: #e8f1ff; border: 1px solid #bcd6fb; color: #1b4a8a; padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.hint { color: var(--ink-soft); font-size: 13px; margin: 0 0 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bloc-adauga { display: flex; flex-direction: column; }
textarea, input[type=text], input[type=password], input[type=file], select {
  font-family: inherit; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--ink);
}
textarea { width: 100%; resize: vertical; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47,111,237,.13); }
.rand-form { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.rand-form label { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 14px; }
.rand-inline { display: flex; gap: 8px; align-items: center; }
.rand-inline input[type=text] { min-width: 220px; }
.btn-mic { padding: 5px 10px; font-size: 13px; }

.tab-stari { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab-stari a { padding: 9px 16px; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid transparent; }
.tab-stari a:hover { text-decoration: none; color: var(--ink); }
.tab-stari a.tab-activ { color: var(--brand-2); border-bottom-color: var(--brand-2); }
.bula { display: inline-block; background: #eef1f7; color: var(--ink-soft); border-radius: 20px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }

.bara-filtre { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.bara-filtre input[type=text] { min-width: 220px; }
.bara-bulk { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
.total-text { color: var(--ink-soft); font-size: 14px; }
.bulk-actiuni { display: flex; gap: 8px; align-items: center; }

.tabel { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.gol-tabel { text-align: center; color: var(--ink-soft); padding: 28px 14px; }
.paginare { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 18px; }
.pag-info { color: var(--ink-soft); font-size: 14px; }

/* ---------- Editor campanie ---------- */
.editor-wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 22px; align-items: start; }
.editor-stanga, .editor-dreapta { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.rand-campuri { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.camp { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-bottom: 12px; }
.camp input { font-weight: 400; color: var(--ink); }
.sub-hint { font-weight: 400; font-size: 12px; color: var(--ink-soft); }

.toolbar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 9px 9px 0 0; background: #f7f9fc; border-bottom: none; }
.toolbar select { padding: 5px 6px; font-size: 13px; }
.tb { display: inline-flex; align-items: center; gap: 3px; min-width: 32px; height: 30px; justify-content: center; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-size: 14px; }
.tb:hover { border-color: var(--brand-2); }
.tb-culoare { position: relative; overflow: hidden; font-weight: 700; }
.tb-culoare input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.editor-corp { min-height: 280px; border: 1px solid var(--line); border-radius: 0 0 9px 9px; padding: 16px; font-size: 15px; line-height: 1.6; color: #222; outline: none; background: #fff; }
.editor-corp:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(47,111,237,.10); }

.grupuri-tinta { margin-top: 18px; }
.chip-grup { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; margin: 0 6px 6px 0; font-size: 14px; cursor: pointer; }
.chip-grup:hover { border-color: var(--brand-2); }

.bara-actiuni { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.test-bloc { display: inline-flex; gap: 6px; align-items: center; }
.test-bloc input { min-width: 200px; }
.btn-succes { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-succes:hover { background: #168a44; }

.email-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f4f4f4; }
.prev-subiect { background: #fff; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); }
.prev-corp { background: #fff; padding: 16px; min-height: 220px; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.6; color: #222; }
.prev-corp a { color: #2f6fed; }
.prev-footer { padding: 12px 16px; font-size: 12px; color: #888; background: #fafafa; border-top: 1px solid #e2e2e2; }

.et-draft { background: #eef1f7; color: #5b6678; }
.et-trimitere { background: #fff3da; color: #b9821a; }

@media (max-width: 980px) { .editor-wrap { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } .rand-campuri { grid-template-columns: 1fr; } }

@media (max-width: 760px) {
  .sidebar { width: 64px; align-items: center; }
  .sidebar .brand-name, .nav .lbl, .mod-badge, .semper-fi { display: none; }
  .nav a { justify-content: center; }
  .logout { font-size: 18px; }
  .brand-logo { width: 34px; }
  .contapro-logo { width: 34px; }
}
