/* ── Google Fonts: Roboto (body) + Roboto Mono (numbers/code) — Material type scale ── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,400&family=Roboto+Mono:wght@400;500&display=swap');

/* ── CSS custom properties — edit this block to retheme the entire app ── */
/* v0.10.0 Material / ARS Cloud Connect retheme — visual only, see Doc/UKG-Automation-Architecture-Design.md */
:root {
  --bg:          #F4F6F8;   /* Material-style cool light background */
  --surface:     #FFFFFF;
  --surface2:    #F7F9FA;
  --surface3:    #EEF1F3;
  --border:      #E1E5EA;
  --border2:     #C9D0D8;
  --header-bg:   #0279b4;   /* ARS Blue — App Bar, per MUI/Cloud Connect guide */
  --header-bg-dark: #01628f; /* hover/pressed shade of header/primary */
  --header-text: #FFFFFF;
  --btn-primary: #0279b4;   /* ARS Blue — primary (contained) button, matches App Bar */
  --btn-primary-dark: #01628f;
  --ars-red:     #d62628;   /* ARS Red (CTA) per brand guide */
  --ars-blue:    #0279b4;   /* ARS Blue per brand guide */
  --ars-dark:    #0c2744;   /* ARS Dark Blue per brand guide — retained for accents/footer */
  --ars-light:   #f0f8ff;   /* ARS Light Blue Tint per brand guide */
  --text:        #1A1D1F;
  --text2:       #5B6470;
  --text3:       #6B7280;
  --blue:        #0279b4;   /* ARS Blue per brand guide */
  --blue-bg:     #e3f2fa;
  --blue-border: #9fd3ee;
  --amber:       #91530f;
  --amber-bg:    #FCEED9;
  --amber-border:#F5CB88;
  --red:         #d62628;   /* matches ARS Red for destructive actions */
  --red-bg:      #fbe3e3;
  --red-border:  #f5b3b4;
  --green:       #256b25;
  --green-bg:    #e2f3e2;
  --green-border:#A8D4A8;
  --pink:        #8B2F5E;
  --pink-bg:     #f6e3ee;
  --pink-border: #E0A8C8;
  --radius:      8px;
  --radius-lg:   16px;
  /* Material elevation scale (MUI-style multi-layer shadows) */
  --elevation-1: 0px 2px 1px -1px rgba(0,0,0,0.20), 0px 1px 1px 0px rgba(0,0,0,0.14), 0px 1px 3px 0px rgba(0,0,0,0.12);
  --elevation-2: 0px 3px 1px -2px rgba(0,0,0,0.20), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
  --elevation-4: 0px 2px 4px -1px rgba(0,0,0,0.20), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12);
  --elevation-8: 0px 5px 5px -3px rgba(0,0,0,0.20), 0px 8px 10px 1px rgba(0,0,0,0.14), 0px 3px 14px 2px rgba(0,0,0,0.12);
  --elevation-16:0px 8px 10px -5px rgba(0,0,0,0.20), 0px 16px 24px 2px rgba(0,0,0,0.14), 0px 6px 30px 5px rgba(0,0,0,0.12);
  --shadow:      var(--elevation-1);
  --shadow-md:   var(--elevation-4);
  --shadow-lg:   var(--elevation-8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOP HEADER — dark bar per guide ── */
.app-header {
  background: var(--header-bg);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 50px;
  position: sticky;
  top: 0;
  z-index: 200;
  flex-shrink: 0;
  box-shadow: var(--elevation-4); /* MUI AppBar default elevation */
}
.app-logo { font-weight: 600; font-size: 15px; color: var(--header-text); letter-spacing: -0.01em; }
.app-role {
  font-size: 11px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 500;
}
.header-spacer { flex: 1; }
.header-year { font-size: 12px; color: rgba(255,255,255,0.5); font-family: 'Roboto Mono', monospace; }

/* ── VERSION BADGE — clickable, shows changelog dropdown ── */
.version-badge {
  font-size: 11px;
  font-family: 'Roboto Mono', monospace;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #aaa;
  padding: 3px 10px;
  border-radius: 99px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  user-select: none;
}
.version-badge:hover { background: rgba(255,255,255,0.14); color: #ddd; }

/* ── CHANGELOG DROPDOWN (version badge click) ── */
.changelog-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  width: 340px;
  z-index: 300;
  color: var(--text);
  max-height: 70vh;
  overflow-y: auto;
}
.changelog-dropdown.open { display: block; }
.changelog-dropdown h4 {
  font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cl-entry { margin-bottom: 12px; }
.cl-ver { font-family: 'Roboto Mono', monospace; font-size: 11px; font-weight: 500; color: var(--blue); }
.cl-date { font-size: 11px; color: var(--text3); margin-left: 6px; }
.cl-items { margin-top: 5px; padding-left: 14px; }
.cl-items li { font-size: 12px; color: var(--text2); margin-bottom: 3px; list-style: disc; }

/* ── TAB NAVIGATION ── */
.tab-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  padding: 0 20px;
  gap: 0;
  flex-shrink: 0;
}
.tab-btn {
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.12s;
  white-space: nowrap;
  font-family: 'Roboto', sans-serif;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

/* ── APP BODY (below header + tabs) ── */
.app-body { flex: 1; overflow: hidden; }
.app-body.natural-scroll { overflow: auto; height: auto; }

/* ── QUEUE VIEW — 3-column grid ── */
.queue-view {
  display: grid;
  grid-template-columns: 220px minmax(560px,1fr) 560px;
  gap: 0;
  height: 100%;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3); padding: 6px 6px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; color: var(--text2); transition: all 0.12s; border: 1px solid transparent;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-border); font-weight: 500; }
