/* ==========================================================================
   Platforma Academia Poligraf — stiluri
   Temă sobră: bleumarin + gri, accent albastru. Fără librării externe.
   ========================================================================== */

:root {
  --navy-950: #081226;
  --navy-900: #0c1a33;
  --navy-800: #122447;
  --navy-700: #1b3260;
  --navy-600: #284580;
  --accent: #2f6fed;
  --accent-600: #2459c9;
  --accent-700: #1d48a3;
  --accent-50: #eef3fe;
  --accent-100: #dce7fd;
  --gold: #c9a24b;

  --gray-0: #ffffff;
  --gray-25: #fafbfc;
  --gray-50: #f4f6f9;
  --gray-100: #eceff4;
  --gray-200: #dfe3ea;
  --gray-300: #c9cfd9;
  --gray-400: #9aa3b2;
  --gray-500: #6b7486;
  --gray-600: #525a6b;
  --gray-700: #394052;
  --gray-800: #252b38;
  --gray-900: #151a24;

  --success: #11805b;
  --success-50: #e8f6f0;
  --warning: #a86a0c;
  --warning-50: #fdf4e3;
  --danger: #c2352f;
  --danger-50: #fdecec;
  --info: #2459c9;
  --info-50: #eaf1fe;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(12, 26, 51, .06);
  --shadow-sm: 0 1px 3px rgba(12, 26, 51, .08), 0 1px 2px rgba(12, 26, 51, .04);
  --shadow: 0 6px 20px -6px rgba(12, 26, 51, .16), 0 2px 6px rgba(12, 26, 51, .05);
  --shadow-lg: 0 24px 48px -16px rgba(12, 26, 51, .28);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --sidebar-w: 264px;
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray-800);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-600); text-decoration: none; }
a:hover { color: var(--accent-700); text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { color: var(--gray-900); line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }
small, .text-sm { font-size: .86rem; }
.text-xs { font-size: .78rem; }
.muted { color: var(--gray-500); }
.mono { font-family: var(--mono); font-size: .88em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 3px solid rgba(47, 111, 237, .45); outline-offset: 2px; border-radius: 4px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 32px; height: 32px; }

/* ---------- Layout aplicație ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c6d0e3; display: flex; flex-direction: column;
  transition: transform .35s var(--ease);
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; height: var(--topbar-h); border-bottom: 1px solid rgba(255,255,255,.06); color: #fff; }
.sidebar-brand:hover { text-decoration: none; color: #fff; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: .95rem; letter-spacing: .02em; }
.brand-text span { font-size: .72rem; color: #8d9ab3; letter-spacing: .04em; text-transform: uppercase; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; }
.nav-group { margin-bottom: 18px; }
.nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f7d98; padding: 0 12px 6px; font-weight: 600; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: #c6d0e3; font-weight: 500; font-size: .93rem;
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link:active { transform: scale(.98); }
.nav-link.active { background: rgba(47,111,237,.18); color: #fff; }
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); animation: growY .35s var(--ease);
}
.nav-link .count { margin-left: auto; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.06); font-size: .75rem; color: #6f7d98; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.topbar-title { font-weight: 600; color: var(--gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: var(--gray-600); cursor: pointer; transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--gray-100); color: var(--gray-900); text-decoration: none; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid #fff; animation: pop .4s var(--ease-spring);
}
.menu-toggle { display: none; }
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--gray-700); font: inherit; }
.user-trigger:hover { background: var(--gray-100); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--navy-600), var(--accent)); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .03em;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-trigger .who { text-align: left; line-height: 1.2; }
.user-trigger .who strong { display: block; font-size: .88rem; }
.user-trigger .who span { font-size: .74rem; color: var(--gray-500); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; border: 1px solid var(--gray-200);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
  transition: opacity .18s, transform .22s var(--ease);
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px; color: var(--gray-700); font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--gray-50); color: var(--gray-900); text-decoration: none; }
.dropdown .sep { height: 1px; background: var(--gray-100); margin: 6px 0; }

.content { padding: 28px; width: 100%; max-width: 1320px; margin: 0 auto; animation: fadeIn .4s var(--ease); }
.backdrop { position: fixed; inset: 0; background: rgba(8, 18, 38, .45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ---------- Antet pagină ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-header h1 { margin: 0; }
.page-header .subtitle { color: var(--gray-500); margin: 4px 0 0; }
.page-header .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 6px; align-items: center; font-size: .84rem; color: var(--gray-500); margin-bottom: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--accent-600); }

/* ---------- Butoane ---------- */
.btn {
  --bg: var(--gray-0); --fg: var(--gray-800); --bd: var(--gray-300);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; min-height: 40px;
  font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2; color: var(--fg); background: var(--bg);
  border: 1px solid var(--bd); border-radius: 9px; cursor: pointer; white-space: nowrap; user-select: none;
  box-shadow: var(--shadow-xs); transition: background .18s, border-color .18s, box-shadow .18s, transform .12s var(--ease), color .18s;
}
.btn:hover { text-decoration: none; color: var(--fg); background: var(--gray-50); border-color: var(--gray-400); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-primary { --bg: var(--accent); --fg: #fff; --bd: var(--accent); box-shadow: 0 1px 2px rgba(36,89,201,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:hover { background: var(--accent-600); border-color: var(--accent-600); color: #fff; box-shadow: 0 6px 16px -6px rgba(47,111,237,.6); }
.btn-dark { --bg: var(--navy-800); --fg: #fff; --bd: var(--navy-800); }
.btn-dark:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-success { --bg: var(--success); --fg: #fff; --bd: var(--success); }
.btn-success:hover { background: #0d6a4b; border-color: #0d6a4b; color: #fff; }
.btn-danger { --bg: #fff; --fg: var(--danger); --bd: #efc3c1; }
.btn-danger:hover { background: var(--danger-50); border-color: var(--danger); color: var(--danger); }
.btn-ghost { --bg: transparent; --bd: transparent; box-shadow: none; --fg: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); border-color: transparent; }
.btn-sm { padding: 6px 11px; min-height: 32px; font-size: .82rem; border-radius: 7px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(255,255,255,.9) rgba(255,255,255,.9) transparent transparent; animation: spin .7s linear infinite; }
.btn:not(.btn-primary):not(.btn-dark):not(.btn-success).loading::after { border-color: var(--accent) var(--accent) transparent transparent; }
.inline-form { display: inline; margin: 0; }

/* ---------- Carduri ---------- */
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card + .card { margin-top: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--gray-100); flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; }
.card-body { padding: 22px; }
.card-body.flush { padding: 0; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--gray-100); background: var(--gray-25); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card-hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gray-300); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 20px; }

/* Statistici */
.stat {
  position: relative; overflow: hidden; padding: 20px 22px; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 6px; color: inherit;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
a.stat:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.stat .stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); margin-bottom: 6px; }
.stat .stat-value { font-size: 1.9rem; font-weight: 750; color: var(--gray-900); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .stat-label { color: var(--gray-500); font-size: .86rem; font-weight: 500; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, var(--accent-50), transparent 70%); }
.stat.tone-warning .stat-icon { background: var(--warning-50); color: var(--warning); }
.stat.tone-success .stat-icon { background: var(--success-50); color: var(--success); }
.stat.tone-navy .stat-icon { background: #e7ebf3; color: var(--navy-700); }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-muted { background: var(--gray-100); color: var(--gray-600); }
.badge-navy { background: #e4e9f3; color: var(--navy-700); }
.badges { display: flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Tabele ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); font-weight: 650; padding: 12px 16px; background: var(--gray-25); border-bottom: 1px solid var(--gray-200); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #f8faff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 4px; }
.table .cell-text { min-width: 120px; }
.table .cell-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 650; background: var(--gray-25); border-top: 1px solid var(--gray-200); border-bottom: 0; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cell-user .avatar { width: 34px; height: 34px; font-size: .75rem; }
.cell-user strong, .cell-user > div > a { display: block; color: var(--gray-900); font-weight: 600; }
.cell-user span { font-size: .82rem; color: var(--gray-500); }
.row-link { color: var(--gray-900); font-weight: 600; }

/* ---------- Formulare ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .86rem; color: var(--gray-700); }
.field .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; font: inherit; font-size: .94rem; color: var(--gray-900); background: #fff;
  border: 1px solid var(--gray-300); border-radius: 9px; padding: 10px 12px; min-height: 42px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7486' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--gray-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,111,237,.14); }
.input::placeholder, .textarea::placeholder { color: var(--gray-400); }
.has-error .input, .has-error .select, .has-error .textarea, .has-error .file-drop { border-color: var(--danger); background: #fffafa; }
.has-error .input:focus { box-shadow: 0 0 0 4px rgba(194,53,47,.12); }
.field-error { color: var(--danger); font-size: .82rem; margin: 0; font-weight: 500; animation: shakeIn .4s var(--ease); }
.help { color: var(--gray-500); font-size: .8rem; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; color: var(--gray-700); line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--gray-400); border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease-spring); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.check input:focus-visible { box-shadow: 0 0 0 4px rgba(47,111,237,.2); outline: none; }
.check-group { display: flex; flex-direction: column; gap: 10px; }
.check-row { display: flex; gap: 18px; flex-wrap: wrap; }
.role-option { flex: 1 1 160px; border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px 14px; transition: border-color .2s, background .2s; }
.role-option:has(input:checked) { border-color: var(--accent); background: var(--accent-50); }
.role-option small { display: block; color: var(--gray-500); margin-top: 2px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .92rem; color: var(--gray-700); }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--gray-300); position: relative; cursor: pointer; flex: none; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease-spring); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }

.file-drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px dashed var(--gray-300); border-radius: 10px;
  background: var(--gray-25); cursor: pointer; transition: border-color .2s, background .2s;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--accent); background: var(--accent-50); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop .file-icon { width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--gray-200); display: grid; place-items: center; color: var(--accent); flex: none; }
.file-drop .file-text strong { display: block; font-size: .9rem; color: var(--gray-800); }
.file-drop .file-text span { font-size: .8rem; color: var(--gray-500); }
.file-drop.has-file { border-style: solid; border-color: var(--success); background: var(--success-50); }
.file-drop.has-file .file-icon { color: var(--success); }

.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-group .toggle-pw { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; }
.strength { height: 4px; border-radius: 4px; background: var(--gray-200); overflow: hidden; margin-top: 2px; }
.strength span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .35s var(--ease), background .35s; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px 22px; border-bottom: 1px solid var(--gray-100); }
.filters .field { flex: 1 1 170px; }
.filters .field.grow { flex: 2 1 240px; }
.filters .input, .filters .select { min-height: 38px; padding-top: 8px; padding-bottom: 8px; font-size: .9rem; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.search-input .input { padding-left: 38px; }

/* ---------- Taburi ---------- */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); overflow-x: auto; scrollbar-width: none; padding: 0 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 14px 14px; border: 0; background: none; font: inherit; font-size: .9rem; font-weight: 600; color: var(--gray-500); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; transition: color .2s; }
.tab:hover { color: var(--gray-800); text-decoration: none; }
.tab.active { color: var(--accent-600); }
.tab .count { background: var(--gray-100); color: var(--gray-600); font-size: .72rem; padding: 1px 7px; border-radius: 999px; }
.tab.active .count { background: var(--accent-100); color: var(--accent-700); }
.tab-indicator { position: absolute; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; transition: left .35s var(--ease), width .35s var(--ease); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .35s var(--ease); }
a.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ---------- Stări goale, alerte ---------- */
.empty { text-align: center; padding: 48px 24px; color: var(--gray-500); }
.empty .empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--gray-100); color: var(--gray-400); }
.empty h3 { color: var(--gray-700); margin-bottom: 4px; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; font-size: .9rem; border: 1px solid; align-items: flex-start; }
.alert .icon { margin-top: 2px; }
.alert-info { background: var(--info-50); border-color: #cbdcfb; color: #1b4597; }
.alert-warning { background: var(--warning-50); border-color: #f0dbb3; color: #7c4f08; }
.alert-danger { background: var(--danger-50); border-color: #f3c8c6; color: #962520; }
.alert-success { background: var(--success-50); border-color: #bfe5d5; color: #0b5f43; }

/* ---------- Liste descriptive ---------- */
.dl { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; margin: 0; }
.dl dt { color: var(--gray-500); font-size: .86rem; padding: 11px 0; border-bottom: 1px solid var(--gray-100); }
.dl dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--gray-100); color: var(--gray-900); font-weight: 500; word-break: break-word; }
.dl > :nth-last-child(-n+2) { border-bottom: 0; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-bottom: 1px solid var(--gray-100); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--gray-900); display: block; }
.list .meta { font-size: .82rem; color: var(--gray-500); }

/* Activitate */
.timeline { list-style: none; margin: 0; padding: 6px 22px 16px; }
.timeline li { position: relative; padding: 10px 0 10px 26px; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: -10px; width: 2px; background: var(--gray-100); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline li.error::after { border-color: var(--danger); }
.timeline .when { font-size: .76rem; color: var(--gray-400); display: block; }

/* Notificări */
.notif { display: flex; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--gray-100); color: inherit; transition: background .15s; }
.notif:hover { background: var(--gray-25); text-decoration: none; color: inherit; }
.notif .notif-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gray-100); color: var(--gray-500); display: grid; place-items: center; flex: none; }
.notif.unread .notif-icon { background: var(--accent-50); color: var(--accent); }
.notif.unread .notif-title { font-weight: 700; }
.notif .notif-title { color: var(--gray-900); display: block; }
.notif .notif-body { font-size: .86rem; color: var(--gray-600); }
.notif .notif-time { font-size: .76rem; color: var(--gray-400); }
.notif.unread { position: relative; }
.notif.unread::after { content: ""; position: absolute; right: 22px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Dashboard cursant ---------- */
.hero-student {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 28px; color: #fff;
  background: radial-gradient(1200px 400px at 110% -20%, rgba(47,111,237,.55), transparent 60%), linear-gradient(135deg, var(--navy-800), var(--navy-950));
  box-shadow: var(--shadow);
}
.hero-student h1 { color: #fff; margin-bottom: 4px; }
.hero-student p { color: #b9c5dc; margin: 0; }
.hero-student .trace { position: absolute; right: 0; bottom: 0; width: 60%; max-width: 520px; opacity: .35; pointer-events: none; }
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; font-size: .88rem; color: #d2dbec; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }

.progress-track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.session-step { position: relative; padding: 18px; border: 1px solid var(--gray-200); border-radius: 14px; background: #fff; transition: transform .25s var(--ease), box-shadow .25s; }
.session-step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.session-step .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; background: var(--gray-100); color: var(--gray-500); margin-bottom: 12px; }
.session-step.done .num { background: var(--success); color: #fff; }
.session-step.current .num { background: var(--accent); color: #fff; box-shadow: 0 0 0 0 rgba(47,111,237,.5); animation: pulse 2.2s infinite; }
.session-step h4 { margin: 0 0 8px; font-size: .95rem; }
.session-step .probe { display: flex; justify-content: space-between; font-size: .84rem; color: var(--gray-600); padding: 4px 0; }
.session-step .probe b { color: var(--gray-400); font-weight: 600; }
.progress-bar { height: 8px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #5b8ff5); transition: width 1.2s var(--ease); }

.next-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.next-card .next-date { flex: none; width: 62px; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--gray-200); }
.next-card .next-date b { display: block; background: var(--accent); color: #fff; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 3px 0; }
.next-card .next-date span { display: block; font-size: 1.5rem; font-weight: 750; color: var(--gray-900); padding: 4px 0; }
.next-card .next-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); }

.module-tile { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 14px; border: 1px solid var(--gray-200); background: #fff; color: inherit; }
.module-tile .tile-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--gray-100); color: var(--navy-700); flex: none; }
.module-tile strong { display: block; color: var(--gray-900); }
.module-tile span { font-size: .82rem; color: var(--gray-500); }
.module-tile.soon { opacity: .75; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; top: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; padding: 14px 40px 14px 16px;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--gray-200); font-size: .9rem; color: var(--gray-800);
  animation: toastIn .45s var(--ease-spring) both;
}
.toast.hide { animation: toastOut .35s var(--ease) forwards; }
.toast .toast-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.toast-success .toast-icon { background: var(--success-50); color: var(--success); }
.toast-error .toast-icon { background: var(--danger-50); color: var(--danger); }
.toast-info .toast-icon, .toast-warning .toast-icon { background: var(--info-50); color: var(--info); }
.toast .toast-close { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; }
.toast .toast-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; background: currentColor; opacity: .25; animation: timer 6s linear forwards; }
.toast-success .toast-timer { color: var(--success); }
.toast-error .toast-timer { color: var(--danger); }
.toast-info .toast-timer, .toast-warning .toast-timer { color: var(--info); }
.toast:hover .toast-timer { animation-play-state: paused; }

/* ---------- Dialog confirmare ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 16px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); color: inherit; }
dialog.modal[open] { animation: modalIn .3s var(--ease-spring); }
dialog.modal::backdrop { background: rgba(8,18,38,.5); backdrop-filter: blur(3px); animation: fadeIn .25s; }
.modal-body { padding: 24px; display: flex; gap: 16px; }
.modal-body .modal-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--danger-50); color: var(--danger); }
.modal-body .modal-icon.positive { background: var(--accent-50); color: var(--accent); }
.modal-body h3 { margin: 2px 0 6px; }
.modal-body p { margin: 0; color: var(--gray-600); font-size: .92rem; }
.modal-actions { padding: 14px 24px; background: var(--gray-25); display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--gray-100); }

/* ---------- Paginare ---------- */
.pagination { display: flex; gap: 4px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--gray-100); flex-wrap: wrap; }
.pagination a, .pagination span.current { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; font-size: .88rem; font-weight: 600; color: var(--gray-600); }
.pagination a:hover { background: var(--gray-100); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff !important; }
.pagination-total { margin-left: auto; color: var(--gray-500); font-size: .84rem; }

