/* =====================================================================
   Classic business-software theme (loaded after app.css when app.ui.classic=true).
   Same colours as the original design; solid system structure: flat bordered panels with
   header strips, grid tables, compact square controls, folder tabs, system font. Turn off with
   app.ui.classic=false to return to the original design.
   ===================================================================== */

:root {
  /* Same colours as the original design (brand #d4dde9 + navy); only the structure changes */
  --sys-accent: var(--navy-700);
  --sys-accent-dark: var(--navy-800);
  --sys-head: var(--brand-100);     /* panel and table header strips */
  --sys-menu: var(--brand);

  --border: #d3dbe6;
  --border-strong: #bccadb;

  --radius-sm: 3px;
  --radius: 4px;
  --radius-lg: 4px;
  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(18, 36, 59, .08);
  --shadow-lg: 0 6px 20px rgba(12, 26, 44, .18);

  --sidebar-w: 240px;
  --topbar-h: 54px;
  --font: "Segoe UI", Tahoma, system-ui, -apple-system, Roboto, Arial, sans-serif;
}

body { font-size: 13px; line-height: 1.45; font-feature-settings: normal; }
h1, h2, h3, h4 { letter-spacing: 0; }

/* Menu + top bar (original colours, squarer structure) ----------------------- */
.sidebar { background: var(--brand); border-right: 1px solid var(--brand-300); }
.brand { padding: 0 14px; gap: 10px; border-bottom: 1px solid var(--brand-300); }
.brand-mark { width: 32px; height: 32px; border-radius: 4px; box-shadow: none; }
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-size: 14px; }
.brand-sub { font-size: 11px; }

.nav { padding: 6px 0 16px; }
.nav-section {
  margin-top: 6px; padding: 6px 14px 5px; font-size: 10.5px; letter-spacing: .06em;
  color: var(--navy-600); background: var(--brand-150); border-top: 1px solid var(--brand-300); border-bottom: 1px solid var(--brand-300);
}
.nav-section:first-child { margin-top: 0; border-top: 0; }
.nav a {
  min-height: 32px; padding: 6px 14px; margin: 0; border-radius: 0; gap: 9px;
  font-size: 13px; font-weight: 500; border-left: 3px solid transparent;
}
.nav a .i { width: 16px; height: 16px; }
.nav a:hover { background: rgba(255, 255, 255, .45); }
.nav a.active { background: var(--surface); box-shadow: none; border-left-color: var(--navy-700); font-weight: 600; }
.nav a.active::before { display: none; }
.nav .count { height: 18px; min-width: 20px; border-radius: 9px; font-size: 10.5px; }
.sidebar-foot { padding: 9px 14px; }

.topbar { backdrop-filter: none; background: var(--surface); padding: 0 18px; box-shadow: 0 1px 0 var(--border); }
.crumbs .here { font-size: 14.5px; }
.icon-btn { width: 34px; height: 34px; border-radius: 4px; }
.user-btn { border-radius: 4px; padding: 3px 8px 3px 3px; }
.user-btn .avatar { border-radius: 3px; }
.fy-chip { border-radius: 4px; height: 30px; }
.dropdown { border-radius: 4px; padding: 4px; }
.dropdown a, .dropdown button { border-radius: 2px; padding: 7px 10px; font-size: 13px; }

.content { padding: 16px 18px 28px; }
.footer { padding: 10px 18px; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }

/* Page header ----------------------------------------------------------- */
.page-head {
  align-items: center; margin: 0 0 14px; padding: 10px 14px; gap: 10px 18px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--sys-accent); border-radius: var(--radius);
}
.page-head h1 { font-size: 18px; font-weight: 600; }
.page-head .sub { font-size: 12.5px; margin-top: 2px; }
.eyebrow { font-size: 11px; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; }

/* Buttons (original colours, compact and square) --------------------------- */
.btn { height: 32px; padding: 0 12px; border-radius: 4px; font-size: 13px; gap: 6px; }
.btn:active { transform: none; }
.btn-primary { box-shadow: none; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 4px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 12px; border-radius: 3px; }
.btn-icon { width: 30px; }
.btn-sm.btn-icon { width: 28px; }

