/* ==========================================================================
   CMAT Platform — stylesheet
   Ported from the CMAT design prototype. Retheme via the design tokens in
   :root below.
   ========================================================================== */

/* ===== CMAT Design Tokens ===== */
:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;
  --accent: #0ea5e9;
  --accent-50: #f0f9ff;

  --bg: #f0f9ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-fg: #15803d;

  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-fg: #b45309;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-fg: #b91c1c;

  --sidebar: #1e3a5f;
  --sidebar-2: #18304d;
  --sidebar-hover: #264a76;
  --sidebar-active: #2563eb;
  --sidebar-text: #cbd5e1;
  --sidebar-text-muted: #7e93b3;

  --azure: #0078d4;
  --aws: #ff9900;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);

  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: #bfdbfe; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ===== Login / register screen ===== */
.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, #dbeafe 0%, transparent 50%),
    radial-gradient(900px 500px at -10% 110%, #e0f2fe 0%, transparent 50%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  animation: rise 300ms ease-out;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.login-brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
}
.login-brand .logo-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.login-brand .wordmark {
  font-weight: 800; font-size: 20px; letter-spacing: -0.01em;
}
.login-brand .brand-tag {
  font-size: 11px; color: var(--text-3); margin-top: 1px;
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.login-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.login-sub {
  color: var(--text-2); margin: 0 0 28px; font-size: 14px;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px; letter-spacing: 0.01em;
}
.input {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit; color: var(--text);
  background: var(--surface);
  transition: border-color 120ms, box-shadow 120ms;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.input.with-icon { padding-left: 38px; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); display: grid; place-items: center;
}
.input-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--text-3);
  padding: 6px 8px; cursor: pointer; border-radius: 6px;
}
.field-help { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 11px 16px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600;
  border: 1px solid transparent;
  transition: background 120ms, border-color 120ms, color 120ms, transform 80ms;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: var(--primary-600); color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}
.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 14.5px; }

.login-divider { height: 1px; background: var(--border); margin: 24px 0; }
.login-foot {
  margin-top: 24px; text-align: center;
  font-size: 13.5px; color: var(--text-2);
}
.login-meta {
  display: flex; justify-content: center; gap: 16px;
  margin-top: 24px; font-size: 12px; color: var(--text-3);
}

/* ===== App layout (sidebar + main) ===== */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  padding: 22px 14px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 16px;
}
.sidebar-brand .logo-mark {
  width: 32px; height: 32px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.sidebar-brand .wordmark {
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
}
.sidebar-brand .tag {
  font-size: 10px; font-weight: 600; color: var(--sidebar-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-top: 2px;
}

.nav-section-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--sidebar-text-muted); text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500;
  background: transparent;
  border: 0; text-align: left; width: 100%;
  cursor: pointer; text-decoration: none;
  transition: background 120ms, color 120ms;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
  position: relative;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 6px; bottom: 6px;
  width: 3px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item .ico { display: inline-grid; place-items: center; width: 18px; }
.nav-item .badge-count {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
  color: var(--sidebar-text);
  font-size: 12px;
}
.sidebar-foot .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.18);
}

/* ===== Main area ===== */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 5;
}
.topbar .org { display: flex; align-items: center; gap: 10px; }
.topbar .org-logo {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #78350f;
}
.topbar .org-name {
  font-weight: 700; font-size: 14px; letter-spacing: -0.005em;
}
.topbar .org-sub { font-size: 11.5px; color: var(--text-3); }
.topbar-spacer { flex: 1; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--text-2);
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.user-menu {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.user-menu .name { font-size: 13px; font-weight: 600; }
.user-menu .role { font-size: 11px; color: var(--text-3); }

.content { padding: 28px; min-width: 0; }
.content.wide { max-width: 1280px; margin: 0 auto; width: 100%; }

/* ===== Breadcrumbs + page header ===== */
.crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-3); margin-bottom: 8px;
}
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--primary); }
.crumbs .sep { color: var(--text-3); display: inline-grid; }
.crumbs .current { color: var(--text); font-weight: 600; }

.page-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.page-sub { color: var(--text-2); font-size: 13.5px; margin-top: 4px; }
.page-head-actions { display: flex; gap: 10px; }