.nav-count {
  margin-left: auto; font-size: 11px; font-weight: 600; background: var(--red-bg); color: var(--red);
  border: 1px solid var(--red-border); padding: 1px 7px; border-radius: 99px;
}
.nav-count.amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.nav-count.blue  { background: var(--blue-bg);  color: var(--blue);  border-color: var(--blue-border); }
.nav-count.green { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.sidebar-divider { height: 1px; background: var(--border); margin: 6px 0; }
.stat-mini { padding: 8px 10px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); margin-bottom: 4px; }
.stat-mini-n { font-size: 22px; font-weight: 600; font-family: 'Roboto Mono', monospace; color: var(--text); line-height: 1; }
.stat-mini-l { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── MAIN CONTENT ── */
.main { overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); }
.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface);
  border-radius: var(--radius-lg); padding: 11px 14px; box-shadow: var(--shadow);
}
.toolbar-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.search-box { display: flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 5px 10px; }
.search-box input { border: none; background: transparent; font-family: 'Roboto', sans-serif; font-size: 13px; color: var(--text); outline: none; width: 170px; }
.search-box input::placeholder { color: var(--text3); }

/* ── BUTTONS — Material contained/outlined/text variants ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: var(--radius);
  border: 1px solid var(--border2); font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.02em;
  cursor: pointer; transition: all 0.15s; background: var(--surface); color: var(--text2);
}
.btn:hover { background: var(--surface2); border-color: var(--text3); color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
/* Contained primary — filled ARS Blue, elevated per MUI Button (contained) */
.btn-primary {
  background: var(--btn-primary);
  color: #fff;
  border-color: var(--btn-primary);
  box-shadow: var(--elevation-2);
}
.btn-primary:hover { background: var(--btn-primary-dark); border-color: var(--btn-primary-dark); box-shadow: var(--elevation-4); }
/* Text button — no border/fill, colored label only */
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--text2); }
.btn-ghost:hover { background: rgba(0,0,0,0.045); color: var(--text); }
/* Outlined-with-color variants (semantic actions) */
.btn-red   { background: var(--red-bg);   color: var(--red);   border-color: var(--red-border); }
.btn-red:hover { background: var(--red-border); box-shadow: var(--elevation-1); }
.btn-amber { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.btn-amber:hover { background: var(--amber-border); box-shadow: var(--elevation-1); }
.btn-green { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.btn-green:hover { background: var(--green-border); box-shadow: var(--elevation-1); }

/* ── INLINE CONFIRM — replaces window.confirm per guide ── */
.inline-confirm {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--red);
  background: var(--red-bg); border: 1px solid var(--red-border); border-radius: var(--radius); padding: 5px 10px;
}
.inline-confirm span { font-weight: 500; }
.inline-confirm button {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; cursor: pointer;
  font-family: 'Roboto', sans-serif; border: 1px solid; transition: all 0.1s;
}
.ic-yes { background: var(--red); color: #fff; border-color: var(--red); }
.ic-yes:hover { background: #8a1e1e; }
.ic-no  { background: var(--surface); color: var(--text2); border-color: var(--border2); }
.ic-no:hover { background: var(--surface2); }

/* ── FILTER TABS ── */
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.ftab {
  font-size: 12px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--text2); transition: all 0.12s; font-family: 'Roboto', sans-serif;
}
.ftab:hover { background: var(--surface2); }
.ftab.active { background: var(--btn-primary); color: #fff; border-color: var(--btn-primary); }
.ftab.red.active    { background: var(--red);   border-color: var(--red); }
.ftab.amber.active  { background: var(--amber); border-color: var(--amber); }
.ftab.green.active  { background: var(--green); border-color: var(--green); }
.ftab.pink.active   { background: var(--pink);  border-color: var(--pink); }

/* ── BULK ACTION BAR ── */
.bulk-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--blue-bg);
  border: 1px solid var(--blue-border); border-radius: var(--radius-lg); padding: 9px 14px;
}
.row-check, #selectAllBox { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }

/* ── QUEUE TABLE ── */
.queue-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow-x: auto; }
.queue-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.queue-table thead th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text3); padding: 9px 14px; background: var(--surface2); border-bottom: 1px solid var(--border);
}
.queue-table tbody tr { border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; }
.queue-table tbody tr:last-child { border-bottom: none; }
.queue-table tbody tr:hover { background: var(--surface2); }
.queue-table tbody tr.selected { background: var(--blue-bg); }
.queue-table td { padding: 10px 14px; font-size: 13px; vertical-align: middle; }
.cell-name { font-weight: 500; color: var(--text); }
.cell-sub  { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ── STATUS BADGES ── */
.badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px; display: inline-block; white-space: nowrap; }
.b-pending { background: var(--amber-bg); color: var(--amber); }
.b-failed  { background: var(--red-bg);   color: var(--red); }
.b-success { background: var(--green-bg); color: var(--green); }
.b-blocked { background: var(--pink-bg);  color: var(--pink); }
.b-inprog  { background: var(--blue-bg);  color: var(--blue); }
.b-notreq  { background: var(--surface3); color: var(--text3); }
.b-revoked { background: var(--surface3); color: var(--text2); }
.b-deprovisioned { background: var(--surface3); color: var(--text2); }

