/* RadMan-FR — light theme built on #ffffff / #f2f2f2 / #52ab98 */
:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #fafbfa;
  --line: #e3e9e7;
  --line-strong: #d3ded9;
  --text: #1f2d2a;
  --text-soft: #43534f;
  --muted: #6f827e;
  --brand: #52ab98;
  --brand-dark: #3d8a79;
  --brand-darker: #2f6f62;
  --brand-soft: #e8f4f1;
  --brand-soft-2: #d5ece6;
  --green: #2f9e6b;
  --green-soft: #e6f6ee;
  --amber: #b7791f;
  --amber-soft: #fdf3e2;
  --red: #c94a4a;
  --red-soft: #fbecec;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 45, 42, .06);
  --shadow-sm: 0 2px 8px rgba(31, 45, 42, .05);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Inter", "Segoe UI", system-ui, -apple-system, "Pyidaungsu", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-darker); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--brand-dark); }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
::selection { background: var(--brand-soft-2); }

/* ---------------- layout ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 244px; flex: 0 0 244px; background: var(--surface);
  border-right: 1px solid var(--line); padding: 18px 12px 24px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #52ab98, #79c4b3); color: #fff; font-weight: 800;
  box-shadow: 0 6px 16px rgba(82, 171, 152, .32);
}
.brand small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
.brand b { font-size: 15px; color: var(--text); }
.nav-group { margin: 14px 0 6px; padding: 0 10px; color: #9aaba7; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--text-soft); font-size: 13.2px; text-decoration: none; margin-bottom: 1px;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-darker); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-darker); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nav a svg { width: 16px; height: 16px; opacity: .75; flex: 0 0 16px; }
.nav a.active svg { opacity: 1; }
.nav .count { margin-left: auto; background: var(--brand-soft-2); color: var(--brand-darker); border-radius: 20px; padding: 1px 7px; font-size: 11px; }

.main { flex: 1; min-width: 0; padding: 22px 26px 60px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.topbar .spacer { flex: 1; }
.crumb { color: var(--muted); font-size: 12.5px; }
.crumb a { color: var(--brand-dark); }
.userchip { display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); padding: 6px 12px 6px 6px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft-2); color: var(--brand-darker); font-size: 12px; font-weight: 700; }

/* ---------------- components ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c23 { grid-template-columns: 2fr 1fr; }
.grid.c32 { grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1150px) { .grid.c4 { grid-template-columns: repeat(2, 1fr); } .grid.c3, .grid.c23, .grid.c32 { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .sidebar { display: none; } .main { padding: 16px; } .grid.c2, .grid.c4 { grid-template-columns: 1fr; } }

.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.stat .label { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.stat .value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.stat .sub { color: var(--muted); font-size: 11.5px; }
.stat .spark { position: absolute; right: 14px; top: 14px; opacity: .55; color: var(--brand); }
.stat.accent { border-color: var(--brand-soft-2); background: linear-gradient(180deg, #ffffff 0%, #f5fbf9 100%); }
.trend-up { color: var(--green); } .trend-down { color: var(--red); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text-soft); padding: 8px 13px; border-radius: 9px; font-size: 13px; cursor: pointer;
  font-family: inherit; text-decoration: none; transition: .15s ease; font-weight: 500;
}
.btn:hover { border-color: var(--brand); color: var(--brand-darker); background: var(--brand-soft); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(82, 171, 152, .28); }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--red-soft); border-color: #f0cccc; color: #a83a3a; }
.btn.danger:hover { background: #f7dede; border-color: #e2b3b3; color: #8f2f2f; }
.btn.success { background: var(--green-soft); border-color: #c8e8d7; color: #247a53; }
.btn.success:hover { background: #d9f1e4; }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: #f1f4f3; color: #5a6b67; }
.badge.green { background: var(--green-soft); color: #1e7a52; }
.badge.red { background: var(--red-soft); color: #b23d3d; }
.badge.amber { background: var(--amber-soft); color: #97621a; }
.badge.blue { background: var(--brand-soft); color: var(--brand-darker); }
.badge.violet { background: #efeafb; color: #6d4fb0; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; background: #f8faf9; }
tbody tr:hover { background: #f7fbfa; }
tbody tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td.mono, th.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 5px; font-weight: 500; }
input, select, textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
  padding: 9px 11px; border-radius: 9px; font-family: inherit; font-size: 13.5px; outline: none;
}
input::placeholder, textarea::placeholder { color: #a8b5b1; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(82, 171, 152, .16); }
textarea { min-height: 76px; resize: vertical; }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 140px; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.flash.ok { background: var(--green-soft); border-color: #c8e8d7; color: #1e7a52; }
.flash.err { background: var(--red-soft); border-color: #f0cccc; color: #a83a3a; }
.flash.info { background: var(--brand-soft); border-color: var(--brand-soft-2); color: var(--brand-darker); }

.progress { height: 7px; background: #eef2f1; border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.progress.warn > span { background: #e0a437; }
.progress.crit > span { background: #d4635f; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 8px 2px 0; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart .bar i { width: 100%; max-width: 30px; background: linear-gradient(180deg, #79c4b3, #52ab98); border-radius: 5px 5px 2px 2px; display: block; min-height: 2px; }
.chart .bar b { font-size: 10px; color: var(--text-soft); font-weight: 600; }
.chart .bar span { font-size: 10px; color: var(--muted); }
.sparkline { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.sparkline i { width: 4px; background: var(--brand); border-radius: 2px; display: block; opacity: .7; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .sub { color: var(--muted); font-size: 11.5px; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 13px; border-radius: 9px 9px 0 0; color: var(--muted); font-size: 13px; }
.tabs a.active { background: var(--surface); color: var(--brand-darker); border: 1px solid var(--line); border-bottom-color: transparent; font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--brand-darker); }

.pre { background: #f7faf9; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; white-space: pre-wrap; font-size: 12px; color: #2c4a43; }
.note { font-size: 12.5px; color: var(--muted); }
.hr { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------------- login / landing ---------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; padding-bottom: 10px; }
.auth-card h1 { text-align: center; font-size: 19px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }
.auth-card form { display: grid; gap: 12px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 12.5px; color: var(--muted); }

.hero { max-width: 1020px; margin: 0 auto; padding: 60px 26px; }
.hero h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; color: var(--text); }
.hero h1 span { color: var(--brand); }
.hero p.lead { color: var(--text-soft); font-size: 15px; max-width: 640px; }
.entry { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
@media (max-width: 760px) { .entry { grid-template-columns: 1fr; } .hero h1 { font-size: 26px; } }
.entry .card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.entry h2 { font-size: 17px; }
.entry p { color: var(--muted); font-size: 13px; flex: 1; }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.pill { border: 1px solid var(--brand-soft-2); background: var(--surface); padding: 5px 11px; border-radius: 999px; font-size: 12px; color: var(--brand-darker); }

/* ---------------- print ---------------- */
@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { padding: 0; }
  .card { box-shadow: none; border-color: #ddd; background: #fff; color: #111; }
  table th { background: #f3f4f6; color: #111; }
  th, td { border-color: #e5e7eb; color: #111; }
  .badge { border: 1px solid #ddd; color: #111; background: #f9fafb; }
}

/* --- 802.1X / EAP additions ------------------------------------------------ */
.meter-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.meter-label { width: 96px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-soft); }
.meter { flex: 1; height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #7cc6b5); border-radius: 99px; }
.meter-value { width: 46px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-soft); }

.steps { margin: 0 0 10px; padding-left: 18px; color: var(--text-soft); font-size: 13px; line-height: 1.65; }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--text); }

label.check { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; cursor: pointer; }
label.check:hover { border-color: var(--brand); }
label.check input { margin-top: 3px; }
label.check.full { grid-column: 1 / -1; }

.pre { background: #0f1c19; color: #d7e8e3; padding: 12px 14px; border-radius: 10px; font-size: 11.5px; line-height: 1.55; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* segmented control (period switches, filters) */
.seg { display: inline-flex; gap: 2px; background: var(--surface-2, #f2f5f4); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 8px; cursor: pointer; }
.seg-btn:hover { color: var(--brand-darker); background: rgba(82,171,152,.10); }
.seg-btn.active { background: var(--surface, #fff); color: var(--brand-darker); font-weight: 600; box-shadow: 0 1px 2px rgba(16,32,28,.08); }
.seg-btn svg { opacity: .85; }