/* ===== Stat cards row ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms, transform 150ms, border-color 150ms;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 150ms;
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: #c7d6f5;
}
.stat-card:hover::after { opacity: 1; }
.stat-card.success:hover::after { background: linear-gradient(90deg, var(--success), #4ade80); }
.stat-card.warning:hover::after { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.danger:hover::after { background: linear-gradient(90deg, var(--danger), #f87171); }
.stat-card .label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-2);
  font-weight: 600;
}
.stat-card .ico {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary);
}
.stat-card.success .ico { background: var(--success-bg); color: var(--success-fg); }
.stat-card.warning .ico { background: var(--warning-bg); color: var(--warning-fg); }
.stat-card.danger .ico { background: var(--danger-bg); color: var(--danger-fg); }

.stat-card .num {
  font-family: var(--font-mono);
  font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 10px;
  color: var(--text);
}
.stat-card.success .num { color: var(--success-fg); }
.stat-card.warning .num { color: var(--warning-fg); }
.stat-card.danger .num { color: var(--danger-fg); }

.stat-card .trend {
  margin-top: 6px;
  font-size: 12px; color: var(--text-3);
}
.stat-card.compact { padding: 14px; }
.stat-card.compact .num { font-size: 24px; margin-top: 6px; }

/* ===== Generic card ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; margin: 0; }
.card-sub { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.card-body { padding: 20px; }
.card-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px; color: var(--text-2);
  display: flex; align-items: center; justify-content: space-between;
}

/* ===== Cost compare ===== */
.cost-row {
  display: grid;
  grid-template-columns: 90px 1fr 130px;
  gap: 14px; align-items: center;
  padding: 12px 0;
}
.cost-row + .cost-row { border-top: 1px dashed var(--border); }
.cost-row .label {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 13.5px;
}
.cost-row .swatch { width: 14px; height: 14px; border-radius: 4px; }
.cost-row .swatch.azure { background: var(--azure); }
.cost-row .swatch.aws { background: var(--aws); }
.cost-row .bar {
  height: 22px;
  background: var(--surface-2);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}