/* ── WORKER TYPE BADGE — amber for contractor, distinct from status badges ── */
.b-contractor {
  background: var(--amber-bg); color: var(--amber);
  font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 99px; margin-left: 5px; vertical-align: middle;
}

/* ── SYSTEM STATUS DOTS ── */
.sys-dots { display: flex; gap: 4px; align-items: center; }
.sys-dot-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sys-dot-circle { width: 8px; height: 8px; border-radius: 50%; }
.sys-dot-label  { font-size: 9px; color: var(--text3); font-family: 'Roboto Mono', monospace; }
.dot-done    { background: #3a8a3a; }
.dot-pending { background: #d4900a; }
.dot-failed  { background: #c43232; }
.dot-blocked { background: #a03070; }
.dot-wait    { background: #aaa; }
.dot-notreq  { background: #d8d8d8; }
.dot-revoked { background: #6b6b6b; }

/* ── DETAIL PANEL ── */
.detail-panel { background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }
.detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text3); gap: 8px; padding: 24px; text-align: center; }
.detail-content { display: flex; flex-direction: column; height: 100%; }
.detail-head { padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface2); flex-shrink: 0; }
.detail-head-row { display: flex; align-items: flex-start; gap: 10px; }
.detail-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.detail-name { font-size: 14px; font-weight: 600; color: var(--text); }
.detail-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }
.detail-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.det-sec-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text3); margin-bottom: 7px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.info-cell { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; }
.info-cell-label { font-size: 10px; color: var(--text3); font-weight: 500; margin-bottom: 2px; }
.info-cell-val   { font-size: 12px; font-weight: 500; color: var(--text); }
.sys-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.sys-status-item { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 9px; display: flex; align-items: center; gap: 7px; }
.sys-status-name { font-size: 12px; font-weight: 500; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-box { border-radius: var(--radius); padding: 9px 11px; font-size: 12px; display: flex; gap: 8px; align-items: flex-start; }
.alert-warn { background: var(--amber-bg); border: 1px solid var(--amber-border); color: var(--amber); }
/* Possible-duplicate panel in the New Contractor Request form (story 36029). */
.dup-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.dup-table th, .dup-table td { padding: 4px 8px; text-align: left; vertical-align: top; }
.dup-table th { font-weight: 600; border-bottom: 1px solid var(--amber-border); white-space: nowrap; }
.dup-table td { border-bottom: 1px solid var(--amber-border); }
.dup-table tr:last-child td { border-bottom: none; }
.alert-neutral { background: var(--surface2); border: 1px solid var(--border2); color: var(--text2); }
.alert-success { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }

/* ── TIMELINE ── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 8px; position: relative; padding-bottom: 10px; }
.tl-item:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 17px; bottom: 0; width: 1px; background: var(--border); }
.tl-dot-wrap { width: 17px; height: 17px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; margin-top: 1px; }
.tl-ok   { background: var(--green-bg); color: var(--green); }
.tl-err  { background: var(--red-bg);   color: var(--red); }
.tl-wait { background: var(--amber-bg); color: var(--amber); }
.tl-info { background: var(--blue-bg);  color: var(--blue); }
.tl-text { font-size: 12px; color: var(--text); }
.tl-time { font-size: 10px; color: var(--text3); margin-top: 1px; }

.notes-area {
  width: 100%; border: 1px solid var(--border2); border-radius: var(--radius); padding: 7px 9px;
  font-family: 'Roboto', sans-serif; font-size: 12px; color: var(--text); background: var(--surface2);
  resize: vertical; min-height: 56px; outline: none;
}
.notes-area:focus { border-color: var(--blue); }

.detail-actions { padding: 10px 14px; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.action-row { display: flex; gap: 6px; }
.action-row .btn { flex: 1; justify-content: center; font-size: 12px; }

/* ── TICKET FORM ── */
.ticket-form-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px 18px; }
.form-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.04em; }
.form-input, .form-select, .form-textarea {
  border: 1px solid var(--border2); border-radius: var(--radius); padding: 7px 10px; font-family: 'Roboto', sans-serif;
  font-size: 13px; color: var(--text); background: var(--surface2); outline: none; transition: border-color 0.15s;
  -webkit-appearance: none; -moz-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--blue); }
