:root {
  --bg: #f5f7fb;
  --surface: rgba(255,255,255,0.92);
  --surface-strong: #ffffff;
  --text: #18212f;
  --muted: #6b7280;
  --line: #e8edf5;
  --primary: #2563eb;
  --primary-soft: #e8f0ff;
  --success: #15803d;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: radial-gradient(circle at top left, #ffffff 0%, #eef3ff 45%, #f7f9fc 100%); }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.stack { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.brand-pill, .status-pill, .chip, .badge { display: inline-flex; align-items: center; justify-content: center; }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); background: var(--surface); border: 1px solid rgba(255,255,255,0.8); backdrop-filter: blur(18px); border-radius: 28px; box-shadow: var(--shadow); padding: 32px; }
.login-card h1 { margin: 16px 0 8px; font-size: 32px; line-height: 1.1; }
.login-card input, .sidebar input, .search-input { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 13px 14px; outline: none; }
.login-card button, .sidebar button, .ghost-btn { background: linear-gradient(135deg, #1d4ed8, #2563eb); color: #fff; border-radius: 14px; padding: 13px 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22); }
.ghost-btn { background: #fff; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.ghost-btn.danger { color: var(--danger); }
.brand-pill { padding: 8px 12px; background: var(--primary-soft); color: var(--primary); border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.error-text { color: var(--danger); min-height: 20px; margin: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 20px; padding: 20px; }
.sidebar { background: var(--surface); border: 1px solid rgba(255,255,255,0.7); backdrop-filter: blur(18px); border-radius: 28px; box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.brand-block { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.brand-logo { width: 46px; height: 46px; border-radius: 16px; background: linear-gradient(135deg, #1d4ed8, #60a5fa); color: #fff; display: grid; place-items: center; font-weight: 800; }
.eyebrow { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.nav-list { display: flex; flex-direction: column; gap: 8px; }
.nav-btn { text-align: left; padding: 12px 14px; border-radius: 16px; background: transparent; color: var(--text); font-weight: 600; }
.nav-btn.active, .nav-btn:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.main { display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid rgba(255,255,255,0.7); border-radius: 28px; box-shadow: var(--shadow); padding: 22px 24px; }
.topbar h1 { margin: 6px 0 0; font-size: 32px; }
.status-pill { padding: 10px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 700; }
.hero-card, .card, .module-card, .dict-card, .flow-card { background: var(--surface); border: 1px solid rgba(255,255,255,0.7); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-card { padding: 28px; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.hero-card h2 { margin: 8px 0 10px; font-size: 34px; }
.hero-meta { display: grid; gap: 14px; min-width: 240px; }
.hero-meta div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.hero-meta span, .stat-card span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.stats-grid, .grid-2, .grid-3, .module-grid, .dictionary-grid, .flow-grid { display: grid; gap: 20px; }
.stats-grid { grid-template-columns: repeat(6, minmax(0,1fr)); margin-top: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.stat-card strong { font-size: 28px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.module-grid, .dictionary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.flow-grid { grid-template-columns: 1fr; }
.card, .module-card, .dict-card, .flow-card { padding: 22px; }
.card-head { margin-bottom: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.list { margin: 0; padding-left: 18px; line-height: 1.7; }
.list.clean { list-style: none; padding-left: 0; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; background: #fcfdff; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.badge { padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.badge-active, .badge-approved, .badge-paid, .badge-p1, .badge-present, .badge-official { background: #e9f8ef; color: var(--success); }
.badge-pending, .badge-probation, .badge-offer { background: #fff4df; color: var(--warning); }
.badge-draft, .badge-screening, .badge-interview { background: #eef3ff; color: var(--primary); }
.badge-rejected, .badge-exited, .badge-terminated { background: #feeceb; color: var(--danger); }
.mini-card, .state-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.subsection { margin-top: 14px; }
.flow-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.flow-step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-width: 170px; display: flex; gap: 12px; align-items: center; }
.flow-step span { width: 28px; height: 28px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.flow-arrow { color: var(--muted); font-weight: 700; }
.top-gap-20 { margin-top: 20px; }
.roadmap-cols { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid-3, .roadmap-cols { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .topbar, .hero-card { flex-direction: column; align-items: stretch; }
  .grid-2, .module-grid, .dictionary-grid, .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .login-card, .sidebar, .topbar, .card, .module-card, .dict-card, .flow-card, .hero-card { border-radius: 22px; }
  .app-shell { padding: 12px; gap: 12px; }
  .topbar h1, .hero-card h2, .login-card h1 { font-size: 26px; }
}