/* ---------- Audit ---------- */
.audit-row summary { list-style: none; cursor: pointer; }
.audit-row summary::-webkit-details-marker { display: none; }
.audit-diff { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: 8px; }
.audit-diff th, .audit-diff td { text-align: left; padding: 6px 10px; border: 1px solid var(--gray-200); vertical-align: top; word-break: break-word; }
.audit-diff th { background: var(--gray-50); font-weight: 600; color: var(--gray-600); width: 22%; }
.audit-diff .old { background: #fff5f5; color: #8a2a25; }
.audit-diff .new { background: #f2fbf7; color: #0b5f43; }
.audit-details { padding: 6px 16px 16px 16px; background: var(--gray-25); }
.audit-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .78rem; color: var(--gray-500); }

/* ---------- Pagini publice / autentificare ---------- */
.guest { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #fff; }
.guest-aside {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: radial-gradient(900px 500px at 0% 100%, rgba(47,111,237,.35), transparent 60%), linear-gradient(160deg, var(--navy-800), var(--navy-950) 70%);
}
.guest-aside .brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.guest-aside .brand:hover { text-decoration: none; }
.guest-aside .brand strong { display: block; font-size: 1.05rem; }
.guest-aside .brand > span > span { font-size: .78rem; color: #93a1bd; letter-spacing: .06em; text-transform: uppercase; }
.guest-aside h2 { color: #fff; font-size: 2rem; max-width: 460px; line-height: 1.2; margin-bottom: 12px; }
.guest-aside p { color: #aebbd4; max-width: 440px; }
.guest-aside .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, #000 70%, transparent); }
.trace-wrap { position: relative; margin: 32px -48px; height: 180px; }
.trace-wrap svg { width: 100%; height: 100%; }
.trace path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.trace .t1 { stroke: #5b8ff5; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 4.5s var(--ease) .2s forwards, glow 3s ease-in-out 4.7s infinite; }
.trace .t2 { stroke: rgba(201,162,75,.8); stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 5s var(--ease) .6s forwards; }
.trace .t3 { stroke: rgba(255,255,255,.35); stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 5.5s var(--ease) 1s forwards; }
.trace .scan { fill: url(#scanGrad); animation: scan 6s linear infinite; }
.guest-foot { font-size: .8rem; color: #7d8aa6; position: relative; }
.guest-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 420px; animation: fadeUp .6s var(--ease) both; }
.auth-card h1 { font-size: 1.7rem; }
.auth-card .lead { color: var(--gray-500); margin-bottom: 28px; }
.auth-card form > * + * { margin-top: 18px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; gap: 12px; flex-wrap: wrap; }

.public-header { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray-200); }
.public-header .inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 16px; }
.public-header .brand { display: flex; align-items: center; gap: 12px; color: var(--gray-900); }
.public-header .brand:hover { text-decoration: none; }
.public-header .brand strong { display: block; font-size: .95rem; line-height: 1.2; }
.public-header .brand > span > span { display: block; font-size: .72rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .06em; }
.public-header nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.en-fields-head { border-top: 1px solid var(--gray-100); padding-top: 16px; margin-top: 4px; }
.en-fields-head .help { margin: 4px 0 0; }
.lang-switch { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--gray-100); margin: 0; }
.lang-switch button { border: 0; background: transparent; font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .04em; line-height: 1; padding: 7px 10px; border-radius: 999px; color: var(--gray-500); cursor: pointer; transition: background .15s, color .15s; }
.lang-switch button:hover { color: var(--gray-900); }
.lang-switch button[aria-pressed="true"] { background: var(--gray-0); color: var(--gray-900); box-shadow: var(--shadow-xs); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.guest-main { position: relative; }
.guest-main > .lang-switch { position: absolute; top: 20px; right: 24px; }
.public-main { max-width: 1160px; margin: 0 auto; padding: 40px 24px 64px; }
.public-main.narrow { max-width: 820px; }
.public-hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 64px 48px; color: #fff; margin-bottom: 40px;
  background: radial-gradient(800px 400px at 100% 0%, rgba(47,111,237,.5), transparent 60%), linear-gradient(140deg, var(--navy-800), var(--navy-950));
}
.public-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 640px; }
.public-hero p { color: #b9c5dc; max-width: 560px; font-size: 1.05rem; }
.public-hero .trace { position: absolute; right: -40px; bottom: 10px; width: 58%; opacity: .5; }
.public-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: 16px; }
.public-footer { border-top: 1px solid var(--gray-200); padding: 24px; text-align: center; color: var(--gray-500); font-size: .84rem; background: #fff; }
.series-card { display: flex; flex-direction: column; padding: 22px; }
.series-card .code { font-family: var(--mono); font-size: .8rem; color: var(--accent-600); font-weight: 600; }
.series-card h3 { margin: 6px 0 10px; font-size: 1.1rem; }
.series-card .meta { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--gray-600); margin-bottom: 18px; }
.series-card .meta span { display: inline-flex; gap: 8px; align-items: center; }
.series-card .btn { margin-top: auto; }
.form-section { padding: 24px 28px; border-bottom: 1px solid var(--gray-100); }
.form-section:last-of-type { border-bottom: 0; }
.form-section h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.form-section h3 .step { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-50); color: var(--accent); font-size: .8rem; display: grid; place-items: center; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.success-mark { width: 88px; height: 88px; margin: 0 auto 20px; }
.success-mark circle { fill: none; stroke: var(--success); stroke-width: 3; stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw .8s var(--ease) forwards; }
.success-mark path { fill: none; stroke: var(--success); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .5s var(--ease) .7s forwards; }

.error-page { text-align: center; padding: 72px 24px; max-width: 520px; margin: 0 auto; }
.error-page .code { font-size: 5rem; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, var(--navy-700), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 12px; }
.debug { text-align: left; white-space: pre-wrap; background: var(--gray-900); color: #e3e8f1; padding: 16px; border-radius: 10px; font-size: .78rem; overflow-x: auto; }

/* Câmpuri formular (admin) */
.field-row { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--gray-100); transition: background .15s; }
.field-row:hover { background: var(--gray-25); }
.field-row.inactive { opacity: .55; }
.field-row .order { display: flex; flex-direction: column; gap: 2px; }
.field-row .order button { width: 26px; height: 22px; border-radius: 6px; }
.field-row .grow { flex: 1; min-width: 0; }
.field-row .grow strong { display: block; color: var(--gray-900); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Catalog ---------- */
.center { text-align: center !important; }
.grade-table th.sub { padding-top: 6px; padding-bottom: 8px; font-size: .7rem; }
/* Prima coloană (cursantul) rămâne vizibilă la derularea orizontală pe telefon. */
.grade-table thead tr:first-child th:first-child, .grade-table tbody td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--gray-100); }
.grade-table thead tr:first-child th:first-child { background: var(--gray-25); }
.grade-table tbody tr:hover td:first-child { background: #f8faff; }
.grade-table td { padding-top: 10px; padding-bottom: 10px; }
.grade-cell { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; border: 1px solid transparent; transition: transform .2s var(--ease); }
.grade-cell sup { font-size: .6rem; margin-left: 2px; color: var(--gray-500); }
.grade-cell.empty { color: var(--gray-300); }
.grade-cell.publicata { background: var(--success-50); color: var(--success); }
.grade-cell.validata { background: #e7ebf3; color: var(--navy-700); border-style: dashed; border-color: #b9c3d8; }
.grade-cell.ciorna { background: var(--gray-50); color: var(--gray-500); border-style: dashed; border-color: var(--gray-300); }
.grade-cell.failed { background: var(--danger-50); color: var(--danger); }
tr:hover .grade-cell:not(.empty) { transform: scale(1.06); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 22px; font-size: .8rem; color: var(--gray-500); border-bottom: 1px solid var(--gray-100); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.cell-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cell-dot.publicata { background: var(--success-50); border: 1px solid var(--success); }
.cell-dot.validata { background: #e7ebf3; border: 1px dashed var(--navy-700); }
.cell-dot.ciorna { background: var(--gray-50); border: 1px dashed var(--gray-400); }
.cell-dot.failed { background: var(--danger-50); border: 1px solid var(--danger); }
.probe-block { padding: 16px 22px; border-bottom: 1px solid var(--gray-100); scroll-margin-top: 90px; }
.probe-block:last-child { border-bottom: 0; }
.probe-block:target { animation: flash 1.6s var(--ease); }
.probe-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grade-big { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--gray-900); }
.grade-big small { font-size: .9rem; color: var(--gray-500); font-weight: 600; }
.grade-big.passed { color: var(--success); }
.grade-big.failed { color: var(--danger); }
.attempt { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: 12px; background: var(--gray-25); }
.attempt-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.attempt-label { font-weight: 600; font-size: .86rem; min-width: 110px; }
.attempt-del { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.grade-details { margin-top: 10px; }
.grade-details > summary { list-style: none; display: inline-flex; }
.grade-details > summary::-webkit-details-marker { display: none; }
.grade-details[open] > summary { margin-bottom: 10px; }
.grade-details[open] .grade-form { animation: fadeUp .3s var(--ease); }
.grade-form { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 16px; }
.grade-input { font-size: 1.2rem; font-weight: 700; max-width: 140px; }
.grade-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.note-box { background: var(--info-50); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; color: #1b4597; }
.session-form { border: 1px solid var(--gray-200); border-radius: 14px; padding: 18px; background: var(--gray-25); }
.session-form h3 { display: flex; align-items: center; gap: 10px; }
.session-form .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: .82rem; }
.session-step .probe b.ok { color: var(--success); }
.session-step .probe b.ko { color: var(--danger); }
.session-step.done .num .icon { width: 16px; height: 16px; stroke-width: 3; }
a.module-tile:hover { text-decoration: none; color: inherit; border-color: var(--accent-100); }
a.module-tile:hover .tile-icon { background: var(--accent-50); color: var(--accent); }
.module-tile .tile-icon { transition: background .2s, color .2s; }

/* ---------- Exerciții, fișiere ---------- */
.student-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; max-height: 280px; overflow: auto; padding: 12px; border: 1px solid var(--gray-200); border-radius: 10px; margin-top: 8px; background: var(--gray-25); }
.student-pick[hidden], [data-show-when][hidden], [data-show-when-not][hidden],
[data-push-card] [hidden], [data-install-card] [hidden] { display: none !important; }
.file-chip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--gray-200); border-radius: 10px; margin-bottom: 8px; font-size: .9rem; background: #fff; }
.file-chip a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--gray-100); font-size: .85rem; color: var(--gray-700); }
.chip button { border: 0; background: transparent; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--gray-500); }
.chip button:hover { background: var(--gray-200); color: var(--danger); }
.chip .icon { width: 14px; height: 14px; }
.prose h3 { margin-top: 18px; font-size: .95rem; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Bibliotecă ---------- */
.lib-card { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--gray-200); border-radius: 14px; background: #fff; color: inherit; min-width: 0; }
.lib-card:hover { text-decoration: none; color: inherit; }
.lib-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-50); color: var(--accent); }
.lib-icon.kind-video { background: var(--danger-50); color: var(--danger); }
.lib-icon.kind-link { background: var(--success-50); color: var(--success); }
.lib-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-body strong { color: var(--gray-900); line-height: 1.3; }
.lib-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-600); font-weight: 650; }
.lib-desc { font-size: .84rem; color: var(--gray-600); }
.lib-meta { font-size: .76rem; color: var(--gray-500); margin-top: 4px; }
.lib-meta .icon { width: 13px; height: 13px; }
.video-wrap { overflow: hidden; aspect-ratio: 16 / 9; background: var(--navy-950); }
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Calendar ---------- */
.cal-head { gap: 6px; justify-content: flex-start; }
.cal-title { min-width: 180px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 8px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); font-weight: 650; text-align: center; border-bottom: 1px solid var(--gray-100); }
.cal-day { min-height: 104px; padding: 6px; border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .2s; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--gray-25); }
.cal-day.other { background: var(--gray-25); }
.cal-day.other .cal-num { color: var(--gray-300); }
.cal-num { font-size: .8rem; font-weight: 650; color: var(--gray-600); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .cal-num { background: var(--accent); color: #fff; animation: pop .4s var(--ease-spring); }
.cal-ev { display: block; font-size: .72rem; line-height: 1.3; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gray-800); background: var(--gray-100); border-left: 3px solid var(--gray-400); transition: transform .15s var(--ease), box-shadow .15s; }
.cal-ev:hover { text-decoration: none; transform: translateX(2px); box-shadow: var(--shadow-sm); color: var(--gray-900); }
.cal-ev .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-ev.tone-info { background: var(--info-50); border-color: var(--info); }
.cal-ev.tone-navy { background: #e7ebf3; border-color: var(--navy-700); }
.cal-ev.tone-warning { background: var(--warning-50); border-color: var(--warning); }
.cal-ev.tone-danger { background: var(--danger-50); border-color: var(--danger); }
.cal-more { font-size: .7rem; color: var(--gray-500); padding-left: 6px; }
@media (max-width: 640px) {
  .cal-day { min-height: 64px; padding: 4px 2px; }
  .cal-ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; }
  .cal-ev .t { display: none; }
  .cal-title { min-width: 0; font-size: 1rem; }
  .attempt-del { margin-left: 0; }
}
@keyframes flash { 0% { background: var(--accent-50); } 100% { background: transparent; } }

/* ---------- Animații reveal ---------- */
.reveal > * { animation: fadeUp .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shakeIn { 0% { opacity: 0; transform: translateX(-4px); } 40% { transform: translateX(3px); } 70% { transform: translateX(-2px); } 100% { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.96); height: 0; padding-top: 0; padding-bottom: 0; margin-top: -10px; } }
@keyframes timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes scan { from { transform: translateX(-20%); } to { transform: translateX(120%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,111,237,.45); } 70% { box-shadow: 0 0 0 12px rgba(47,111,237,0); } 100% { box-shadow: 0 0 0 0 rgba(47,111,237,0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .trace path { stroke-dashoffset: 0 !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.drawer-open .sidebar { transform: none; }
  body.drawer-open .backdrop { opacity: 1; pointer-events: auto; }
  body.drawer-open { overflow: hidden; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .content { padding: 20px 16px; }
  .guest { grid-template-columns: 1fr; }
  .guest-aside { padding: 28px 24px; min-height: auto; }
  .guest-aside h2, .guest-aside p, .guest-foot { display: none; }
  .trace-wrap { height: 90px; margin: 16px -24px 0; }
  .progress-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat .stat-value { font-size: 1.5rem; }
  .user-trigger .who { display: none; }
  .card-header, .card-body, .filters { padding-left: 16px; padding-right: 16px; }
  .list li, .notif, .field-row { padding-left: 16px; padding-right: 16px; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .dl dd { padding-top: 2px; }
  .public-hero { padding: 36px 24px; border-radius: 16px; }
  .public-header .brand > span > span { display: none; }
  .public-main { padding: 24px 16px 48px; }
  .form-section { padding: 20px 16px; }
  .page-header .actions { width: 100%; }
  .table th, .table td { padding: 11px 12px; }
  .hero-student { padding: 22px; }
  .next-card { padding: 16px; }
  .toasts { right: 16px; left: 16px; width: auto; top: 12px; }
}

/* ——— Contracte (Etapa 4): textul afișat cursantului, zona de semnătură, editorul de șabloane ——— */
.contract-doc { max-height: 560px; overflow: auto; padding: 28px 32px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--gray-25); font-size: .92rem; line-height: 1.65; color: var(--gray-800); }
.contract-doc:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(47,111,237,.14); }
.contract-doc h1 { font-size: 1.2rem; letter-spacing: .02em; }
.contract-doc h2 { font-size: 1rem; margin-top: 1.4em; }
.contract-doc h3, .contract-doc h4 { font-size: .95rem; margin-top: 1.2em; }
.contract-doc p { margin: 0 0 .7em; }
.contract-doc ul, .contract-doc ol { margin: 0 0 .7em; padding-left: 1.4em; }
.contract-doc table { width: 100%; border-collapse: collapse; margin: 0 0 .7em; }
.contract-doc th, .contract-doc td { border: 1px solid var(--gray-200); padding: 6px 8px; text-align: left; vertical-align: top; }
.contract-doc .centru { text-align: center; }
.contract-doc .dreapta { text-align: right; }
.contract-doc .justificat { text-align: justify; }
.contract-doc .mic { font-size: .8rem; color: var(--gray-500); }
.contract-doc .pagina-noua { border-top: 1px dashed var(--gray-300); margin: 18px 0; }
.contract-sig-slot { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding: 14px 16px; border: 1px dashed var(--gray-300); border-radius: var(--radius); color: var(--gray-500); font-size: .85rem; background: #fff; }
.sig-pad { position: relative; height: 200px; border: 1.5px dashed var(--gray-300); border-radius: var(--radius); background: #fff; touch-action: none; transition: border-color .15s; }
.sig-pad::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 48px; border-bottom: 1px solid var(--gray-200); pointer-events: none; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; cursor: crosshair; touch-action: none; }
.sig-pad .sig-hint { position: absolute; left: 24px; bottom: 56px; color: var(--gray-400); font-size: .85rem; pointer-events: none; transition: opacity .2s var(--ease); }
.sig-pad.has-ink { border-style: solid; border-color: var(--gray-400); }
.sig-pad.has-ink .sig-hint { opacity: 0; }
.has-error .sig-pad { border-color: var(--danger); }
.sig-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--gray-200); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--gray-25); }
.editor-toolbar + .textarea { border-top-left-radius: 0; border-top-right-radius: 0; font-size: .82rem; line-height: 1.55; }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip.placeholder-chip { padding: 4px 10px; border: 0; cursor: pointer; font-size: .78rem; transition: background .15s, color .15s; }
.chip.placeholder-chip:hover { background: var(--accent-50); color: var(--accent-700); }
.chip.placeholder-chip:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(47,111,237,.2); }
@media (max-width: 640px) {
  .contract-doc { padding: 18px 16px; max-height: 440px; }
  .sig-pad { height: 180px; }
}