/* Panels ------------------------------------------------------------------ */
.card { border-radius: var(--radius); box-shadow: none; border-color: var(--border); }
.card + .card { margin-top: 14px; }
.card-head { padding: 8px 14px; background: var(--sys-head); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; min-height: 40px; }
.card-head h2, .card-head h3 { font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.card-head .hint { font-size: 12px; margin-top: 0; }
.card-body { padding: 14px; }
.card-body.tight { padding: 8px 14px; }
.card-foot { padding: 10px 14px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-flush .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.grid { gap: 14px; }
.stack { gap: 14px; }

/* KPI tiles: plain boxes with a coloured left edge */
.kpis { gap: 12px; }
.kpi { border-radius: var(--radius); box-shadow: none; padding: 12px 14px; border-left: 4px solid var(--sys-accent); }
.kpi::after { display: none; }
.kpi:hover { border-color: var(--border-strong); border-left-color: var(--sys-accent-dark); background: #fbfcfd; }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi-icon { width: 30px; height: 30px; border-radius: 3px; }
.kpi-value { margin-top: 6px; font-size: 22px; font-weight: 600; color: var(--navy-900); }
.kpi-meta { margin-top: 4px; font-size: 12px; }

/* Badges, tags, alerts ------------------------------------------------------ */
.badge { height: 20px; padding: 0 7px; border-radius: 3px; font-size: 11.5px; font-weight: 600; border: 1px solid rgba(0, 0, 0, .06); }
.badge::before { display: none; }
.tag { border-radius: 3px; height: 20px; }
.code { border-radius: 2px; }
.alert-box { border-radius: var(--radius); padding: 9px 12px; font-size: 13px; gap: 10px; }
.toast { border-radius: var(--radius); }

/* Tables: grid lines, grey header, zebra rows */
.table-wrap { border-radius: 0; }
.table th {
  background: var(--sys-head); color: var(--navy-800); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none;
  padding: 7px 10px; border-bottom: 1px solid var(--border-strong); border-right: 1px solid var(--border);
}
.table td { padding: 7px 10px; border-bottom: 1px solid #e1e6ec; border-right: 1px solid #edf0f4; color: var(--text); }
.table th:last-child, .table td:last-child { border-right: 0; }
.table tbody tr:nth-child(even) td { background: #fafbfd; }
.table tbody tr:hover td { background: var(--brand-50); }
.table-compact td, .table-compact th { padding: 5px 9px; }
.table tfoot td { background: var(--sys-head); }

/* Forms ---------------------------------------------------------------------- */
.input, .select, .textarea { height: 32px; padding: 0 9px; border-radius: 3px; font-size: 13px; border-color: var(--border-strong); }
.textarea { padding: 6px 9px; height: auto; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--sys-accent); box-shadow: 0 0 0 2px rgba(61, 104, 163, .22); outline: 0; }
.input-sm, .select-sm { height: 28px; border-radius: 3px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--navy-800); }
.form-section-title .n { border-radius: 3px; }
.filters { padding: 8px 14px; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; gap: 8px; }
.filters .select, .filters .input { height: 30px; }
.search-box .input { height: 30px; }

/* Tabs: classic folder tabs */
.tabs { background: transparent; padding: 0; gap: 2px; border-radius: 0; border-bottom: 1px solid var(--border-strong); width: 100%; }
.tabs a, .tabs button {
  height: 32px; padding: 0 14px; border-radius: 3px 3px 0 0; border: 1px solid var(--border); border-bottom: 0;
  background: var(--sys-head); color: var(--navy-800); font-weight: 500; margin-bottom: -1px;
}
.tabs a:hover, .tabs button:hover { background: var(--brand-150); color: var(--navy-950); }
.tabs .active { background: var(--surface); color: var(--navy-950); font-weight: 600; box-shadow: none; border-color: var(--border-strong); border-top: 2px solid var(--sys-accent); }
.tabs .n { border-radius: 3px; }
.tabs-sm { border-radius: 3px; }

/* Lists, timeline, misc ------------------------------------------------------- */
.list > li { padding: 9px 14px; }
.timeline li { padding: 9px 14px; }
.timeline .ico, .tasks .ico, .empty .ico, .alert-item .ico { border-radius: 3px; }
.avatar { border-radius: 3px; }
.progress, .progress > span { border-radius: 2px; }
dialog.modal { border-radius: var(--radius); }
.modal-head { background: var(--sys-head); border-bottom: 1px solid var(--border); }
.chips a { border-radius: 3px; }
.msgid { border-radius: 3px; }
.chart-tip { border-radius: 3px; }
.dropzone, .doc, .letter, .stats, .node, .kra { border-radius: var(--radius); }

/* Login: simple centred sign-in box -------------------------------------------- */
.auth { grid-template-columns: minmax(0, 1fr); background: var(--canvas); }
.auth-art { display: none; }
.auth-form { padding: 24px 16px; }
.auth-card { max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 0 18px; overflow: hidden; }
.auth-card > :not(.auth-brand) { margin-left: 22px; margin-right: 22px; }
.auth-brand { display: flex !important; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 18px; background: var(--brand); color: var(--navy-950); border-bottom: 1px solid var(--brand-300); }
.auth-brand .brand-mark { width: 30px; height: 30px; }
.auth-brand b { display: block; font-size: 14px; }
.auth-brand small { display: block; font-size: 11px; color: var(--navy-600); }
.auth-card h2 { font-size: 18px; font-weight: 600; }
.auth-card .sub { margin-bottom: 16px; font-size: 12.5px; }
.auth-card .field + .field { margin-top: 12px; }
.auth-card .input { height: 34px; }
.auth-card .btn { height: 34px; margin-top: 16px; font-size: 13.5px; }
.auth-foot { margin-top: 14px; }

/* Candidate pages (offer response, verify, activate) ------------------------------ */
.public-card { border-radius: var(--radius); box-shadow: var(--shadow); }
.public-card .ph { padding: 14px 18px; }
.public-card .pb { padding: 16px 18px; }

@media (max-width: 760px) {
  .content { padding: 12px 10px 24px; }
  .page-head { padding: 10px 12px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
}
@media print {
  .page-head { border: 0; padding: 0; }
}