.cost-row .fill {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 6px;
}
.cost-row .fill.azure { background: linear-gradient(90deg, #0078d4, #2b9be4); }
.cost-row .fill.aws { background: linear-gradient(90deg, #ff9900, #ffb33d); }
.cost-row .amount {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  text-align: right;
}
.cost-row .amount .currency { color: var(--text-3); font-weight: 500; }

.cost-summary {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 12px 14px;
  background: var(--primary-50);
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  font-size: 13px;
}
.cost-summary .savings {
  font-family: var(--font-mono); font-weight: 700; color: var(--success-fg);
}

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data thead th {
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
table.data tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background 120ms; }
table.data tbody tr:not(.empty-row):hover { background: var(--surface-2); }
table.data tbody tr.linked { cursor: pointer; }
table.data .server-cell { display: flex; align-items: center; gap: 11px; }
table.data .server-cell .svr-ico {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--primary-50); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
table.data .server-cell .name { font-weight: 700; }
table.data .server-cell .sub {
  font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono);
}
table.data .mono { font-family: var(--font-mono); }
table.data .num { font-family: var(--font-mono); font-weight: 600; }
table.data td.right, table.data th.right { text-align: right; }

.os-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.os-pill .ico { width: 16px; height: 16px; display: inline-grid; }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge.success { background: var(--success-bg); color: var(--success-fg); border-color: #bbf7d0; }
.badge.success .dot { background: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning-fg); border-color: #fde68a; }
.badge.warning .dot { background: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger-fg); border-color: #fecaca; }
.badge.danger .dot { background: var(--danger); }
.badge.neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.badge.info { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.badge.azure { background: rgba(0,120,212,0.08); color: var(--azure); border-color: rgba(0,120,212,0.25); }
.badge.aws { background: rgba(255,153,0,0.10); color: #b45309; border-color: rgba(255,153,0,0.30); }

.row-action {
  background: transparent; border: 0;
  color: var(--primary); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
}
.row-action:hover { text-decoration: underline; }

/* ===== Server detail ===== */
.two-col {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.spec-item .k {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
  margin-bottom: 4px;
}
.spec-item .v { font-size: 14.5px; font-weight: 600; }
.spec-item .v.mono { font-family: var(--font-mono); }
.spec-item .sub { font-size: 12px; color: var(--text-3); font-weight: 500; }

.util-row { margin-bottom: 16px; }
.util-row:last-child { margin-bottom: 0; }
.util-row .util-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; margin-bottom: 8px;
}
.util-row .util-head .label { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.util-row .util-head .vals { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }
.util-bar {
  position: relative; height: 10px; background: var(--surface-2);
  border-radius: 999px; overflow: hidden;
}
.util-bar .avg, .util-bar .peak {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 999px;
}
.util-bar .peak { background: rgba(2, 132, 199, 0.25); }
.util-bar .avg { background: var(--accent); }
.util-legend {
  display: flex; gap: 12px; margin-top: 8px;
  font-size: 11.5px; color: var(--text-3);
}
.util-legend .swatch {
  width: 9px; height: 9px; border-radius: 3px; display: inline-block;
  margin-right: 5px; vertical-align: middle;
}

.section-title {
  font-size: 16px; font-weight: 800; letter-spacing: -0.01em;
  margin: 24px 0 12px;
}

/* ===== Migration recommendation cards ===== */
.reco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reco-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  border-top: 3px solid var(--azure);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms, transform 150ms;
}
.reco-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.reco-card.aws { border-top-color: var(--aws); }
.reco-card .reco-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.reco-card .vendor {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px;
}
.reco-card .vendor-logo {
  width: 32px; height: 32px; border-radius: 7px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 13px;
}
.reco-card .vendor-logo.azure { background: var(--azure); }
.reco-card .vendor-logo.aws { background: var(--aws); }
.reco-card .vendor-sub { font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-top: 2px; }
.reco-card .sku {
  font-family: var(--font-mono); font-size: 13.5px;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 14px;
}
.reco-card .price-row { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.reco-card .price {
  font-family: var(--font-mono); font-size: 32px; font-weight: 700;
  letter-spacing: -0.02em;
}
.reco-card .price-unit { font-size: 13px; color: var(--text-2); }
.reco-card .price-sub { font-size: 12px; color: var(--text-3); }
.reco-card .basis {
  padding-top: 14px; margin-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--text-2); line-height: 1.6;
}

/* ===== Blockers ===== */
.blocker-list { display: flex; flex-direction: column; gap: 12px; }
.blocker {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  border-left: 4px solid var(--danger);
}
.blocker.warn { border-left-color: var(--warning); }
.blocker .b-ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--danger-bg); color: var(--danger-fg);
  display: grid; place-items: center;
}
.blocker.warn .b-ico { background: var(--warning-bg); color: var(--warning-fg); }
.blocker .b-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3);
}
.blocker .b-title { font-weight: 700; font-size: 14.5px; margin-top: 2px; }
.blocker .b-desc { color: var(--text-2); font-size: 13px; margin-top: 3px; }

.ok-banner {
  display: flex; align-items: center; gap: 14px;
}
.ok-banner .ok-ico {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--success-bg); color: var(--success-fg);
  display: grid; place-items: center; flex-shrink: 0;
}

/* ===== Report ===== */
.report-page {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.report-header {
  padding: 32px 36px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  display: flex; align-items: start; justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.report-header::after {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(14,165,233,0.4), transparent 70%);
  pointer-events: none;
}
.report-header .meta { position: relative; z-index: 1; }
.report-header .label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin-bottom: 8px; font-weight: 700;
}
.report-header h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.015em; }
.report-header .org-line { margin-top: 6px; font-size: 13.5px; color: rgba(255,255,255,0.85); }
.report-header .scan-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: auto auto; gap: 6px 18px;
  font-size: 12.5px;
}
.report-header .scan-grid .k { color: rgba(255,255,255,0.65); }
.report-header .scan-grid .v { font-family: var(--font-mono); font-weight: 600; }

.report-body { padding: 28px 36px 36px; }
.summary-box {
  background: var(--primary-50);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 24px;
  font-size: 14px; line-height: 1.65;
}
.summary-box .summary-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 10px;
}
.summary-box p { margin: 0 0 10px; }
.summary-box p:last-child { margin-bottom: 0; }

.report-foot {
  padding: 24px 36px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.report-foot .note { font-size: 12.5px; color: var(--text-2); max-width: 480px; }

/* ===== Flash messages ===== */
.flash {
  padding: 10px 14px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  border-left-width: 4px;
  box-shadow: var(--shadow-sm);
}
.flash-ok  { background: var(--success-bg); color: var(--success-fg); border-color: #bbf7d0; border-left-color: var(--success); }
.flash-err { background: var(--danger-bg);  color: var(--danger-fg);  border-color: #fecaca; border-left-color: var(--danger); }

/* ===== Misc ===== */
.empty {
  text-align: center; padding: 36px 20px;
  color: var(--text-3); font-size: 13.5px;
}
.empty-row td { text-align: center; padding: 30px; color: var(--text-3); }
.muted { color: var(--text-3); }
.mono { font-family: var(--font-mono); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .reco-grid { grid-template-columns: 1fr; }
}