.form-textarea { resize: vertical; min-height: 60px; }
.form-hint { font-size: 11px; color: var(--text3); line-height: 1.4; }
.form-input[readonly], .form-select:disabled { background: var(--surface); color: var(--text2); font-family: 'Roboto Mono', monospace; cursor: not-allowed; }
.prov-access-row { display: flex; gap: 16px; align-items: center; padding: 6px 0 2px; flex-wrap: wrap; }
.prov-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.prov-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; }
.prov-check.disabled { opacity: 0.55; }
.prov-fixed { font-size: 12px; color: var(--text3); }
.dp-result-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 6px; cursor: pointer; transition: background 0.1s; }
.dp-result-row:hover { background: var(--surface2); }
.form-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.form-actions .spacer { flex: 1; }

/* ── SETTINGS VIEW ── */
.settings-view { overflow-y: auto; padding: 24px; max-width: 800px; }
.settings-section { margin-bottom: 28px; }
.settings-section h3 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.app-info-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-row { display: flex; flex-direction: column; gap: 2px; }
.ai-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); }
.ai-val   { font-size: 13px; color: var(--text); }
.ai-val a { color: var(--blue); text-decoration: none; }

.dm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dm-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.dm-card-desc  { font-size: 12px; color: var(--text2); flex: 1; line-height: 1.5; }
.dm-actions    { display: flex; flex-direction: column; gap: 6px; }
.dm-full { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px; display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.dm-full .dm-card-desc { margin: 0; }

.vh-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 8px; overflow: hidden; }
.vh-card-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; transition: background 0.12s; }
.vh-card-header:hover { background: var(--surface2); }
.vh-ver  { font-family: 'Roboto Mono', monospace; font-size: 12px; font-weight: 500; color: var(--blue); }
.vh-date { font-size: 12px; color: var(--text3); }
.vh-desc { font-size: 12px; color: var(--text2); flex: 1; }
.vh-current { font-size: 10px; font-weight: 600; background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); padding: 1px 8px; border-radius: 99px; }
.vh-chevron { font-size: 12px; color: var(--text3); transition: transform 0.2s; }
.vh-card.open .vh-chevron { transform: rotate(180deg); }
.vh-body { display: none; padding: 0 14px 12px; }
.vh-card.open .vh-body { display: block; }
.vh-items { padding-left: 14px; margin-top: 2px; }
.vh-items li { font-size: 12px; color: var(--text2); margin-bottom: 3px; list-style: disc; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 430px; max-width: 94vw; overflow: hidden; }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: var(--surface2); }
.modal-head h3 { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.modal-body { padding: 18px; font-size: 13px; color: var(--text2); line-height: 1.6; }
.modal-result { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-family: 'Roboto Mono', monospace; font-size: 11px; color: var(--text); margin-top: 10px; white-space: pre-wrap; max-height: 180px; overflow-y: auto; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ── TOAST NOTIFICATIONS ── */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; pointer-events: none; }
.toast-msg { background: var(--text); color: #fff; padding: 9px 14px; border-radius: var(--radius); font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); opacity: 1; transition: all 0.22s; }
.toast-msg.success { background: var(--green); }
.toast-msg.error   { background: var(--red); }
.toast-msg.warn    { background: var(--amber); }

/* ── FOOTER ── */
.app-footer { background: #1A1916; color: #555; font-size: 11px; font-family: 'Roboto Mono', monospace; padding: 8px 24px; display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.footer-spacer { flex: 1; }
.footer-warn { color: #666; }

/* ── RESPONSIVE — single column below 600px ── */
@media (max-width: 600px) {
  .queue-view { grid-template-columns: 1fr; }
  .sidebar, .detail-panel { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .dm-grid { grid-template-columns: 1fr; }
  .app-info-card { grid-template-columns: 1fr; }
}

/* ── COLUMN SORT HEADERS ── */
.queue-table thead th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.queue-table thead th.sortable:hover { background: var(--surface3); }
.sort-indicator { display: inline-block; margin-left: 4px; font-size: 10px; color: var(--text3); transition: color 0.12s; }
.queue-table thead th.sort-asc  .sort-indicator,
.queue-table thead th.sort-desc .sort-indicator { color: var(--blue); }

/* ── COLUMN FILTER INPUTS ── */
.col-filter {
  display: block; width: 100%; margin-top: 5px; padding: 3px 6px; font-size: 11px; font-family: 'Roboto', sans-serif;
  border: 1px solid var(--border2); border-radius: 4px; background: var(--surface); color: var(--text);
  outline: none; font-weight: 400; letter-spacing: 0; text-transform: none;
}
.col-filter:focus { border-color: var(--blue); }
.col-filter::placeholder { color: var(--text3); font-style: italic; }

/* ── PAGINATION BAR ── */
.pagination-bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--surface); border-top: 1px solid var(--border); flex-shrink: 0; }
.pagination-bar .pg-info { font-size: 12px; color: var(--text2); flex: 1; }
.pagination-bar .pg-info strong { color: var(--text); }
.pg-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-size: 12px; font-weight: 500;
  font-family: 'Roboto', sans-serif; border: 1px solid var(--border2); border-radius: var(--radius);
  background: var(--surface2); color: var(--text2); cursor: pointer; transition: all 0.12s;
}
.pg-btn:hover:not(:disabled) { background: var(--border); color: var(--text); }
.pg-btn:disabled { opacity: 0.35; cursor: default; }
.pg-pages { display: flex; gap: 4px; }
.pg-num {
  min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  font-family: 'Roboto Mono', monospace; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface2); color: var(--text2); cursor: pointer; transition: all 0.12s;
}
.pg-num:hover { background: var(--border); }
.pg-num.active { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }

/* Blazor error UI (from the scaffold) restyled to match the app instead of the default template look */
#blazor-error-ui {
  background: var(--red-bg);
  border-top: 1px solid var(--red-border);
  color: var(--red);
  bottom: 0;
  box-shadow: var(--shadow-md);
  display: none;
  left: 0;
  padding: 0.8rem 1.25rem 0.6rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-size: 13px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
/* Request history on a person's record (story 30519). */
.hist-table { width: 100%; font-size: 11px; border-collapse: collapse; }
.hist-table th, .hist-table td { padding: 4px 6px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.hist-table th { font-weight: 600; color: var(--text3); white-space: nowrap; }
.hist-table tr:last-child td { border-bottom: none; }
