/* TACACS+ administration console. Local assets only; no external fonts or scripts. */
:root {
  color-scheme: light;
  --ink: #243344;
  --muted: #596879;
  --line: #d5dde5;
  --paper: #fff;
  --bg: #f1f4f7;
  --header: #23384d;
  --blue: #255b8e;
  --radius: 4px;
  font-family: Arial, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 2px solid #1676c5; outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -100px; padding: 8px 14px; background: white; z-index: 10; }
.skip-link:focus { top: 8px; }
/* The outer rails remain empty. The navigation belongs inside the console. */
.desktop-frame { display: grid; grid-template-columns: minmax(24px, 1fr) minmax(0, 1160px) minmax(24px, 1fr); min-height: 100vh; }
.outer-rail { min-width: 0; }
.site { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; background: #f7f9fb; border-inline: 1px solid var(--line); }
.desktop-notice { display: none; }
.topbar { min-height: 62px; background: var(--header); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 3px solid #567795; }
.brand { display: flex; align-items: center; gap: 16px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand strong { font-size: 21px; letter-spacing: -.5px; }
.brand span { color: #d9e3eb; border-left: 1px solid #74879a; padding-left: 16px; font-size: 13px; }
.account-bar, .public-nav { display: flex; align-items: center; gap: 18px; }
.account-name { font-weight: 600; overflow-wrap: anywhere; }
.account-name small { display: block; color: #d1dde6; font-size: 11px; font-weight: normal; }
.public-nav a { color: #fff; }
.inlineform { margin: 0; }
.nav-link { background: transparent; border: 1px solid #8496a7; border-radius: var(--radius); padding: 6px 12px; color: white; white-space: nowrap; }
.nav-link:hover { background: #385069; }
.workspace { flex: 1; display: flex; min-width: 0; }
.sidebar { width: 216px; flex: 0 0 216px; background: #e8edf2; border-right: 1px solid #ccd5de; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 0; }
.nav-section { padding: 12px 18px 6px; color: #536579; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .4px; }
.sidebar nav a { display: block; padding: 10px 17px; border-left: 3px solid transparent; color: #34475b; font-size: 13px; }
.sidebar nav a:hover { background: #dce5ed; text-decoration: none; }
.sidebar nav a.active { border-left-color: #255b8e; background: #d3e2ef; color: #174d7b; font-weight: bold; }
.sidebar-host { padding: 18px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.main { flex: 1; min-width: 0; padding: 24px 28px 32px; max-width: 100%; margin: 0 auto; }
.signed-out .main { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: var(--muted); background: #e8edf2; padding: 11px 24px; font-size: 12px; }
h1,h2,p { margin-top: 0; }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-heading h1, .auth-card h1, .narrow h1 { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0 0 7px; }
.page-heading p { color: var(--muted); margin: 0; max-width: 920px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f6f8fa; border-bottom: 1px solid var(--line); margin: -18px -20px 16px; padding: 12px 20px; }
.panel-head h2 { margin: 0; }
.full-panel, .detail-panel { padding: 18px 20px; margin: 0 0 18px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.dashboard-grid > .panel { margin: 0; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; line-height: 1.55; margin: 0 0 10px; }
.tiny { font-size: 12px; }
.block { display: block; }
.detail-row { display: grid; grid-template-columns: minmax(100px, 40%) minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid #e4e9ee; align-items: start; }
.detail-row:last-child { border: 0; }
.detail-row > span:first-child { color: var(--muted); }
.detail-row strong { font-weight: 600; overflow-wrap: anywhere; }
.detail-row .tag { justify-self: start; }
.action-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e4e9ee; }
.action-box p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.action-box .btn { white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; line-height: 1.4; padding: 3px 7px; border: 1px solid #cbd5df; border-radius: 3px; background: #f2f5f8; color: #3e5368; overflow-wrap: anywhere; }
.tag-good { background: #eaf4ed; border-color: #b8d5c0; color: #255c36; }
.tag-warn { background: #fff6df; border-color: #e7d3a3; color: #775311; }
.tag-danger { background: #fceeed; border-color: #e6c0bd; color: #9c302a; }
.stats-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: white; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.stat { padding: 13px 18px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat .label-stat { font-size: 17px; margin-top: 3px; }
.table-scroll { overflow-x: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
th { background: #edf2f6; color: #43576b; font-weight: 600; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th, td { padding: 9px 10px; text-align: left; vertical-align: middle; }
td { border-bottom: 1px solid #e1e6eb; overflow-wrap: anywhere; }
tbody tr:nth-child(even) { background: #fafbfd; }
tbody tr:hover { background: #f0f5fa; }
.admin-table { min-width: 780px; }
.username-cell small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.actions form { margin: 0; }
.promote-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.promote-form input:not([type=hidden]) { width: 125px; min-height: 30px; font-size: 12px; padding: 5px 7px; }
.btn, .small-button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #aab9c8; border-radius: var(--radius); background: #f8fafc; color: #2e4c68; font-weight: 600; text-decoration: none; padding: 8px 13px; min-height: 36px; line-height: 1.35; }
.btn:hover, .small-button:hover { background: #e8eff5; text-decoration: none; }
.btn-primary { background: #285d91; border-color: #204e7a; color: #fff; }
.btn-primary:hover { background: #204e7a; }
.small-button { padding: 5px 9px; min-height: 30px; font-size: 12px; white-space: nowrap; }
.small-button.positive { color: #255c36; border-color: #b0c9b9; }
.small-button.negative { color: #9c302a; border-color: #d8b5b2; }
.stack-form, .manage-form { display: grid; gap: 10px; }
.stack-form { margin-top: 20px; }
.manage-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 20px; align-items: end; }
.manage-form.single { grid-template-columns: 1fr; }
.manage-form .wide { grid-column: 1 / -1; }
.manage-form .btn { justify-self: start; }
label { font-weight: 600; font-size: 13px; }
.manage-form label { display: grid; gap: 5px; min-width: 0; }
input:not([type=hidden]), select { background: white; border: 1px solid #aebcca; border-radius: 3px; color: var(--ink); padding: 8px 10px; min-height: 37px; width: 100%; min-width: 0; }
input::placeholder { color: #667586; }
.stack-form input { margin-bottom: 4px; }
.stack-form .btn-primary { margin-top: 6px; }
.label-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label-line a { font-size: 12px; }
.auth-layout, .center-shell { width: 100%; max-width: 440px; margin: 32px auto; }
.auth-card, .narrow { padding: 28px; }
.auth-card p, .narrow p { font-size: 13px; margin-bottom: 14px; }
.card-bottom { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.alerts { width: 100%; margin-bottom: 14px; }
.signed-out .alerts { max-width: 440px; }
.notice { padding: 11px 13px; background: #edf4fa; color: #2b506f; border: 1px solid #c4d8e9; border-left-width: 3px; border-radius: 3px; margin: 0 0 16px; font-size: 13px; overflow-wrap: anywhere; }
.notice-info { margin-top: 14px; }
.notice-danger { background: #fceeed; color: #8c302a; border-color: #dcb6b1; }
.notice-warning { background: #fff6df; color: #765011; border-color: #e5d09b; }
.notice-success { background: #eaf4ed; color: #255c36; border-color: #b5d1be; }
code { font-family: Consolas, 'Liberation Mono', monospace; font-size: 12px; overflow-wrap: anywhere; }

/* Narrow desktop windows retain the same navigation and table layout. */
@media (min-width: 1024px) and (max-width: 1207px) {
  .main { padding: 20px; }
  .sidebar { width: 190px; flex-basis: 190px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
/* No mobile management UI: show only an access notice on narrow viewports. */
@media (max-width: 1023px) {
  .desktop-frame { display: none; }
  .desktop-notice { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
  .desktop-notice-box { width: 100%; max-width: 440px; border: 1px solid var(--line); background: var(--paper); padding: 28px 22px; }
  .desktop-notice-box h1 { font-size: 23px; margin: 0 0 16px; }
  .desktop-notice-box p { color: var(--muted); margin: 0 0 10px; }
  .desktop-notice-box p:last-child { margin-bottom: 0; }
}
