/* TorEndpoint console — "Administrator - Bright" design system (from Figma). */
:root {
  --blue: #0079C4;      /* top bar */
  --blue-link: #0093EE; /* links / active */
  --green: #4ECE3D;     /* positive / actions */
  --text: #3F536E;      /* primary text */
  --muted: #8DABC4;     /* secondary text */
  --bg: #ECF5FD;        /* page background */
  --card: #FFFFFF;
  --border: #E5EEF5;
  --border2: #C5D9E8;
  --rail: #2C405A;      /* dark icon rail */
  --danger: #FF151F;
  --warn: #F5A623;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.05);
  --radius: 6px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'Heebo', system-ui, 'Segoe UI', sans-serif;
  color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5;
}
a { color: var(--blue-link); text-decoration: none; }
button { font-family: inherit; }

/* ── Top bar ── */
.topbar {
  position: fixed; inset-block-start: 0; inset-inline: 0; height: 60px; z-index: 30;
  background: var(--blue); color: #fff; display: flex; align-items: center; gap: 18px; padding-inline: 20px;
}
.topbar .logo { font-size: 20px; letter-spacing: .5px; white-space: nowrap; }
.topbar .logo b { font-weight: 800; }
.topbar .logo span { font-weight: 300; opacity: .95; }
.topbar .search {
  flex: 1; max-width: 780px; height: 36px; display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: 4px; padding-inline: 14px; color: #fff;
}
.topbar .search input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 15px; }
.topbar .search input::placeholder { color: rgba(255,255,255,.6); }
.topbar .spacer { flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 12px; }
.topbar .avatar { width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.topbar .logout { color: #fff; opacity: .85; background: none; border: 0; cursor: pointer; font-size: 13px; }

/* ── Shell (RTL: rail+nav on the right, detail on the left) ── */
.shell { position: fixed; inset-block-start: 60px; inset-inline: 0; inset-block-end: 0; display: flex; }
.rail { width: 60px; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding-block: 16px; gap: 6px; }
.rail .ico { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; color: #8CA6BE; cursor: pointer; font-size: 18px; }
.rail .ico.active, .rail .ico:hover { color: #fff; background: rgba(255,255,255,.08); }
.rail .grow { flex: 1; }

.sidebar { width: 210px; background: var(--card); border-inline-start: 1px solid var(--border); padding: 22px 14px; overflow-y: auto; }
.sidebar .nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar .nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; cursor: pointer;
}
.sidebar .nav a .dot { width: 8px; height: 8px; border-radius: 50%; }
.sidebar .nav a:hover { background: var(--bg); }
.sidebar .nav a.active { background: #EAF4FC; color: var(--blue-link); }
.sidebar .label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin: 20px 12px 8px; }

.content { flex: 1; overflow-y: auto; padding: 26px 30px; }
.content-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.content-head h1 { font-size: 22px; font-weight: 700; margin: 0; }
.content-head .sub { color: var(--muted); font-size: 13px; }

/* ── Cards, table ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: start; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  font-weight: 700; padding: 16px 20px; border-bottom: 1px solid var(--border);
}
tbody td { padding: 15px 20px; border-bottom: 1px solid var(--border); font-size: 15px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #F7FBFE; }
tbody tr.selected { background: #EAF4FC; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text); }
.muted { color: var(--muted); }
.green { color: var(--green); font-weight: 600; }

/* ── Pills / badges ── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.online { color: #2AA31F; background: rgba(78,206,61,.14); }
.pill.offline { color: #7E95A7; background: rgba(141,171,196,.16); }
.pill.revoked { color: var(--danger); background: rgba(255,21,31,.10); }
.sev { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; text-transform: uppercase; letter-spacing: .5px; }
.sev.error, .sev.critical { color: var(--danger); background: rgba(255,21,31,.10); }
.sev.warning { color: #B9770E; background: rgba(245,166,35,.15); }
.sev.info { color: var(--blue-link); background: rgba(0,147,238,.12); }
.sev.warn { color: #B9770E; background: rgba(245,166,35,.15); }
.sev.ok { color: var(--green); background: rgba(78,206,61,.14); }

/* ── Buttons ── */
/* Buttons — Figma "Button 42 px" system (Heebo Medium 15/22, radius 4). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding-inline: 22px; border-radius: 4px; border: 0; font-family: inherit; font-size: 15px; font-weight: 500; line-height: 22px; cursor: pointer; transition: filter .12s, background .12s; }
.btn-blue { background: var(--blue-link); color: #fff; box-shadow: inset -1px 1px 0 rgba(255,255,255,.06); }
.btn-blue:hover { filter: brightness(.95); }
.btn-blue:active { filter: brightness(.9); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { filter: brightness(.96); }
/* Stroked (secondary): white, light border, BLUE label — per Figma. */
.btn-ghost { background: #fff; color: var(--blue-link); border: 1px solid var(--border2); }
.btn-ghost:hover { background: #F5FAFE; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid rgba(255,21,31,.3); }
.btn-sm { height: 36px; padding-inline: 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border2); background: #fff; cursor: pointer; display: grid; place-items: center; color: var(--muted); }

/* Deployment card — the ready-to-Intune download surface. */
.deploy { padding: 20px 22px; margin-bottom: 18px; }
.deploy .row { display: flex; align-items: center; gap: 18px; }
.deploy .txt { flex: 1; min-width: 0; }
.deploy .t { font-size: 16px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.deploy .s { color: var(--muted); font-size: 13px; margin-top: 3px; }
.deploy .links { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.deploy .hint { color: var(--muted); font-size: 12px; margin-inline-start: auto; align-self: center; }

/* ── Detail panel ── */
.detail { width: 380px; background: var(--card); border-inline-end: 1px solid var(--border); overflow-y: auto; display: none; }
.detail.open { display: block; }
.detail .dhead { padding: 20px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.detail .dhead h2 { margin: 0; font-size: 18px; }
.detail .tabs { display: flex; border-bottom: 1px solid var(--border); }
.detail .tabs button { flex: 1; background: none; border: 0; padding: 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.detail .tabs button.active { color: var(--blue-link); border-bottom-color: var(--blue-link); }
.detail .dbody { padding: 20px 22px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: end; }
.finding { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.finding h4 { margin: 6px 0 4px; font-size: 14px; }
.finding p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.close { background: none; border: 0; font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }

.empty { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(0,0,0,.12); border-top-color: var(--blue-link); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login gate ── */
.login { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 50; }
.login .box { background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.12); width: 380px; padding: 30px; text-align: center; }
.login .brand { font-size: 24px; margin-bottom: 6px; color: var(--blue); }
.login .brand b { font-weight: 800; }
.login .brand span { font-weight: 300; }
.login input { width: 100%; height: 42px; border: 1px solid var(--border2); border-radius: 8px; padding-inline: 14px; font-size: 15px; margin: 16px 0 12px; }
.login .btn { width: 100%; justify-content: center; }
.login .err { color: var(--danger); font-size: 13px; min-height: 18px; margin-top: 10px; }
.btn-ms { background: #fff; color: #3F536E; border: 1px solid var(--border2); }
.btn-ms:hover { background: #F7FBFE; }
.linklike { background: none; border: 0; color: var(--blue-link); cursor: pointer; font-size: 13px; margin-top: 12px; font-family: inherit; }
.hidden { display: none !important; }
.toast { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; background: var(--text); color: #fff; padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow); z-index: 60; font-size: 14px; }
