:root {
    --bg: #02060b;
    --surface: #07111d;
    --surface-2: #0a1726;
    --surface-3: #0d1d2e;
    --line: #18324c;
    --line-bright: #1d6da5;
    --text: #f4f9ff;
    --muted: #8095aa;
    --blue: #1f9cff;
    --blue-2: #2571ff;
    --cyan: #27d5e8;
    --green: #35dc83;
    --red: #ff4f68;
    --orange: #ff9f32;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 13px;
    --shadow: 0 24px 70px rgba(0, 0, 0, .42);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color-scheme: dark;
}

.test-environment-banner {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 10000;
  transform: translateX(-50%);
  padding: 8px 18px;
  border: 1px solid rgba(255, 203, 61, .9);
  border-radius: 999px;
  background: rgba(120, 72, 0, .96);
  color: #fff4bf;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .35);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  pointer-events: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    color: var(--text);
    background:
        radial-gradient(circle at 72% -10%, rgba(26, 117, 196, .22), transparent 34%),
        radial-gradient(circle at 12% 100%, rgba(11, 83, 139, .13), transparent 30%),
        var(--bg);
    font-size: 15px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, .button, a { -webkit-tap-highlight-color: transparent; }

.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; padding: 28px 22px 22px;
    display: flex; flex-direction: column;
    background: rgba(3, 8, 14, .93); border-right: 1px solid #11263b;
    backdrop-filter: blur(24px);
}
.brand { display: flex; gap: 13px; align-items: center; }
.brand.centered { justify-content: center; }
.brand-mark {
    position: relative; isolation: isolate; overflow: hidden;
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px;
    border: 0;
    background: transparent; color: transparent;
    box-shadow: 0 12px 34px rgba(79, 209, 189, .13);
    font-weight: 900; font-size: 0; letter-spacing: -.05em;
}
.brand-mark::before { content: none; }
.brand-mark::after {
    content: none;
}
.brand-mark img, .command-icon img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.22)); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: -.02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.sidebar nav { display: grid; gap: 7px; margin-top: 46px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px;
    color: #91a5b9; border: 1px solid transparent; transition: .18s ease;
}
.sidebar nav a:hover { color: #dceeff; background: #0b1623; transform: translateX(2px); }
.sidebar nav a.active {
    color: white; background: linear-gradient(135deg, #102945, #0b1b2d);
    border-color: #1c5d91; box-shadow: inset 3px 0 var(--blue);
}
.nav-icon { width: 24px; color: #4cb9ff; text-align: center; font-size: 18px; }
.sidebar-app-tools {
    --sidebar-tool-height: 78px;
    width: 100%; margin-top: auto; display: grid; gap: 9px; min-width: 0;
}
.authenticator-card {
    overflow: hidden; margin: 0; padding: 0 !important; border-radius: 17px !important;
    border: 1px solid #245477 !important;
    background: linear-gradient(145deg, #10243a 0%, #07121f 58%, #040b13 100%) !important;
    box-shadow: 0 16px 34px rgba(0,0,0,.46), 0 0 24px rgba(39,213,232,.09), inset 0 1px rgba(255,255,255,.1) !important;
}
.authenticator-card > summary {
    height: var(--sidebar-tool-height); min-height: var(--sidebar-tool-height);
    padding: 10px 34px 10px 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr);
    align-items: center; gap: 8px; text-align: center;
}
.authenticator-card > summary::after { top: 13px; right: 13px; }
.authenticator-card > summary span:nth-child(2) { min-width: 0; width: 100%; }
.authenticator-card > summary small,
.authenticator-card > summary strong { display: block; }
.authenticator-card > summary small {
    color: var(--cyan); font-size: 8px; font-weight: 850; letter-spacing: .16em;
}
.authenticator-card > summary strong { margin-top: 4px; font-size: 14px; line-height: 1.2; }
.authenticator-icon {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 11px; color: #dffbff; font-size: 19px;
    background: linear-gradient(145deg, #1588b8, #0b426c);
    box-shadow: inset 0 1px rgba(255,255,255,.24), 0 7px 16px rgba(0,0,0,.3);
}
.authenticator-body {
    padding: 0 12px 14px; text-align: center;
}
.authenticator-body img {
    display: block; width: min(180px, 100%); height: auto; aspect-ratio: 1;
    margin: 0 auto; padding: 7px; border-radius: 13px; background: #fff;
}
.authenticator-body p {
    margin: 10px 3px 5px; color: #c8d8e7; font-size: 10px; line-height: 1.4;
}
.authenticator-body small {
    display: block; color: var(--muted); font-size: 8px; line-height: 1.35;
}
.sidebar-app-card {
    overflow: hidden; border-radius: 17px !important;
    border: 1px solid #245477 !important;
    background: linear-gradient(145deg, #10243a 0%, #07121f 58%, #040b13 100%) !important;
    box-shadow:
        0 16px 34px rgba(0,0,0,.46),
        0 0 24px rgba(31,156,255,.08),
        inset 0 1px 0 rgba(255,255,255,.11),
        inset 0 -12px 28px rgba(0,0,0,.2) !important;
}
.sidebar-app-tools .distribution-body { max-height: 42vh; overflow-y: auto; }
.sidebar-app-tools .sidebar-download {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 8px; text-align: center;
    width: 100%; min-width: 0; height: var(--sidebar-tool-height); min-height: var(--sidebar-tool-height); padding: 10px 13px;
    border-radius: 17px; font-size: 15px; line-height: 1; white-space: nowrap;
    box-shadow: 0 16px 34px rgba(0,0,0,.46), 0 0 24px rgba(31,156,255,.16), inset 0 1px rgba(255,255,255,.18);
}
.sidebar-download .download-arrow {
    font-size: 27px; font-weight: 900; line-height: .8;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,.28));
}
.sidebar-download .download-label { min-width: 0; white-space: nowrap; grid-column: 2; }
.sidebar-app-tools .sidebar-download.disabled { pointer-events: none; opacity: .42; }
.sidebar-app-tools + .sidebar-bottom { margin-top: 10px; }
.sidebar-bottom {
    width: 100%; min-width: 0; min-height: 112px; margin-top: auto; padding: 16px; display: grid; align-content: center; gap: 4px; border-radius: 17px;
    background: linear-gradient(145deg, #10243a 0%, #07121f 58%, #040b13 100%); border: 1px solid #245477;
    box-shadow: 0 16px 34px rgba(0,0,0,.46), 0 0 24px rgba(31,156,255,.08), inset 0 1px 0 rgba(255,255,255,.11);
}
.sidebar-bottom span { font-weight: 750; }
.sidebar-bottom small { color: var(--muted); }
.sidebar-bottom a { color: #53b9ff; margin-top: 10px; font-size: 13px; }

main { min-width: 0; padding: 34px 40px 52px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: clamp(29px, 3vw, 42px); line-height: 1.05; letter-spacing: -.045em; }
.topbar-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0 0 8px; color: #57b9ff; font-size: 10px; letter-spacing: .2em; font-weight: 850; }
.live-pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 99px;
    background: #092017; border: 1px solid #176640; color: #8de9b6; font-size: 12px; font-weight: 700;
}
.live-pill i, .status i { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.panel {
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(13, 26, 42, .96), rgba(5, 11, 18, .97));
    box-shadow: var(--shadow); padding: 22px;
}
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.panel-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.muted { color: var(--muted); }
.alert { padding: 13px 16px; border-radius: 11px; margin-bottom: 16px; }
.alert.error { color: #ff9cad; background: #34121a; border: 1px solid #72293a; }
.alert.success { color: #7af0b8; background: #08291d; border: 1px solid #236846; }

.control-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 17px; }
.session-panel { position: relative; overflow: hidden; }
.session-panel::after {
    content: ""; position: absolute; width: 240px; height: 240px; right: -95px; top: -125px;
    border-radius: 50%; background: rgba(31, 156, 255, .11); filter: blur(2px); pointer-events: none;
}
.batch-form { position: relative; z-index: 1; display: grid; grid-template-columns: 1.35fr .78fr auto; gap: 10px; }
input, select, textarea {
    width: 100%; min-width: 0; color: white; background: #040c15; border: 1px solid #203a55;
    border-radius: 11px; padding: 12px 13px; outline: none; transition: .18s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,156,255,.15); }
input::placeholder, textarea::placeholder { color: #54687d; }
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 11px; padding: 11px 17px;
    color: white; font-weight: 800; cursor: pointer; transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.button.primary { background: linear-gradient(135deg, #179efb, #2465ff); box-shadow: 0 9px 25px rgba(27,112,247,.32); }
.button.blue { background: linear-gradient(135deg, #168fdc, #1b69d8); border-color: #2d9cef; }
.button.ghost { background: #0b1521; border-color: #2a4158; color: #dce9f5; }
.button.compact { padding: 8px 13px; }
.button.wide { width: 100%; }
.release-panel { padding: 0; overflow: hidden; }
.release-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 26px; }
.release-panel .release-meta p { margin: 7px 0 0; }
.release-version { color: #78c7ff; }
.release-download { min-height: 48px; padding-inline: 22px; white-space: nowrap; }
.release-warning { display: flex; align-items: center; gap: 18px; margin: 0 26px 20px; padding: 15px 17px; border: 1px solid #a83b4c; border-radius: 13px; background: linear-gradient(135deg, #35111a, #210b11); color: #ffb3be; }
.release-warning strong { flex: 0 0 auto; color: #ff667c; }
.release-warning span { line-height: 1.45; }
.release-upload { padding: 22px 26px 25px; border-top: 1px solid var(--line); background: rgba(3, 10, 17, .54); }
.upload-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.upload-heading h3 { margin: 0; font-size: 16px; }
.upload-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.upload-form { display: grid; grid-template-columns: minmax(150px, .38fr) minmax(330px, 1fr) auto; gap: 12px; align-items: end; }
.upload-field { display: grid; gap: 8px; min-width: 0; }
.upload-field > span { color: #a9bdd0; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.upload-field input { min-height: 50px; padding: 11px 13px; font-size: 14px; }
.file-field input[type="file"] { padding: 6px 8px; color: #b9cad9; cursor: pointer; }
.file-field input[type="file"]::file-selector-button { height: 36px; margin-right: 12px; padding: 0 15px; color: white; font-weight: 800; border: 1px solid #2a79b5; border-radius: 8px; background: #102b45; cursor: pointer; }
.upload-button { min-height: 50px; padding-inline: 22px; white-space: nowrap; }
.upload-button:disabled { cursor: wait; opacity: .68; transform: none; }
.upload-progress { height: 8px; margin-top: 16px; overflow: hidden; border: 1px solid #1e3c57; border-radius: 99px; background: #030a11; }
.upload-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #148cff, #27d5e8); box-shadow: 0 0 14px rgba(39,213,232,.5); transition: width .16s ease; }
.upload-message { min-height: 18px; margin: 10px 0 0; color: #8fa5b9; font-size: 12px; }
.upload-message.success { color: var(--green); }
.upload-message.error { color: #ff7b90; }
.upload-help { margin: 13px 0 0; color: #6f879d; font-size: 11px; }
.upload-help strong { color: #9dd5ff; }

.workspace { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 17px; align-items: start; }
.batch-list { padding: 14px; max-height: calc(100vh - 285px); overflow: auto; }
.batch-list .panel-title { padding: 8px 8px 4px; }
.batch-list .panel-title span { color: var(--muted); font-size: 12px; }
.batch-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 14px 13px; margin-top: 5px; border-radius: 12px; color: #c6d5e3;
    border: 1px solid transparent; transition: .16s ease;
}
.batch-row:hover { background: #0b1928; }
.batch-row.selected { background: linear-gradient(135deg, #102a45, #0b1c2d); border-color: #246b9f; color: white; }
.batch-row strong, .batch-row small { display: block; }
.batch-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 185px; }
.batch-row small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.batch-count { padding: 6px 8px; border-radius: 9px; background: #06111d; color: #6fc2ff; font-weight: 800; font-size: 12px; }
.device-panel { min-height: 500px; }
.batch-head { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.batch-head > div:first-child { margin-right: auto; }
.batch-head h2 { font-size: 25px; }
.batch-head .muted { margin: 7px 0 0; font-size: 12px; }
.batch-code { min-width: 155px; padding: 11px 17px; text-align: center; border-radius: 14px; background: #061a2a; border: 1px solid #2177ae; box-shadow: inset 0 0 22px rgba(25,136,213,.1); }
.batch-code small, .batch-code strong { display: block; }
.batch-code small { color: #6fbce9; font-size: 9px; letter-spacing: .18em; }
.batch-code strong { margin-top: 4px; color: white; font-size: 26px; letter-spacing: .17em; }
.start-device-button { white-space: nowrap; }

.start-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 0, #0b2946 0, #050c16 48%, #02060b 100%); }
.start-card { width: min(680px, 100%); padding: 42px; border: 1px solid #244b6d; border-radius: 28px; background: linear-gradient(145deg, rgba(13,29,48,.98), rgba(4,11,20,.98)); box-shadow: 0 30px 90px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.05); }
.start-card .brand { justify-content: flex-start; margin-bottom: 34px; }
.start-card h1 { margin: 6px 0 22px; font-size: clamp(36px, 7vw, 58px); letter-spacing: -.04em; }
.current-session { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid #1d699a; border-radius: 16px; background: #071a2b; }
.current-session small { color: #62bfff; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.current-session strong { font-size: 21px; }
.start-steps { display: grid; gap: 12px; margin: 25px 0; color: #b6c7d9; }
.start-steps span { display: flex; align-items: center; gap: 12px; }
.start-steps b { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; color: white; background: #167dec; }
.launch-download { display: flex; min-height: 62px; font-size: 18px; }
.start-note { margin: 16px 0 0; color: #8296aa; text-align: center; font-size: 12px; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.summary-strip span { position: relative; padding: 14px 15px; border-radius: 12px; color: var(--muted); background: #07111c; border: 1px solid #172b3e; font-size: 11px; }
.summary-strip span::before { content: ""; display: block; width: 23px; height: 3px; margin-bottom: 11px; border-radius: 9px; background: #476176; }
.summary-strip span:nth-child(2)::before { background: var(--blue); }
.summary-strip span:nth-child(3)::before { background: var(--green); }
.summary-strip span:nth-child(4)::before { background: var(--red); }
.summary-strip strong { display: block; margin-bottom: 4px; color: white; font-size: 25px; line-height: 1; }
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 13px; }
.device-card {
    position: relative; overflow: hidden; min-height: 290px; padding: 18px; border-radius: 16px;
    border: 1px solid #20384e; background: linear-gradient(155deg, #0d1c2c, #06101a); transition: .2s ease;
}
.device-card:hover { transform: translateY(-2px); border-color: #2d6c99; box-shadow: 0 18px 35px #0008; }
.device-card::after { content: ""; position: absolute; inset: auto -70px -85px auto; width: 170px; height: 170px; border-radius: 50%; background: rgba(31,156,255,.06); pointer-events: none; }
.device-card.testing { border-color: #1f80b9; box-shadow: inset 0 0 38px rgba(12,106,166,.12); }
.device-card.issue { border-color: #753044; box-shadow: inset 0 0 38px rgba(255,79,104,.08); }
.device-card.repaired { border-color: #856323; box-shadow: inset 0 0 38px rgba(255,180,79,.08); }
.device-card.parts { border-color: #70468c; box-shadow: inset 0 0 38px rgba(213,91,255,.08); }
.device-card.supplier_return { border-color: #28647c; box-shadow: inset 0 0 38px rgba(55,194,240,.08); }
.device-card.completed { border-color: #226341; }
.device-top { display: flex; justify-content: space-between; align-items: center; }
.device-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #58c2ff; background: #102b43; font-size: 20px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 99px; background: #121d29; font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.status.testing { color: #6dcaff; }.status.testing i { background: #35b7ff; }
.status.completed { color: #69e5a0; }.status.completed i { background: var(--green); }
.status.issue { color: #ff8ea1; }.status.issue i { background: var(--red); box-shadow: 0 0 12px var(--red); }
.status.repaired { color: #ffbe63; }.status.repaired i { background: #ffb44f; box-shadow: 0 0 12px #ffb44f; }
.status.parts { color: #e4a8ff; }.status.parts i { background: #d55bff; box-shadow: 0 0 12px #d55bff; }
.status.supplier_return { color: #76d9fa; }.status.supplier_return i { background: #37c2f0; box-shadow: 0 0 12px #37c2f0; }
.status.connected { color: #83caff; }.status.connected i { background: var(--blue); }
.status.offline { color: #8995a1; }.status.offline i { background: #667482; box-shadow: none; }
.device-card h3 { margin: 17px 0 5px; font-size: 21px; letter-spacing: -.03em; }
.device-card > p { min-height: 34px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.device-card dl { margin: 14px 0; }
.device-card dl div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #1b2c3d; }
.device-card dt { color: var(--muted); }.device-card dd { margin: 0; text-align: right; font-weight: 650; }
.progress { height: 6px; overflow: hidden; border-radius: 9px; background: #192838; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 12px rgba(39,213,232,.4); }
.progress-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }
.device-card > a { position: relative; z-index: 1; display: inline-flex; margin-top: 13px; color: #5bbdff; font-weight: 750; font-size: 12px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty.large { padding: 140px 20px; }

.report-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.report-toolbar .search { display: flex; gap: 9px; flex: 1; max-width: 680px; }
.report-total { color: var(--muted); font-size: 12px; }
.report-list { overflow: hidden; }
.report-list table { width: 100%; border-collapse: collapse; }
.report-list th { padding: 12px 14px; color: #6f8498; font-size: 9px; letter-spacing: .14em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.report-list td { padding: 15px 14px; border-bottom: 1px solid #15283a; }
.report-list tbody tr { transition: background .15s ease; }.report-list tbody tr:hover { background: #0c1927; }
.report-list td strong, .report-list td small { display: block; }
.report-list td small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.serial { color: #93cfff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.grade-chip { display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; color: #ffd293; background: #2a1d0e; border: 1px solid #69451c; font-weight: 900; }

.report-body { padding: 0; }
.report-page { max-width: 1180px; margin: auto; }
.report-workspace { min-width: 0; padding: 34px 40px 52px; }
.report-shell { display: block; min-height: 100vh; }
.report-shell .sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: 218px; height: 100vh; }
.report-shell .report-workspace { min-height: 100vh; margin-left: 218px; }
.report-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.report-nav-actions { display: flex; align-items: center; gap: 10px; }
.sales-label-dialog { width: min(960px, calc(100vw - 32px)); padding: 22px; color: var(--text); border: 1px solid #277eba; border-radius: 22px; background: linear-gradient(150deg, #0d1d2e, #050d16); box-shadow: 0 30px 100px rgba(0,0,0,.75); }
.sales-label-dialog::backdrop { background: rgba(0,4,8,.8); backdrop-filter: blur(8px); }
.sales-label-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.sales-label-dialog-head h2 { margin: 5px 0 0; font-size: 24px; }
.sales-label-preview { width: 100%; aspect-ratio: 89 / 36; padding: 2.2% 2.5%; box-sizing: border-box; overflow: hidden; display: grid; grid-template-rows: auto 1fr 1fr; gap: 2%; color: #111; border: 1px solid #d6d6d6; border-radius: 12px; background: #fff; }
.sales-label-title, .sales-label-code > div { width: 100%; text-align: center; font: 500 clamp(11px,1.8vw,16px)/1 system-ui,sans-serif; white-space: nowrap; }
.sales-label-row { display: grid; grid-template-columns: 13% 1fr 13%; align-items: center; min-height: 0; }
.sales-label-code { height: 100%; min-height: 0; display: grid; grid-template-rows: 1fr auto; gap: 2px; align-items: end; }
.sales-label-code svg { width: 100%; height: 100%; min-height: 0; }
.sales-label-row:first-of-type .sales-label-code > div { transform: translateY(clamp(5px,.8vw,10px)); }
.sales-label-ce { align-self: center; justify-self: center; max-width: 96%; font: 500 clamp(36px,7vw,66px)/1 Arial,sans-serif; letter-spacing: -.12em; white-space: nowrap; }
.sales-label-batch { align-self: end; justify-self: end; font: 500 clamp(12px,2.4vw,22px)/1 system-ui,sans-serif; }
.sales-label-controls { display: grid; gap: 10px; margin-top: 18px; }
.sales-label-controls label { display: grid; gap: 7px; color: #9fb3c6; font-size: 12px; font-weight: 800; }
.sales-label-controls input { width: 100%; padding: 12px 14px; box-sizing: border-box; }
.sales-label-controls > div { display: flex; justify-content: flex-end; gap: 10px; }
.sales-label-error { min-height: 18px; margin: 0; color: #ff7b88; font-size: 12px; }
.sales-label-controls .button:disabled { cursor: not-allowed; opacity: .4; }
.back { color: #5abaff; font-weight: 700; }
.report-hero { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 25px; margin: 0 0 16px; padding: 32px; border-radius: var(--radius-xl); border: 1px solid #1e5d8d; background: linear-gradient(140deg, #102c48, #07121f 70%); box-shadow: var(--shadow); }
.report-hero::after { content: ""; position: absolute; right: -100px; top: -120px; width: 320px; height: 320px; border-radius: 50%; border: 55px solid rgba(37,157,255,.07); }
.report-hero h1 { position: relative; margin: 0 0 7px; font-size: clamp(32px, 5vw, 50px); letter-spacing: -.05em; }
.report-hero p { position: relative; margin: 0; color: #9bb2c7; }
.report-outcome { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 170px); gap: 10px; align-items: stretch; }
.grade, .outcome-badge, .batch-badge { box-sizing: border-box; display: flex; width: 170px; height: 82px; padding: 13px 16px; flex-direction: column; justify-content: center; border-radius: 14px; font-size: 11px; font-weight: 800; line-height: 1; }
.grade { color: #69bfff; background: #071727; border: 1px solid #2889ca; }
.grade strong, .outcome-badge strong, .batch-badge strong { display: block; margin-top: 7px; color: white; font-size: 20px; line-height: 1; }
.grade span, .outcome-badge span, .batch-badge span { letter-spacing: .04em; }
.outcome-badge.completed { color: #79e5aa; background: #092419; border: 1px solid #236944; }
.outcome-badge.completed strong { color: #79e5aa; }
.outcome-badge.issue { color: #ff93a4; background: #2c1118; border: 1px solid #7a2c3e; }
.outcome-badge.issue strong { color: #ff93a4; }
.batch-badge { color: #8fd9ff; background: #071d2c; border: 1px solid #287ca8; }
.batch-badge strong { white-space: nowrap; }
.report-batch { display: inline-block; max-width: 150px; overflow: hidden; color: #8fd9ff; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 16px; }
.spec-grid div { padding: 17px; border-radius: 14px; background: linear-gradient(145deg, #0c1927, #07101a); border: 1px solid var(--line); }
.spec-grid small, .spec-grid strong { display: block; }.spec-grid small { margin-bottom: 7px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.spec-grid strong { font-size: 16px; }
.serial-value { display: flex !important; align-items: center; gap: 9px; }
.copy-value { display: inline-grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; padding: 0; border: 1px solid #285274; border-radius: 8px; color: #68c2ff; background: #0b2336; cursor: pointer; font-size: 16px; line-height: 1; }
.copy-value:hover, .copy-value.copied { color: #8af0b5; border-color: #347854; background: #0b2c1d; }
.insight-grid { display: grid; grid-template-columns: repeat(var(--insight-columns, 4), minmax(0, 1fr)); gap: 11px; margin-bottom: 16px; }
.insight-card { padding: 18px; border-radius: 14px; background: #08131f; border: 1px solid #1b344a; }
.insight-card small, .insight-card strong { display: block; }.insight-card small { color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }.insight-card strong { margin-top: 7px; color: #64c4ff; font-size: 22px; }
.insight-card.health-good strong { color: #5fe398; }.insight-card.health-good { border-color: #286342; }
.insight-card.health-warning strong { color: var(--orange); }.insight-card.health-warning { border-color: #75491e; }
.insight-card.health-critical strong { color: var(--red); }.insight-card.health-critical { border-color: #753143; }
.insight-card.new-battery-pulse { animation: new-battery-pulse 1.44s ease-in-out infinite; }
@keyframes new-battery-pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px rgba(46, 225, 120, .22); }
    50% { opacity: .48; transform: scale(1.035); border-color: #57f59a; box-shadow: 0 0 28px rgba(46, 225, 120, .78); }
}
.sku { margin-bottom: 16px; border-color: #3b3d6b; background: linear-gradient(145deg, #15172c, #090d18); }.sku h2 { display: flex; align-items: center; gap: 10px; line-height: 1.45; font-size: 19px; }
.report-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.report-section-heading h2 { font-size: 25px; }
.report-section-heading > div > p:last-child { max-width: 690px; margin: 7px 0 0; color: #7f96aa; line-height: 1.5; }
.report-findings-panel { margin-bottom: 16px; border-color: #613043; background: linear-gradient(150deg, #160d13, #080d14 62%); }
.finding-count { display: grid; place-items: center; min-width: 44px; height: 44px; border: 1px solid #934058; border-radius: 13px; color: #ff99aa; background: #32151e; font-size: 20px; font-weight: 900; }
.finding-list, .evidence-list { display: grid; gap: 12px; }
.finding-card { overflow: hidden; border: 1px solid #633044; border-radius: 16px; background: #0b1119; box-shadow: inset 4px 0 #ff536f; }
.finding-card > header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid #36202a; background: linear-gradient(90deg, rgba(255,83,111,.09), transparent 70%); }
.finding-card header small, .finding-note small { display: block; margin-bottom: 5px; color: #8da0b1; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.finding-card h3, .evidence-card h3 { margin: 0; font-size: 18px; }
.finding-card header > span { max-width: 48%; padding: 7px 10px; border: 1px solid #8e354b; border-radius: 9px; color: #ff91a3; background: #2c1118; font-size: 11px; font-weight: 900; text-align: right; }
.finding-content { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 18px; padding: 18px; }
.finding-note { padding: 14px 15px; border-radius: 12px; background: #101a25; }
.finding-note p, .evidence-card > p { margin: 0; color: #d3dfE9; line-height: 1.65; }
.finding-photos { margin-top: 0; }
.finding-photos:empty { display: none; }
.report-evidence-panel { margin-bottom: 16px; border-color: #26516d; }
.evidence-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evidence-card { padding: 16px; border: 1px solid #1d3b51; border-radius: 14px; background: #08131e; }
.evidence-card header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.evidence-card header span { color: #62dfa0; font-size: 11px; font-weight: 900; }
.report-results-panel { margin-bottom: 16px; }
.compact-results-panel { border-color: #215c88; background: linear-gradient(145deg, #091725, #060d15); }
.compact-results-panel .report-section-heading { align-items: center; margin-bottom: 14px; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 0; }
.result-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 67px; padding: 10px 13px; border: 1px solid #1d6544; border-radius: 13px; background: #081827; }
.result-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: white; background: #2bd46e; font-weight: 900; }
.result-main { min-width: 0; }.result-main strong { display: block; overflow: hidden; color: #e6eef7; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }.result-indicators { display: flex; align-items: center; gap: 7px; margin-top: 3px; }.result-status { color: #2bd46e; font-size: 12px; font-weight: 850; }.result-photo-indicator { position: relative; display: grid; place-items: center; width: 24px; height: 18px; border: 2px solid #68c2ff; border-radius: 4px; color: #bce6ff; background: #0a263a; font-size: 10px; font-weight: 950; line-height: 1; }.result-photo-indicator::before { position: absolute; top: -5px; left: 5px; width: 8px; height: 4px; border: 2px solid #68c2ff; border-bottom: 0; border-radius: 3px 3px 0 0; content: ''; }
.result-row > small { max-width: 125px; overflow: hidden; color: #64df9e; font-size: 9px; font-weight: 850; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.result-row.result-failed { border-color: #70303d; }.result-row.result-failed .result-number { background: #ff4354; }.result-row.result-failed .result-status { color: #ff5365; }
.result-row.result-issue, .result-row.result-skipped, .result-row.result-pending { border-color: #75491e; }.result-row.result-issue .result-number, .result-row.result-skipped .result-number, .result-row.result-pending .result-number { background: #ff922f; }.result-row.result-issue .result-status, .result-row.result-skipped .result-status, .result-row.result-pending .result-status { color: #ff9a3d; }
.report-documentation-panel { margin-bottom: 16px; border-color: #27506e; background: #07101a; }
.report-documentation-panel .report-section-heading { margin-bottom: 13px; }
.documentation-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.documentation-row { overflow: hidden; border: 1px solid #24445c; border-radius: 13px; background: #0a1623; }
.documentation-row > header { display: grid; grid-template-columns: 23px max-content 24px; align-items: center; justify-content: start; gap: 9px; padding: 10px 13px 7px; }
.documentation-row h3 { margin: 0; font-size: 14px; }.documentation-row header strong { max-width: 230px; overflow: hidden; color: #69dfa0; font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.documentation-symbol { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #06100b; background: #5fe398; font-weight: 950; }
.documentation-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px 11px 45px; }.documentation-content > p { margin: 0; color: #9fb0c1; font-size: 12px; line-height: 1.4; }
.documentation-row.result-failed { border-color: #71303e; }.documentation-row.result-failed .documentation-symbol { color: white; background: #ff4658; }.documentation-row.result-failed header strong { color: #ff5365; }
.documentation-row.result-issue, .documentation-row.result-skipped { border-color: #75491e; }.documentation-row.result-issue .documentation-symbol, .documentation-row.result-skipped .documentation-symbol { color: white; background: #ff922f; }.documentation-row.result-issue header strong, .documentation-row.result-skipped header strong { color: #ff9a3d; }
.documentation-photo-badge { display: inline-grid; grid-template-columns: 11px 1fr; align-items: center; justify-items: center; width: 24px; height: 24px; overflow: hidden; border: 1px solid #4388b4; border-radius: 5px; color: #bce6ff; background: #0a263a; text-decoration: none; cursor: zoom-in; box-sizing: border-box; }.documentation-photo-badge span { font-size: 11px; line-height: 1; }.documentation-photo-badge b { font-size: 9px; line-height: 1; }.documentation-photo-badge:focus-visible { outline: 2px solid #68c2ff; outline-offset: 2px; }
.photo-preview-overlay { position: fixed; z-index: 1000; inset: 0; display: none; align-items: center; justify-content: center; padding: 24px; }.photo-preview-overlay:target { display: flex; }.photo-preview-backdrop { position: absolute; inset: 0; background: rgba(0, 5, 10, .84); backdrop-filter: blur(7px); }.photo-preview-panel { position: relative; z-index: 1; width: min(760px, 100%); max-height: min(720px, 88vh); overflow: auto; padding: 22px; border: 1px solid #2a6b98; border-radius: 18px; background: #071522; box-shadow: 0 28px 90px #000c; }.photo-preview-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }.photo-preview-panel small { color: #66c4ff; font-weight: 900; letter-spacing: .16em; }.photo-preview-panel h3 { margin: 4px 0 0; font-size: 22px; }.photo-preview-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #315673; border-radius: 50%; color: #dcecff; background: #0d2537; font-size: 24px; line-height: 1; text-decoration: none; }.photo-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }.photo-preview-grid a { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid #315a77; border-radius: 12px; background: #02070b; }.photo-preview-grid img { display: block; width: 100%; height: 100%; object-fit: contain; }.photo-preview-grid b { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 7px; color: white; background: #071522df; font-size: 12px; }
.photo-preview-grid > a:only-child { grid-column: 1 / -1; width: min(100%, 680px); justify-self: center; }
.report-footer { display: flex; justify-content: space-between; margin: 18px 3px; color: var(--muted); font-size: 12px; }

/* Portal blue glass — report visual layer. */
.report-body {
    background:
        radial-gradient(circle at 14% 4%, rgba(31, 156, 255, .20), transparent 36%),
        radial-gradient(circle at 88% 86%, rgba(37, 113, 255, .14), transparent 38%),
        var(--bg);
}
.report-hero,
.report-body .panel,
.report-body .spec-grid div,
.report-body .insight-card,
.report-body .result-row,
.report-body .documentation-row,
.report-body .evidence-card {
    border-color: rgba(76, 185, 255, .34);
    background: linear-gradient(145deg, rgba(24, 91, 148, .24), rgba(13, 48, 81, .24) 58%, rgba(4, 12, 22, .62));
    box-shadow: inset 0 1px 0 rgba(220, 241, 255, .15), 0 18px 46px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px) saturate(116%);
}
.report-hero { border-color: rgba(76, 185, 255, .50); }
.report-hero::after { border-color: rgba(104, 194, 255, .14); }
.report-body .grade {
    color: #edf7ff;
    border-color: rgba(82, 183, 255, .58);
    background: rgba(26, 112, 174, .25);
}
.report-body .eyebrow,
.report-body .insight-card strong,
.report-body .back { color: #62bdff; }
.report-body .copy-value,
.report-body .result-photo-indicator,
.report-body .documentation-photo-badge {
    color: #e1f3ff;
    border-color: rgba(87, 181, 247, .54);
    background: rgba(24, 100, 157, .25);
}
.report-body .compact-results-panel,
.report-body .report-documentation-panel,
.report-body .report-evidence-panel {
    border-color: rgba(72, 166, 231, .40);
}
.report-body .health-good { border-color: #286342; }
.report-body .health-warning,
.report-body .result-row.result-issue,
.report-body .result-row.result-skipped,
.report-body .result-row.result-pending,
.report-body .documentation-row.result-issue,
.report-body .documentation-row.result-skipped { border-color: #75491e; }
.report-body .health-critical,
.report-body .result-row.result-failed,
.report-body .documentation-row.result-failed { border-color: #71303e; }
.report-body .outcome-badge.completed { border-color: #236944; background: rgba(9, 64, 39, .55); }
.report-body .outcome-badge.issue { border-color: #7a2c3e; background: rgba(74, 21, 33, .58); }

.login-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 38px; border-radius: 25px; background: linear-gradient(145deg, #0c1928, #050b12); border: 1px solid #1c3a56; box-shadow: 0 35px 100px #000c; }
.login-card h1 { margin: 30px 0 7px; text-align: center; font-size: 31px; letter-spacing: -.04em; }.login-card > p { margin: 0 0 27px; text-align: center; color: var(--muted); }
.login-card form { display: grid; gap: 15px; }.login-card label { display: grid; gap: 7px; color: #aebdcb; font-size: 12px; }

@media (max-width: 1180px) {
    .control-grid, .workspace { grid-template-columns: 1fr; }
    .batch-list { max-height: none; display: flex; overflow-x: auto; align-items: center; gap: 7px; }
    .batch-list .panel-title { min-width: 100px; margin: 0; }.batch-row { min-width: 230px; margin: 0; }
}
@media (max-width: 860px) {
    .shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 18px; flex-direction: row; align-items: center; gap: 20px; }
    .report-shell .sidebar { position: static; width: 100%; height: auto; }
    .report-shell .report-workspace { margin-left: 0; }
    .sidebar nav { margin: 0 0 0 auto; display: flex; }.sidebar-app-tools, .sidebar-bottom { display: none; }.sidebar nav a { padding: 10px; }.sidebar nav a span:last-child { display: none; }
    main { padding: 25px 18px 42px; }.batch-form { grid-template-columns: 1fr; }.upload-form { grid-template-columns: minmax(135px, .4fr) minmax(260px, 1fr); }.upload-button { grid-column: 1 / -1; }
    .summary-strip { grid-template-columns: 1fr 1fr; }.spec-grid { grid-template-columns: 1fr 1fr; }.insight-grid { grid-template-columns: 1fr 1fr; }
    .finding-content { grid-template-columns: 1fr; }.evidence-list, .documentation-list { grid-template-columns: 1fr; }.result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-list { overflow-x: auto; }.report-list table { min-width: 900px; }
}
@media (max-width: 590px) {
    .brand small { display: none; }.topbar { align-items: flex-start; }.topbar .live-pill { display: none; }
    .release-header, .upload-heading, .release-warning { align-items: flex-start; flex-direction: column; }.release-download { width: 100%; }.release-warning { gap: 5px; }.upload-form { grid-template-columns: 1fr; }.upload-button { grid-column: auto; }.batch-head { align-items: flex-start; flex-wrap: wrap; }.batch-code { order: 3; width: 100%; }
    .summary-strip, .spec-grid, .insight-grid, .result-grid { grid-template-columns: 1fr; }.report-workspace { padding: 15px; }.report-hero { align-items: flex-start; flex-direction: column; }.report-outcome { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }.grade, .outcome-badge, .batch-badge { width: 100%; }
    .finding-card > header, .report-section-heading { align-items: flex-start; flex-direction: column; }.finding-card header > span { max-width: 100%; text-align: left; }
    .photo-preview-grid { grid-template-columns: 1fr; }.photo-preview-panel { padding: 16px; }
}

@media print {
    @page { size: A4 landscape; margin: 5mm; }
    :root { color-scheme: light; }.report-body { padding: 0; background: white; color: #111; font-size: 8pt; }.report-body .shell { display: block; min-height: 0; }.report-body .sidebar { display: none !important; }.report-workspace { padding: 0; }.report-page { width: 100%; max-width: none; }.report-nav, .copy-value, .photo-preview-overlay { display: none !important; }
    .report-hero { min-height: 0; margin-bottom: 2.5mm; padding: 4mm 5mm; border-radius: 3mm; box-shadow: none; background: white; color: #111; }.report-hero::after { display: none; }.report-hero h1 { margin-bottom: 1mm; font-size: 23pt; }.report-hero .eyebrow { font-size: 6pt; }.report-hero p { color: #555; }.report-outcome { grid-template-columns: repeat(3, 28mm); gap: 2mm; }.grade, .outcome-badge, .batch-badge { width: 28mm; height: 15mm; min-height: 0; padding: 2mm 3mm; border-radius: 2.5mm; }.grade strong, .outcome-badge strong { font-size: 18pt; }.batch-badge strong { font-size: 9pt; }
    .spec-grid { gap: 1.5mm; margin-bottom: 2mm; }.spec-grid div { padding: 2.2mm 3mm; border-radius: 2mm; box-shadow: none; background: white; color: #111; }.spec-grid small { margin-bottom: 1mm; color: #555; font-size: 5.5pt; }.spec-grid strong { font-size: 9pt; }
    .insight-grid { gap: 1.5mm; margin-bottom: 2mm; }.insight-card { padding: 2mm 3mm; border-radius: 2mm; box-shadow: none; background: white; color: #111; }.insight-card small { color: #555; font-size: 5.5pt; }.insight-card strong { margin-top: .5mm; font-size: 13pt; }
    .panel { padding: 3mm; border-radius: 2.5mm; box-shadow: none; background: white; color: #111; }.sku { margin-bottom: 2mm; padding: 2.3mm 3mm; }.sku .eyebrow { font-size: 5.5pt; }.sku h2 { font-size: 9pt; line-height: 1.2; }
    .report-results-panel { margin-bottom: 2mm; }.report-section-heading { margin-bottom: 1.5mm; }.report-section-heading h2 { font-size: 13pt; }.report-section-heading .eyebrow { font-size: 5.5pt; }.report-section-heading .muted { font-size: 7pt; }
    .result-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1mm; }.result-row { grid-template-columns: 7mm minmax(0, 1fr); min-height: 12mm; padding: 1.3mm 2mm; gap: 1.5mm; border-radius: 2mm; background: white; }.result-number { width: 7mm; height: 7mm; }.result-main strong { color: #111; font-size: 7.5pt; }.result-indicators { gap: 1.5mm; margin-top: .5mm; }.result-status { font-size: 6.5pt; }.result-photo-indicator { width: 5mm; height: 3.8mm; border-width: .4mm; border-radius: .8mm; color: #17699a; background: white; font-size: 6pt; }.result-photo-indicator::before { top: -1.2mm; left: 1mm; width: 1.8mm; height: .8mm; border-width: .4mm; border-bottom: 0; }
    .report-documentation-panel { margin-bottom: 1mm; }.documentation-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1mm; }.documentation-row { border-radius: 2mm; background: white; }.documentation-row > header { grid-template-columns: 5mm max-content 5mm; padding: 1.5mm 2mm .5mm; gap: 1mm; }.documentation-symbol { width: 4mm; height: 4mm; font-size: 7pt; }.documentation-row h3 { font-size: 7.5pt; }.documentation-photo-badge { grid-template-columns: 2.3mm 1fr; width: 5mm; height: 5mm; border-width: .3mm; border-radius: 1mm; color: #17699a; background: white; }.documentation-photo-badge span { font-size: 6pt; }.documentation-photo-badge b { font-size: 5pt; }.documentation-content { padding: .5mm 2mm 1.5mm 8mm; }.documentation-content > p { color: #333; font-size: 6.5pt; line-height: 1.25; }
    .report-footer { margin: 1.5mm 1mm 0; font-size: 6pt; }
}
@media print {
    body.sales-label-printing { width: 89mm; height: 36mm; margin: 0; padding: 0; background: #fff; }
    body.sales-label-printing .shell { display: block; min-height: 0; }
    body.sales-label-printing .sidebar { display: none !important; }
    body.sales-label-printing .report-workspace { padding: 0; }
    body.sales-label-printing .report-page { width: 89mm; height: 36mm; max-width: none; margin: 0; }
    body.sales-label-printing .report-page > :not(.sales-label-dialog) { display: none !important; }
    body.sales-label-printing .sales-label-dialog { position: static; display: block; width: 89mm; height: 36mm; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
    body.sales-label-printing .sales-label-dialog-head, body.sales-label-printing .sales-label-controls { display: none !important; }
    body.sales-label-printing .sales-label-preview { width: 89mm; height: 36mm; padding: 2mm 2.2mm; border: 0; border-radius: 0; }
    body.sales-label-printing .sales-label-title, body.sales-label-printing .sales-label-code > div { font-size: 7pt; }
    body.sales-label-printing .sales-label-ce { font-size: 27pt; }
    body.sales-label-printing .sales-label-batch { font-size: 8pt; }
}
.issue-documentation{grid-column:1/-1;margin:-3px 0 10px;padding:14px 16px;border:1px solid rgba(255,112,112,.28);border-radius:14px;background:rgba(255,255,255,.025)}
.issue-documentation p{margin:0;color:#cbd9e8;line-height:1.55;white-space:normal}
.issue-photos{display:flex;gap:10px;overflow-x:auto;margin-top:12px;padding-bottom:3px}
.issue-photos img{width:180px;height:126px;flex:0 0 auto;object-fit:cover;border-radius:11px;border:1px solid rgba(255,255,255,.16)}
@media print {
    .issue-documentation{background:#fff;color:#111;border-color:#ccd3da;break-inside:avoid}
    .issue-documentation p{color:#333}
    .issue-photos{overflow:visible;flex-wrap:wrap}
}

/* Operations workspace — dense, scan-first dashboard */
.dashboard-body { background: #03080e; }
.dashboard-body .shell { grid-template-columns: 218px minmax(0, 1fr); }
.dashboard-body .sidebar { padding: 20px 14px 16px; }
.dashboard-body .brand { gap: 10px; padding: 0 5px; }
.dashboard-body .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
.dashboard-body .brand strong { font-size: 16px; }
.dashboard-body .brand small { max-width: 130px; font-size: 9px; line-height: 1.35; }
.dashboard-body .sidebar nav { margin-top: 32px; }
.dashboard-body .sidebar nav a { padding: 11px 12px; font-size: 13px; }
.dashboard-body .sidebar-bottom { padding: 12px; }

.dashboard-main { min-width: 0; padding: 22px 24px 32px; }
.dashboard-body .topbar { align-items: center; margin-bottom: 16px; }
.dashboard-body .topbar h1 { font-size: 29px; }
.dashboard-body .topbar-subtitle { margin-top: 6px; font-size: 12px; }
.dashboard-body .eyebrow { margin-bottom: 5px; font-size: 9px; }
.dashboard-body .panel { border-radius: 15px; padding: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.2); }

.command-bar {
    display: grid; grid-template-columns: minmax(390px, 1.25fr) 132px 190px 205px; gap: 8px;
    align-items: stretch; margin-bottom: 13px; padding: 9px !important;
    background: linear-gradient(90deg, #0c1b2a, #07111c) !important;
}
.command-session, .command-code, .command-expiry {
    display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; min-height: 92px; padding: 10px 14px;
    border: 1px solid #182d41; border-radius: 10px; background: rgba(3,10,17,.58);
}
.command-session {
    display: grid;
    grid-template-columns: minmax(58px, 1fr) minmax(0, 2fr) minmax(110px, 1fr);
    align-items: center;
}
.command-icon {
    position: relative; overflow: hidden; display: grid; place-items: center; justify-self: center;
    width: 50px; height: 50px; border: 0; border-radius: 13px;
    background: transparent;
    box-shadow: 0 9px 24px rgba(79,209,189,.12);
}
.command-session-copy { display: grid; justify-items: center; align-content: center; gap: 6px; width: 100%; min-width: 0; text-align: center; }
.command-bar .command-session-copy strong {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(17px, 1.65vw, 25px);
    line-height: 1.08;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.command-bar .command-session-copy strong.retest-batch-title {
    display: grid;
    justify-items: center;
    gap: 2px;
    width: 100%;
    font-size: clamp(15px, 1.5vw, 23px);
    line-height: 1.02;
    -webkit-line-clamp: unset;
}
.batch-serial-line, .batch-retest-line {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: clip;
    white-space: nowrap;
}
.batch-retest-line {
    color: #c9d9e8;
    font-size: .72em;
    letter-spacing: .04em;
}
.command-qr { justify-self: center; width: min(100%, 150px); min-height: 48px; padding: 0 13px; white-space: nowrap; }
.command-session-actions { display: grid; align-content: center; gap: 7px; min-height: 92px; padding: 9px; border: 1px solid #182d41; border-radius: 10px; background: rgba(3,10,17,.58); }
.command-session-actions form { width: 100%; }
.command-session-actions .button { width: 100%; min-height: 34px; padding: 7px 9px; font-size: 11px; }
.command-session-actions.is-empty,
.command-code.is-empty,
.command-expiry.is-empty { opacity: .42; }
.command-session-actions.is-empty { pointer-events: none; opacity: 1; }
.command-session-actions.is-empty .button,
.command-qr.is-empty { cursor: not-allowed; opacity: .38; pointer-events: none; filter: saturate(.4); box-shadow: none; }
.command-code.is-empty strong,
.command-expiry.is-empty strong { color: #718395; letter-spacing: .08em; }
.command-session-actions .button:disabled { cursor: not-allowed; opacity: .38; filter: saturate(.4); transform: none; box-shadow: none; }
.command-bar small, .distribution-details summary small { display: block; color: #5abaff; font-size: 9px; font-weight: 900; letter-spacing: .16em; text-align: center; }
.command-bar strong { display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; line-height: 1.15; }
.command-code, .command-expiry { display: grid; place-content: center; justify-items: center; min-width: 0; text-align: center; }
.command-code-value { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.command-code strong { color: white; font-size: 18px; letter-spacing: .14em; }
.command-code-copy { display: inline-flex; align-items: center; gap: 5px; min-height: 29px; padding: 5px 8px; border: 1px solid #285274; border-radius: 8px; color: #68c2ff; background: #0b2336; font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.command-code-copy:hover, .command-code-copy.copied { color: #8af0b5; border-color: #347854; background: #0b2c1d; }
.command-bar > .button { display: flex; align-items: center; justify-content: center; min-height: 92px; padding-inline: 15px; font-size: 14px; white-space: nowrap; }
.button-meta { padding: 3px 5px; border-radius: 5px; background: rgba(0,0,0,.22); font-size: 9px; }
.session-qr-dialog { position: relative; width: min(360px, calc(100vw - 32px)); padding: 28px; color: white; text-align: center; border: 1px solid #2b8dcc; border-radius: 20px; background: linear-gradient(155deg, #10263a, #050d16); box-shadow: 0 28px 90px rgba(0,0,0,.7); }
.session-qr-dialog::backdrop { background: rgba(0,5,10,.78); backdrop-filter: blur(6px); }
.session-qr-dialog small { display: block; color: #5abaff; font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.session-qr-dialog > strong { display: block; margin: 8px 0 18px; font-size: 25px; }
.session-qr-dialog p { margin: 14px 0 0; color: #9fb1c3; }
.session-qr-dialog p b { color: white; letter-spacing: .14em; }
#session-qr-code { display: grid; place-items: center; width: 244px; height: 244px; margin: 0 auto; border: 12px solid white; border-radius: 14px; background: white; }
.session-qr-close { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; padding: 0; color: #9fb1c3; border: 0; background: transparent; font-size: 25px; cursor: pointer; }

.dashboard-workspace { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 13px; align-items: start; }
.workspace-rail { position: sticky; top: 13px; display: grid; gap: 11px; min-width: 0; }
.dashboard-body .batch-list { max-height: none; padding: 10px; overflow: visible; }
.dashboard-body .batch-list .panel-title { margin: 0; padding: 5px 5px 9px; }
.dashboard-body .batch-list .panel-title h2 { font-size: 17px; }
.dashboard-body .batch-row { justify-content: flex-start; gap: 8px; margin: 3px 0 0; padding: 10px 9px; border-radius: 9px; }
.batch-state { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #5d6d7b; }
.batch-state.active { background: #35caff; box-shadow: 0 0 10px rgba(53,202,255,.6); }
.batch-state.closed { background: #607183; }
.batch-state.archived { background: #a45dff; box-shadow: 0 0 10px rgba(164,93,255,.45); }
.dashboard-body .batch-row > div { min-width: 0; margin-right: auto; }
.dashboard-body .batch-row strong { max-width: 145px; font-size: 12px; }
.dashboard-body .batch-row small { margin-top: 3px; font-size: 9px; }
.dashboard-body .batch-count { padding: 5px 6px; border-radius: 7px; font-size: 10px; }

.rail-details { overflow: hidden; }
.rail-details > summary { list-style: none; cursor: pointer; user-select: none; }
.rail-details > summary::-webkit-details-marker { display: none; }
.create-details { margin: 4px 0 8px; border: 1px dashed #24577e; border-radius: 9px; background: #071624; }
.create-details > summary { padding: 10px; color: #69c5ff; font-size: 11px; font-weight: 800; }
.create-details[open] > summary { border-bottom: 1px solid #1a344b; }
.rail-form { display: grid; gap: 9px; padding: 10px; }
.rail-form label { display: grid; gap: 5px; color: #8ea5b9; font-size: 9px; font-weight: 800; }
.rail-form input, .rail-form select, .rail-form textarea { padding: 9px 10px; border-radius: 8px; font-size: 11px; }
.rail-form textarea { min-height: 118px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.45; }
.refurb-bridge-button { margin: 4px 0 8px; color: #ffc16f; border-color: #775020; background: #251707; }
.refurb-bridge-button:hover { border-color: #b8782f; background: #35200a; }
.manual-refurb-details { border-color: #28745a; background: #071d18; }
.manual-refurb-details > summary { color: #67e2ae; }
.refurb-import-dialog { width: min(620px, calc(100vw - 28px)); padding: 24px; border: 1px solid #2e5874; border-radius: 16px; color: #dce8f1; background: #08131d; box-shadow: 0 28px 90px rgba(0,0,0,.72); }
.refurb-import-dialog::backdrop { background: rgba(0,6,12,.78); backdrop-filter: blur(5px); }
.refurb-import-dialog h2 { margin: 0 38px 7px 0; font-size: 21px; }
.refurb-import-close { position: absolute; top: 13px; right: 15px; width: 34px; height: 34px; padding: 0; border: 1px solid #29445a; border-radius: 9px; color: #93aabd; background: #0b1c2a; font-size: 22px; cursor: pointer; }
.refurb-import-intro { margin: 0 0 17px; color: #8fa5b8; font-size: 11px; line-height: 1.55; }
.refurb-import-dialog label { display: grid; gap: 7px; color: #a9bac8; font-size: 10px; font-weight: 850; }
.refurb-import-dialog input { width: 100%; padding: 12px 13px; border: 1px solid #29465d; border-radius: 9px; color: #e6f0f7; background: #06101a; font-size: 13px; }
.refurb-import-dialog textarea { width: 100%; min-height: 150px; padding: 12px 13px; border: 1px solid #29465d; border-radius: 9px; color: #e6f0f7; background: #06101a; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.refurb-import-dialog label + label { margin-top: 11px; }
.refurb-import-message { min-height: 17px; margin: 12px 0 0; color: #8298aa; font-size: 10px; line-height: 1.45; }
.refurb-import-message.loading { color: #68c9ff; }
.refurb-import-message.success { color: #60e5a3; }
.refurb-import-message.error { color: #ff8f8f; }
.refurb-import-results { margin-top: 13px; border: 1px solid #384554; border-radius: 10px; overflow: hidden; background: #050d14; }
.refurb-results-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid #263745; color: #ffc16f; }
.refurb-results-head span { display: grid; place-items: center; min-width: 27px; height: 27px; padding: 0 7px; border-radius: 8px; color: #0c171f; background: #ffc16f; font-weight: 900; }
.refurb-results-list { display: grid; gap: 1px; max-height: 265px; overflow: auto; }
.refurb-results-list > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 12px; padding: 9px 12px; background: #0a151e; }
.refurb-results-list code { color: #ffc16f; font-weight: 850; }
.refurb-results-list span { overflow: hidden; color: #b9c7d2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.refurb-import-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.refurb-import-actions .button { min-width: 112px; }
.refurb-import-actions .button[hidden] { display: none; }
.rail-form .button { padding: 9px; font-size: 11px; }

.distribution-details { padding: 0 !important; }
.distribution-details > summary { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 92px; padding: 13px 42px; text-align: center; }
.distribution-details > summary::after { content: "⌃"; position: absolute; right: 18px; top: 50%; color: #6a8297; font-size: 13px; transform: translateY(-50%); }
.distribution-details[open] > summary::after { transform: translateY(-50%) rotate(180deg); }
.distribution-details > summary b { display: none; }
.distribution-details > summary > span:nth-child(2) { display: grid; justify-items: center; min-width: 0; }
.distribution-details summary small { white-space: nowrap; }
.distribution-details summary strong { display: block; margin-top: 3px; font-size: 12px; text-align: center; white-space: nowrap; }
.summary-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; color: #67c4ff; background: #0e2b43; font-size: 20px; }
.sidebar-app-card > summary {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center;
    gap: 8px; height: var(--sidebar-tool-height); min-height: var(--sidebar-tool-height); padding: 10px 11px;
}
.sidebar-app-card > summary::after { top: 12px; right: 13px; transform: none; font-size: 11px; }
.sidebar-app-card[open] > summary::after { transform: rotate(180deg); }
.sidebar-app-card > summary > span:nth-child(2) { width: 100%; overflow: visible; }
.sidebar-app-card summary small {
    max-width: 100%; overflow: visible; color: #67c8ff;
    font-size: 8px; letter-spacing: .13em; line-height: 1.2;
}
.sidebar-app-card summary strong { margin-top: 4px; font-size: 14px; line-height: 1.2; }
.sidebar-app-card .summary-icon {
    width: 38px; height: 38px; border-radius: 11px;
    color: #9bddff; background: linear-gradient(145deg, #17466a, #09253d 70%);
    border: 1px solid rgba(104,202,255,.28);
    box-shadow:
        0 12px 22px rgba(0,0,0,.42),
        0 0 24px rgba(34,167,255,.16),
        inset 3px 3px 8px rgba(255,255,255,.12),
        inset -5px -7px 12px rgba(0,0,0,.3);
    font-size: 0; text-shadow: 0 2px 8px rgba(62,190,255,.35);
}
.sidebar-app-card .summary-icon::before { content: "↑"; font-size: 18px; line-height: 1; }
.sidebar-app-card[open] .summary-icon::before { content: "↓"; }
.distribution-body { padding: 0 13px 13px; border-top: 1px solid #182c3f; }
.distribution-body > p { margin: 10px 0; color: #7f94a8; font-size: 10px; }
.distribution-body .upload-form { grid-template-columns: 1fr; gap: 8px; }
.distribution-body .upload-field { gap: 5px; }
.distribution-body .upload-field input { min-height: 40px; font-size: 11px; }
.distribution-body .upload-button { min-height: 40px; padding: 9px; font-size: 11px; }
.compact-warning { display: grid; gap: 3px; margin: 8px 0 !important; padding: 9px !important; font-size: 10px; }

.fleet-panel { min-height: calc(100vh - 180px); padding: 14px !important; }
.batch-status-bar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 2px 11px; padding: 9px 10px; border: 1px solid #263a4c; border-radius: 11px; background: #07121c; box-shadow: inset 0 1px rgba(255,255,255,.035), 0 8px 18px rgba(0,0,0,.22); }
.batch-status-bar.ready { border-color: #1b6049; background: linear-gradient(180deg, #0b2b22, #071f18); }
.batch-status-bar.archived { border-color: #5d3782; background: linear-gradient(180deg, #251437, #180d24); }
.batch-status-bar.locked { border-color: #61421f; background: linear-gradient(180deg, #30200e, #211507); }
.batch-archive-note { min-width: 0; flex: 1 1 auto; overflow: hidden; color: #8fa3b5; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.batch-status-bar.ready .batch-archive-note { color: #58df9d; }
.batch-status-bar.archived .batch-archive-note { color: #c99aff; }
.batch-status-bar.locked .batch-archive-note { color: #ffb35c; }
.status-filter-controls { display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; gap: 8px; margin-left: auto; }
.batch-issue-summary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 7px 12px; color: #ffbac5; border: 1px solid #8f3445; border-radius: 9px; background: linear-gradient(180deg, #35141d, #210c12); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 12px rgba(0,0,0,.28); font-size: 9px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.batch-issue-summary-button[hidden] { display: none; }
.batch-issue-summary-button:hover { color: white; border-color: #dc536b; transform: translateY(-1px); }
.status-filters { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }

.batch-issues-body { min-height: 100vh; color: #15202a; background: #edf2f5; }
.batch-issues-page { width: min(1050px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.batch-issues-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.batch-issues-toolbar .back { color: #2277aa; font-weight: 800; text-decoration: none; }
.batch-issues-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 3px solid #142736; }
.batch-issues-header .eyebrow { color: #367ea9; }
.batch-issues-header h1 { margin: 5px 0; color: #0c1923; font-size: 32px; }
.batch-issues-header p { margin: 0; color: #5b6c78; }
.batch-issue-list { display: grid; gap: 15px; }
.batch-issue-sheet { break-inside: avoid; padding: 20px 22px; border: 1px solid #bac7d0; border-left: 6px solid #d74258; border-radius: 13px; background: white; box-shadow: 0 8px 24px rgba(22,42,58,.08); }
.batch-issue-device-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; padding-bottom: 12px; border-bottom: 1px solid #d8e0e6; }
.batch-issue-device-head small { display: block; margin-bottom: 4px; color: #738491; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.batch-issue-device-head h2 { margin: 0; color: #111d27; font-size: 18px; line-height: 1.28; }
.batch-issue-serial { min-width: 180px; text-align: right; }
.batch-issue-serial strong { color: #111d27; font: 800 17px ui-monospace, SFMono-Regular, Menlo, monospace; }
.batch-issue-lines { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.batch-issue-lines li { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0,1fr); gap: 12px; padding: 9px 11px; border-radius: 8px; background: #fff1f3; }
.batch-issue-lines b { color: #a31f35; }
.batch-issue-lines span { color: #283842; white-space: pre-wrap; }
.batch-issues-empty { padding: 40px; text-align: center; border: 1px dashed #9eafb9; border-radius: 14px; background: white; }

@media print {
    .batch-issues-body { background: white; }
    .batch-issues-page { width: 100%; padding: 0; }
    .batch-issues-toolbar { display: none; }
    .batch-issues-header { margin-bottom: 12px; }
    .batch-issue-list { gap: 9px; }
    .batch-issue-sheet { padding: 12px 14px; border-radius: 0; box-shadow: none; }
}
.filter-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 13px; color: #91a7ba; border: 1px solid #29465f; border-radius: 10px; background: linear-gradient(180deg, #102438, #07131f); box-shadow: inset 0 1px rgba(255,255,255,.1), inset 0 -2px rgba(0,0,0,.32), 0 5px 10px rgba(0,0,0,.3); font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; transition: transform .16s ease, border-color .16s ease, filter .16s ease; }
.filter-chip b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 7px; color: #d5e7f5; background: rgba(0,0,0,.3); font-size: 10px; }
.filter-chip:hover { color: white; border-color: #4a91c1; filter: brightness(1.1); transform: translateY(-1px); }
.filter-chip.active { color: white; border-color: #38a9ef; background: linear-gradient(180deg, #174e76, #0b2c47); box-shadow: inset 0 1px rgba(255,255,255,.18), inset 0 -3px rgba(0,0,0,.32), 0 0 18px rgba(41,154,226,.2), 0 6px 12px rgba(0,0,0,.34); transform: translateY(-1px); }
.filter-chip.to-refurb-filter.active { border-color: #d78a2d; background: linear-gradient(180deg, #6a3d12, #392007); box-shadow: inset 0 1px rgba(255,255,255,.17), inset 0 -3px rgba(0,0,0,.32), 0 0 18px rgba(224,139,42,.18), 0 6px 12px rgba(0,0,0,.34); }
.filter-chip.issue-filter.active { border-color: #a43d50; background: #32121a; }
.filter-chip.archive-filter.active { border-color: #76509a; background: linear-gradient(180deg, #39204f, #21112f); box-shadow: inset 0 1px rgba(255,255,255,.15), inset 0 -3px rgba(0,0,0,.32), 0 6px 12px rgba(0,0,0,.34); }
.filter-chip.active:not(.archive-filter) b.has-count { animation: active-filter-count 1.15s ease-in-out infinite; }
@keyframes active-filter-count { 0%, 100% { opacity: .62; transform: scale(.92); box-shadow: 0 0 0 rgba(87,193,255,0); } 50% { opacity: 1; transform: scale(1.08); box-shadow: 0 0 13px rgba(87,193,255,.75); } }
.dashboard-body .device-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.dashboard-body .device-card { min-height: 0; padding: 13px; border-radius: 12px; background: linear-gradient(155deg, #0b1a29, #050d16); }
.dashboard-body .device-card:hover { transform: translateY(-2px) scale(1.005); }
.dashboard-body .device-card::after { width: 120px; height: 120px; }
.device-index { color: #54bdff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 900; }
.dashboard-body .status { padding: 5px 7px; font-size: 8px; }
.device-identity { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.dashboard-body .device-icon { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 9px; font-size: 16px; }
.device-identity > div { min-width: 0; }
.dashboard-body .device-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.dashboard-body .device-card .device-subtitle { min-height: 0; margin: 3px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.device-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 11px 0; overflow: hidden; border: 1px solid #182b3d; border-radius: 8px; background: #182b3d; }
.device-specs div { min-width: 0; padding: 7px 8px; background: #07111b; }
.device-specs span, .device-specs strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-specs span { color: #687f94; font-size: 7px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.device-specs strong { margin-top: 3px; color: #cfdeeb; font-size: 9px; }
.device-specs .macos-version.current span,
.device-specs .macos-version.current strong {
    color: #53e69a;
}
.device-specs .macos-version.outdated span,
.device-specs .macos-version.outdated strong {
    color: #ff526d;
    font-weight: 950;
}
.device-specs .macos-version.outdated strong {
    animation: macos-update-alert 1s ease-in-out infinite;
}
@keyframes macos-update-alert {
    0%, 100% { opacity: .58; text-shadow: 0 0 0 rgba(255,82,109,0); }
    50% { opacity: 1; text-shadow: 0 0 10px rgba(255,82,109,.9); }
}
@media (prefers-reduced-motion: reduce) {
    .device-specs .macos-version.outdated strong { animation: none; }
}


.device-activity { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 9px; }
.device-activity span { flex: 0 0 auto; color: #6f8498; white-space: nowrap; }
.device-activity strong { min-width: 0; overflow: hidden; color: #bdd0df; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-body .progress { height: 4px; }
.dashboard-body .progress-label { margin-top: 5px; font-size: 8px; }
.device-card-link { display: flex !important; justify-content: space-between; margin: 10px -13px -13px !important; padding: 9px 13px; border-top: 1px solid #182c3f; background: rgba(5,15,24,.72); }
.device-card-link::after { content: "→"; }
.device-card.archived { opacity: 1; border-color: #3f6078; }
.device-card.to-refurb { border-color: #775020; background: linear-gradient(155deg, #25190b, #0d0b08); }
.status.to-refurb { color: #ffb653; }
.status.to-refurb i { background: #f5a63a; box-shadow: 0 0 12px rgba(245,166,58,.72); }
.refurb-source-description strong { white-space: normal !important; line-height: 1.35; }
.dashboard-body .device-card h3,
.dashboard-body .device-card .device-subtitle,
.dashboard-body .device-card .device-specs div:not(.macos-version) strong,
.dashboard-body .device-card .device-activity strong,
.dashboard-body .device-card .progress-label,
.dashboard-body .device-card .device-card-link,
.dashboard-body .device-card .device-archive-button {
    color: #d8e8f5;
    text-shadow: 0 0 8px rgba(132,199,242,.2);
}
.dashboard-body .device-card .device-specs div:not(.macos-version) span,
.dashboard-body .device-card .device-activity span {
    color: #8fa9bf;
}
.dashboard-body .device-card .status {
    filter: brightness(1.28);
    text-shadow: 0 0 7px currentColor;
}
.status.archived i { background: #8294a5; box-shadow: none; }
.device-card-actions { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; margin: 10px -13px -13px; border-top: 1px solid #182c3f; background: rgba(5,15,24,.72); }
.device-card-actions .device-card-link { margin: 0 !important; border: 0; background: transparent; }
.device-card-actions form { display: flex; }
.device-archive-button { width: 100%; border: 0; border-left: 1px solid #182c3f; color: #6bc3ff; background: transparent; font: inherit; font-size: 8px; font-weight: 850; cursor: pointer; }
.device-archive-button:hover { color: white; background: #0d2940; }
.device-archive-button.restore { color: #b6c5d2; }
.device-archive-button.repaired { color: #ffb44f; }
.device-archive-button.cancel-incomplete { min-height: 38px; padding: 0 12px; border-left: 0; color: #ffb45c; }
.device-card-actions.single-action { grid-template-columns: 1fr; }
.device-card-actions.disposition-required { grid-template-columns: 1fr; }
.device-card-actions.disposition-required .device-card-link { border-bottom: 1px solid #182c3f; }
.device-card-actions.single-action .device-card-link { justify-content: center; text-align: center; }
.device-card-actions.single-action .device-card-link::after { display: none; }

.report-admin-message{margin:0 0 14px;padding:11px 14px;border:1px solid;border-radius:10px;font-size:11px;font-weight:850}.report-admin-message.success{color:#79efb1;border-color:#287a5c;background:#0b2b20}.report-admin-message.error{color:#ff9eaa;border-color:#713340;background:#32141b}.report-admin-metadata{padding:0;overflow:hidden;border-color:#268bc1;box-shadow:0 0 28px rgba(38,139,193,.12)}.report-admin-metadata>summary{padding:15px 16px;color:#8ad8ff;font-size:12px;font-weight:950;cursor:pointer}.report-admin-metadata-form{display:grid;grid-template-columns:minmax(180px,1fr) 130px auto;gap:12px;align-items:end;padding:0 16px 16px}.report-admin-metadata-form label,.report-step-form>label{display:grid;gap:6px;color:#d4e1eb;font-size:11px;font-weight:900}.report-admin-metadata-form input,.report-admin-metadata-form select,.report-step-form textarea{width:100%;padding:12px;border:1px solid #3b6886;border-radius:10px;color:#fff;background:#040a0f;font:inherit}.admin-editable-result{cursor:pointer;transition:border-color .16s ease,background .16s ease,transform .16s ease}.admin-editable-result:hover,.admin-editable-result:focus-visible{border-color:#46bff2;background:#0c2334;outline:none;transform:translateY(-1px)}.report-step-dialog{width:min(760px,calc(100vw - 30px));padding:0;border:1px solid #315a75;border-radius:22px;color:#eaf4fb;background:linear-gradient(155deg,#151d25,#080d12);box-shadow:0 30px 100px #000c}.report-step-dialog::backdrop{background:#000c;backdrop-filter:blur(8px)}.report-step-form{display:grid;gap:17px;padding:25px}.report-step-form header{display:flex;justify-content:space-between;gap:16px}.report-step-form header h2{margin:3px 0;font-size:26px}.report-step-form header strong{color:#ff6578;font-size:12px}.report-step-close{width:42px;height:42px;border:1px solid #65717b;border-radius:50%;color:#fff;background:#3a4249;font-size:27px;cursor:pointer}.report-step-form textarea{min-height:155px;resize:vertical}.report-step-photo-line{display:flex;align-items:center;justify-content:space-between;gap:12px}.report-step-photo-line>span{font-size:13px;font-weight:900}.report-step-photo-actions{display:flex;gap:10px}.report-step-photo-line input{position:absolute;left:-9999px}.report-step-photo-empty{display:flex;align-items:center;justify-content:center;gap:9px;min-height:86px;border:1px solid #26343e;border-radius:12px;color:#a8b5bf;background:#171d22;font-size:13px;font-weight:800}.report-step-photo-empty[hidden]{display:none}.report-step-photo-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;border:1px solid #2a6b98;border-radius:14px;background:#071522}.report-step-photo-preview[hidden]{display:none}.report-step-photo-preview a{position:relative;display:block;overflow:hidden;aspect-ratio:4/3;border:1px solid #315a77;border-radius:10px;background:#02070b}.report-step-photo-preview img{display:block;width:100%;height:100%;object-fit:cover}.report-step-photo-preview b{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:6px;color:#fff;background:#071522df;font-size:10px}.report-phone-transfer{display:grid;grid-template-columns:214px 1fr;gap:20px;align-items:center;padding:17px;border:1px solid #2d789f;border-radius:16px;background:#081a26}.report-phone-transfer[hidden]{display:none}.report-phone-transfer [data-phone-qr]{display:grid;place-items:center;width:214px;height:214px;padding:12px;border-radius:12px;background:white}.report-phone-transfer [data-phone-qr] img,.report-phone-transfer [data-phone-qr] canvas{width:190px!important;height:190px!important}.report-phone-transfer strong{display:block;margin-bottom:8px;color:#fff;font-size:16px}.report-phone-transfer p{margin:0 0 13px;color:#aebfcb;line-height:1.5}.report-phone-transfer small{color:#55cef8;font-weight:850}.report-phone-transfer small.success{color:#55e99a}.report-step-form>small{color:#7890a3}.report-step-form footer{display:flex;justify-content:flex-end;gap:10px;padding-top:15px;border-top:1px solid #253746}.report-photo-toast{position:fixed;z-index:1500;right:24px;top:24px;display:flex;align-items:center;gap:11px;min-width:300px;padding:15px 18px;border:1px solid #39c77d;border-radius:13px;color:#eafff3;background:#0b2d21;box-shadow:0 18px 55px #000a;opacity:0;transform:translateY(-12px);transition:opacity .2s ease,transform .2s ease}.report-photo-toast[hidden]{display:none}.report-photo-toast.visible{opacity:1;transform:translateY(0)}.report-photo-toast span{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:#062012;background:#43dc86;font-size:18px;font-weight:950}.report-photo-toast strong{font-size:12px}@media(max-width:700px){.report-admin-metadata-form{grid-template-columns:1fr}.report-step-photo-line{align-items:stretch;flex-direction:column}.report-step-photo-actions{flex-direction:column}.report-phone-transfer{grid-template-columns:1fr}.report-phone-transfer [data-phone-qr]{margin:auto}.report-step-photo-preview{grid-template-columns:repeat(2,minmax(0,1fr))}.report-photo-toast{right:15px;left:15px;min-width:0}}

/* Unified report result controls: status, edit, photos, comment. */
.report-body .result-row{grid-template-columns:48px minmax(0,1fr) 114px;gap:12px;min-height:72px}
.report-body .result-name{display:block;overflow:hidden;color:#e6eef7;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.result-status-icon{display:grid;place-items:center;width:46px;height:46px;border:1px solid rgba(255,255,255,.28);border-radius:11px;color:#fff;background:#2bd46e;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 20px rgba(43,212,110,.18);font-size:27px;font-weight:950;line-height:1}
.result-row.result-failed .result-status-icon{background:#ff4354;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 20px rgba(255,67,84,.20)}
.result-row.result-issue .result-status-icon,.result-row.result-skipped .result-status-icon,.result-row.result-pending .result-status-icon{background:#ff922f;box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 8px 20px rgba(255,146,47,.20);font-size:22px}
.result-action-grid{display:grid;grid-template-columns:repeat(3,34px);gap:6px;align-items:center;justify-content:end}
.result-action-slot{display:grid;place-items:center;width:34px;height:34px}
.result-action-icon{display:grid;place-items:center;width:34px;height:34px;box-sizing:border-box;border:1px solid #3c89b8;border-radius:9px;color:#c9ecff;background:#0a2a3e;font-size:16px;font-weight:950;line-height:1}
.result-edit-icon{color:#dff5ff;border-color:#42a7d9;background:#0b3045;font-size:18px}
.result-photo-indicator{position:static;grid-template-columns:14px auto;gap:1px;padding:0 3px}
.result-photo-indicator::before{display:none}
.result-photo-indicator span{font-size:13px}.result-photo-indicator b{font-size:10px}
.result-comment-indicator{font-size:22px;padding-bottom:4px}
@media(max-width:700px){.report-body .result-row{grid-template-columns:44px minmax(0,1fr) 102px}.result-status-icon{width:42px;height:42px}.result-action-grid{grid-template-columns:repeat(3,30px)}.result-action-slot,.result-action-icon{width:30px;height:30px}}
.corrections-page{display:grid;gap:18px}.corrections-hero{margin-bottom:0}.correction-search-panel,.correction-device-card,.correction-editor{padding:22px}.correction-search-form{display:grid;gap:9px}.correction-search-form label,.correction-editor-form label{color:#d4e1eb;font-size:12px;font-weight:900}.correction-search-form>div{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px}.correction-search-form input,.correction-editor-form input,.correction-editor-form select{width:100%;padding:13px 15px;border:1px solid #3b6886;border-radius:11px;color:#fff;background:#040a0f;font:inherit}.correction-device-card{display:flex;justify-content:space-between;gap:24px;align-items:center}.correction-device-card h2{margin:4px 0}.correction-device-card p{margin-bottom:0;color:#92a4b2}.correction-device-card dl{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:10px;margin:0}.correction-device-card dl div{padding:12px;border:1px solid #29465a;border-radius:10px;background:#08131c}.correction-device-card dt{color:#7890a3;font-size:9px;font-weight:900;text-transform:uppercase}.correction-device-card dd{margin:5px 0 0;color:#fff;font-size:12px;font-weight:900}.correction-editor-form{display:grid;grid-template-columns:minmax(220px,1fr) 150px auto;gap:12px;align-items:end}.correction-editor-form label{display:grid;gap:7px}.correction-editor>small{display:block;margin-top:14px;color:#7890a3}@media(max-width:850px){.correction-search-form>div,.correction-editor-form{grid-template-columns:1fr}.correction-device-card{align-items:stretch;flex-direction:column}.correction-device-card dl{grid-template-columns:repeat(2,1fr)}}
.corrections-page :is(input,select,.button){box-sizing:border-box;height:58px;min-height:58px;margin:0;padding:0 18px;border-radius:13px;font-family:inherit;font-size:16px;font-weight:850;line-height:1}.corrections-page .button{display:inline-flex;align-items:center;justify-content:center;min-width:220px;white-space:nowrap}.correction-search-form{gap:10px}.correction-search-form>div{grid-template-columns:minmax(260px,1fr) 220px;gap:14px;align-items:stretch}.correction-editor-form{grid-template-columns:minmax(260px,1fr) minmax(180px,.42fr) 220px;gap:14px;align-items:end}.correction-search-form label,.correction-editor-form label{font-size:14px;line-height:1.2}.correction-editor-form label{gap:10px}.correction-editor-form select{appearance:auto}.correction-editor-form>.button,.correction-search-form .button{width:100%}@media(max-width:850px){.correction-search-form>div,.correction-editor-form{grid-template-columns:1fr}.corrections-page .button{width:100%;min-width:0}}
.device-disposition-form { display: grid !important; grid-template-columns: minmax(0,1fr) auto; padding: 6px; gap: 5px; }
.device-disposition-form select { min-width: 0; padding: 6px; border: 1px solid #29445c; border-radius: 6px; color: #d7e7f4; background: #08131e; font: inherit; font-size: 8px; }
.device-disposition-form .device-archive-button { width: auto; min-width: 70px; min-height: 34px; padding: 0 9px; border: 1px solid #5d4822; border-radius: 6px; position: relative; z-index: 3; }
.filtered-empty { grid-column: 1 / -1; }

/* Dedicated historical archive */
.archive-pill { padding: 10px 14px; border: 1px solid #643c91; border-radius: 99px; color: #d5afff; background: #1a1027; font-size: 12px; font-weight: 800; }
.archive-workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.archive-load-error { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; padding: 15px 17px; border: 1px solid rgba(255,75,91,.48); border-radius: 13px; color: #ff9ba5; background: rgba(72,18,28,.72); }
.archive-load-error strong { color: #fff; }
.archive-batches { position: sticky; top: 18px; padding: 14px; }
.archive-batches .panel-title { padding: 4px 4px 12px; }
.archive-batches .batch-row { justify-content: flex-start; gap: 9px; margin-top: 5px; padding: 12px 10px; }
.archive-bulk-actions { display: grid; gap: 7px; margin: 0 4px 9px; padding: 9px; border: 1px solid #263c51; border-radius: 10px; background: #07131f; }
.archive-bulk-actions > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.archive-bulk-actions button { min-height: 29px; padding: 6px 8px; border: 1px solid #29465f; border-radius: 7px; color: #9bb0c2; background: #0c1c2b; font: inherit; font-size: 8px; font-weight: 850; cursor: pointer; }
.archive-bulk-actions button:hover { color: white; border-color: #4a91c1; }
.archive-bulk-actions .archive-bulk-delete { color: #ff8998; border-color: #713340; background: #241018; }
.archive-bulk-actions .archive-bulk-delete:not(:disabled):hover { border-color: #b54b60; background: #3a1420; }
.archive-bulk-actions .archive-bulk-delete:disabled { cursor: not-allowed; opacity: .38; }
.archive-bulk-actions .archive-bulk-delete span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 4px; border-radius: 6px; background: rgba(0,0,0,.3); }
.archive-batch-select-row { display: block; margin-top: 5px; border: 1px solid transparent; border-radius: 10px; }
.archive-batch-select-row.selectable { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: stretch; }
.archive-batch-select-row.selected { border-color: #277cac; background: #0c2940; }
.archive-batch-select-row.checked { border-color: #8652bd; background: #211331; }
.archive-batch-select-row .batch-row { margin: 0; border: 0; background: transparent; }
.archive-batch-checkbox { display: grid; place-items: center; cursor: pointer; }
.archive-batch-checkbox input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.archive-batch-checkbox span { position: relative; width: 15px; height: 15px; border: 1px solid #4c6478; border-radius: 4px; background: #07121c; }
.archive-batch-checkbox input:focus-visible + span { outline: 2px solid #54bdff; outline-offset: 2px; }
.archive-batch-checkbox input:checked + span { border-color: #ae73e8; background: #713ba8; box-shadow: 0 0 10px rgba(164,93,255,.45); }
.archive-batch-checkbox input:checked + span::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 900; }
.archive-batches .batch-row > div { min-width: 0; margin-right: auto; }
.archive-batches .batch-row strong, .archive-batches .batch-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-batches .batch-row small { margin-top: 4px; }
.archive-inventory { min-height: calc(100vh - 160px); padding: 20px; }
.archive-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 2px 2px 18px; border-bottom: 1px solid #183149; }
.archive-head h2 { font-size: 26px; }
.archive-head .muted { margin: 6px 0 0; font-size: 12px; }
.archive-code { min-width: 145px; padding: 11px 15px; text-align: center; border: 1px solid #59407a; border-radius: 11px; background: #140e20; }
.archive-code small, .archive-code strong { display: block; }
.archive-code small { color: #aa75e5; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.archive-code strong { margin-top: 5px; font-size: 19px; letter-spacing: .13em; }
.archive-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; }
.archive-head-actions form { margin: 0; }
.archive-delete-button { padding: 10px 12px; border: 1px solid #713340; border-radius: 9px; color: #ff8998; background: #241018; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; }
.archive-delete-button:hover { color: white; border-color: #b54b60; background: #3a1420; }
.archive-restore-button { padding: 10px 12px; border: 1px solid #287a5c; border-radius: 9px; color: #75e8b8; background: #0d2a21; font: inherit; font-size: 9px; font-weight: 850; cursor: pointer; }
.archive-restore-button:hover { color: white; border-color: #4bc493; background: #123d2f; }
.archive-device-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin-top: 18px; }
.archive-device-card { overflow: hidden; border: 1px solid #205e4a; border-radius: 14px; background: linear-gradient(155deg, #0a1b27, #050d15); box-shadow: 0 14px 34px rgba(0,0,0,.25); }
.archive-device-card.has-issue { border-color: #773344; }
.archive-device-card > :not(.archive-report-link) { margin-left: 14px; margin-right: 14px; }
.archive-card-top { display: flex; justify-content: space-between; align-items: center; padding-top: 13px; }
.archive-result { padding: 5px 7px; border-radius: 99px; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.archive-result.ok { color: #67eaa0; background: #0b2b20; }
.archive-result.issue { color: #ff8192; background: #32141b; }
.archive-device-card .device-identity { margin-top: 12px; }
.archive-device-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.archive-device-card .device-subtitle { margin: 3px 0 0; color: #8499ac; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.archive-device-card .device-specs { margin-top: 12px; margin-bottom: 12px; }
.archive-outcome { margin-bottom: 12px; padding: 8px 9px; border-radius: 8px; color: #ff91a0; background: #281119; font-size: 9px; }
.archive-outcome strong { display: block; margin-top: 3px; color: #ffc0c9; }
.archive-report-link { display: flex; justify-content: space-between; padding: 11px 14px; border-top: 1px solid #183049; color: #6fc6ff; background: #06111b; font-size: 10px; font-weight: 850; }
.archive-report-link:hover { color: white; background: #0b2236; }
.archive-report-link.disabled { color: #607486; }
.archive-empty { display: grid; gap: 6px; padding: 24px 12px; color: #71869a; text-align: center; }
.archive-empty strong { color: #b9c9d7; }
.archive-empty.large { place-content: center; min-height: 440px; }
@media (max-width: 1540px) { .archive-device-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .archive-device-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .archive-workspace { grid-template-columns: 1fr; } .archive-batches { position: static; } .archive-device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (min-width: 1680px) {
    .dashboard-body .device-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1540px) {
    .dashboard-body .device-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
    .command-bar { grid-template-columns: minmax(310px,1fr) 125px auto auto; }
    .command-bar > .button { grid-row: 2; }
    .command-bar > .button.blue { grid-column: 3; }
    .dashboard-workspace { grid-template-columns: 220px minmax(0,1fr); }
    .dashboard-body .device-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .dashboard-body .shell { display: block; }
    .dashboard-body .sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; }
    .dashboard-body .sidebar nav { display: flex; margin: 0 0 0 auto; }
    .dashboard-body .sidebar-app-tools, .dashboard-body .sidebar-bottom { display: none; }
    .command-bar, .dashboard-workspace { grid-template-columns: 1fr; }
    .command-bar > .button, .command-bar > .button.primary, .command-bar > .button.blue { grid-row: auto; grid-column: auto; }
    .workspace-rail { position: static; grid-template-columns: 1fr 1fr; }
    .dashboard-body .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .dashboard-main { padding: 16px 12px 26px; }
    .workspace-rail { grid-template-columns: 1fr; }
    .summary-strip { grid-template-columns: 1fr 1fr; }
    .dashboard-body .device-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .sidebar, .dashboard-body .sidebar { flex-wrap: wrap; }
    .sidebar-app-tools, .dashboard-body .sidebar-app-tools {
        order: 3; display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin-top: 0;
    }
    .authenticator-card > summary,
    .sidebar-app-tools .sidebar-download,
    .sidebar-app-card > summary {
        height: var(--sidebar-tool-height); min-height: var(--sidebar-tool-height);
    }
    .sidebar-bottom, .dashboard-body .sidebar-bottom {
        order: 4; display: grid; width: 100%; min-height: 76px; margin-top: 0;
    }
}
.device-action-message{display:none;grid-column:1/-1;font-size:12px;font-weight:700;line-height:1.35}.device-action-message.saving,.device-action-message.error{display:block}.device-action-message.saving{color:#56baff}.device-action-message.error{color:#ff6578}

/* Compact clear-glass sidebar tabs */
.dashboard-body .sidebar-app-tools {
    --sidebar-tool-height: 46px;
    gap: 6px;
}
.dashboard-body .authenticator-card,
.dashboard-body .sidebar-app-card,
.dashboard-body .sidebar-app-tools .sidebar-download,
.dashboard-body .sidebar-bottom {
    border-color: rgba(104,190,231,.24) !important;
    background: linear-gradient(135deg,rgba(30,65,88,.34),rgba(7,20,31,.2)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.08),0 7px 18px rgba(0,0,0,.15) !important;
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
}
.dashboard-body .authenticator-card,
.dashboard-body .sidebar-app-card,
.dashboard-body .sidebar-app-tools .sidebar-download {
    border-radius: 11px !important;
}
.dashboard-body .authenticator-card:hover,
.dashboard-body .sidebar-app-card:hover,
.dashboard-body .sidebar-app-tools .sidebar-download:hover {
    border-color: rgba(104,190,231,.42) !important;
    background: linear-gradient(135deg,rgba(38,82,109,.46),rgba(9,28,42,.3)) !important;
}
.dashboard-body .authenticator-card > summary,
.dashboard-body .sidebar-app-card > summary,
.dashboard-body .sidebar-app-tools .sidebar-download {
    height: 46px;
    min-height: 46px;
    padding: 7px 10px;
}
.dashboard-body .authenticator-card > summary {
    grid-template-columns: 28px minmax(0,1fr);
    gap: 9px;
    padding-right: 28px;
    text-align: left;
}
.dashboard-body .sidebar-app-card > summary {
    grid-template-columns: 28px minmax(0,1fr) 16px;
    gap: 9px;
    text-align: left;
}
.dashboard-body .sidebar-app-tools .sidebar-download {
    grid-template-columns: 28px minmax(0,1fr);
    gap: 9px;
    text-align: left;
}
.dashboard-body .authenticator-icon,
.dashboard-body .sidebar-app-card .summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
}
.dashboard-body .sidebar-download .download-arrow {
    width: 28px;
    font-size: 19px;
}
.dashboard-body .sidebar-download .download-label {
    grid-column: 2;
    font-size: 12px;
    text-align: left;
}
.dashboard-body .authenticator-card > summary small,
.dashboard-body .sidebar-app-card > summary small {
    margin: 0 !important;
    font-size: 6px;
    letter-spacing: .16em;
}
.dashboard-body .authenticator-card > summary strong,
.dashboard-body .sidebar-app-card > summary strong {
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.05;
}

/* Clear-lens prototype: Google Authenticator only. */
.dashboard-body .authenticator-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(229, 249, 255, .38) !important;
    background:
        linear-gradient(145deg, rgba(255,255,255,.105), rgba(175,218,226,.035) 48%, rgba(5,15,22,.075)) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        inset 0 -1px 0 rgba(181,225,235,.09),
        0 12px 28px rgba(0,0,0,.22) !important;
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    backdrop-filter: blur(26px) saturate(145%);
}
.dashboard-body .authenticator-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% -28%, rgba(255,255,255,.26), transparent 46%),
        linear-gradient(115deg, transparent 12%, rgba(255,255,255,.055) 48%, transparent 72%);
}
.dashboard-body .authenticator-card > summary,
.dashboard-body .authenticator-card[open] .authenticator-body {
    position: relative;
    z-index: 1;
}
.dashboard-body .authenticator-card .authenticator-icon {
    border: 1px solid rgba(222,247,252,.27);
    background: linear-gradient(145deg, rgba(206,241,246,.14), rgba(115,180,193,.055));
    box-shadow: inset 0 1px rgba(255,255,255,.24), 0 6px 16px rgba(0,0,0,.16);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
}
.dashboard-body .authenticator-card:hover {
    border-color: rgba(235,251,255,.55) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(175,218,226,.05) 48%, rgba(5,15,22,.09)) !important;
}
.dashboard-body .sidebar-app-card > summary b {
    font-size: 0;
}
.dashboard-body .sidebar-app-card > summary b::after {
    content: '\203A';
    font-size: 17px;
    color: #72caff;
}
.dashboard-body .authenticator-card > summary::after {
    top: 15px;
    right: 9px;
}
.dashboard-body .sidebar-bottom {
    min-height: 58px;
    margin-top: 6px;
    padding: 9px 11px;
    border-radius: 11px;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 8px;
    align-content: center;
}
.dashboard-body .sidebar-bottom span {
    grid-column: 1;
    grid-row: 1;
    font-size: 13px;
}
.dashboard-body .sidebar-bottom small {
    grid-column: 1;
    grid-row: 2;
    font-size: 9px;
}
.dashboard-body .sidebar-bottom a {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
    font-size: 10px;
}

/* Keep report-page sidebar tools identical to Live diagnostics. */
.reports-body .shell { grid-template-columns: 218px minmax(0, 1fr); }
.reports-body .sidebar { padding: 20px 14px 16px; }
.reports-body .brand { gap: 10px; padding: 0 5px; }
.reports-body .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 17px; }
.reports-body .brand strong { font-size: 16px; }
.reports-body .brand small { max-width: 130px; font-size: 9px; line-height: 1.35; }
.reports-body .sidebar nav { margin-top: 32px; }
.reports-body .sidebar nav a { padding: 11px 12px; font-size: 13px; }
.reports-body main { padding: 22px 24px 32px; }
.reports-body .sidebar-app-tools { --sidebar-tool-height: 46px; gap: 6px; }
.reports-body .authenticator-card,
.reports-body .sidebar-app-card,
.reports-body .sidebar-app-tools .sidebar-download,
.reports-body .sidebar-bottom {
    border-color: rgba(104,190,231,.24) !important;
    background: linear-gradient(135deg,rgba(30,65,88,.34),rgba(7,20,31,.2)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.08),0 7px 18px rgba(0,0,0,.15) !important;
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
}
.reports-body .authenticator-card,
.reports-body .sidebar-app-card,
.reports-body .sidebar-app-tools .sidebar-download {
    min-height: 46px;
    border-radius: 11px !important;
}
.reports-body .authenticator-card > summary,
.reports-body .sidebar-app-card > summary,
.reports-body .sidebar-app-tools .sidebar-download {
    height: 46px;
    min-height: 46px;
    padding: 7px 10px;
}
.reports-body .authenticator-card > summary,
.reports-body .sidebar-app-tools .sidebar-download {
    grid-template-columns: 28px minmax(0,1fr);
    gap: 9px;
    text-align: left;
}
.reports-body .authenticator-card > summary { padding-right: 28px; }
.reports-body .sidebar-app-card > summary {
    grid-template-columns: 28px minmax(0,1fr) 16px;
    gap: 9px;
    text-align: left;
}
.reports-body .authenticator-icon,
.reports-body .sidebar-app-card .summary-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
}
.reports-body .sidebar-download .download-arrow { width: 28px; font-size: 19px; }
.reports-body .sidebar-download .download-label { grid-column: 2; font-size: 12px; text-align: left; }
.reports-body .authenticator-card > summary small,
.reports-body .sidebar-app-card > summary small { margin: 0; font-size: 6px; letter-spacing: .16em; }
.reports-body .authenticator-card > summary strong,
.reports-body .sidebar-app-card > summary strong { margin-top: 1px; font-size: 11px; line-height: 1.05; }
.reports-body .sidebar-app-card > summary b { font-size: 0; }
.reports-body .sidebar-app-card > summary b::after { content: '\203A'; font-size: 17px; color: #72caff; }
.reports-body .authenticator-card > summary::after { top: 15px; right: 9px; }
.reports-body .sidebar-bottom {
    min-height: 58px;
    margin-top: 6px;
    padding: 9px 11px;
    border-radius: 11px;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: auto auto;
    gap: 1px 8px;
    align-content: center;
}
.reports-body .sidebar-bottom span { grid-column: 1; grid-row: 1; font-size: 13px; }
.reports-body .sidebar-bottom small { grid-column: 1; grid-row: 2; font-size: 9px; }
.reports-body .sidebar-bottom a {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    margin: 0;
    font-size: 10px;
}

/* Portal-wide clear-glass controls. */
:is(.button, button, .filter-chip, .sidebar nav a, .batch-row, .authenticator-card, .sidebar-app-card, .sidebar-bottom) {
    border-color: rgba(190, 232, 244, .28) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(147,207,219,.045) 48%, rgba(5,15,22,.12)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(172,220,231,.07), 0 9px 22px rgba(0,0,0,.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
}
:is(.button, button, .filter-chip, .sidebar nav a, .batch-row):hover {
    border-color: rgba(222, 247, 253, .48) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(154,215,227,.07) 48%, rgba(7,22,31,.16)) !important;
}
.button.primary,
.button.blue,
.sidebar-app-tools .sidebar-download {
    color: #f4fbff;
    border-color: rgba(102, 199, 241, .38) !important;
    background: linear-gradient(145deg, rgba(76,180,229,.2), rgba(30,104,162,.1) 54%, rgba(5,17,27,.16)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.22), 0 9px 24px rgba(12,86,139,.16) !important;
}
.button.ghost { color: #dce9f5; }
.filter-chip.active,
.sidebar nav a.active,
.batch-row.selected {
    border-color: rgba(86,190,239,.5) !important;
    background: linear-gradient(145deg, rgba(53,157,216,.2), rgba(20,80,124,.1) 55%, rgba(5,16,25,.16)) !important;
}
.filter-chip.to-refurb-filter.active {
    border-color: rgba(231,165,78,.54) !important;
    background: linear-gradient(145deg, rgba(198,122,37,.2), rgba(98,55,17,.09) 58%, rgba(21,13,5,.15)) !important;
}
.filter-chip.issue-filter.active,
.archive-delete-button {
    border-color: rgba(231,101,123,.5) !important;
    background: linear-gradient(145deg, rgba(190,58,83,.18), rgba(86,24,38,.1) 58%, rgba(21,7,12,.15)) !important;
}

/* Make the selected fleet view unmistakable at a glance. */
.status-filters .filter-chip { opacity: .7; }
.status-filters .filter-chip.active {
    opacity: 1;
    color: #fff !important;
    border-color: #73d2ff !important;
    background: linear-gradient(180deg, #167db5, #0a456d) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.38), 0 0 0 2px rgba(77,190,244,.25), 0 0 24px rgba(37,171,235,.58), 0 8px 18px rgba(0,0,0,.38) !important;
    transform: translateY(-2px) scale(1.045);
}
.status-filters .filter-chip.active::before {
    content: "✓";
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    color: #07314a;
    background: #dff7ff;
    font-size: 10px;
    font-weight: 950;
}
.status-filters .filter-chip.today-filter.active {
    border-color: #50efbb !important;
    background: linear-gradient(180deg, #14866a, #07513f) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.35), 0 0 0 2px rgba(58,226,172,.23), 0 0 24px rgba(38,218,158,.5), 0 8px 18px rgba(0,0,0,.38) !important;
}
.status-filters .filter-chip.to-refurb-filter.active {
    border-color: #ffb14e !important;
    background: linear-gradient(180deg, #a75d13, #653506) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.35), 0 0 0 2px rgba(255,170,65,.22), 0 0 24px rgba(234,137,33,.5), 0 8px 18px rgba(0,0,0,.38) !important;
}
.status-filters .filter-chip.issue-filter.active {
    border-color: #ff8297 !important;
    background: linear-gradient(180deg, #a42e45, #641728) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.3), 0 0 0 2px rgba(255,104,130,.2), 0 0 24px rgba(226,54,86,.48), 0 8px 18px rgba(0,0,0,.38) !important;
}
.status-filters .filter-chip.archive-filter.active {
    border-color: #c28aff !important;
    background: linear-gradient(180deg, #7041a2, #40215f) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.3), 0 0 0 2px rgba(184,121,246,.2), 0 0 24px rgba(147,76,214,.5), 0 8px 18px rgba(0,0,0,.38) !important;
}

/* The Authenticator lens must remain identical on Reports as on Live diagnostics. */
.reports-body .authenticator-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(229,249,255,.38) !important;
    background: linear-gradient(145deg, rgba(255,255,255,.105), rgba(175,218,226,.035) 48%, rgba(5,15,22,.075)) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.28), inset 0 -1px rgba(181,225,235,.09), 0 12px 28px rgba(0,0,0,.22) !important;
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    backdrop-filter: blur(26px) saturate(145%);
}
.reports-body .authenticator-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 18% -28%, rgba(255,255,255,.26), transparent 46%), linear-gradient(115deg, transparent 12%, rgba(255,255,255,.055) 48%, transparent 72%);
}
.reports-body .authenticator-card > summary,
.reports-body .authenticator-card[open] .authenticator-body { position: relative; z-index: 1; }
.reports-body .authenticator-card .authenticator-icon {
    border: 1px solid rgba(222,247,252,.27);
    background: linear-gradient(145deg, rgba(206,241,246,.14), rgba(115,180,193,.055));
    box-shadow: inset 0 1px rgba(255,255,255,.24), 0 6px 16px rgba(0,0,0,.16);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
}

/* Keep both distribution arrows centered inside their own areas. */
.sidebar-app-card .summary-icon {
    overflow: hidden;
    line-height: 1;
}
.sidebar-app-card .summary-icon::before {
    display: block;
    line-height: 1;
}
.sidebar-app-card > summary::after {
    content: "↑";
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: #8fb9d1;
    font-size: 16px;
    line-height: 1;
}
.sidebar-app-card[open] > summary::after {
    content: "↓";
    transform: translateY(-50%);
}

/* Uniformly center the three sidebar tool labels as icon-and-text groups. */
:is(.dashboard-body, .reports-body) .authenticator-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-tools .sidebar-download {
    grid-template-columns: 28px max-content;
    justify-content: center;
    gap: 12px;
    padding-inline: 12px;
    text-align: left;
}
:is(.dashboard-body, .reports-body) .authenticator-card > summary {
    padding-right: 12px;
}
:is(.dashboard-body, .reports-body) .sidebar-app-card > summary::after {
    content: none;
}

/* Fixed left icon column with truly centered labels. */
:is(.dashboard-body, .reports-body) .authenticator-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-tools .sidebar-download {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    justify-content: stretch;
    gap: 0;
    padding-inline: 8px;
}
:is(.dashboard-body, .reports-body) .authenticator-icon,
:is(.dashboard-body, .reports-body) .sidebar-app-card .summary-icon,
:is(.dashboard-body, .reports-body) .sidebar-download .download-arrow {
    grid-column: 1;
    justify-self: center;
}
:is(.dashboard-body, .reports-body) .authenticator-card > summary > span:nth-child(2),
:is(.dashboard-body, .reports-body) .sidebar-app-card > summary > span:nth-child(2),
:is(.dashboard-body, .reports-body) .sidebar-download .download-label {
    grid-column: 2;
    justify-self: stretch;
    text-align: center;
}

/* One identical clear-glass frame for all three sidebar icons. */
:is(.dashboard-body, .reports-body) .authenticator-icon,
:is(.dashboard-body, .reports-body) .sidebar-app-card .summary-icon,
:is(.dashboard-body, .reports-body) .sidebar-download .download-arrow {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin: 0;
    border: 1px solid rgba(222,247,252,.27);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(206,241,246,.14), rgba(115,180,193,.055));
    box-shadow: inset 0 1px rgba(255,255,255,.24), 0 6px 16px rgba(0,0,0,.16);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
    color: #c9efff;
    font-size: 15px;
    line-height: 1;
}


/* Balanced portal-wide clear-glass workspace. */
:is(.dashboard-body, .reports-body) {
    background:
        radial-gradient(circle at 18% -8%, rgba(93, 198, 215, .13), transparent 34%),
        radial-gradient(circle at 86% 12%, rgba(64, 133, 181, .11), transparent 32%),
        radial-gradient(circle at 72% 92%, rgba(54, 167, 148, .07), transparent 34%),
        #03080d;
    background-attachment: fixed;
}
:is(.dashboard-body, .reports-body) .sidebar {
    border-right-color: rgba(154, 215, 230, .18);
    background: linear-gradient(160deg, rgba(17,31,40,.55), rgba(3,9,14,.42));
    box-shadow: inset -1px 0 rgba(255,255,255,.025), 14px 0 44px rgba(0,0,0,.18);
    -webkit-backdrop-filter: blur(30px) saturate(130%);
    backdrop-filter: blur(30px) saturate(130%);
}
:is(.dashboard-body, .reports-body) :is(
    .panel,
    .command-session,
    .command-code,
    .command-expiry,
    .command-session-actions,
    .batch-status-bar,
    .archive-bulk-actions,
    .archive-code,
    .archive-device-card
) {
    border-color: rgba(165, 220, 233, .22);
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(112,183,198,.028) 52%, rgba(3,12,18,.18));
    box-shadow: inset 0 1px rgba(255,255,255,.12), inset 0 -1px rgba(144,207,220,.035), 0 18px 46px rgba(0,0,0,.2);
    -webkit-backdrop-filter: blur(24px) saturate(125%);
    backdrop-filter: blur(24px) saturate(125%);
}
.dashboard-body .command-bar {
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(112,183,198,.035) 52%, rgba(3,12,18,.2));
}
.dashboard-body .fleet-panel,
.dashboard-body .batch-list,
.reports-body .report-list,
.archive-body .archive-batches,
.archive-body .archive-inventory {
    background: linear-gradient(145deg, rgba(18,39,51,.42), rgba(7,20,29,.3) 58%, rgba(3,10,16,.34));
}
.dashboard-body .device-card {
    border-color: rgba(152,214,228,.22);
    background: linear-gradient(150deg, rgba(31,63,78,.42), rgba(9,25,35,.36) 58%, rgba(3,12,18,.42));
    box-shadow: inset 0 1px rgba(255,255,255,.08), 0 15px 34px rgba(0,0,0,.2);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    backdrop-filter: blur(18px) saturate(120%);
}
.dashboard-body .device-card.to-refurb {
    border-color: rgba(220,154,70,.4);
    background: linear-gradient(150deg, rgba(116,70,24,.26), rgba(39,27,15,.24) 58%, rgba(12,10,8,.34));
}
.dashboard-body .device-card.issue,
.archive-body .archive-device-card.has-issue {
    border-color: rgba(222,85,111,.42);
    background: linear-gradient(150deg, rgba(105,34,50,.22), rgba(37,18,25,.22) 58%, rgba(12,8,11,.34));
}
.archive-body .archive-device-card:not(.has-issue) {
    border-color: rgba(83,208,161,.32);
}
.reports-body .report-list tbody tr {
    background: rgba(7,20,29,.12);
}
.reports-body .report-list tbody tr:hover {
    background: rgba(116,196,218,.075);
}
.reports-body .report-list :is(th, td) {
    border-bottom-color: rgba(148,207,221,.14);
}
:is(.dashboard-body, .reports-body) :is(input, select, textarea) {
    border-color: rgba(152,214,228,.24);
    background: rgba(3,12,18,.34);
    box-shadow: inset 0 1px rgba(255,255,255,.045);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.dashboard-body .batch-status-bar.locked {
    border-color: rgba(225,151,64,.34);
    background: linear-gradient(145deg, rgba(116,68,19,.24), rgba(47,30,13,.18));
}
.dashboard-body .batch-status-bar.ready {
    border-color: rgba(71,211,151,.32);
    background: linear-gradient(145deg, rgba(37,112,79,.2), rgba(14,49,36,.16));
}
.archive-body .archive-pill {
    border-color: rgba(185,139,230,.34);
    background: rgba(93,51,134,.16);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}


/* Readability pass for live device cards. */
.dashboard-body .device-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}
.dashboard-body .device-card {
    padding: 15px;
    border-radius: 15px;
}
.dashboard-body .device-card h3 {
    color: #f4f9ff;
    font-size: 18px;
    line-height: 1.12;
    text-shadow: 0 1px 10px rgba(139,210,244,.16);
}
.dashboard-body .device-card .device-subtitle {
    margin-top: 4px;
    color: #c3d5e4;
    font-size: 10.5px;
    line-height: 1.35;
}
.dashboard-body .device-specs {
    gap: 1px;
    margin: 13px 0;
    border-color: rgba(141,202,219,.28);
    border-radius: 10px;
    background: rgba(137,200,217,.18);
}
.dashboard-body .device-specs > div {
    padding: 10px 11px;
    background: rgba(2,11,18,.76);
}
.dashboard-body .device-specs span {
    color: #9db7ca !important;
    font-size: 8.5px;
    line-height: 1.25;
    letter-spacing: .12em;
}
.dashboard-body .device-specs strong {
    margin-top: 4px;
    color: #e3eef7 !important;
    font-size: 12px;
    line-height: 1.3;
}
.dashboard-body .device-specs div:not(.macos-version) strong {
    white-space: normal;
}
.dashboard-body .device-specs .macos-version-pair {
    border-top: 0;
    background: rgba(137,200,217,.18) !important;
}


.dashboard-body .device-specs .macos-version {
    min-height: 58px;
    padding: 10px 11px;
    background: rgba(2,11,18,.78);
}
.dashboard-body .device-specs .macos-version span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    font-size: 8px;
}
.dashboard-body .device-specs .macos-version.current strong,
.dashboard-body .device-specs .macos-version.current span {
    color: #59eaa0 !important;
}
.dashboard-body .device-specs .macos-version.outdated strong,
.dashboard-body .device-specs .macos-version.outdated span {
    color: #ff6078 !important;
}
.dashboard-body .device-card-link,
.dashboard-body .device-card-actions {
    margin-left: -15px !important;
    margin-right: -15px !important;
}
@media (min-width: 1680px) {
    .dashboard-body .device-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1540px) {
    .dashboard-body .device-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
    .dashboard-body .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .dashboard-body .device-grid { grid-template-columns: 1fr; }
}


/* Subtle breathing glow for the two primary portal logos. */
:is(.dashboard-body, .reports-body) :is(.brand-mark, .command-icon) img {
    transform-origin: center;
    animation: mf-logo-breathe 3.2s ease-in-out infinite;
    will-change: transform, filter;
}
:is(.dashboard-body, .reports-body) .command-icon img {
    animation-delay: -1.6s;
}
@keyframes mf-logo-breathe {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) saturate(1) drop-shadow(0 2px 4px rgba(0,0,0,.22)) drop-shadow(0 0 0 rgba(91,224,217,0));
    }
    50% {
        transform: scale(1.055);
        filter: brightness(1.2) saturate(1.16) drop-shadow(0 3px 6px rgba(0,0,0,.24)) drop-shadow(0 0 11px rgba(91,224,217,.52));
    }
}
@media (prefers-reduced-motion: reduce) {
    :is(.dashboard-body, .reports-body) :is(.brand-mark, .command-icon) img {
        animation: none;
    }
}

/* Clear-glass technical panel inside each live device card. */
.dashboard-body .device-specs {
    border-color: rgba(211,239,246,.3);
    background: rgba(184,225,235,.14);
    box-shadow: inset 0 1px rgba(255,255,255,.16), inset 0 -1px rgba(158,215,227,.05), 0 10px 25px rgba(0,0,0,.12);
    -webkit-backdrop-filter: blur(20px) saturate(130%);
    backdrop-filter: blur(20px) saturate(130%);
}
.dashboard-body .device-specs > div,
.dashboard-body .device-specs .macos-version {
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(137,202,215,.026) 52%, rgba(2,11,18,.12));
    box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.dashboard-body .device-specs .macos-version-pair {
    background: rgba(184,225,235,.14) !important;
}
.dashboard-body .device-specs .macos-version-pair > .macos-version {
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(137,202,215,.03) 52%, rgba(2,11,18,.14));
}


/* Exact shared dimensions for every sidebar control. */
:is(.dashboard-body, .reports-body) .sidebar nav a,
:is(.dashboard-body, .reports-body) .authenticator-card:not([open]),
:is(.dashboard-body, .reports-body) .sidebar-app-card:not([open]),
:is(.dashboard-body, .reports-body) .sidebar-app-tools .sidebar-download,
:is(.dashboard-body, .reports-body) .sidebar-bottom {
    width: 100%;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}


/* Match Work sessions controls to the 48px sidebar control height. */
.dashboard-body .create-details:not([open]),
.dashboard-body .refurb-bridge-button,
.dashboard-body .batch-row {
    width: 100%;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}


/* Compact every technical specification row to one consistent height. */
.dashboard-body .device-specs > div:not(.macos-version-pair),
.dashboard-body .device-specs .macos-version-pair,
.dashboard-body .device-specs .macos-version {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}
.dashboard-body .device-specs > div:not(.macos-version-pair),
.dashboard-body .device-specs .macos-version {
    display: grid;
    align-content: center;
    padding: 4px 10px;
}
.dashboard-body .device-specs span {
    line-height: 1.1;
}
.dashboard-body .device-specs strong {
    margin-top: 3px;
    line-height: 1.15;
}
.dashboard-body .device-specs div:not(.macos-version) strong,
.dashboard-body .device-specs .macos-version span,
.dashboard-body .device-specs .macos-version strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-body .device-specs .macos-version-pair {
    align-items: stretch;
}

/* Separate technical values into subtle individual glass cells. */
.dashboard-body .device-specs {
    gap: 4px;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
.dashboard-body .device-specs > div:not(.macos-version-pair),
.dashboard-body .device-specs .macos-version {
    border: 1px solid rgba(205,236,244,.24);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(137,202,215,.026) 52%, rgba(2,11,18,.12));
    box-shadow: inset 0 1px rgba(255,255,255,.055), 0 5px 13px rgba(0,0,0,.08);
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    backdrop-filter: blur(16px) saturate(125%);
}
.dashboard-body .device-specs .macos-version-pair {
    gap: 4px !important;
    overflow: visible;
    background: transparent !important;
}
.dashboard-body .device-specs .macos-version.outdated :is(span, strong) {
    animation: none !important;
    text-shadow: none;
}

.dashboard-body .create-details > summary {
    display: flex;
    align-items: center;
    height: 48px;
    min-height: 48px;
    padding: 0 11px;
}
.dashboard-body .refurb-bridge-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
}
.dashboard-body .batch-row {
    align-items: center;
    padding: 6px 9px;
}

:is(.dashboard-body, .reports-body) .sidebar nav a {
    padding-block: 0;
}
:is(.dashboard-body, .reports-body) .authenticator-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-card > summary,
:is(.dashboard-body, .reports-body) .sidebar-app-tools .sidebar-download {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
}
:is(.dashboard-body, .reports-body) .sidebar-bottom {
    margin-top: 6px;
    padding: 6px 10px;
    align-content: center;
}

/* Keep archived-card actions fully inside the rounded card footprint. */
.dashboard-body .device-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px -13px -13px !important;
    overflow: hidden;
    border-radius: 0 0 11px 11px;
    background: rgba(8, 22, 32, .34);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
    backdrop-filter: blur(18px) saturate(125%);
}
.dashboard-body .device-card-actions > * {
    min-width: 0;
}
.dashboard-body .device-card-actions .device-card-link,
.dashboard-body .device-card-actions .device-archive-button {
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}
.dashboard-body .device-card-actions .device-card-link {
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding-right: 28px;
}
.dashboard-body .device-card-actions .device-card-link::after {
    position: absolute;
    right: 12px;
}
.dashboard-body .device-card-actions form {
    min-width: 0;
    border-left: 1px solid rgba(205, 236, 244, .18);
}
.dashboard-body .device-card-actions .device-archive-button {
    border-left: 0;
}
.dashboard-body .device-card-actions.single-action {
    grid-template-columns: minmax(0, 1fr);
}
.dashboard-body .device-card-actions.single-action .device-card-link {
    padding-right: 14px;
}
.dashboard-body .device-card-actions.single-action .device-card-link::after {
    display: none;
}
