:root {
  color-scheme: light;
  --navy: #15243A;
  --accent: #315DA8;
  --accent-hover: #274B8A;
  --accent-active: #244577;
  --accent-soft: #274B8A;
  --bg: #F5F7FB;
  --panel: #FFFFFF;
  --panel-soft: #F8FAFC;
  --text: #1E293B;
  --muted: #64748B;
  --button-text: #FFFFFF;
  --button-text-shadow: none;
  --line: #E2E8F0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --control-height: 42px;
  --control-radius: 8px;
  --card-radius: 12px;
  --control-gap: 8px;
  --page-top-gap: clamp(20px, 2.5vw, 32px);
  --section-gap: 20px;
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --success: #16A34A;
  --success-hover: #15803D;
  --warning: #D97706;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --table-min-width: 760px;
  --text-strong: #334155;
  --muted-strong: #475569;
  --line-strong: #CBD5E1;
    --accent-tint: #DBEAFE;
  --info-bg: #EFF6FF;
  --info-border: #BFDBFE;
  --info-text: #1E40AF;
  --success-bg: #F0FDF4;
  --success-border: #86EFAC;
  --success-text: #166534;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --danger-text: #B91C1C;
  --warning-bg: #FFF7ED;
  --warning-border: #FED7AA;
  --warning-text: #92400E;
  --success-button-text: #052E16;
  --font-sans: Inter, "Noto Sans", "Nirmala UI", ui-sans-serif, system-ui, sans-serif;
  --weight-regular: 450;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --accent-focus: rgba(49, 93, 168, .18);
  --accent-tint-alpha: rgba(49, 93, 168, .08);
  --accent-border-alpha: rgba(49, 93, 168, .35);
  --success-tint-alpha: rgba(22, 163, 74, .08);
  --danger-tint-alpha: rgba(220, 38, 38, .08);
  --warning-tint-alpha: rgba(217, 119, 6, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
label { display: block; margin: 0 0 6px; color: var(--text-strong); font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%; max-width: 100%; min-width: 0; min-height: var(--control-height);
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--control-radius);
  background: var(--panel); color: var(--text); font: inherit;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select { height: var(--control-height); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent-hover); box-shadow: 0 0 0 2px var(--accent-focus); outline: none; }
textarea { min-height: 96px; resize: vertical; }
button:disabled { opacity: 1; cursor: not-allowed; }

.topbar {
  position: relative; z-index: 300; display: flex; min-width: 0; min-height: 68px;
  flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 16px; overflow: visible; padding: 10px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
}
.brand { display: flex; min-width: 0; flex: 0 0 auto; align-items: center; gap: 9px; color: var(--navy); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; white-space: nowrap; }
.brand-name { display: block; }
.brand-name span { display: block; color: var(--accent); }
.brand-logo { display: block; width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
.header-actions { position: relative; display: flex; flex: 0 0 auto; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 10px; }
.menu-dropdown { position: relative; flex: 0 0 auto; }
.menu-dropdown:has(.menu-button[aria-expanded="true"]) { z-index: 301; }
.menu-button { display: inline-flex; min-width: 86px; height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.menu-button:hover, .menu-button[aria-expanded="true"] { border-color: var(--accent); background: var(--info-bg); }
.menu-button svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-chevron { transition: transform .18s ease; }
.menu-button[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.menu-panel { position: absolute; z-index: 120; top: calc(100% + 8px); right: 0; display: grid; width: min(260px, calc(100vw - 24px)); max-height: min(70vh, 560px); gap: 4px; overflow-x: hidden; overflow-y: auto; padding: 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: 0 16px 38px rgba(15, 23, 42, .12); }
.menu-panel[hidden] { display: none; }
.menu-panel > a { display: flex; min-width: 0; min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 600; }
.menu-panel > a:hover, .menu-panel > a:focus-visible { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--text); }
.menu-panel > a.active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); }
.nav-inventory-dropdown { min-width: 0; }
.nav-inventory-dropdown > summary { display: flex; min-height: 40px; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; }
.nav-inventory-dropdown > summary::-webkit-details-marker { display: none; }
.nav-inventory-dropdown > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-inventory-dropdown[open] > summary::after { transform: rotate(225deg) translate(-2px,-1px); }
.nav-inventory-dropdown > summary:hover, .nav-inventory-dropdown > summary:focus-visible, .nav-inventory-dropdown > summary.active { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--accent-soft); }
.nav-inventory-links { display: grid; gap: 3px; margin: 2px 0 4px 10px; padding-left: 8px; border-left: 2px solid var(--line); }
.nav-inventory-links > a { display: flex; min-height: 36px; align-items: center; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.nav-inventory-links > a:hover, .nav-inventory-links > a:focus-visible { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--text); }
.nav-inventory-links > a.active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); }
.nav-audit-dropdown { min-width: 0; }
.nav-audit-dropdown > summary { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.nav-audit-dropdown > summary::-webkit-details-marker { display: none; }
.nav-audit-dropdown > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-audit-dropdown[open] > summary::after { transform: rotate(225deg) translate(-2px,-1px); }
.nav-audit-dropdown > summary:hover, .nav-audit-dropdown > summary:focus-visible, .nav-audit-dropdown > summary.active { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--accent-soft); }
.nav-audit-links { display: grid; gap: 3px; margin: 2px 0 4px 10px; padding-left: 8px; border-left: 2px solid var(--line); }
.nav-audit-links > a { display: flex; min-width: 0; min-height: 36px; align-items: center; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.nav-audit-links > a:hover, .nav-audit-links > a:focus-visible { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--text); }
.nav-audit-links > a.active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); }
.global-search { display: flex; width: clamp(200px, 18vw, 240px); min-width: 200px; flex: 0 0 clamp(200px, 18vw, 240px); flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; margin: 0; }
.global-search input { width: 100%; min-width: 0; height: 40px; min-height: 40px; padding: 8px 11px; font-size: 13px; }
.global-search button { display: inline-grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; padding: 0; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--button-text); cursor: pointer; }
.global-search button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.global-search svg, .search-toggle svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.search-toggle { display: none; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; padding: 0; border: 1px solid var(--accent); border-radius: 8px; background: var(--panel-soft); color: var(--text); cursor: pointer; }
.nav-logout { display: flex; flex: 0 0 auto; align-items: center; margin: 0; }
.nav-logout button { display: inline-flex; min-width: 82px; height: 42px; align-items: center; justify-content: center; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.nav-logout button svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-button:focus-visible, .menu-panel a:focus-visible, .nav-inventory-dropdown summary:focus-visible, .nav-logout button:focus-visible, .search-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-button:hover, .nav-logout button:hover { border-color: var(--accent); background: var(--info-bg); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.nav-count { display: inline-grid; min-width: 19px; height: 19px; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--button-text); text-shadow: var(--button-text-shadow); font-size: 10px; font-weight: 800; }
@media (min-width: 851px) and (max-width: 1100px) {
  .topbar { gap: 10px; padding-inline: 16px; }
  .brand { gap: 6px; font-size: 10px; letter-spacing: .7px; }
  .brand-logo { width: 30px; height: 30px; flex-basis: 30px; }
  .header-actions { gap: 7px; }
  .menu-button, .nav-logout button { height: 40px; font-size: 12px; }
  .menu-button { min-width: 78px; gap: 6px; padding-inline: 8px; }
  .nav-logout button { min-width: 74px; gap: 5px; padding-inline: 7px; }
  .global-search { width: 200px; min-width: 200px; flex-basis: 200px; }
  .global-search input { padding-inline: 8px; font-size: 12px; }
}

.container { width: min(1440px, calc(100% - 48px)); min-width: 0; margin: var(--page-top-gap) auto 48px; }
.page-back { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; margin: 0 0 12px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); color: var(--text); font-size: 13px; font-weight: 650; line-height: 1; transition: color .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease; }
.page-back svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.page-back:hover { border-color: var(--accent); background: var(--accent-tint-alpha); color: var(--text); box-shadow: 0 0 0 2px var(--accent-tint-alpha); }
.page-back:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: var(--section-gap); padding: 0 2px; }
.eyebrow { color: var(--accent); font-size: 11px; letter-spacing: 2px; }
.page-head h1 { margin: 4px 0; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.03em; overflow-wrap: anywhere; }
.dashboard-welcome { display: flex; min-width: 0; align-items: center; gap: 16px; margin: 0 2px 16px; padding: 12px 18px; border: 1px solid rgba(49, 93, 168, .24); border-radius: 12px; background: var(--panel); animation: dashboard-welcome-in 180ms ease-out both; }
.dashboard-welcome__icon { display: grid; width: 52px; height: 52px; flex: 0 0 52px; place-items: center; border: 1px solid rgba(49, 93, 168, .32); border-radius: 12px; background: rgba(49, 93, 168, .09); color: var(--accent); }
.dashboard-welcome__icon svg { display: block; width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-welcome__copy { min-width: 0; }
.dashboard-welcome__time, .dashboard-welcome__name { margin: 0; }
.dashboard-welcome__time { color: var(--accent); font-size: clamp(16px, 1.8vw, 20px); font-weight: 600; letter-spacing: .02em; line-height: 1.2; overflow-wrap: anywhere; }
.dashboard-welcome__name { color: var(--navy); font-size: clamp(24px, 2.4vw, 30px); font-weight: 650; line-height: 1.15; overflow-wrap: anywhere; }
.dashboard-page-head { margin-bottom: 16px; }
.dashboard-page-head h1 { font-size: clamp(24px, 2.2vw, 28px); }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 0; }
.credential-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-stats > .stat { display: grid; min-width: 0; min-height: 88px; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; align-items: center; gap: 4px 12px; padding: 12px 16px; }
.dashboard-stats > .stat > span:not(.stat-icon) { grid-column: 2; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.dashboard-stats > .stat strong { grid-column: 2; margin: 0; color: var(--navy); font-size: 25px; line-height: 1.1; }
.dashboard-stat-link { color: var(--text); text-decoration: none; }
.dashboard-stat-link:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(21, 36, 58, .1); }
.dashboard-stat-link:focus-visible, .category-inventory-values a:focus-visible, .category-inventory-card-heading a:focus-visible, .row-detail-link:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 3px; border-radius: 6px; }
.stat-icon { display: grid; width: 36px; height: 36px; grid-column: 1; grid-row: 1 / span 2; place-items: center; border: 1px solid var(--accent-tint); border-radius: 10px; background: var(--info-bg); color: var(--accent); }
.stat-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon-warning { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning); }
.dashboard-stat-section { margin-bottom: 22px; }
.dashboard-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.dashboard-section-heading h2 { margin: 0; color: var(--navy); font-size: 17px; font-weight: 650; }
.dashboard-section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.credential-stat-section { padding-top: 16px; border-top: 1px solid var(--line); }
.category-inventory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.category-inventory-card { display: grid; min-width: 0; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); box-shadow: var(--shadow); color: var(--text); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.category-inventory-card:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(21, 36, 58, .1); color: var(--text); }
.category-inventory-card:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; }
.category-inventory-card-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.category-inventory-card-heading strong { overflow-wrap: anywhere; color: var(--navy); font-size: 16px; font-weight: 650; }
.category-inventory-card-heading svg { width: 28px; height: 28px; flex: 0 0 28px; padding: 5px; border: 1px solid var(--accent-tint); border-radius: 8px; background: var(--info-bg); fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.category-inventory-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.category-inventory-values > span { display: grid; min-width: 0; gap: 5px; }
.category-inventory-values > a { display: grid; min-width: 0; min-height: 44px; align-content: center; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); text-decoration: none; }
.category-inventory-values > a:hover { border-color: var(--accent); background: var(--info-bg); }
.category-inventory-values > a > span { color: var(--muted); font-size: 12px; }
.category-inventory-card-heading a { color: var(--navy); text-decoration: none; }
.category-inventory-values > span > span { color: var(--muted); font-size: 12px; }
.category-inventory-values strong { color: var(--text); font-size: 18px; font-weight: 500; line-height: 1.1; }
.category-inventory-values .category-active-value { color: var(--success); font-weight: 650; }
.category-inventory-values .category-total-value { color: var(--navy); font-weight: 700; }
.category-detail-section { display: grid; gap: 18px; }
.category-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); box-shadow: var(--shadow); }
.category-detail-heading h2 { margin: 4px 0 0; color: var(--navy); }
.category-detail-heading .eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .1em; }
.category-detail-totals { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); box-shadow: var(--shadow); }
.category-detail-filters { align-items: end; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); }
.transaction-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.transaction-detail-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.transaction-detail-grid dt { color: var(--muted); font-size: 12px; }
.transaction-detail-grid dd { margin: 4px 0 0; color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .btn { min-width: 44px; min-height: 44px; }
.pagination .btn[aria-current="page"] { border-color: var(--accent); background: var(--info-bg); color: var(--navy); }
.row-detail-link { display: inline-block; min-height: 40px; padding: 8px 0; }
.category-detail-filters > div { min-width: min(220px, 100%); }
.category-detail-table { min-width: 850px; }
.inventory-drill-link { color: var(--accent); font-weight: 650; text-decoration: none; text-underline-offset: 3px; }
.inventory-drill-link:hover, .inventory-drill-link:focus-visible { color: var(--accent-hover); text-decoration: underline; }
.inventory-drill-link:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; border-radius: 2px; }
.inventory-drilldown .card { display: grid; gap: 14px; }
.inventory-drilldown h3 { margin: 4px 0; color: var(--navy); }
.detail-product-heading, .drilldown-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.drilldown-nav { flex-wrap: wrap; }
.detail-reconciliation { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--info-bg); color: var(--navy); }
.category-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.asset-manager { display: grid; gap: 18px; }
.asset-manager h3 { margin: 8px 0 0; color: var(--navy); }
.asset-export-links, .asset-job-actions, .asset-reconcile-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.asset-search { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 0; }
.asset-search label { flex: 1 0 100%; }
.asset-search input { min-width: min(360px, 100%); flex: 1 1 280px; }
.asset-bulk-panel { padding: 15px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); }
.asset-bulk-panel > summary { display: inline-flex; cursor: pointer; }
.asset-bulk-form { margin: 15px 0 0; }
.asset-detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 12px; margin: 20px 0; }
.asset-detail-grid > div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.asset-detail-grid dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.asset-detail-grid dd { margin: 5px 0 0; color: var(--navy); overflow-wrap: anywhere; font-weight: 650; }
.asset-serial-edit-form { margin-top: 18px; }
.asset-serial-edit-form small { display: block; margin-top: 5px; }
.asset-bulk-form input[type="file"] { width: 100%; min-width: 0; }
.asset-tag-preview { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--info-bg); color: var(--navy); overflow-wrap: anywhere; }
.asset-tag-preview span { color: var(--text); }
.asset-job-table { min-width: 920px; }
.asset-job-table progress { width: 110px; height: 10px; accent-color: var(--accent); vertical-align: middle; }
.asset-job-table td small, .asset-reconciliation td small { display: block; margin-top: 4px; color: var(--muted); }
.asset-job-actions { min-width: 170px; }
.asset-reconciliation { display: grid; gap: 10px; padding-top: 6px; }
.asset-reconcile-form select { min-width: 190px; }
.asset-reconcile-form { position: relative; min-width: 250px; }
.asset-tag-suggestions { position: absolute; z-index: 5; top: calc(100% - 38px); left: 0; right: 0; display: grid; max-height: 220px; overflow: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.asset-tag-suggestions[hidden] { display: none; }
.asset-tag-option { padding: 9px 11px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.asset-tag-option:hover, .asset-tag-option:focus-visible { background: var(--info-bg); color: var(--accent); }
.hardware-assets-table { min-width: 860px; }
@media (max-width: 700px) {
  .category-detail-actions, .category-detail-actions .btn, .asset-export-links, .asset-export-links .btn { width: 100%; }
  .asset-search input, .asset-search .btn { width: 100%; }
  .asset-bulk-panel { padding: 12px; }
  .asset-reconcile-form select, .asset-reconcile-form .btn { width: 100%; }
}

/* Compact Hardware Assets page */
.hardware-page { display: grid; gap: 14px; min-width: 0; }
.hardware-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; }
.hardware-page-heading h1 { margin: 0; color: var(--navy); font-size: clamp(24px, 3vw, 32px); }
.hardware-page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.hardware-page-actions > .btn, .hardware-page-actions > details > summary { min-height: 40px; padding: 9px 13px; white-space: nowrap; }
.hardware-export-menu { position: relative; }
.hardware-export-menu > summary { display: inline-flex; align-items: center; cursor: pointer; list-style: none; }
.hardware-export-menu > summary::-webkit-details-marker { display: none; }
.hardware-export-options { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(540px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); box-shadow: var(--shadow); }
.hardware-export-options .asset-export-links { gap: 8px; }
.hardware-export-options .hardware-export-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hardware-export-filter > div { min-width: 0; }
.hardware-export-filter button { align-self: end; }
.hardware-page .asset-manager { gap: 14px; padding: 16px; }
.hardware-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hardware-summary-card { display: flex; min-width: 0; min-height: 64px; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 2px 8px rgba(21,36,58,.05); }
.hardware-summary-card span { color: var(--muted); font-size: 12px; line-height: 1.25; }
.hardware-summary-card strong { color: var(--navy); font-size: 20px; line-height: 1; }
.hardware-filter-form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(170px, .9fr) minmax(220px, 1.6fr) auto auto; align-items: end; gap: 10px; margin: 0; }
.hardware-filter-form > div { min-width: 0; }
.hardware-filter-form label { display: block; margin-bottom: 5px; font-size: 12px; }
.hardware-filter-form select, .hardware-filter-form input { width: 100%; min-width: 0; height: 42px; }
.hardware-filter-form > .btn { min-height: 42px; white-space: nowrap; }
.hardware-result-count { margin: 0; }
.hardware-page .field-error { display: block; margin-top: 5px; color: var(--danger, #a12622); font-size: 12px; }
.hardware-page input[aria-invalid="true"], .hardware-page select[aria-invalid="true"], .hardware-page textarea[aria-invalid="true"] { border-color: var(--danger, #a12622); }
.hardware-attention { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 9px 12px; border: 1px solid #f0cf8c; border-radius: 9px; background: #fff9e9; color: var(--navy); font-size: 13px; }
.hardware-attention a { font-weight: 700; }
.hardware-advanced-tools { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.hardware-advanced-tools > summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.hardware-advanced-tools h3 { margin-top: 0; }
.hardware-assets-table { min-width: 0; width: 100%; table-layout: fixed; }
.hardware-assets-table th, .hardware-assets-table td { overflow-wrap: anywhere; }
.hardware-assets-table th:nth-child(2), .hardware-assets-table th:nth-child(3), .hardware-assets-table th:nth-child(6), .hardware-assets-table th:nth-child(7), .hardware-assets-table td:nth-child(2), .hardware-assets-table td:nth-child(3), .hardware-assets-table td:nth-child(6), .hardware-assets-table td:nth-child(7) { display: none; }
.hardware-assets-table th:nth-child(1) { width: 18%; }
.hardware-assets-table th:nth-child(4) { width: 27%; }
.hardware-assets-table th:nth-child(5) { width: 15%; }
.hardware-assets-table th:nth-child(8) { width: 25%; }
.hardware-assets-table th:last-child { width: 15%; }
.hardware-assets-table td .btn { white-space: nowrap; }
.hardware-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.hardware-pagination .btn { min-width: 38px; min-height: 38px; padding: 7px 10px; }
.hardware-pagination .btn[aria-current="page"] { border-color: var(--accent); background: var(--info-bg); color: var(--navy); }
.hardware-pagination .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.hardware-page .asset-manager, .hardware-summary-card { transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease; }
.hardware-summary-card:hover { transform: translateY(-2px); border-color: #7da6ed; box-shadow: 0 6px 16px rgba(38,82,150,.10); }
.hardware-page-actions .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(38,82,150,.12); }
.hardware-page-actions .btn:focus-visible, .hardware-advanced-tools > summary:focus-visible, .hardware-export-menu > summary:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; }
@media (max-width: 900px) {
  .hardware-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hardware-filter-form .hardware-search-field { grid-column: 1 / -1; }
  .hardware-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hardware-page-heading { align-items: flex-start; flex-direction: column; }
  .hardware-page-actions { width: 100%; justify-content: flex-start; }
  .hardware-page-actions > .btn, .hardware-page-actions > details > summary { flex: 1 1 auto; justify-content: center; }
  .hardware-export-options { left: 0; right: auto; width: min(100vw - 32px, 440px); }
  .hardware-export-options .hardware-export-filter { grid-template-columns: 1fr; }
  .hardware-filter-form { grid-template-columns: 1fr; }
  .hardware-filter-form .hardware-search-field { grid-column: auto; }
  .hardware-filter-form > .btn { width: 100%; }
  .hardware-summary-grid { gap: 8px; }
  .hardware-summary-card { min-height: 58px; padding: 9px; }
  .hardware-summary-card span { font-size: 11px; }
  .hardware-summary-card strong { font-size: 18px; }
  .hardware-page .asset-manager { padding: 12px; }
  .hardware-assets-table, .hardware-assets-table tbody, .hardware-assets-table tr, .hardware-assets-table td { display: block; width: 100%; }
  .hardware-assets-table thead, .hardware-assets-table .secondary-asset-column { display: none; }
  .hardware-assets-table tr { margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
  .hardware-assets-table td { display: grid; grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr); gap: 8px; padding: 6px 2px; border: 0; }
  .hardware-assets-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; }
  .hardware-assets-table td:last-child { align-items: center; }
  .hardware-pagination { justify-content: center; }
  .hardware-pagination .hardware-page-range { flex: 1 0 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .hardware-page .asset-manager, .hardware-summary-card { transition: none; }
  .hardware-summary-card:hover, .hardware-page-actions .btn:hover { transform: none; }
}
@media (max-width: 600px) {
  .category-detail-heading { align-items: flex-start; flex-direction: column; padding: 15px; }
  .category-detail-heading .btn { width: 100%; text-align: center; }
  .inventory-drilldown .category-detail-heading { width: 100%; }
  .inventory-drilldown .drilldown-nav, .inventory-drilldown .drilldown-nav .btn { width: 100%; }
  .detail-product-heading { align-items: flex-start; flex-direction: column; }
  .category-detail-totals { padding: 14px; }
  .category-detail-filters { align-items: stretch; }
  .category-detail-filters > div { min-width: 100%; }
  .category-detail-filters > .btn { flex: 1 1 120px; }
}
@keyframes dashboard-welcome-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .dashboard-welcome { animation: none; } }
.grid { display: grid; align-items: start; gap: var(--space-5); min-width: 0; }
.grid > * { min-width: 0; min-height: 0; align-self: start; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); margin-bottom: 20px; }
.card {
  height: auto; min-width: 0; min-height: 0; overflow: visible; align-self: start;
  padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--line); border-radius: var(--card-radius);
  background: var(--panel); box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; font-size: clamp(18px, 2.2vw, 23px); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { display: block; margin-top: 8px; color: var(--navy); font-size: 32px; text-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.section-heading h2 { margin: 0; }

.btn, button.btn, a.btn, summary.btn {
  display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 0; height: var(--control-height); min-height: var(--control-height);
  margin: 0; padding: 10px 15px; border: 1px solid var(--accent); border-radius: var(--control-radius);
  background: var(--accent); color: var(--button-text); text-shadow: var(--button-text-shadow); font: inherit; font-size: 13px; font-weight: 750; line-height: 1.2;
  text-align: center; white-space: normal; overflow-wrap: anywhere; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:hover, button.btn:hover, a.btn:hover, summary.btn:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--button-text); box-shadow: 0 4px 10px rgba(49, 93, 168, .16); }
.btn:active, button.btn:active, a.btn:active, summary.btn:active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); }
.btn:focus-visible, button.btn:focus-visible, a.btn:focus-visible, summary.btn:focus-visible { outline-color: var(--accent-hover); color: var(--button-text); }
.btn:disabled, button.btn:disabled { color: var(--button-text); opacity: 1; }
.btn-glow, .btn-primary { border-color: var(--accent); background: var(--accent); color: var(--button-text); }
.btn-glow:hover, .btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--button-text); }
.btn-danger { border-color: var(--danger); background: var(--danger); color: var(--button-text); }
.btn-danger:hover { border-color: var(--danger-hover); background: var(--danger-hover); color: var(--button-text); }
.btn-success { border-color: var(--success); background: var(--success); color: var(--success-button-text); }
.btn-success:hover { border-color: var(--success-hover); background: var(--success-hover); color: var(--panel); }

.icon-button { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: var(--button-text); text-shadow: var(--button-text-shadow); cursor: pointer; transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.icon-button:hover, .icon-button:focus-visible { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--button-text); box-shadow: 0 4px 10px rgba(49, 93, 168, .16); }
.icon-button span { position: relative; display: block; width: 18px; height: 18px; color: var(--button-text); font-size: 0; }
.icon-button span:before { position: absolute; top: 1px; left: 1px; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 50%; content: ''; }
.icon-button span:after { position: absolute; top: 13px; left: 12px; width: 7px; height: 2px; transform: rotate(45deg); transform-origin: left center; border-radius: 2px; background: currentColor; content: ''; }

table { width: 100%; min-width: var(--table-min-width); border-collapse: collapse; table-layout: auto; font-size: 13px; }
th, td { min-width: 0; padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
th { color: var(--accent); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.35; }
html.inventory-layout-route .table-scroll th { white-space: nowrap; overflow-wrap: normal; }
tbody tr:last-child td { border-bottom: 0; }
td form { margin: 0; }
td input, td select { min-width: 0; }
.table-scroll { display: block; width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden; border-radius: 12px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) var(--panel); }
.inventory-valuation { margin: 0 0 18px; }
.inventory-valuation .metric-card { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.inventory-valuation .metric-card span { display: block; color: var(--muted); font-size: .88rem; }
.inventory-valuation .metric-card strong { display: block; margin-top: 5px; color: var(--accent); font-size: 1.2rem; }
.table-scroll table { width: 100%; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: var(--info-bg); }
.clickable-row:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: -3px; }
.table-scroll .orders-table { min-width: 1320px; }
.employee-hardware-valuation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.employee-hardware-metric { min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.employee-hardware-metric span { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.employee-hardware-metric strong { display: block; margin-top: 5px; color: var(--accent); font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.hardware-assigned-scroll .hardware-assigned-table { --table-min-width: 1725px; table-layout: fixed; }
.hardware-assigned-scroll .hardware-assigned-table th,
.hardware-assigned-scroll .hardware-assigned-table td { padding: 6px 8px; line-height: 1.25; vertical-align: middle; white-space: normal; overflow-wrap: normal; word-break: normal; }
.hardware-assigned-scroll .hardware-assigned-table thead th { white-space: normal; overflow-wrap: normal; word-break: normal; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(1), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(1) { width: 195px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(2), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(2) { width: 130px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(3), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(3) { width: 125px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(4), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(4) { width: 185px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(5), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(5) { width: 170px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(6), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(6) { width: 150px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(7), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(7) { width: 145px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(8), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(8) { width: 140px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(9), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(9) { width: 155px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(10), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(10) { width: 110px; }
.hardware-assigned-scroll .hardware-assigned-table th:nth-child(11), .hardware-assigned-scroll .hardware-assigned-table td:nth-child(11) { width: 100px; }
.hardware-assigned-scroll .hardware-assigned-table.with-actions th:nth-child(12), .hardware-assigned-scroll .hardware-assigned-table.with-actions td.hardware-actions-cell { width: 120px; min-width: 120px; white-space: nowrap; }
.hardware-assigned-scroll .hardware-assigned-table .state-pill { display: inline-flex; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.hardware-assigned-scroll .hardware-assigned-table .hardware-value-cell { white-space: nowrap; }
.hardware-assigned-scroll .hardware-assigned-table .hardware-serial-cell { overflow-wrap: anywhere; }
.employee-hardware-valuation + .hardware-assigned-scroll { margin-top: 0; }
.hardware-history-scroll .hardware-history-table { --table-min-width: 1360px; }
.hardware-history-scroll th, .hardware-history-scroll td { vertical-align: middle; }
@media (max-width: 900px) { .employee-hardware-valuation { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .employee-hardware-valuation { grid-template-columns: minmax(0, 1fr); } }
.vendor-table { --table-min-width: 1100px; }
.assignment-list table { --table-min-width: 820px; }
.badge, .state-pill, .order-status { display: inline-flex; max-width: 100%; align-items: center; vertical-align: middle; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.badge { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--info-bg); color: var(--accent-soft); }
.order-status { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.order-status.pending { border: 1px solid rgba(217, 119, 6, .32); background: var(--warning-tint-alpha); color: var(--warning-text); }
.order-status.confirmed { border: 1px solid rgba(22, 163, 74, .3); background: var(--success-tint-alpha); color: var(--success-text); }
.order-status.rejected { border: 1px solid rgba(220, 38, 38, .28); background: var(--danger-tint-alpha); color: var(--danger-text); }
.status-detail { display: block; min-width: 0; margin-top: 4px; white-space: normal; }
.orders-actions-cell { min-width: 250px; padding-right: 12px; }
.order-actions { display: flex; min-width: 220px; align-items: center; justify-content: center; gap: var(--space-2); }
.order-actions form { display: flex; min-width: 0; flex: 1 1 0; }
.order-action-button { display: flex; width: 100%; height: 44px; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--control-radius); color: var(--button-text); text-shadow: var(--button-text-shadow); font-size: 12px; font-weight: 750; line-height: 1.1; white-space: nowrap; overflow-wrap: normal; }
.order-action-button.confirm-action { border-color: var(--success); background: var(--success); color: var(--success-button-text); }
.order-action-button.confirm-action:hover { border-color: var(--success-hover); background: var(--success-hover); color: var(--button-text); }
.order-action-button.reject-action { border-color: var(--danger); background: var(--danger); color: var(--button-text); }
.order-action-button.reject-action:hover { border-color: var(--danger-hover); background: var(--danger-hover); color: var(--button-text); }

.alert { margin: 12px 0; padding: 13px 15px; border: 1px solid var(--danger-border); border-radius: 12px; background: var(--danger-bg); color: var(--danger-text); }
.alert.error { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.alert.success { border-color: var(--success-border); background: var(--success-bg); color: var(--success-text); }
.alert.info { border-color: var(--info-border); background: var(--info-bg); color: var(--info-text); }
.muted { color: var(--muted); }
.empty-state { padding: 22px 14px; color: var(--muted); text-align: center; white-space: normal; }
.status-low { color: var(--danger); }
.status-ok { color: var(--success-text); }
.state-pill { display: inline-flex; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--info-bg); color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.state-pill.assigned, .state-pill.installed { border-color: var(--success-border); background: var(--success-tint-alpha); color: var(--success-text); }
.state-pill.uninstalled { border-color: var(--line); color: var(--muted); }

.toolbar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.toolbar > div { min-width: min(100%, 180px); flex: 1 1 180px; }
.toolbar > .btn, .toolbar > a.btn { margin: 0; }
.compact-toolbar { margin: 0; }
.compact-toolbar > div { min-width: min(100%, 160px); }
.orders-filter { max-width: 600px; }
.orders-filter .btn { margin-bottom: 0; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }
.inline-actions { display: flex; min-width: 0; align-items: center; flex-wrap: nowrap; gap: var(--space-2); }
.inline-actions form { display: flex; min-width: 0; margin: 0; }
.inline-actions .btn { margin: 0; }
.action-stack { min-width: 0; vertical-align: middle; white-space: nowrap; }
.action-stack > a.btn, .action-stack > details, .action-stack > form { display: inline-flex; min-width: 0; align-items: center; margin: 0 8px 0 0; vertical-align: middle; }
.action-stack .btn { width: 112px; min-width: 112px; min-height: 44px; margin: 0; white-space: normal; }
.hardware-actions-cell { min-width: 240px; white-space: nowrap; }
.hardware-action-select { display: block; width: 180px; max-width: 100%; min-width: 160px; height: 40px; margin: 0; padding: 7px 34px 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--control-radius); background: var(--panel); color: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; }
.hardware-assigned-table .hardware-action-select { box-sizing: border-box; width: 104px; min-width: 104px; max-width: 100%; height: 34px; min-height: 34px; padding: 5px 22px 5px 8px; font-size: 12px; }
.hardware-action-select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.action-stack details > summary { list-style: none; cursor: pointer; }
.action-stack details > summary::-webkit-details-marker { display: none; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--control-gap); }
.form-actions .btn { width: auto; min-width: 112px; margin: 4px 0 0; padding: 6px 20px; }
.form-wide, .form-actions { grid-column: 1 / -1; }
.product-form, .assignment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-3) var(--space-4); min-width: 0; }
.product-form > *, .assignment-form > * { min-width: 0; }
.form-field { min-width: 0; }
.form-field label { margin-top: 8px; }
.form-field small { display: block; margin-top: 4px; }
.stacked-form { display: grid; gap: 14px; min-width: 0; }
.stacked-form > label { margin: 0; }
.stacked-form [data-stock-pricing] { display: grid; gap: 12px; }
.stacked-form [data-stock-pricing][hidden] { display: none; }
.catalog-section { margin-bottom: var(--space-5); }
.catalog-section h2 { margin-bottom: 14px; }
.catalog-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); align-items: end; gap: var(--space-3); margin-bottom: 14px; }
.catalog-entry .btn { justify-self: start; margin: 0; }
.category-create-entry { width: 100%; max-width: 960px; grid-template-columns: minmax(0, 30fr) minmax(0, 35fr) minmax(0, 35fr); gap: 12px; }
.category-create-entry > div { min-width: 0; }
.category-create-entry .btn { align-self: end; }
.category-table-scroll { min-width: 0; }
.category-list-table { --table-min-width: 0px; width: 100%; table-layout: fixed; }
.category-list-table.has-actions th:nth-child(1), .category-list-table.has-actions td:nth-child(1) { width: 30%; }
.category-list-table.has-actions th:nth-child(2), .category-list-table.has-actions td:nth-child(2) { width: 35%; }
.category-list-table.has-actions th:nth-child(3), .category-list-table.has-actions td:nth-child(3) { width: 12%; }
.category-list-table.has-actions th:nth-child(4), .category-list-table.has-actions td:nth-child(4) { width: 23%; }
.category-list-table:not(.has-actions) th:nth-child(1), .category-list-table:not(.has-actions) td:nth-child(1) { width: 36%; }
.category-list-table:not(.has-actions) th:nth-child(2), .category-list-table:not(.has-actions) td:nth-child(2) { width: 44%; }
.category-list-table:not(.has-actions) th:nth-child(3), .category-list-table:not(.has-actions) td:nth-child(3) { width: 20%; }
.category-list-table input { width: 100%; min-width: 0; }
.category-list-table .inline-actions { flex-wrap: wrap; gap: 6px; }
.category-list-table .inline-actions .btn { white-space: nowrap; }
.employee-admin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; gap: var(--space-3); }
.employee-admin-form .btn { margin: 0; }
.employee-picker { position: relative; min-width: 0; }
.employee-picker > span { display: block; margin-top: 6px; }
.search-results { position: absolute; z-index: 8; top: 100%; right: 0; left: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); }
.search-results[hidden] { display: none; }
.search-result, .search-result-empty { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.search-result { cursor: pointer; }
.search-result:hover, .search-result:focus { background: var(--info-bg); color: var(--accent-soft); }
.auto-filled { background: var(--info-bg); color: var(--muted); }
.filter-panel { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.filter-panel[hidden] { display: none; }
.product-picker { display: flex; align-items: flex-end; gap: var(--space-3); margin-bottom: var(--space-4); }
.product-picker > div { flex: 1 1 220px; min-width: 0; }
.product-picker .btn { flex: 0 0 auto; margin: 0; }
.product-match-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.product-match-list li { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.product-match-list li > div { display: grid; min-width: 0; gap: 3px; }
.product-match-list li strong { overflow-wrap: anywhere; color: var(--text); }
.product-match-list li .muted { font-size: 12px; }
.product-match-list .btn { flex: 0 0 auto; margin: 0; }
.history-filters { margin-bottom: 18px; }
.history-filter-fields { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)); align-items: end; gap: 12px; }
.history-custom-time { display: grid; grid-template-columns: 1fr; gap: 4px; }
.history-custom-time[hidden] { display: none; }
.history-custom-time .time-label { margin-top: 4px; }
.history-filter-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.history-filter-actions .btn { margin: 0; }
.history-filter-actions .export-button { margin-left: auto; }
.history-reconciliation-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 12px 0 18px; }
.history-reconciliation-form label { align-self: end; }
.history-reconciliation-form input, .history-reconciliation-form select, .history-reconciliation-form textarea { width: 100%; min-width: 0; }
.history-reconciliation-form textarea { min-height: 76px; }
.history-reconciliation-form button { justify-self: start; margin: 0; }
.history-page .table-scroll { margin-top: 10px; }
.history-page .table-scroll table { min-width: 1120px; }

.users-heading-action { display: flex; justify-content: flex-end; margin: 0 0 var(--space-4); }
.users-heading-action .btn { margin: 0; padding: 9px 16px; }
.employee-dialog, .software-dialog { width: min(620px, calc(100vw - 28px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 18px 60px rgba(15, 23, 42, .18); }
.employee-dialog::backdrop, .software-dialog::backdrop { background: rgba(21, 36, 58, .32); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin: 0; }
.employee-create-form .form-actions { margin-top: 12px; }
.employee-create-form .btn { margin: 0; }
.employee-create-form button:disabled { opacity: 1; color: var(--button-text); cursor: not-allowed; }
.employee-directory { display: grid; width: 100%; max-width: 1080px; gap: 8px; margin-inline: auto; }
.employee-tile { display: grid; min-width: 0; gap: 10px; padding: 12px; border: 1px solid var(--panel-soft); border-radius: 15px; background: rgba(248, 250, 252, .9); }
.employee-tile-main { display: grid; min-width: 0; grid-template-columns: 44px minmax(0, 520px) auto; align-items: center; gap: 12px 14px; }
.employee-avatar { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; border: 1px solid var(--accent-border-alpha); border-radius: 12px; background: var(--accent-tint-alpha); color: var(--accent-soft); font-size: 19px; font-weight: 800; }
.employee-tile-content { min-width: 0; max-width: 520px; flex: 1; }
.employee-tile h3 { margin: 0 0 4px; font-size: 16px; }
.employee-tile p { margin: 3px 0; overflow-wrap: anywhere; font-size: 13px; }
.employee-tile > .btn { flex: 0 0 auto; margin: 0; }
.employee-tile-controls { display: flex; min-width: 0; grid-column: 3; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 12px; }
.employee-tile-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.employee-tile-actions > form { margin: 0; }
.employee-edit { position: relative; }
.employee-edit > summary { list-style: none; }
.employee-edit > summary::-webkit-details-marker { display: none; }
.employee-edit[open] > summary { display: none; }
.employee-edit-form { display: grid; width: 100%; max-width: 760px; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.employee-edit-form[hidden] { display: none; }
.employee-edit-form label { min-width: 0; margin: 0; }
.employee-edit-form input, .employee-edit-form select { min-width: 0; }
.employee-edit-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; }
.employee-edit-actions .btn { margin: 0; }
@media (max-width: 850px) {
  .employee-directory { max-width: 100%; }
  .employee-tile-main { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
  .employee-tile-controls { grid-column: 2; align-items: flex-start; justify-content: flex-start; }
}
.users-list-page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.users-list-page-head h1 { margin: 0; }
.users-list-page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.users-list-page-head > .btn { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.users-list-card, .user-create-page-card { min-width: 0; align-self: start; }
.user-create-page-card { width: min(100%, 940px); margin-inline: auto; }
.users-list-card .users-accounts-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.users-accounts-table { width: 100%; min-width: 1195px; table-layout: fixed; }
.users-accounts-table :is(th, td) { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.users-accounts-table :is(th, td):nth-child(1) { width: 175px; }
.users-accounts-table :is(th, td):nth-child(2) { width: 160px; }
.users-accounts-table :is(th, td):nth-child(3) { width: 230px; }
.users-accounts-table :is(th, td):nth-child(4) { width: 150px; }
.users-accounts-table :is(th, td):nth-child(5) { width: 110px; }
.users-accounts-table :is(th, td):nth-child(6) { width: 180px; }
.users-accounts-table :is(th, td):nth-child(7) { width: 190px; }
.users-accounts-table td:is(:nth-child(1), :nth-child(2), :nth-child(3)) { overflow: hidden; text-overflow: ellipsis; }
.users-account-actions, .users-account-actions .btn { white-space: nowrap; }
.users-account-actions { padding-inline: 6px; text-align: center; }
.users-account-action-group { display: inline-flex; min-width: 0; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 6px; }
.users-account-status-form { display: inline-flex; flex: 0 0 auto; margin: 0; }
.users-account-actions .btn { display: inline-flex; flex: 0 0 auto; padding-inline: 14px; overflow-wrap: normal; }
.users-account-actions .btn-outline-danger { border-color: var(--danger); background: var(--panel); color: var(--danger); }
.users-account-actions .btn-outline-danger:hover, .users-account-actions .btn-outline-danger:focus-visible { border-color: var(--danger); background: var(--danger-bg); color: var(--danger-text); }
.users-created-followup { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.users-created-followup > span { flex: 1 1 240px; }
.users-created-followup .btn { white-space: nowrap; overflow-wrap: normal; }
.permission-matrix-scroll { width: 100%; min-width: 0; }
.permission-horizontal-scroll { display: block; width: 100%; height: 20px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: auto; scrollbar-color: var(--accent) var(--line); }
.permission-horizontal-scroll-top { margin: 0 0 4px; }
.permission-horizontal-scroll-bottom { margin: 4px 0 0; }
.permission-scroll-spacer { height: 1px; min-width: 100%; }
.permission-table-scroll { max-height: min(60vh, 560px); min-height: 240px; overflow-x: auto; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; overscroll-behavior: contain; scrollbar-width: auto; scrollbar-color: var(--accent) var(--line); }
.permission-table-scroll::-webkit-scrollbar, .permission-horizontal-scroll::-webkit-scrollbar { width: 14px; height: 14px; }
.permission-table-scroll::-webkit-scrollbar-track, .permission-horizontal-scroll::-webkit-scrollbar-track { border: 1px solid var(--line); border-radius: 999px; background: #E2E8F0; }
.permission-table-scroll::-webkit-scrollbar-thumb, .permission-horizontal-scroll::-webkit-scrollbar-thumb { min-width: 36px; border: 3px solid #E2E8F0; border-radius: 999px; background: var(--accent); }
.permission-table-scroll::-webkit-scrollbar-thumb:hover, .permission-horizontal-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }
.permission-matrix-scroll [data-permission-horizontal]:focus-visible, .permission-table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.permissions-table { min-width: 1040px; table-layout: fixed; }
.permissions-table th:first-child { position: sticky; left: 0; z-index: 2; width: 190px; min-width: 190px; background: var(--panel); text-align: left; }
.permissions-table thead th { position: sticky; top: 0; z-index: 3; background: var(--panel-soft); text-align: center; }
.permissions-table thead th:first-child { z-index: 4; }
.permissions-table td { width: 84px; min-width: 84px; text-align: center; }
.permissions-table input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--accent); vertical-align: middle; }
.permission-mode { display: grid; width: min(100%, 360px); gap: 6px; }
.directory-search { max-width: 760px; }
.directory-search .btn { margin-bottom: 0; }
.employee-directory-filters { display: grid; grid-template-columns: minmax(250px, 300px) minmax(240px, 1fr) auto auto; align-items: end; gap: 12px; width: 100%; max-width: none; }
.employee-directory-filters > div { min-width: 0; }
.employee-directory-filters > .btn { align-self: end; justify-self: start; width: auto; white-space: nowrap; }
.employee-filter-summary { margin: -4px 0 14px; color: var(--muted-strong); font-size: 13px; }
.employee-filter-summary strong { color: var(--navy); }
@media (max-width: 800px) {
  .employee-directory-filters { grid-template-columns: minmax(200px, 1fr) minmax(220px, 2fr) auto auto; }
}
@media (max-width: 640px) {
  .employee-directory-filters { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .employee-directory-filters > .btn { justify-self: start; }
}
.auth-page { display: grid; min-height: 100vh; place-items: center; padding: clamp(12px, 4vw, 30px); }
.auth-card { width: min(430px, 100%); max-width: 100%; min-width: 0; padding: clamp(20px, 6vw, 34px); border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.auth-card .brand { margin-bottom: 10px; }
.auth-card .brand-logo { width: 52px; height: 52px; flex-basis: 52px; }
.auth-card form input[name="username"], .auth-card form input[name="password"] {
  color-scheme: light; background: var(--panel); color: var(--text); caret-color: var(--text);
}
.auth-card form input[name="username"]::placeholder, .auth-card form input[name="password"]::placeholder { color: var(--muted); opacity: 1; }
.auth-card form input[name="username"]:focus, .auth-card form input[name="password"]:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-focus); }
.auth-card form input[name="username"]:-webkit-autofill,
.auth-card form input[name="username"]:-webkit-autofill:hover,
.auth-card form input[name="username"]:-webkit-autofill:focus,
.auth-card form input[name="username"]:-webkit-autofill:active,
.auth-card form input[name="password"]:-webkit-autofill,
.auth-card form input[name="password"]:-webkit-autofill:hover,
.auth-card form input[name="password"]:-webkit-autofill:focus,
.auth-card form input[name="password"]:-webkit-autofill:active {
  background-color: var(--panel);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset;
  box-shadow: 0 0 0 1000px var(--panel) inset;
  filter: none;
}
.auth-card form input[name="username"]:autofill,
.auth-card form input[name="username"]:-moz-autofill,
.auth-card form input[name="password"]:autofill,
.auth-card form input[name="password"]:-moz-autofill {
  background-color: var(--panel);
  color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--panel) inset;
  filter: none;
}
.auth-card form input[name="username"]:-webkit-autofill:focus,
.auth-card form input[name="password"]:-webkit-autofill:focus { border-color: var(--accent); }
.auth-card form input[name="username"]:-moz-autofill:focus,
.auth-card form input[name="password"]:-moz-autofill:focus { border-color: var(--accent); }
footer { padding: 20px; color: var(--muted); text-align: center; font-size: 12px; }

.profile-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 var(--space-6); padding: 0 4px; }
.profile-intro, .profile-summary, .profile-tabs, .profile-section { min-width: 0; }
.profile-intro h2 { margin: 3px 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.03em; }
.profile-intro p { margin: 6px 0; }
.profile-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); gap: var(--space-4); margin-bottom: var(--space-6); }
.profile-summary > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(248, 250, 252, .9); }
.profile-summary span, .profile-summary strong { display: block; }
.profile-summary span { color: var(--muted); font-size: 12px; }
.profile-summary strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 14px; }
.profile-tabs { display: flex; gap: 8px; margin: 0 0 var(--space-5); padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.profile-tab { display: inline-flex; min-height: 44px; flex: 1; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--text); font-weight: 650; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.profile-tab:hover, .profile-tab:focus-visible { border-color: rgba(49, 93, 168, .35); background: var(--info-bg); color: var(--accent-hover); }
.profile-tab.active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); }
.profile-section { min-width: 0; min-height: 0; margin-top: var(--space-6); scroll-margin-top: 16px; }
.profile-section, .hardware-management, .hardware-form-panel, .history-disclosure { max-width: 100%; }
.profile-section[hidden] { display: none !important; }
.profile-section .section-heading { margin-bottom: 14px; }
.profile-section .section-heading h2 { display: flex; align-items: center; gap: 9px; margin: 3px 0; }
.count-chip { display: inline-grid; min-width: 25px; height: 25px; place-items: center; padding: 0 7px; border: 1px solid rgba(49, 93, 168, .4); border-radius: 999px; background: rgba(49, 93, 168, .13); color: var(--accent); font-size: 12px; }
.profile-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.software-row-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px; white-space: normal; }
.software-row-actions > .btn, .software-row-actions > form { display: flex; min-width: 0; flex: 0 1 112px; align-items: center; margin: 0; }
.software-row-actions .btn { width: 100%; min-width: 0; height: 44px; min-height: 44px; margin: 0; padding: 8px 12px; border-radius: var(--control-radius); }
.hardware-management { min-width: 0; }
.hardware-action-buttons { display: flex; min-width: 0; align-items: flex-start; flex-wrap: nowrap; gap: 10px; }
.hardware-action-buttons > .btn { min-width: 0; }
.hardware-form-panel { display: grid; min-width: 0; gap: 12px; margin-top: 12px; }
.hardware-action-form { margin: 0; }
.hardware-action-form[hidden] { display: none !important; }
.hardware-action-buttons > .btn.active { border-color: var(--accent-active); background: var(--accent-active); color: var(--button-text); box-shadow: 0 0 0 2px rgba(49, 93, 168, .2); }
.profile-action { position: relative; min-width: 0; }
.profile-action > summary { list-style: none; cursor: pointer; }
.profile-action > summary::-webkit-details-marker { display: none; }
.profile-action > summary.btn { min-width: 150px; }
.profile-form { display: grid; width: min(720px, 100%); min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.profile-form > * { min-width: 0; }
.profile-form button { justify-self: start; min-width: 140px; }
.profile-form .form-wide, .profile-form .form-actions { grid-column: 1 / -1; }
.hardware-form-panel .hardware-action-form { margin: 0; }
.profile-action[open] .profile-form { box-shadow: var(--shadow); }

@keyframes page-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-enter { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes feedback-enter { from { opacity: .55; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
main.container { animation: page-enter .22s ease-out both; }
.profile-section:not([hidden]) { animation: panel-enter .2s ease-out both; }
.alert.success { animation: feedback-enter .22s ease-out both; }
.mini-form { position: static; width: min(310px, 100%); max-width: 100%; margin-top: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.mini-form .btn { margin-top: 12px; }
.history-disclosure { margin-top: var(--space-5); padding-top: 13px; border-top: 1px solid var(--line); }
.history-disclosure > summary { padding: 8px 2px; color: var(--accent-soft); font-weight: 650; cursor: pointer; }
.history-disclosure .table-scroll { margin-top: 10px; }
.vendor-create { margin-bottom: var(--space-5); }
.vendor-create > summary, .vendor-edit > summary { display: inline-flex; align-items: center; justify-content: center; list-style: none; cursor: pointer; }
.vendor-create > summary::-webkit-details-marker, .vendor-edit > summary::-webkit-details-marker { display: none; }
.vendor-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-3) var(--space-4); margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.vendor-form > * { min-width: 0; }
.vendor-form .form-wide, .vendor-form .form-actions { grid-column: 1 / -1; }
.vendor-filters { align-items: end; margin-bottom: 16px; }
.vendor-picker { position: relative; min-width: 0; }
.vendor-search-control { position: relative; min-width: 0; }
.vendor-suggestions { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; left: 0; max-height: min(300px, 45vh); overflow: auto; padding: 5px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.vendor-suggestions[hidden] { display: none; }
.vendor-option { display: flex; width: 100%; min-height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.vendor-option:hover, .vendor-option[aria-selected="true"] { background: var(--accent-tint-alpha); color: var(--text); }
.vendor-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--accent-tint-alpha); color: var(--text); }
.vendor-option small, .vendor-suggestion-empty { color: var(--muted); font-size: 12px; }
.vendor-suggestion-empty { padding: 12px; }
.vendor-autofill { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin-top: 8px; }
.vendor-autofill label { min-width: 0; }
.vendor-autofill input { background: var(--panel-soft); color: var(--muted); }
.vendor-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.vendor-profile-head h2 { margin: 4px 0; }
.vendor-profile { margin-bottom: var(--space-5); }
.vendor-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.vendor-contact-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(248, 250, 252, .9); }
.vendor-contact-grid span, .vendor-contact-grid strong { display: block; overflow-wrap: anywhere; }
.vendor-contact-grid span { color: var(--muted); font-size: 12px; }
.vendor-contact-grid strong { margin-top: 5px; font-size: 14px; }
.vendor-contact-grid .vendor-address { grid-column: span 2; }
.vendor-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.vendor-stats .card { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.vendor-stats .card span { color: var(--muted); font-size: 12px; }
.vendor-stats .card strong { overflow-wrap: anywhere; font-size: clamp(18px, 2.3vw, 24px); }
.vendor-status-form { margin: 12px 0 var(--space-6); }
.software-dialog { display: none; width: min(680px, calc(100vw - 28px)); max-width: calc(100vw - 24px); max-height: min(760px, calc(100dvh - 24px)); overflow: hidden; padding: 0; }
.software-dialog[open] { display: flex; flex-direction: column; }
.software-dialog-header { position: sticky; z-index: 2; top: 0; flex: 0 0 auto; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--panel); }
.software-dialog-header h2 { margin: 0; color: var(--navy); font-size: 20px; }
.employee-software-form { display: flex; min-width: 0; min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 0; overflow: hidden; padding: 0; border: 0; background: transparent; }
.software-dialog-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 20px 22px; }
.software-details-section h3 { margin: 0 0 14px; color: var(--navy); font-size: 16px; }
.software-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.software-details-grid > div { min-width: 0; }
.software-details-notes { grid-column: 1 / -1; }
.software-details-grid input, .software-details-grid textarea, .credential-action-fields input, .credential-action-fields textarea, .credential-action-fields select, .credential-edit-fields input, .credential-edit-fields textarea { width: 100%; min-width: 0; }
.software-details-grid textarea, .credential-input-row textarea { min-height: 74px; }
.employee-software-credentials { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.employee-software-credentials > summary { padding: 13px 15px; color: var(--navy); font-weight: 700; cursor: pointer; }
.software-credential-content { display: grid; gap: 12px; padding: 0 15px 15px; }
.credential-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.credential-choice legend { width: 100%; margin-bottom: 2px; color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.credential-choice-option { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--navy); font-size: 13px; font-weight: 650; cursor: pointer; }
.credential-choice-option input { accent-color: var(--blue); }
.credential-action-fields, .credential-edit-fields { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.credential-action-fields[hidden], .credential-edit-fields[hidden] { display: none; }
.credential-input-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.credential-input-row > div { min-width: 0; }
.credential-input-row .form-wide { grid-column: 1 / -1; }
.credential-edit-fields h4 { margin: 0 0 10px; color: var(--navy); }
.software-credential-content .table-scroll { margin: 0; }
.software-credential-content table { min-width: 600px; }
.software-credential-content .credential-actions { min-width: 170px; }
.software-dialog-footer { position: sticky; z-index: 2; bottom: 0; display: flex; justify-content: flex-end; gap: 9px; flex: 0 0 auto; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel); }
.software-dialog-footer .btn { margin: 0; }
.software-dialog-footer [hidden] { display: none; }
code { display: block; max-width: 360px; overflow-wrap: anywhere; color: var(--muted-strong); font-size: 11px; white-space: pre-wrap; }
.hardware-available { margin: var(--space-5) 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.hardware-available h3 { margin: 0 0 10px; font-size: 16px; }
.hardware-available + .table-scroll { margin-top: var(--space-5); }
.hardware-assigned-scroll { overflow-x: auto; overflow-y: hidden; }
.remove-hardware-dialog { width: min(640px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-x: hidden; overflow-y: auto; margin: auto; padding: clamp(18px, 3vw, 26px); border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); color: var(--text); box-shadow: 0 18px 60px rgba(15, 23, 42, .2); }
.remove-hardware-dialog::backdrop { background: rgba(21, 36, 58, .38); backdrop-filter: blur(2px); }
.remove-hardware-dialog:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.remove-hardware-dialog h2 { margin: 0; color: var(--navy); font-size: 18px; }
.remove-hardware-dialog p { margin: 8px 0 16px; color: var(--muted-strong); font-size: 13px; }
.remove-hardware-form { display: grid; gap: 8px; }
.remove-hardware-form input { width: 100%; min-width: 0; }
.remove-hardware-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.remove-hardware-actions .btn { min-width: 136px; margin: 0; white-space: nowrap; }
.hardware-assigned-scroll, .history-disclosure .table-scroll { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }
.history-disclosure table { --table-min-width: 820px; }

.profile-actions details, .action-stack details { position: relative; }
.profile-actions details[open] .profile-form { position: static; }
.table-scroll .orders-actions-cell { width: 250px; }
.orders-table { --table-min-width: 1320px; }
.orders-table th:last-child, .orders-table td.orders-actions-cell { width: 250px; min-width: 250px; }
.section-spaced { margin-top: var(--space-6); }
.global-search-page { max-width: 1100px; margin-inline: auto; }
.global-search-form > div { display: flex; align-items: center; gap: var(--space-2); }
.global-search-form > div input { flex: 1 1 auto; }
.global-search-form > div button { flex: 0 0 auto; }
.search-summary { margin: var(--space-4) 0 0; }
.search-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-4); margin-top: var(--space-5); }
.search-group { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(248, 250, 252, .9); }
.search-group h2 { margin: 0 0 10px; font-size: 17px; }
.search-group ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.search-group li { min-width: 0; }
.search-group li a { display: grid; gap: 4px; min-width: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: rgba(49, 93, 168, .025); }
.search-group li a:hover, .search-group li a:focus-visible { border-color: rgba(49, 93, 168, .4); background: rgba(49, 93, 168, .09); }
.search-group li strong, .search-group li span { overflow-wrap: anywhere; }
.search-group li strong { color: var(--text); font-size: 14px; }
.search-group li span { color: var(--muted); font-size: 12px; }
.empty-state { margin: var(--space-5) 0 0; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.user-create-form, .auth-card form { display: grid; gap: var(--space-2); min-width: 0; }
.user-create-form > fieldset { min-width: 0; }
.user-create-form > .btn { margin-top: var(--space-2); }
.user-edit-form { display: grid; min-width: 0; gap: 20px; }
.user-edit-fields { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.user-edit-fields > div { min-width: 0; }
.users-back-link { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px 2px; color: var(--accent); font-size: 13px; font-weight: 700; transition: color 180ms ease, transform 180ms ease; }
.users-back-link svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.users-back-link:hover, .users-back-link:focus-visible { color: var(--accent); transform: translateX(-2px); }
.users-edit-page-head { margin-bottom: 16px; }
.users-edit-page-head h1 { margin-top: 0; }
.users-edit-page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.user-management-route .container { margin-top: 16px; }
.users-create-page-head { margin: 0 0 14px; }
.users-create-page-head h1 { margin: 0; }
.users-create-page-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.user-password-reset, .user-permissions-settings, .user-account-details { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.user-password-reset legend, .user-permissions-settings legend, .user-account-details legend { padding: 0 8px; color: var(--text); font-weight: 700; }
.user-password-reset > p, .user-permissions-settings > p { margin: 0 0 14px; }
.user-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-edit-actions > .btn { min-width: 120px; margin: 0; text-align: center; }
.auth-card form > .btn { justify-self: start; margin-top: var(--space-2); }
.auth-card label { margin: 0; }

/* Compact, grouped permission controls shared by Create User and Edit User. */
.user-permissions-settings { display: grid; gap: 11px; }
.user-permissions-settings > p { margin: 0; }
.user-permissions-settings .permission-mode { display: grid; grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); align-items: center; gap: 10px; max-width: 520px; }
.user-permissions-settings .permission-mode label { margin: 0; font-weight: 650; }
.effective-access { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, #f8fafc); display: grid; gap: 4px; }
.effective-access > strong { color: var(--text); }
.effective-access > span, .effective-access p { margin: 0; color: var(--muted); font-size: 12px; }
.effective-access ul { display: flex; flex-wrap: wrap; gap: 5px 16px; margin: 3px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.permission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.permission-module { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); overflow: clip; }
.permission-module > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 9px 12px; cursor: pointer; color: var(--text); font-weight: 650; list-style-position: inside; }
.permission-module > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: -3px; }
.permission-module > summary small { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; }
.permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; padding: 4px 12px 12px; }
.permission-option { display: flex; align-items: flex-start; gap: 8px; min-width: 0; margin: 0; padding: 4px 0; font-size: 12px; line-height: 1.4; }
.permission-option input { flex: 0 0 auto; margin: 2px 0 0; }
.permission-option span { overflow-wrap: anywhere; }
.permission-note { margin: 0 12px 11px !important; color: var(--muted); font-size: 11px; }
.permission-department-list { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: -9px 0 0; padding-left: 22px; color: var(--muted); font-size: 12px; }
.permission-increase-confirm { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warning, #b45309) 40%, var(--line)); border-radius: 9px; background: color-mix(in srgb, var(--warning, #b45309) 7%, white); }
.permission-increase-confirm[hidden] { display: none; }
.permission-increase-confirm label { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12px; }
.permission-increase-confirm input { flex: 0 0 auto; margin-top: 2px; }
.form-error, .form-field-error { color: var(--danger); }
.form-error { margin: 0; padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--danger) 7%, white); }
.form-field-error { display: block; }
@media (max-width: 700px) {
  .user-permissions-settings .permission-mode { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .permission-groups { grid-template-columns: minmax(0, 1fr); }
  .permission-options { grid-template-columns: minmax(0, 1fr); }
  .effective-access ul { display: grid; gap: 3px; }
}

@media (max-width: 1000px) {
  .employee-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 44px auto; column-gap: 8px; row-gap: 0; padding: 8px 16px; }
  .brand { grid-column: 1; grid-row: 1; gap: 7px; font-size: 11px; letter-spacing: .9px; }
  .header-actions { display: grid; grid-column: 2; grid-row: 1 / span 2; grid-template-columns: auto 40px 40px; grid-template-rows: 44px auto; align-items: center; gap: 8px 5px; }
  .menu-dropdown { position: relative; grid-column: 1; grid-row: 1; }
  .menu-button { min-width: 75px; height: 40px; gap: 6px; padding-inline: 8px; font-size: 12px; }
  .menu-button svg { width: 16px; height: 16px; }
  .search-toggle { display: inline-grid; grid-column: 2; grid-row: 1; width: 40px; height: 40px; }
  .search-toggle:hover, .search-toggle[aria-expanded="true"] { border-color: var(--accent); background: var(--info-bg); }
  .global-search { display: none; grid-column: 1 / -1; grid-row: 2; width: min(100%, 360px); min-width: 0; flex-basis: auto; padding-top: 8px; border-top: 1px solid var(--line); }
  .topbar.search-open .global-search { display: flex; }
  .global-search input { height: 40px; min-height: 40px; }
  .global-search button { width: 40px; height: 40px; flex-basis: 40px; }
  .nav-logout { grid-column: 3; grid-row: 1; }
  .nav-logout button { width: 40px; min-width: 40px; height: 40px; padding: 0; }
  .nav-logout button svg { width: 18px; height: 18px; }
  .logout-label { display: none; }
}
@media (max-width: 850px) {
  .dashboard-welcome { gap: 12px; padding: 11px 15px; }
  .dashboard-welcome__icon { width: 48px; height: 48px; flex-basis: 48px; }
  .dashboard-welcome__icon svg { width: 34px; height: 34px; }
  .dashboard-welcome__name { font-size: clamp(24px, 4vw, 30px); }
  .dashboard-welcome__time { font-size: clamp(19px, 3.2vw, 24px); }
  .grid.two { grid-template-columns: minmax(0, 1fr); }
  .product-form, .assignment-form { grid-template-columns: minmax(0, 1fr); }
  .product-picker { align-items: stretch; flex-direction: column; }
  .product-picker .btn { align-self: flex-start; }
  .product-match-list li { align-items: flex-start; }
  .form-wide, .form-actions { grid-column: 1; }
  .catalog-entry, .employee-admin-form { grid-template-columns: minmax(0, 1fr); }
  .catalog-entry.category-create-entry { grid-template-columns: minmax(0, 30fr) minmax(0, 35fr) minmax(0, 35fr); }
  .compact-toolbar > div { min-width: 100%; }
  .profile-form { width: 100%; min-width: 0; }
  .profile-intro { align-items: flex-start; flex-direction: column; }
  .profile-intro .btn { margin: 0; }
  .profile-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-section .table-scroll { overflow-x: auto; }
  .profile-section .hardware-action-form { width: 100%; }
}
@media (max-width: 700px) {
  .credential-access-controls { grid-template-columns: minmax(0, 1fr); }
  .users-create-page-head { margin-bottom: 10px; }
  .users-list-card { padding: 14px; }
  .users-list-page-head { align-items: flex-start; flex-direction: column; }
  .users-list-page-head > .btn { align-self: flex-start; }
}
@media (max-width: 1023px) {
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 24px); }
  .category-inventory-grid { grid-template-columns: minmax(0, 1fr); }
  .category-inventory-card { gap: 12px; padding: 14px; }
  .page-head { gap: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-welcome { align-items: flex-start; gap: 10px; padding: 10px 12px; }
  .dashboard-welcome__icon { width: 42px; height: 42px; flex-basis: 42px; }
  .dashboard-welcome__icon svg { width: clamp(27px, 8vw, 32px); height: clamp(27px, 8vw, 32px); }
  .dashboard-welcome__name { font-size: clamp(21px, 7vw, 27px); }
  .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .dashboard-stats { gap: 8px; }
  .dashboard-stats > .stat { grid-template-columns: 32px minmax(0, 1fr); gap: 4px 8px; padding: 10px; }
  .stat-icon { width: 30px; height: 30px; border-radius: 8px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .dashboard-stats > .stat > span:not(.stat-icon) { font-size: 11px; }
  .dashboard-stats > .stat strong { font-size: 22px; }
  .transaction-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-welcome__time { font-size: clamp(17px, 5.6vw, 21px); }
  .toolbar { align-items: stretch; }
  .toolbar > div { min-width: 0; flex: 1 1 100%; }
  .toolbar > .btn, .toolbar > a.btn { flex: 1 1 120px; }
  .global-search-page { padding: 16px; }
  .global-search-form > div { align-items: stretch; flex-direction: column; }
  .global-search-form > div button { width: 100%; }
  .employee-admin-form, .history-filter-fields, .catalog-entry { grid-template-columns: minmax(0, 1fr); }
  .catalog-entry.category-create-entry { grid-template-columns: minmax(0, 1fr); }
  .category-list-table { --table-min-width: 620px; }
  .history-filter-actions { align-items: stretch; flex-wrap: wrap; }
  .history-filter-actions > .btn { flex: 1 1 120px; }
  .history-filter-actions .export-button { margin-left: 0; }
  .employee-tile-main { grid-template-columns: 44px minmax(0, 1fr); align-items: start; }
  .employee-tile-content { min-width: 0; }
  .employee-tile-controls { grid-column: 2; align-items: flex-start; justify-content: flex-start; }
  .employee-tile-actions { justify-content: flex-start; }
  .user-edit-fields { grid-template-columns: minmax(0, 1fr); }
  .user-edit-actions > .btn { flex: 1 1 140px; }
  .permission-horizontal-scroll { height: 22px; }
  .permission-table-scroll { max-height: min(55vh, 440px); min-height: 220px; }
  .employee-edit-form { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .employee-edit-actions { grid-column: 1; }
  .profile-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-action, .profile-action > summary { width: 100%; min-width: 0; }
  .profile-action > summary.btn { width: 100%; min-width: 0; }
  .profile-form { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .profile-form .form-wide, .profile-form .form-actions { grid-column: 1; }
  .mini-form { width: 100%; max-width: 100%; }
  .history-filter-fields { grid-template-columns: minmax(0, 1fr); }
  .employee-dialog { width: calc(100vw - 20px); padding: 16px; }
  .software-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 0; }
  .software-dialog-header, .software-dialog-body { padding-right: 15px; padding-left: 15px; }
  .software-dialog-footer { padding: 11px 15px; }
  .software-details-grid { grid-template-columns: minmax(0, 1fr); }
  .software-details-notes, .credential-input-row .form-wide { grid-column: 1; }
  .software-dialog-footer .btn { flex: 1 1 0; }
  .credential-input-row { grid-template-columns: minmax(0, 1fr); }
  .vendor-form, .vendor-autofill { grid-template-columns: minmax(0, 1fr); }
  .vendor-form .form-wide, .vendor-form .form-actions, .vendor-contact-grid .vendor-address { grid-column: 1; }
  .vendor-profile-head { align-items: flex-start; flex-direction: column; }
  .vendor-filters > div { min-width: 0; flex: 1 1 100%; }

  .profile-tabs { position: static; }
  .profile-tab { flex: 1; }
}
@media (max-width: 440px) {
  .transaction-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .category-detail-heading { align-items: stretch; flex-direction: column; }
  .drilldown-nav { display: flex; flex-wrap: wrap; gap: 8px; }
  .drilldown-nav .btn { flex: 1 1 120px; }
}
@media (max-width: 600px) {
  .remove-hardware-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 16px; }
  .remove-hardware-actions { align-items: stretch; }
  .remove-hardware-actions .btn { flex: 1 1 100%; width: 100%; }
  .hardware-action-buttons { flex-wrap: wrap; }
  .hardware-action-form { grid-template-columns: minmax(0, 1fr); }
  .hardware-action-form .form-wide { grid-column: 1; }
  .history-disclosure { overflow: hidden; }
}
@media (max-width: 440px) {
  .topbar { padding-inline: 12px; gap: 6px; }
  .header-actions { column-gap: 4px; }
  .brand { gap: 5px; font-size: 10px; letter-spacing: .6px; }
  .brand-logo { width: 28px; height: 28px; flex-basis: 28px; }
  .profile-actions { grid-template-columns: minmax(0, 1fr); }
  .profile-summary { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .history-filter-actions .export-button { margin-left: 0; }
}
.im-ocean-transition { position: fixed; z-index: 10000; inset: 0; display: none; overflow: hidden; background: transparent; pointer-events: none; }
.im-ocean-transition.is-leaving, .im-ocean-transition.is-arriving, html.im-ocean-arriving .im-ocean-transition { display: block; }
.im-ocean-transition.is-leaving { pointer-events: auto; }
.im-ocean-transition__backdrop { position: absolute; inset: 0; transform: translate3d(0, 100vh, 0); background: rgba(49, 93, 168, .045); will-change: transform; transition: transform 200ms ease; }
.im-ocean-transition__wave { display: none; }
html.im-ocean-arriving .im-ocean-transition__backdrop { transform: translate3d(0, 0, 0); }
@media (prefers-reduced-motion: reduce) {
  .im-ocean-transition { display: none !important; }
}

/* Inventory History compact transaction cards and dedicated detail page. */
.container:has(.history-page) { padding-top: 8px; scroll-margin-top: 16px; }
.history-page .history-list-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.history-page .history-list-scroll .history-table { width: 100%; min-width: 900px; table-layout: auto; }
.history-page .history-list-scroll .history-table th,
.history-page .history-list-scroll .history-table td { padding: 11px 13px; font-size: 14px; line-height: 1.4; white-space: normal; }
.history-page .history-list-scroll .history-table th { color: var(--muted-strong); background: var(--panel-soft); }
.history-page .history-list-scroll .history-table td { min-width: 0; }
.history-page .history-list-scroll .history-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.history-page .history-id { color: var(--muted-strong); font-variant-numeric: tabular-nums; font-weight: 700; }
.history-page .history-view-details { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; white-space: nowrap; }
.history-page .history-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.history-page .history-detail-heading h2 { margin: 4px 0 0; color: var(--navy); font-size: clamp(22px, 3vw, 28px); overflow-wrap: anywhere; }
.history-page .history-detail-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.history-page .history-detail-section { min-width: 0; margin: 0; padding: 17px 0; border-bottom: 1px solid var(--line); }
.history-page .history-detail-section:last-child { border-bottom: 0; }
.history-page .history-detail-section h3 { margin: 0 0 12px; color: var(--navy); font-size: 17px; }
.history-page .history-detail-section h4 { margin: 16px 0 9px; color: var(--accent); font-size: 14px; }
.history-page .history-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 0; }
.history-page .history-detail-grid > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.history-page .history-detail-grid dt,
.history-page .history-asset-grid dt { margin: 0 0 4px; color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.history-page .history-detail-grid dd,
.history-page .history-asset-grid dd { margin: 0; color: var(--text-strong); font-size: 14px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.history-page .history-detail-note { margin: 11px 0 0; padding: 10px 12px; border-left: 3px solid var(--accent); border-radius: 0 7px 7px 0; background: var(--info-bg); color: var(--info-text); font-size: 13px; line-height: 1.5; }
.history-page .history-detail-table { min-width: 760px; }
.history-page .history-detail-table th,
.history-page .history-detail-table td { padding: 9px 11px; vertical-align: middle; font-size: 13px; }
.history-page .history-asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.history-page .history-asset-grid article { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.history-page .history-asset-grid h4 { margin: 0 0 9px; overflow-wrap: anywhere; }
.history-page .history-asset-grid dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.history-page .history-event-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.history-page .history-event-list article { min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.history-page .history-event-list article > strong { color: var(--accent); }
.history-page .history-event-list article > span { float: right; color: var(--muted); font-size: 12px; }
.history-page .history-event-list p { margin: 8px 0 4px; overflow-wrap: anywhere; }
.history-page :is(.history-detail-nav a, .history-view-details):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 700px) {
  .history-page .history-list-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
  .history-page .history-list-scroll .history-table { display: table; }
  .history-page .history-detail-heading { align-items: stretch; flex-direction: column; }
  .history-page .history-detail-nav { justify-content: flex-start; }
  .history-page .history-detail-grid,
  .history-page .history-event-list { grid-template-columns: minmax(0, 1fr); }
  .history-page .history-asset-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .container:has(.history-page) { width: calc(100% - 16px); }
  .history-page .history-asset-grid dl { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .history-page .history-list-scroll .history-table tbody tr { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Credentials module */
.credential-search,.credential-access-form,.attachment-upload{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin:0 0 18px}
.credential-search label,.credential-access-form label,.attachment-upload label{margin:0;flex:0 0 100%}
.credential-search input{max-width:480px;flex:1 1 260px}
.credential-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.credential-actions form{margin:0}
.credentials-page .section-heading{align-items:center}
.credential-secondary td{padding-top:0;border-top:0}
.credential-secondary details{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:rgba(49, 93, 168, .035)}
.credential-secondary summary{color:var(--accent-soft);font-size:12px;font-weight:650;cursor:pointer}
.credential-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:18px;padding:12px 0 4px}
.credential-detail-grid h3{margin:0 0 8px;font-size:15px}
.credential-detail-grid ul{margin:0;padding-left:18px;color:var(--muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.credential-detail-grid .attachment-upload input[type=file]{flex:1 1 200px}
.credential-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100vh - 28px);overflow:auto}
.credential-secret{max-width:min(76vw,680px);margin:16px 0;padding:14px;border:1px solid var(--line);border-radius:10px;background:var(--panel-soft);font-family:ui-monospace,SFMono-Regular,monospace;overflow-wrap:anywhere;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}
.credential-reveal-dialog .dialog-heading{align-items:center}
.credential-reveal-countdown{margin:0;color:var(--muted);font-size:13px;font-weight:600}
.credentials-page .table-scroll table{min-width:720px}
@media(max-width:640px){.credential-search,.credential-access-form{align-items:stretch;flex-direction:column}.credential-search input{max-width:none}.credential-actions>.btn,.credential-actions>form,.credential-actions>form>.btn{flex:1 1 auto}}
.credential-view-list{display:grid;grid-template-columns:minmax(105px,150px) minmax(0,1fr);gap:8px 14px;margin:18px 0}
.credential-view-list dt{color:var(--muted);font-size:13px;font-weight:650}
.credential-view-list dd{margin:0;overflow-wrap:anywhere}

/* Inventory and Credentials interaction polish, using the existing blue/white theme. */
.inventory-screen .card,
.inventory-screen.card,
.inventory-stock-screen ~ .card,
.history-page .metric-card,
.credentials-page .credential-secondary details {
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.inventory-screen .card:hover,
.inventory-screen.card:hover,
.inventory-stock-screen ~ .card:hover,
.history-page .metric-card:hover,
.credentials-page .credential-secondary details:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border-alpha);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .1), 0 0 0 3px var(--accent-tint-alpha);
}
.credentials-page .credential-search {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.credentials-page .credential-search:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent-border-alpha);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-tint-alpha);
}
.credentials-page .credential-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-focus);
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)) td {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)) td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)) td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)) {
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: credential-row-in .28s ease-out both;
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .1), 0 0 0 2px var(--accent-tint-alpha);
}
.credentials-page .table-scroll tbody tr:not(.credential-secondary):not(:has(.empty-state)):hover td {
  background: var(--info-bg);
}
.credentials-page .credential-actions .btn,
.credentials-page .credential-actions button {
  min-height: 38px;
  box-shadow: 0 2px 6px rgba(49, 93, 168, .1);
}
.credentials-page .credential-actions .btn:hover,
.credentials-page .credential-actions button:hover {
  box-shadow: 0 5px 14px rgba(49, 93, 168, .2), 0 0 0 2px var(--accent-tint-alpha);
}
.credentials-page .credential-secondary details[open] {
  border-color: var(--accent-border-alpha);
  box-shadow: 0 4px 14px var(--accent-tint-alpha);
}
.credentials-page .credential-secondary summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: color .18s ease, background-color .18s ease;
}
.credentials-page .credential-secondary summary:hover,
.credentials-page .credential-secondary summary:focus-visible {
  background: var(--accent-tint-alpha);
  color: var(--accent-hover);
}
.credential-access-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.credential-access-form:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent-border-alpha);
  box-shadow: var(--shadow), 0 0 0 3px var(--accent-tint-alpha);
}
.credential-dialog {
  border-color: var(--line-strong);
  box-shadow: 0 20px 55px rgba(15, 23, 42, .22), 0 0 0 4px var(--accent-tint-alpha);
}
.credential-dialog::backdrop,
.credential-reveal-dialog::backdrop {
  background: rgba(21, 36, 58, .28);
  backdrop-filter: blur(3px);
}
.credential-dialog .form-actions .btn,
.credential-dialog .icon-button {
  transition: transform .18s ease, box-shadow .18s ease;
}
.credential-dialog .form-actions .btn:hover,
.credential-dialog .icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(49, 93, 168, .2);
}
.credential-secret {
  border-color: var(--accent-border-alpha);
  box-shadow: 0 0 0 3px var(--accent-tint-alpha);
}
.credential-reveal-dialog[open] .credential-secret {
  animation: credential-reveal-in .24s ease-out both;
}
.inventory-screen > .card,
.inventory-screen.card,
.inventory-stock-screen ~ .card,
.history-page .metric-card {
  border-color: var(--line);
  background-color: var(--panel);
}
.inventory-screen .stacked-form,
.inventory-screen .profile-form,
.history-page .history-filters,
.inventory-screen .orders-filter {
  transition: box-shadow .2s ease, border-color .2s ease;
}
.inventory-screen :is(.stacked-form, .profile-form):focus-within,
.history-page .history-filters:focus-within,
.inventory-screen .orders-filter:focus-within {
  border-color: var(--accent-border-alpha);
  box-shadow: 0 0 0 3px var(--accent-tint-alpha);
}
.inventory-screen .table-scroll tbody tr,
.history-page .table-scroll tbody tr {
  transition: background-color .18s ease, box-shadow .18s ease;
}
.inventory-screen .table-scroll tbody tr:hover,
.history-page .table-scroll tbody tr:hover {
  background-color: var(--info-bg);
  box-shadow: inset 3px 0 var(--accent), 0 2px 8px var(--accent-tint-alpha);
}
.inventory-screen .order-status,
.inventory-screen .badge,
.history-page .badge {
  transition: transform .18s ease, box-shadow .18s ease;
}
.inventory-screen .order-status:hover,
.inventory-screen .badge:hover,
.history-page .badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 9px var(--accent-tint-alpha);
}
.history-page .metric-card strong {
  color: var(--accent);
  text-shadow: 0 2px 10px var(--accent-tint-alpha);
}
.inventory-screen :is(input, select, textarea),
.history-page :is(input, select, textarea),
.credentials-page :is(input, select, textarea),
.credential-dialog :is(input, select, textarea) {
  transition: border-color .18s ease, box-shadow .18s ease;
}
.inventory-screen :is(button, .btn),
.history-page :is(button, .btn),
.credentials-page :is(button, .btn),
.credential-dialog :is(button, .btn) {
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.inventory-screen :is(button, .btn):not(:disabled):hover,
.history-page :is(button, .btn):not(:disabled):hover,
.credentials-page :is(button, .btn):not(:disabled):hover,
.credential-dialog :is(button, .btn):not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-tint-alpha);
}
.inventory-screen :is(a, summary),
.history-page :is(a, summary),
.credentials-page :is(a, summary) {
  transition: color .16s ease, background-color .16s ease;
}
.inventory-screen tbody tr,
.history-page tbody tr,
.credentials-page tbody tr {
  transition: background-color .16s ease, box-shadow .16s ease;
}
.inventory-screen tbody tr:hover,
.history-page tbody tr:hover,
.credentials-page tbody tr:hover {
  background-color: var(--accent-tint-alpha);
  box-shadow: inset 2px 0 var(--accent);
}
.inventory-screen .metric-card strong,
.history-page .metric-card strong {
  animation: inventory-counter-in .42s ease-out both;
}
.credential-dialog,
.credential-reveal-dialog {
  opacity: 0;
  transform: translateY(8px) scale(.99);
  transition: opacity .18s ease, transform .2s ease, overlay .2s allow-discrete, display .2s allow-discrete;
}
.credential-dialog[open],
.credential-reveal-dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@starting-style {
  .credential-dialog[open], .credential-reveal-dialog[open] {
    opacity: 0;
    transform: translateY(8px) scale(.99);
  }
}
.credential-dialog::backdrop,
.credential-reveal-dialog::backdrop {
  transition: background-color .18s ease;
}
.container:has(.inventory-screen) .alert,
.container:has(.history-page) .alert,
.container:has(.credentials-page) .alert,
body:has(.inventory-screen) .alert,
body:has(.history-page) .alert,
body:has(.credentials-page) .alert {
  animation: inventory-notice-in .24s ease-out both;
}
.inventory-screen :is(button, a, input, select, textarea, summary):focus-visible,
.history-page :is(button, a, input, select, textarea, summary):focus-visible,
.credentials-page :is(button, a, input, select, textarea, summary):focus-visible,
.credential-dialog :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.history-page [hidden] { display: none !important; }
@keyframes inventory-counter-in {
  from { opacity: .55; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes credential-reveal-in {
  from { opacity: .55; filter: blur(1px); }
  to { opacity: 1; filter: blur(0); }
}
@keyframes credential-row-in {
  from { opacity: .45; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes inventory-notice-in {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
  .credentials-page .section-heading { align-items: flex-start; flex-direction: column; }
  .credentials-page .credential-actions { width: 100%; }
  .credentials-page .credential-actions > .btn { flex: 1 1 auto; }
  .credential-view-list { grid-template-columns: 1fr; gap: 4px; }
  .credential-view-list dd { margin-bottom: 10px; }
}
@media (max-width: 480px) {
  .inventory-screen .product-picker, .inventory-screen .history-filter-actions { align-items: stretch; }
  .credential-dialog, .credential-reveal-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .inventory-screen *, .history-page *, .credentials-page *,
  .credential-dialog, .credential-reveal-dialog {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .inventory-screen .card:hover, .history-page .metric-card:hover,
  .credentials-page .credential-secondary details:hover,
  .inventory-screen :is(button, .btn):hover, .history-page :is(button, .btn):hover,
  .credentials-page :is(button, .btn):hover, .credential-dialog :is(button, .btn):hover {
    transform: none;
  }
}

/* Split audit views */
.audit-page{min-width:0}
.audit-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px;border-bottom:1px solid var(--line)}
.audit-tabs a{display:inline-flex;align-items:center;min-height:40px;padding:8px 14px;border-bottom:3px solid transparent;color:var(--muted);font-weight:650;text-decoration:none}
.audit-tabs a:hover,.audit-tabs a.active{border-color:var(--accent);color:var(--accent-soft)}
.audit-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:12px;align-items:end;margin-bottom:14px}
.audit-filters label{display:block;margin:0 0 5px}
.audit-filter-actions,.audit-export-actions,.audit-pagination{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.audit-export-actions{justify-content:space-between;margin:12px 0}
.audit-pagination{justify-content:center;margin-top:16px}
.audit-pagination span{padding:8px;color:var(--muted);font-size:13px}
.audit-table-scroll{max-height:min(70vh,780px);overflow:auto;overscroll-behavior:contain}
.audit-table{width:100%;min-width:940px;table-layout:fixed}
.audit-table th:nth-child(1),.audit-table td:nth-child(1){width:125px}
.audit-table th:nth-child(2),.audit-table td:nth-child(2){width:120px}
.audit-table th:nth-child(3),.audit-table td:nth-child(3){width:135px}
.audit-table th:nth-child(4),.audit-table td:nth-child(4){width:105px}
.audit-table th:nth-child(5),.audit-table td:nth-child(5){width:95px}
.audit-table th:nth-child(6),.audit-table td:nth-child(6){width:245px}
.audit-table th:nth-child(7),.audit-table td:nth-child(7){width:115px}
.audit-table thead th{position:sticky;top:0;z-index:2;background:var(--panel);box-shadow:0 1px 0 var(--line-strong)}
.audit-table td{vertical-align:top;overflow-wrap:anywhere;word-break:break-word}
.audit-details-cell{max-width:245px;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.audit-details-cell span{display:block;margin-bottom:5px}
.audit-view-details{padding:0;border:0;background:none;color:var(--accent);font:inherit;font-size:12px;font-weight:700;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.audit-view-details:focus-visible{outline:2px solid var(--accent-focus);outline-offset:3px;border-radius:2px}
.audit-details-dialog{width:min(760px,calc(100vw - 24px));max-width:none;max-height:82vh;padding:0;border:1px solid var(--line-strong);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 24px 70px rgba(15,23,42,.28)}
.audit-details-dialog::backdrop{background:rgba(15,23,42,.48);backdrop-filter:blur(2px)}
.audit-details-dialog__header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--panel)}
.audit-details-dialog__header h2{margin:0;color:var(--navy);font-size:18px}
.audit-details-dialog__body{max-height:calc(82vh - 68px);overflow:auto;padding:16px 20px}
.audit-detail-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin:0 0 16px;padding:0 0 14px;border-bottom:1px solid var(--line)}
.audit-detail-meta>div{min-width:0}
.audit-detail-meta dt{margin-bottom:3px;color:var(--muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.audit-detail-meta dd{margin:0;overflow-wrap:anywhere;color:var(--text);font-size:13px}
.audit-details-dialog__body pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;font-family:inherit;font-size:13px;line-height:1.6;color:var(--text)}
@media(max-width:640px){.audit-filters{grid-template-columns:1fr}.audit-filter-actions>.btn{flex:1}.audit-tabs a{flex:1 1 auto;justify-content:center;padding-inline:8px}.audit-export-actions{align-items:flex-start;flex-direction:column}.audit-detail-meta{grid-template-columns:1fr}}
@media(max-width:700px){.history-filter-fields{grid-template-columns:1fr}.history-filter-actions{flex-wrap:wrap}.history-filter-actions .export-button{margin-left:0}.history-reconciliation-form{grid-template-columns:1fr}.inventory-valuation{grid-template-columns:1fr 1fr}.history-page .table-scroll{overflow-x:auto}}
@media(max-width:440px){.inventory-valuation{grid-template-columns:1fr}}
.inline-attachment-delete{display:inline-flex;margin-left:6px;vertical-align:middle}
.inline-attachment-delete .btn{min-height:30px;padding:4px 9px;font-size:11px}

/* Component-level presentation for Inventory and Credentials pages. */
.credentials-page {
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--accent);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .08);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.credentials-page:hover { box-shadow: 0 12px 32px rgba(49, 93, 168, .13); }
.credentials-page > .section-heading { margin-bottom: 20px; }
.credentials-page > .section-heading h2 { margin-bottom: 5px; color: var(--navy); font-size: clamp(21px, 2vw, 26px); }
.credentials-page .credential-header-actions { align-items: center; justify-content: flex-end; margin-left: auto; }
.credential-export-section {
  margin: 0 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--panel-soft);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.credential-export-section:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border-alpha);
  box-shadow: 0 8px 20px rgba(49, 93, 168, .1);
}
.credential-export-heading { margin: 0 0 12px; }
.credential-export-heading h3 { margin: 0 0 3px; color: var(--navy); font-size: 15px; font-weight: 700; }
.credential-export-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.software-export-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0;
}
.software-export-filter > div { display: grid; min-width: 0; gap: 5px; }
.software-export-filter label { margin: 0; color: var(--text-strong); font-size: 12px; font-weight: 650; }
.software-export-filter select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 34px 8px 11px; }
.software-export-filter > .btn { min-height: 44px; padding: 9px 16px; white-space: nowrap; }
.credentials-page .credential-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 12px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--panel-soft);
  box-shadow: 0 3px 10px rgba(15, 23, 42, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.credentials-page .credential-search label { grid-column: 1 / -1; margin: 0; color: var(--text-strong); }
.credentials-page .credential-search input { width: 100%; max-width: none; min-height: 44px; }
.credentials-page .credential-search:focus-within {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(49, 93, 168, .16), 0 0 0 4px var(--accent-tint-alpha);
}
.credentials-page .credential-search input { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.credentials-page .credential-search input:focus { background-color: var(--panel); }
.credentials-page .table-scroll { border: 0; border-radius: 0; overflow-x: auto; }
.credentials-page .table-scroll table {
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-top: -8px;
}
.credentials-page .table-scroll thead th {
  padding: 10px 13px;
  border-bottom: 2px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--accent-soft);
  font-size: 10px;
  letter-spacing: .075em;
}
.credentials-page .table-scroll tbody .credential-row {
  box-shadow: 0 3px 10px rgba(49, 93, 168, .08);
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
  animation: credential-row-in .26s ease-out both;
}
.credentials-page .table-scroll tbody .credential-row:nth-of-type(2) { animation-delay: .025s; }
.credentials-page .table-scroll tbody .credential-row:nth-of-type(3) { animation-delay: .05s; }
.credentials-page .table-scroll tbody .credential-row:nth-of-type(4) { animation-delay: .075s; }
.credentials-page .table-scroll tbody .credential-row:nth-of-type(5) { animation-delay: .1s; }
.credentials-page .table-scroll tbody .credential-row td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.credentials-page .table-scroll tbody .credential-row td:first-child {
  min-width: 170px;
  border-left: 1px solid var(--line);
  border-radius: 10px 0 0 10px;
}
.credentials-page .table-scroll tbody .credential-row td:last-child {
  width: 300px;
  border-right: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
}
.credentials-page .table-scroll tbody .credential-row:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 9px 12px rgba(49, 93, 168, .2));
  box-shadow: 0 9px 20px rgba(49, 93, 168, .14);
}
.credentials-page .table-scroll tbody .credential-row:hover td {
  border-color: var(--accent-border-alpha);
  background: var(--info-bg);
}
.credential-service, .credential-person { display: grid; min-width: 0; gap: 7px; }
.credential-service strong { color: var(--navy); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.credential-service-link { display: inline-flex; width: fit-content; max-width: 100%; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--info-border); border-radius: 6px; background: var(--info-bg); color: var(--accent); font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.credential-service-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.credential-person > span { color: var(--text-strong); font-weight: 650; overflow-wrap: anywhere; }
.credential-person small { width: fit-content; padding: 3px 8px; border: 1px solid var(--info-border); border-radius: 999px; background: var(--info-bg); color: var(--info-text); font-size: 10px; font-weight: 650; }
.credential-username, .credential-software, .credential-updated { color: var(--text); overflow-wrap: anywhere; }
.credential-updated { color: var(--muted); font-size: 11px; white-space: nowrap; }
.credential-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 7px; }
.credential-action-group { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.credential-action-group--manage { padding-left: 7px; border-left: 1px solid var(--line-strong); }
.credentials-page .credential-actions .btn { min-height: 36px; padding: 7px 11px; font-size: 11px; box-shadow: 0 2px 6px rgba(15, 23, 42, .08); }
.credentials-page .credential-actions .btn { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.credentials-page .credential-actions .btn:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(49, 93, 168, .24), 0 0 0 2px var(--accent-tint-alpha); }
.credentials-page .credential-actions .btn:active { transform: translateY(1px) scale(.98); box-shadow: 0 2px 5px rgba(49, 93, 168, .14); }
.credentials-page .credential-actions .credential-action-view,
.credentials-page .credential-actions .credential-action-reveal { border-color: var(--accent-border-alpha); background: var(--info-bg); color: var(--accent-soft); }
.credentials-page .credential-actions .credential-action-view:hover,
.credentials-page .credential-actions .credential-action-reveal:hover { border-color: var(--accent); background: var(--accent); color: var(--button-text); }
.credentials-page .credential-actions .credential-action-delete { background: var(--danger-bg); color: var(--danger-text); }
.credentials-page .credential-secondary td { padding: 0 8px; }
.credentials-page .credential-secondary details { padding: 0 12px; border-color: var(--line); background: var(--panel-soft); }
.credentials-page .credential-secondary details[open] { padding-bottom: 12px; border-color: var(--accent-border-alpha); box-shadow: 0 4px 15px rgba(49, 93, 168, .1); }
.credentials-page .credential-secondary summary { min-height: 38px; padding: 5px 8px; border-radius: 6px; color: var(--accent-soft); font-weight: 700; }
.credentials-page .credential-secondary summary:hover,
.credentials-page .credential-secondary summary:focus-visible { background: var(--accent-tint-alpha); color: var(--accent-hover); }
.credentials-page .credential-detail-grid { padding: 14px 8px 4px; }
.credentials-page .credential-detail-grid > div { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.credentials-page .credential-detail-grid h3 { color: var(--navy); }
.credential-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(820px, calc(100vw - 28px));
  max-height: min(90vh, calc(100dvh - 24px));
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(15, 23, 42, .22), 0 0 0 4px var(--accent-tint-alpha);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  transition: opacity .22s ease, transform .24s cubic-bezier(.2,.75,.25,1), overlay .24s allow-discrete, display .24s allow-discrete;
  transition-behavior: allow-discrete;
  transform-origin: 50% 46%;
}
.credential-dialog:not([open]) { display: none; }
.credential-dialog[open] { animation: credential-dialog-enter .24s cubic-bezier(.2,.75,.25,1) both; }
.credential-reveal-dialog[open] { animation: credential-dialog-enter .2s ease-out both; }
.credential-dialog::backdrop, .credential-reveal-dialog::backdrop { transition: background-color .22s ease, backdrop-filter .22s ease; }
.credential-dialog .dialog-heading { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.credential-dialog .dialog-heading h2 { color: var(--navy); font-size: clamp(19px, 2vw, 24px); }
.credential-dialog .profile-form { width: 100%; max-width: none; margin-top: 16px; padding: 18px; border-color: var(--line); background: var(--panel-soft); }
.credential-dialog .profile-form > div:not(.form-actions):not(.form-wide) { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.credential-dialog .profile-form input:focus,
.credential-dialog .profile-form select:focus,
.credential-dialog .profile-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-focus); }
.credential-dialog .form-actions { padding-top: 6px; }
.credential-dialog .field-validation-error,
.credential-dialog .form-validation-summary { position: relative; z-index: 1; grid-column: 1 / -1; }
.credential-dialog [hidden] { display: none !important; }
.credential-view-list { grid-template-columns: minmax(110px, 155px) minmax(0, 1fr); gap: 0 14px; }
.credential-view-list dt, .credential-view-list dd { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.credential-view-list dt { background: var(--panel-soft); color: var(--muted-strong); }
.credential-view-list dd { background: var(--panel); }
.credential-view-list dt:first-of-type { border-radius: 8px 0 0; }
.credential-view-list dd:last-of-type { border-radius: 0 0 8px; }

.inventory-screen.inventory-products-screen { align-items: start; gap: 20px; }
.inventory-screen.inventory-products-screen > .card,
.inventory-screen.inventory-stock-screen > .card,
.inventory-screen.inventory-orders-screen,
.inventory-screen.inventory-stock-screen ~ .card {
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: 0 5px 18px rgba(15, 23, 42, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.inventory-screen.inventory-products-screen > .card:hover,
.inventory-screen.inventory-stock-screen > .card:hover,
.inventory-screen.inventory-orders-screen:hover,
.inventory-screen.inventory-stock-screen ~ .card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-border-alpha);
  border-top-color: var(--accent);
  box-shadow: 0 16px 34px rgba(49, 93, 168, .16), 0 0 0 4px var(--accent-tint-alpha);
}
.inventory-screen :is(.product-picker, .product-form, .product-stock-form, .stacked-form, .orders-filter) {
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}
.inventory-screen :is(.product-picker, .product-form, .product-stock-form, .stacked-form, .orders-filter):focus-within {
  border-color: var(--accent-border-alpha);
  box-shadow: 0 7px 20px rgba(49, 93, 168, .1), 0 0 0 4px var(--accent-tint-alpha);
}
.inventory-screen :is(input, select, textarea), .history-page :is(input, select, textarea) { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
.inventory-screen :is(input, select, textarea):focus, .history-page :is(input, select, textarea):focus { background-color: var(--panel); }
.inventory-screen .product-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: end; }
.inventory-screen .product-picker > div { min-width: 0; }
.inventory-screen :is(.product-picker, .product-management-actions, .inline-actions, .order-actions) .btn { min-height: 40px; }
.inventory-screen .table-scroll,
.history-page .table-scroll,
.inventory-stock-screen ~ .card .table-scroll { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.inventory-screen .table-scroll th,
.history-page .table-scroll th,
.inventory-stock-screen ~ .card .table-scroll th { position: sticky; top: 0; z-index: 1; padding-block: 12px; border-bottom: 2px solid var(--line-strong); background: var(--panel-soft); }
.inventory-screen .table-scroll tbody tr:hover td,
.history-page .table-scroll tbody tr:hover td,
.inventory-stock-screen ~ .card .table-scroll tbody tr:hover td { background: var(--info-bg); }
.inventory-screen .table-scroll tbody tr:hover td:first-child,
.history-page .table-scroll tbody tr:hover td:first-child,
.inventory-stock-screen ~ .card .table-scroll tbody tr:hover td:first-child { box-shadow: inset 3px 0 var(--accent); }
.inventory-screen .table-scroll tbody td, .history-page .table-scroll tbody td { transition: background-color .2s ease, box-shadow .2s ease; }
.inventory-screen .table-scroll tbody td strong { display: inline-block; animation: inventory-counter-in .4s ease-out both; }
.inventory-screen .table-scroll tbody tr:hover td, .history-page .table-scroll tbody tr:hover td,
.inventory-stock-screen ~ .card .table-scroll tbody tr:hover td { background: var(--info-bg); }
.inventory-screen :is(button, .btn):not(:disabled), .history-page :is(button, .btn):not(:disabled) { transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.inventory-screen :is(button, .btn):not(:disabled):hover, .history-page :is(button, .btn):not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(49, 93, 168, .2); }
.inventory-screen :is(button, .btn):not(:disabled):active, .history-page :is(button, .btn):not(:disabled):active { transform: translateY(1px) scale(.98); box-shadow: 0 2px 5px rgba(49, 93, 168, .12); }
.inventory-screen .order-status { padding: 5px 10px; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); transition: box-shadow .18s ease, filter .18s ease; }
.inventory-screen .order-status:hover { box-shadow: 0 4px 10px var(--accent-tint-alpha); filter: saturate(1.08); }
.inventory-screen .order-status.pending { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning-text); }
.inventory-screen .order-status.confirmed { border-color: var(--success-border); background: var(--success-bg); color: var(--success-text); }
.inventory-screen .order-status.rejected { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.inventory-screen .order-actions { gap: 7px; }
.history-page {
  padding: clamp(16px, 2.3vw, 26px);
  border: 1px solid var(--line-strong);
  border-top: 4px solid var(--accent);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: 0 7px 24px rgba(15, 23, 42, .08);
}
.history-page .inventory-valuation .metric-card {
  min-height: 104px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--panel-soft);
  box-shadow: 0 4px 14px rgba(49, 93, 168, .08);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.history-page .inventory-valuation .metric-card:hover { transform: translateY(-5px); border-color: var(--accent-border-alpha); box-shadow: 0 12px 24px rgba(49, 93, 168, .15), 0 0 0 3px var(--accent-tint-alpha); }
.history-page .inventory-valuation .metric-card span { color: var(--muted-strong); font-weight: 650; }
.history-page .inventory-valuation .metric-card strong { display: block; margin-top: 9px; font-size: clamp(18px, 2vw, 22px); animation: inventory-counter-in .45s ease-out both; }
.history-page .history-filters { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.history-page .history-filter-actions { padding-top: 12px; }
.history-page .history-table th,
.history-page .history-table td { padding: 8px 10px; vertical-align: middle; line-height: 1.35; }
.history-page .history-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 0 6px; }
.history-page .history-section-heading h2 { margin: 0; font-size: clamp(18px, 2vw, 22px); }
.history-page .table-scroll .history-table { min-width: 1450px; }
.history-page .table-scroll .hardware-history-table { min-width: 1250px; }
.history-page .inventory-transactions-table td:nth-child(1),
.history-page .inventory-transactions-table td:nth-child(3),
.history-page .inventory-transactions-table td:nth-child(n+5):nth-child(-n+11) { white-space: nowrap; }
.history-page .history-table th { white-space: nowrap; }
.history-page .history-table td { min-width: 88px; }
.history-page .history-table td small { display: block; margin-top: 2px; color: var(--muted); line-height: 1.25; }
.history-page .history-table td small:first-child { margin-top: 0; }
.history-page .history-table td.history-valuation-cell { min-width: 280px; white-space: nowrap; }
.history-page .history-table td.history-valuation-cell small { white-space: nowrap; }
.history-page .history-transaction-details { min-width: 150px; }
.history-page .history-transaction-details summary { display: inline-flex; min-height: 34px; align-items: center; padding: 5px 10px; border: 1px solid var(--info-border); border-radius: 7px; background: var(--info-bg); color: var(--info-text); font-weight: 700; cursor: pointer; }
.history-page .history-transaction-details[open] summary { border-color: var(--accent-border-alpha); box-shadow: 0 0 0 3px var(--accent-tint-alpha); }
.history-page .transaction-detail-grid { display: grid; min-width: min(700px, 70vw); grid-template-columns: repeat(2, minmax(210px, 1fr)); gap: 9px; margin: 12px 0 0; white-space: normal; }
.history-page .transaction-detail-grid > div { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.history-page .transaction-detail-grid dt { margin-bottom: 4px; color: var(--muted-strong); font-size: 11px; font-weight: 750; }
.history-page .transaction-detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.history-page .history-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 22px; }
.history-page .history-pagination span { color: var(--muted-strong); font-size: 13px; }
.history-page .history-table tbody tr { transition: background-color .16s ease; }
.history-page .history-table tbody tr:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.history-page .table-scroll { max-width: 100%; overscroll-behavior-inline: contain; }
.history-page .history-action-pill { display: inline-flex; padding: 4px 9px; border: 1px solid var(--info-border); border-radius: 999px; background: var(--info-bg); color: var(--info-text); font-size: 11px; font-weight: 700; white-space: nowrap; }
.history-page .history-table tbody tr:hover .history-action-pill { border-color: var(--accent-border-alpha); background: var(--panel); }
.credential-page-toast,
body:has(.credentials-page) .alert,
body:has(.inventory-screen) .alert,
body:has(.history-page) .alert { animation: inventory-notice-in .24s ease-out both; }

@media (max-width: 900px) {
  .credentials-page .table-scroll tbody .credential-row td { padding: 11px 9px; }
  .credentials-page .table-scroll tbody .credential-row td:last-child { width: 270px; }
}
@media (max-width: 640px) {
  .credentials-page { padding: 15px; }
  .credentials-page > .section-heading { gap: 10px; }
  .credentials-page .credential-header-actions { justify-content: flex-end; gap: 8px; }
  .credentials-page .credential-header-actions > .btn { flex: 1 1 140px; min-height: 40px; }
  .credential-export-section { padding: 14px; }
  .software-export-filter { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .software-export-filter > .btn { width: 100%; }
  .credentials-page .credential-search { grid-template-columns: minmax(0, 1fr); padding: 13px; }
  .credentials-page .credential-search label { grid-column: 1; }
  .credentials-page .credential-search .btn { width: 100%; }
  .credentials-page .credential-actions:not(.credential-header-actions) { width: 100%; }
  .credentials-page .credential-action-group { flex: 1 1 auto; }
  .credentials-page .credential-action-group--manage { padding-left: 0; border-left: 0; }
  .credentials-page .credential-actions .btn { flex: 1 1 auto; }
  .credential-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 16px; }
  .credential-dialog .profile-form { grid-template-columns: minmax(0, 1fr); padding: 13px; }
  .credential-dialog .profile-form .form-wide,
  .credential-dialog .profile-form .form-actions { grid-column: 1; }
  .credential-view-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .credential-view-list dt, .credential-view-list dd { border-radius: 0 !important; }
  .credential-view-list dt { padding-bottom: 4px; border-bottom: 0; }
  .credential-view-list dd { padding-top: 4px; }
  .history-page { padding: 14px; }
  .history-page .history-section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .history-page .transaction-detail-grid { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .history-page .history-pagination { flex-wrap: wrap; }
  .history-page .history-filters { padding: 12px; }
  .inventory-screen.inventory-products-screen { grid-template-columns: minmax(0, 1fr); }
  .inventory-screen :is(.product-picker, .product-form, .product-stock-form, .stacked-form, .orders-filter) { padding: 12px; }
  .inventory-screen.inventory-orders-screen { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .credentials-page .table-scroll tbody .credential-row,
  .credentials-page .table-scroll tbody .credential-row:hover,
  .credentials-page .credential-search:focus-within,
  .inventory-screen.inventory-products-screen > .card:hover,
  .inventory-screen.inventory-stock-screen > .card:hover,
  .inventory-screen.inventory-orders-screen:hover,
  .inventory-screen.inventory-stock-screen ~ .card:hover { transform: none; }
}
@keyframes credential-dialog-enter {
  from { opacity: 0; transform: translateY(12px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Keep the product and stock panels aligned without changing other two-column pages. */
.inventory-screen.inventory-products-screen {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(14px, 2vw, 22px);
}
.inventory-screen.inventory-products-screen > .card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-self: stretch;
}
.inventory-screen.inventory-products-screen > .card > .section-heading,
.inventory-screen.inventory-products-screen > .card > .product-panel-heading {
  min-height: 42px;
  align-items: center;
  margin: 0 0 16px;
}
.inventory-screen.inventory-products-screen .product-panel-heading h2 { margin: 0; line-height: 1.25; }
.inventory-screen.inventory-products-screen .product-panel-heading .product-status-form { margin: 0; flex: 0 0 auto; }
.inventory-screen.inventory-products-screen .product-picker,
.inventory-screen.inventory-products-screen .product-form,
.inventory-screen.inventory-products-screen .stacked-form {
  width: 100%;
  min-width: 0;
  gap: 12px 14px;
}
.inventory-screen.inventory-products-screen .product-picker { align-items: end; margin: 0 0 16px; }
.inventory-screen.inventory-products-screen .product-picker > div,
.inventory-screen.inventory-products-screen .product-form > *,
.inventory-screen.inventory-products-screen .stacked-form > * { min-width: 0; }
.inventory-screen.inventory-products-screen .product-picker label,
.inventory-screen.inventory-products-screen .product-form label,
.inventory-screen.inventory-products-screen .stacked-form label { margin: 0 0 6px; line-height: 1.35; }
.inventory-screen.inventory-products-screen .product-management-actions { justify-content: flex-end; margin-top: 12px; }
.inventory-screen.inventory-products-screen .product-status-form .btn { min-height: 40px; white-space: normal; }
.inventory-screen.inventory-products-screen #product-stock-form { scroll-margin-top: 16px; }
.inventory-screen.inventory-products-screen :is(input, select, textarea) { min-width: 0; }

@media (max-width: 850px) {
  .inventory-screen.inventory-products-screen { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .inventory-screen.inventory-products-screen > .card { height: auto; }
}
@media (max-width: 520px) {
  .inventory-screen.inventory-products-screen > .card > .section-heading,
  .inventory-screen.inventory-products-screen > .card > .product-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .inventory-screen.inventory-products-screen .product-panel-heading .product-status-form,
  .inventory-screen.inventory-products-screen .product-panel-heading .btn,
  .inventory-screen.inventory-products-screen .product-management-actions .btn { width: 100%; }
  .inventory-screen.inventory-products-screen .product-form { grid-template-columns: minmax(0, 1fr); }
}

/* History tables keep readable desktop columns and scroll horizontally on narrow screens. */
.history-page .history-list-scroll { max-width: 100%; overflow-x: auto; }
.history-page .history-list-scroll .history-table { width: 100%; min-width: 1040px; table-layout: fixed; }
.history-page .history-list-scroll .history-table th,
.history-page .history-list-scroll .history-table td { overflow-wrap: anywhere; }
.history-page .inventory-transactions-table th:nth-child(1), .history-page .inventory-transactions-table td:nth-child(1) { width: 15%; white-space: nowrap; }
.history-page .inventory-transactions-table th:nth-child(2), .history-page .inventory-transactions-table td:nth-child(2) { width: 10%; white-space: nowrap; }
.history-page .inventory-transactions-table th:nth-child(3), .history-page .inventory-transactions-table td:nth-child(3) { width: 22%; }
.history-page .inventory-transactions-table th:nth-child(4), .history-page .inventory-transactions-table td:nth-child(4) { width: 14%; }
.history-page .inventory-transactions-table th:nth-child(5), .history-page .inventory-transactions-table td:nth-child(5) { width: 13%; white-space: nowrap; }
.history-page .inventory-transactions-table th:nth-child(6), .history-page .inventory-transactions-table td:nth-child(6) { width: 14%; white-space: nowrap; }
.history-page .inventory-transactions-table th:nth-child(7), .history-page .inventory-transactions-table td:nth-child(7) { width: 12%; white-space: nowrap; }
.history-page .hardware-history-table { min-width: 960px !important; }
.history-page .history-cost-notice { margin: -7px 0 14px; }
.history-page .history-valuation-completeness { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
@media (max-width: 700px) {
  .history-page .history-list-scroll { overflow-x: auto; }
  .history-page .history-list-scroll .history-table { display: table; }
}
/* Credential-specific authenticator setup and account controls. */
.credential-totp-panel,
.create-account-status { min-width: 0; margin: 16px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.credential-totp-panel legend,
.create-account-status legend { padding: 0 7px; color: var(--navy); font-size: 14px; font-weight: 700; }
.credential-totp-panel > p:last-child,
.create-account-status > p { margin: 8px 0 0; }
.credential-totp-panel .muted { font-size: 12px; line-height: 1.5; }
.credential-access-mode-label { margin: 0; }
.credential-access-mode-label + select { max-width: 420px; }
.credential-access-mode-note { margin: 0 0 12px; }
.credential-access-controls { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 9px; margin: 10px 0 12px; }
.credential-access-option { display: grid; min-width: 0; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font-weight: 400; }
.credential-access-option input { width: 18px; min-height: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.credential-access-option span { display: grid; min-width: 0; align-content: start; gap: 4px; }
.credential-access-option strong { min-width: 0; color: var(--navy); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.credential-access-option small { min-width: 0; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; overflow-wrap: anywhere; }
.credential-access-option:has(input:checked) { border-color: var(--accent-border-alpha); background: var(--info-bg); }
.credential-totp-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.credential-totp-summary strong { color: var(--navy); }
.credential-totp-toggle { display: flex; align-items: center; gap: 9px; margin: 8px 0; color: var(--text); }
.credential-totp-toggle input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--accent); }
.credential-totp-admin-actions { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 4px; }
.credential-totp-admin-actions .btn { flex: 0 0 auto; width: auto; max-width: 100%; white-space: nowrap; overflow-wrap: normal; }
.credential-totp-setup-page { max-width: 780px; margin-inline: auto; }
.credential-totp-enrollment { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 20px; margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.credential-totp-qr { width: min(100%, 210px); aspect-ratio: 1; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.credential-totp-qr svg { display: block; width: 100%; height: 100%; }
.credential-totp-manual-key { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--navy); font-size: 15px; letter-spacing: .11em; }
.credential-totp-verify-form { display: grid; max-width: 390px; gap: 10px; margin-top: 16px; }
.credential-totp-verify-form input[name="code"] { max-width: 220px; font-size: 20px; letter-spacing: .25em; }
.credential-totp-recovery { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .credential-totp-enrollment { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 12px; }
  .credential-totp-qr { width: min(65vw, 210px); }
}
@media (max-width: 700px) {
  .credential-access-controls { grid-template-columns: minmax(0, 1fr); }
}

/* Employee profile sections */
.employee-create-dialog { width: min(820px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
.employee-create-form { display: grid; gap: 14px; margin: 0; }
.employee-form-section { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.employee-form-section h3 { margin: 0 0 5px; color: var(--navy); font-size: 16px; }
.employee-form-section > .muted { margin: 0 0 13px; font-size: 12px; line-height: 1.5; }
.employee-form-grid { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px 15px; }
.employee-form-grid > label,
.employee-new-department > label { display: grid; min-width: 0; align-content: start; gap: 5px; margin: 0; color: var(--text-strong); font-size: 12px; font-weight: 650; }
.employee-form-grid input,
.employee-form-grid select,
.employee-form-grid textarea { width: 100%; min-width: 0; min-height: 42px; margin: 0; }
.employee-form-grid textarea { min-height: 82px; resize: vertical; }
.employee-form-wide { grid-column: 1 / -1; }
.employee-new-department { display: grid; min-width: 0; }
.employee-new-department[hidden] { display: none; }
.employee-readonly-field { display: grid; align-content: start; gap: 6px; min-height: 64px; padding: 8px 0; color: var(--muted); font-size: 12px; }
.employee-readonly-field strong { color: var(--text-strong); font-size: 13px; }
.employee-edit-form > .employee-form-section { grid-column: 1 / -1; }
.employee-edit-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; margin: 0; }
.employee-edit-actions .btn { min-height: 40px; margin: 0; }
.employee-software-name { display: grid; min-width: 0; gap: 4px; }
.employee-software-name > strong { overflow-wrap: anywhere; }
.employee-software-access-area { width: fit-content; max-width: 100%; padding: 3px 8px; border: 1px solid var(--accent-border-alpha); border-radius: 999px; background: var(--info-bg); color: var(--accent-soft); font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.employee-software-accounts { display: grid; gap: 3px; margin-top: 5px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.employee-software-accounts strong { color: var(--text-strong); font-size: 10px; }
.employee-profile-note { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--panel-soft); color: var(--text); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.employee-profile-actions { display: flex; min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.employee-profile-actions .btn { margin: 0; }
@media (max-width: 700px) {
  .employee-create-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 16px; }
  .employee-form-section { padding: 12px; }
  .employee-form-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .employee-form-wide,
  .employee-edit-actions { grid-column: 1; }
  .employee-edit-actions > .btn { flex: 1 1 135px; }
  .employee-profile-actions { justify-content: flex-start; }
}

/* Assignment list, detail, and hardware export layouts */
.assignment-results-table { --table-min-width: 1120px; }
.assignment-table-scroll, .assignment-assets-scroll, .assignment-history-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.assignment-results-table th, .assignment-results-table td { vertical-align: middle; }
.assignment-results-table td small { display: block; margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.assignment-actions-cell { min-width: 190px; white-space: nowrap; }
.assignment-actions-cell > .btn { margin: 0 6px 4px 0; }
.assignment-actions-cell .inline-actions { margin-top: 5px; }
.assignment-status-pill.assigned { border-color: var(--success-border); background: var(--success-tint-alpha); color: var(--success-text); }
.assignment-status-pill.returned { border-color: var(--line-strong); background: var(--panel-soft); color: var(--muted-strong); }
.assignment-status-pill.cancelled, .assignment-status-pill.removed { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.assignment-status-pill.replaced { border-color: var(--warning-border); background: var(--warning-tint-alpha); color: var(--warning-text); }
.assignment-result-count { margin: 14px 0 8px; }
.assignment-pagination { align-items: center; justify-content: space-between; margin-top: 14px; }
.assignment-filter-panel .compact-toolbar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 12px; }
.assignment-filter-panel .compact-toolbar > div { min-width: 0; }
.assignment-filter-panel .compact-toolbar > .btn { align-self: end; }
.assignment-form { grid-template-columns: minmax(220px,2fr) repeat(2,minmax(150px,1fr)); }
.assignment-form > div:not(.form-actions) { display: grid; min-width: 0; align-content: start; gap: 5px; }
.assignment-form > div > label { margin: 0; color: var(--text-strong); font-size: 12px; font-weight: 650; }
.assignment-form :is(input,select,textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; }
.assignment-form textarea { min-height: 68px; resize: vertical; }
.assignment-form .auto-filled { border-color: var(--info-border); background: var(--info-bg); color: var(--text-strong); cursor: default; }
.assignment-field-hint { display: block; min-height: 16px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.assignment-form .employee-picker { z-index: 2; }
.assignment-form .employee-picker:focus-within { z-index: 5; }
.assignment-filter-toggle { min-height: 40px; }
.assignment-results-table { --table-min-width: 980px; table-layout: fixed; }
.assignment-results-table th:nth-child(1) { width: 20%; }
.assignment-results-table th:nth-child(2) { width: 16%; }
.assignment-results-table th:nth-child(3) { width: 25%; }
.assignment-results-table th:nth-child(4) { width: 13%; }
.assignment-results-table th:nth-child(5) { width: 12%; }
.assignment-results-table th:nth-child(6) { width: 14%; }
.assignment-results-table th { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.assignment-employee-name, .assignment-product-name { display: block; color: var(--navy); font-weight: 650; overflow-wrap: anywhere; }
.assignment-results-table .assignment-status-pill { display: inline-flex; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.assignment-actions-cell { min-width: 180px; white-space: normal; }
.assignment-actions-cell > .assignment-details-link { display: inline-flex; min-height: 36px; align-items: center; color: #1769c2; font-size: 12px; font-weight: 650; text-decoration: none; text-underline-offset: 3px; white-space: nowrap; }
.assignment-actions-cell > .assignment-details-link:hover { color: #104f98; text-decoration: underline; }
.assignment-actions-cell > .assignment-details-link:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; border-radius: 3px; }
.assignment-actions-cell .assignment-return-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; }
.assignment-return-form input { box-sizing: border-box; width: 68px; min-width: 68px; min-height: 36px; height: 36px; }
.assignment-return-form .btn { min-height: 36px; padding: 6px 9px; font-size: 11px; white-space: nowrap; }
.assignment-table-scroll { border: 1px solid var(--line); border-radius: 10px; }
.assignment-list .assignment-result-count { margin: 0 0 8px; font-size: 12px; }
.assignment-detail-page { display: grid; gap: 20px; min-width: 0; }
.assignment-detail-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.assignment-detail-heading h2 { margin: 4px 0 0; overflow-wrap: anywhere; }
.assignment-detail-section { display: grid; gap: 12px; min-width: 0; }
.assignment-detail-section h3 { margin: 0; color: var(--navy); }
.assignment-detail-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,210px),1fr)); gap: 10px; margin: 0; }
.assignment-detail-grid > div { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.assignment-detail-grid dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.assignment-detail-grid dd { margin: 5px 0 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.assignment-detail-grid .assignment-detail-notes { grid-column: 1 / -1; }
.assignment-assets-scroll table, .assignment-history-scroll table { --table-min-width: 900px; }
.hardware-export-panel { display: grid; gap: 12px; margin-bottom: 18px; min-width: 0; }
.hardware-export-heading h2 { margin: 3px 0 4px; color: var(--navy); }
.hardware-export-heading p { margin: 0; color: var(--muted); }
.hardware-export-filter { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto; align-items: end; gap: 12px; min-width: 0; }
.hardware-export-filter > div { min-width: 0; }
.hardware-export-filter .btn { margin: 0; white-space: nowrap; }
.hardware-export-help { margin: 0; font-size: 12px; line-height: 1.55; }
@media (max-width: 1000px) {
  .hardware-export-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assignment-filter-panel .compact-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .assignment-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .hardware-export-filter, .assignment-filter-panel .compact-toolbar, .assignment-form { grid-template-columns: minmax(0,1fr); }
  .assignment-form .form-actions, .assignment-form .form-wide { grid-column: auto; }
  .assignment-pagination { justify-content: center; }
  .assignment-results-table { --table-min-width: 920px; }
  .assignment-actions-cell { min-width: 164px; }
  .assignment-detail-page { padding: 14px; }
}
/* Accessible, inline validation feedback shared by application forms. */
.field-validation-error { display: block; margin-top: 5px; color: #b42318; font-size: 12px; line-height: 1.4; }
.form-validation-summary { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #f0b8b4; border-radius: 8px; background: #fff7f6; color: #8f1d16; }
[aria-invalid="true"] { border-color: #b42318 !important; box-shadow: 0 0 0 2px rgba(180, 35, 24, .12); }

/* Dashboard category and credential summaries share a responsive overview row. */
.dashboard-overview-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; gap: 16px; min-width: 0; margin-bottom: 22px; }
.dashboard-overview-grid--single { grid-template-columns: minmax(0, 1fr); }
.dashboard-overview-grid > .dashboard-stat-section { min-width: 0; margin-bottom: 0; }
.dashboard-overview-grid .category-inventory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-overview-grid .credential-stat-section { padding-top: 0; border-top: 0; }
.dashboard-overview-grid .credential-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .dashboard-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-overview-grid .category-inventory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .dashboard-overview-grid { gap: 14px; }
  .dashboard-overview-grid .category-inventory-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-overview-grid .credential-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact Inventory summary cards without changing credential or page cards. */
.inventory-summary-section { margin-bottom: 12px; }
.inventory-summary-section .dashboard-section-heading { margin-bottom: 8px; }
.inventory-summary-section .dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inventory-summary-section .dashboard-stats > .stat {
  min-height: 64px;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 2px 10px;
  padding: 10px 12px;
}
.inventory-summary-section .dashboard-stats > .stat > span:not(.stat-icon) { font-size: 11px; }
.inventory-summary-section .dashboard-stats > .stat strong { font-size: 20px; }
.inventory-summary-section .stat-icon { width: 26px; height: 26px; border-radius: 8px; }
.inventory-summary-section .stat-icon svg { width: 15px; height: 15px; }
@media (max-width: 850px) {
  .inventory-summary-section .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 360px) {
  .inventory-summary-section .dashboard-stats { grid-template-columns: minmax(0, 1fr); }
}

/* Paired dashboard rows for hardware, software, categories, credentials and actions. */
.dashboard-layout-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; margin-bottom: 14px; min-width: 0; }
.dashboard-layout-row--single { grid-template-columns: minmax(0, 1fr); }
.dashboard-layout-row > .dashboard-panel { display: flex; min-width: 0; flex-direction: column; align-self: stretch; gap: 12px; padding: 16px; }
.dashboard-panel > .dashboard-section-heading { width: 100%; min-width: 0; align-items: baseline; margin: 0; }
.dashboard-panel > .dashboard-section-heading h2 { min-width: 0; overflow-wrap: anywhere; }
.dashboard-panel > .dashboard-section-heading p { text-align: right; }
.dashboard-category-layout-row { align-items: stretch; }
.dashboard-category-layout-row > .dashboard-panel { align-self: stretch; }
.dashboard-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.dashboard-metric-tile { display: flex; min-width: 0; min-height: 62px; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); color: var(--text); text-decoration: none; }
.dashboard-metric-tile:hover { border-color: var(--accent); background: var(--info-bg); color: var(--text); }
.dashboard-metric-tile > span { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.dashboard-metric-tile > strong { flex: 0 0 auto; color: var(--navy); font-size: 21px; font-weight: 700; line-height: 1.1; }
.dashboard-metric-tile:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; }
.dashboard-panel .dashboard-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 10px; }
.dashboard-panel .dashboard-category-grid .category-inventory-card { min-width: 0; min-height: 126px; align-content: start; gap: 10px; padding: 12px; }
.dashboard-panel .dashboard-category-grid .category-inventory-card-heading { min-height: 28px; }
.dashboard-panel .dashboard-category-grid .category-inventory-card-heading strong { font-size: 14px; }
.dashboard-panel .dashboard-category-grid .category-inventory-values { gap: 6px; }
.dashboard-panel .dashboard-category-grid .category-inventory-values > a { min-height: 40px; padding: 5px; }
.dashboard-panel .dashboard-category-grid .category-inventory-values > span { min-height: 40px; align-content: center; padding: 5px; border: 1px solid var(--line); border-radius: 9px; }
.dashboard-panel .dashboard-category-grid .category-inventory-values > a > span,
.dashboard-panel .dashboard-category-grid .category-inventory-values > span > span { font-size: 10px; }
.dashboard-panel .dashboard-category-grid .category-inventory-values strong { font-size: 16px; }
.dashboard-quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); align-content: start; gap: 10px; }
.dashboard-quick-actions .btn { width: 100%; min-height: 42px; margin: 0; }
@media (max-width: 800px) {
  .dashboard-layout-row { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
  .dashboard-panel > .dashboard-section-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .dashboard-panel > .dashboard-section-heading p { text-align: left; }
  .dashboard-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .dashboard-panel .dashboard-category-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .dashboard-panel .dashboard-category-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Restrained dashboard-only hover and keyboard-focus motion. */
.dashboard-panel {
  border: 1px solid var(--line);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.dashboard-panel:is(:hover, :focus-within) {
  position: relative;
  z-index: 1;
  transform: translateY(-4px);
  border-color: #7da6ed;
  box-shadow: 0 10px 24px rgba(38, 82, 150, .12);
}
.inventory-summary-section .dashboard-stat-link {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.inventory-summary-section .dashboard-stat-link:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  border-color: #7da6ed;
  box-shadow: 0 7px 17px rgba(38, 82, 150, .11);
}
.dashboard-panel .dashboard-metric-tile {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}
.dashboard-panel a.dashboard-metric-tile:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  border-color: #7da6ed;
  box-shadow: 0 6px 14px rgba(38, 82, 150, .1);
}
.dashboard-panel .dashboard-category-grid .category-inventory-card {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.dashboard-panel .dashboard-category-grid .category-inventory-card:is(:hover, :focus-within) {
  transform: translateY(-2px);
  border-color: #7da6ed;
  box-shadow: 0 7px 17px rgba(38, 82, 150, .11);
}
.dashboard-quick-actions .btn {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}
.dashboard-quick-actions .btn:hover { transform: translateY(-1px); border-color: var(--accent-hover); background-color: var(--accent-hover); box-shadow: 0 4px 10px rgba(38, 82, 150, .14); }
.dashboard-quick-actions .btn:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 3px; }
.dashboard-recent-stock-panel tbody .clickable-row { transition: none; }
.dashboard-recent-stock-panel tbody .clickable-row:hover td { background: var(--info-bg); }
@media (prefers-reduced-motion: reduce) {
  .dashboard-panel,
  .inventory-summary-section .dashboard-stat-link,
  .dashboard-panel .dashboard-metric-tile,
  .dashboard-panel .dashboard-category-grid .category-inventory-card,
  .dashboard-quick-actions .btn { transition: none !important; }
  .dashboard-panel:is(:hover, :focus-within),
  .inventory-summary-section .dashboard-stat-link:is(:hover, :focus-visible),
  .dashboard-panel a.dashboard-metric-tile:is(:hover, :focus-visible),
  .dashboard-panel .dashboard-category-grid .category-inventory-card:is(:hover, :focus-within),
  .dashboard-quick-actions .btn:hover { transform: none !important; }
}

/* Compact department selection for the credential list; export filters stay separate. */
.credentials-page .credential-department-filter { display: grid; grid-template-columns: minmax(300px, 320px) minmax(140px, 160px); align-items: end; gap: 12px; margin: 0 0 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.credentials-page .credential-department-field { display: grid; min-width: 0; gap: 5px; }
.credentials-page .credential-department-field label { margin: 0; }
.credentials-page .credential-department-filter select { min-width: 0; }
.credentials-page .credential-department-filter .btn { grid-column: 2; justify-self: start; width: auto; min-width: 140px; max-width: 160px; margin: 0; white-space: nowrap; }
.credentials-page .credential-filter-summary { margin: 0 0 10px; color: var(--text-strong); font-size: 13px; }
.credentials-page .credential-filter-summary strong { color: var(--navy); }
@media (max-width: 640px) {
  .credentials-page .credential-department-filter { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .credentials-page .credential-department-field,
  .credentials-page .credential-department-filter .btn { grid-column: 1; justify-self: stretch; width: 100%; max-width: none; }
}

/* Department-based assigned hardware dashboard and read-only detail view. */
.dashboard-panel .dashboard-category-grid .category-inventory-card { grid-template-rows: auto auto 1fr; }
.department-detail-link { align-self: end; justify-self: start; width: auto; margin: 0; color: #1769c2; font-size: 12px; font-weight: 650; line-height: 1.4; text-decoration: none; text-underline-offset: 3px; }
.department-detail-link:hover { color: #104f98; text-decoration: underline; }
.department-detail-link:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 3px; border-radius: 3px; }
.department-hardware-card-action { font-size: 12px; }
.department-software-results { display: grid; min-width: 0; gap: 10px; margin: 0 0 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.department-software-results .section-heading { margin: 0; }
.department-software-results h2 { margin: 0; color: var(--navy); font-size: 18px; }
.department-software-results .count-chip { white-space: nowrap; }
.department-software-results .table-scroll { min-width: 0; }
.department-hardware-page { gap: 10px; }
.department-hardware-heading { align-items: center; }
.department-hardware-heading h2 { margin: 0; }
.department-hardware-filter { margin: 0; }
.department-hardware-summary { color: var(--muted-strong); }
.department-hardware-summary strong { color: var(--navy); }
.department-hardware-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.department-hardware-results { overflow: hidden; }
.department-hardware-results .employee-software-content { padding-top: 10px; }
.department-hardware-table-scroll { width: 100%; min-width: 0; border-radius: 8px; }
.department-hardware-table { --table-min-width: 680px; table-layout: fixed; font-size: 12px; }
.department-hardware-table th,
.department-hardware-table td { vertical-align: middle; }
.department-hardware-table th { color: var(--muted-strong); font-size: 11px; font-weight: 700; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.department-hardware-table th:nth-child(1) { width: 23%; }
.department-hardware-table th:nth-child(2) { width: 38%; }
.department-hardware-table th:nth-child(3) { width: 12%; }
.department-hardware-table th:nth-child(4) { width: 14%; }
.department-hardware-table th:nth-child(5) { width: 13%; }
.department-hardware-employee-name,
.department-hardware-component-name { display: block; color: var(--navy); font-weight: 650; overflow-wrap: anywhere; }
.department-hardware-component-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.department-hardware-table .assignment-status-pill { display: inline-flex; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.department-hardware-details-link { color: #1769c2; font-weight: 650; text-decoration: none; text-underline-offset: 3px; white-space: nowrap; }
.department-hardware-details-link:hover { color: #104f98; text-decoration: underline; }
.department-hardware-details-link:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 3px; border-radius: 3px; }
.department-hardware-empty .employee-software-content { padding: 12px; }
.department-hardware-empty .empty-state { margin: 0; }
@media (max-width: 600px) {
  .department-hardware-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-hardware-summary-grid .employee-summary-card:last-child { grid-column: 1 / -1; }
  .department-hardware-results .employee-software-content { padding: 8px; }
  .department-hardware-table { --table-min-width: 650px; }
}

/* Compact employee directory, summary and software disclosure. */
.employee-directory-card { display: grid; min-width: 0; gap: 10px; }
.employee-directory-heading { margin: 0; }
.employee-directory-heading h2 { margin: 0; }
.employee-directory-filters { grid-template-columns: minmax(180px, .9fr) minmax(220px, 1.6fr) repeat(3, auto); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.employee-directory-filters input, .employee-directory-filters select { min-width: 0; }
.employee-directory-filters .btn { min-height: var(--control-height); margin: 0; padding: 7px 12px; }
.employee-add-button { white-space: nowrap; }
.employee-filter-summary { margin: 0; font-size: 12px; }
.employee-summary-grid { display: grid; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.employee-summary-card { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.employee-summary-card > span { min-width: 0; color: var(--muted-strong); font-size: 12px; overflow-wrap: anywhere; }
.employee-summary-card > strong { flex: 0 0 auto; color: var(--navy); font-size: 19px; line-height: 1.1; }
.employee-directory { max-width: none; margin: 0; gap: 7px; }
.employee-tile { position: relative; gap: 8px; padding: 9px 11px; border-color: var(--line); border-radius: 10px; background: var(--panel); }
.employee-tile-main { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; }
.employee-avatar { width: 38px; height: 38px; border-radius: 10px; font-size: 16px; }
.employee-tile-content { max-width: none; }
.employee-tile h3 { margin: 0 0 2px; color: var(--navy); font-size: 14px; }
.employee-tile p { margin: 0; color: var(--muted); font-size: 12px; }
.employee-tile-controls { grid-column: 3; justify-content: flex-end; gap: 8px; }
.employee-view-details { min-height: 34px; margin: 0; padding: 6px 11px; font-size: 12px; white-space: nowrap; }
.employee-actions-menu { position: relative; z-index: 3; flex: 0 0 auto; }
.employee-actions-menu[open] { z-index: 20; }
.employee-actions-menu > summary { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--text-strong); cursor: pointer; font-size: 22px; line-height: 1; list-style: none; }
.employee-actions-menu > summary::-webkit-details-marker { display: none; }
.employee-actions-menu > summary:hover, .employee-actions-menu[open] > summary { border-color: var(--accent); background: var(--info-bg); color: var(--accent); }
.employee-actions-menu > summary:focus-visible, .employee-actions-menu-item:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; }
.employee-actions-menu-list { position: absolute; top: calc(100% + 5px); right: 0; display: grid; min-width: 164px; gap: 2px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel); box-shadow: var(--shadow); }
.employee-actions-menu-list form { margin: 0; }
.employee-actions-menu-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 12px; text-align: left; }
.employee-actions-menu-item:hover { background: var(--panel-soft); }
.employee-actions-menu-item.danger { color: var(--danger); }
.employee-edit-form { position: relative; z-index: 1; max-width: none; }
.employee-edit-form[hidden] { display: none; }
.employee-software-section { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.employee-software-section > summary { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: var(--navy); cursor: pointer; font-size: 13px; font-weight: 650; list-style: none; }
.employee-software-section > summary::-webkit-details-marker { display: none; }
.employee-software-section > summary::before { content: '＋'; color: var(--accent); font-size: 15px; }
.employee-software-section[open] > summary::before { content: '−'; }
.employee-software-section > summary:focus-visible { outline: 3px solid var(--accent-focus); outline-offset: 2px; border-radius: 8px; }
.employee-software-toggle-label { margin-left: auto; color: var(--accent); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.employee-software-content { display: grid; min-width: 0; gap: 12px; padding: 0 12px 12px; }
.employee-software-group { display: grid; min-width: 0; gap: 6px; }
.employee-software-group h3 { display: flex; min-width: 0; align-items: baseline; gap: 8px; margin: 0; color: var(--navy); font-size: 13px; }
.employee-software-group h3 a { color: inherit; text-decoration: none; }
.employee-software-group h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.employee-software-group h3 span { color: var(--muted); font-size: 11px; font-weight: 500; }
.employee-software-group table { --table-min-width: 560px; font-size: 12px; }
@media (max-width: 900px) {
  .employee-directory-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .employee-directory-filters > div:first-child { grid-column: span 2; }
  .employee-directory-filters > div:nth-child(2) { grid-column: span 4; }
  .employee-directory-filters > .btn { grid-column: span 2; justify-self: stretch; }
}
@media (max-width: 600px) {
  .employee-directory-filters { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .employee-directory-filters > div:first-child, .employee-directory-filters > div:nth-child(2) { grid-column: 1; }
  .employee-directory-filters > .btn { justify-self: stretch; width: 100%; }
  .employee-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-summary-card:last-child { grid-column: 1 / -1; }
  .employee-tile-main { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .employee-avatar { width: 34px; height: 34px; font-size: 14px; }
  .employee-tile-controls { grid-column: 3; flex-direction: column; align-items: flex-end; gap: 6px; }
  .employee-tile-controls .state-pill { font-size: 10px; }
  .employee-actions-menu-list { z-index: 5; }
  .employee-software-section > summary { align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; }
  .employee-software-toggle-label { margin-left: 22px; }
}

/* Keep the three hardware filters balanced within the shared employee toolbar. */
.department-hardware-filter.employee-directory-filters { grid-template-columns: minmax(170px, .85fr) minmax(180px, 1fr) minmax(220px, 1.2fr) auto auto; }
@media (max-width: 900px) {
  .department-hardware-filter.employee-directory-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .department-hardware-filter.employee-directory-filters > div:nth-child(3) { grid-column: span 4; }
}
@media (max-width: 600px) {
  .department-hardware-filter.employee-directory-filters { grid-template-columns: minmax(0, 1fr); }
  .department-hardware-filter.employee-directory-filters > div:nth-child(-n+3),
  .department-hardware-filter.employee-directory-filters > .btn { grid-column: 1; }
}

/* Apply reduced-motion preferences consistently across every page and component. */
@media (prefers-reduced-motion: reduce) {
  html,
  html:focus-within,
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.employee-software-status-page { display: grid; gap: 16px; min-width: 0; }
.employee-software-status-heading h1 { margin: 4px 0 6px; font-size: clamp(25px, 4vw, 34px); }
.employee-software-status-heading p { margin-top: 0; }
.employee-software-status-filters { display: grid; gap: 14px; }
.employee-software-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.employee-software-filter-grid > div { display: grid; min-width: 0; gap: 6px; }
.employee-software-filter-grid label { font-size: 12px; font-weight: 650; }
.employee-software-filter-grid input, .employee-software-filter-grid select { width: 100%; min-width: 0; }
.employee-software-filter-actions, .employee-software-results-heading, .employee-software-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-software-filter-actions { justify-content: flex-start; flex-wrap: wrap; }
.employee-software-results-heading h2 { margin: 0 0 4px; font-size: 18px; }
.employee-software-results-heading p { margin: 0; }
.employee-software-status-table { min-width: 760px; }
.employee-software-status-table td { vertical-align: top; }
.employee-software-no-records { color: var(--muted); font-style: italic; }
.employee-software-pagination { margin-top: 14px; color: var(--muted); font-size: 13px; }
.employee-software-pagination > div { display: flex; gap: 8px; }
@media (max-width: 760px) {
  .employee-software-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-software-results-heading, .employee-software-pagination { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 480px) {
  .employee-software-filter-grid { grid-template-columns: minmax(0, 1fr); }
  .employee-software-filter-actions > * { flex: 1 1 100%; text-align: center; }
}

/* Responsive safety layer shared by every authenticated screen. */
html, body { min-width: 0; max-width: 100%; }
body { overflow-x: hidden; }
.container, main, section, article, .card, .page-head, .section-heading,
.grid, .toolbar, form, fieldset { min-width: 0; }
.container { width: min(1440px, calc(100% - 48px)); }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; }
table th, table td { overflow-wrap: normal; word-break: normal; }
table th { white-space: normal; }
table td { overflow-wrap: anywhere; }
input, select, textarea, button, .btn { max-width: 100%; }
button, .btn { min-height: 40px; }
form :where(input, select, textarea) { min-width: 0; }
dialog { box-sizing: border-box; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
dialog form { min-width: 0; }
:where(.card, .page-head, .section-heading, .toolbar, .inline-actions, .form-actions) > * { min-width: 0; }

.has-form-close { position: relative; }
form.has-form-close { padding-top: 50px; }
.form-close-button {
  position: absolute; z-index: 3; top: 10px; right: 10px;
  display: inline-grid; width: 40px; height: 40px; min-height: 40px;
  place-items: center; padding: 0; border: 1px solid var(--line-strong);
  border-radius: 50%; background: var(--panel); color: var(--text-strong);
  box-shadow: 0 1px 3px rgba(15,23,42,.08); cursor: pointer;
}
.form-close-button:hover { border-color: var(--accent-border-alpha); background: var(--accent-tint-alpha); color: var(--accent); }
.form-close-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.form-close-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
dialog.has-form-close { position: relative; padding-top: 52px; }

@media (max-width: 767px) {
  .container { width: calc(100% - 28px); margin-top: 18px; }
  .card { padding: clamp(14px, 4vw, 20px); }
  .page-head, .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .page-head > :first-child, .section-heading > :first-child { min-width: 0; }
  .toolbar { grid-template-columns: minmax(0, 1fr); }
  .toolbar > * { min-width: 0; width: 100%; }
  .inline-actions, .form-actions { flex-wrap: wrap; }
  .inline-actions > *, .form-actions > * { max-width: 100%; }
  .table-scroll { border-radius: 8px; }
  .table-scroll table { width: max-content; min-width: 100%; max-width: none; }
  .table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .form-close-button { top: 8px; right: 8px; }
}
@media (max-width: 430px) {
  .container { width: calc(100% - 24px); }
  .page-head h1 { font-size: clamp(23px, 7vw, 30px); }
  .card { border-radius: 10px; }
  .form-close-button { top: 7px; right: 7px; }
}
@media (min-width: 1920px) {
  .container { width: min(1600px, calc(100% - 96px)); }
}

/* Department form alignment follows the shared catalog controls. */
.department-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.department-form > div { min-width: 0; }
.department-form input,
.department-form select,
.department-form textarea { width: 100%; }
.department-form .form-actions {
  grid-column: 1 / -1;
  margin-top: var(--space-2);
}
.department-table th,
.department-table td { vertical-align: middle; }
.department-table .inline-actions { flex-wrap: nowrap; white-space: nowrap; }
.department-table .inline-actions form,
.department-table .inline-actions .btn { flex: 0 0 auto; }
@media (max-width: 1023px) {
  .department-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .department-form { grid-template-columns: minmax(0, 1fr); }
  .department-form .form-actions { grid-column: 1; }
}

/* Inventory Manager enterprise design system */
:root {
  color-scheme: light;
  --navy: #10110D;
  --accent: #C7F36B;
  --accent-hover: #B5E653;
  --accent-active: #C7F36B;
  --accent-soft: #EDF7D7;
  --accent-tint: #EDF7D7;
  --accent-focus: rgba(153, 194, 74, .24);
  --accent-tint-alpha: rgba(153, 194, 74, .12);
  --accent-border-alpha: rgba(110, 145, 43, .42);
  --bg: #F4F5F3;
  --panel: #FFFFFF;
  --panel-soft: #F8F9F7;
  --text: #20221D;
  --text-strong: #34372F;
  --muted: #777B72;
  --muted-strong: #5B6056;
  --line: #E6E8E2;
  --line-strong: #D7DBD2;
  --button-text: #20221D;
  --shadow: 0 1px 2px rgba(16, 17, 13, .035), 0 8px 24px rgba(16, 17, 13, .045);
  --control-height: 42px;
  --control-radius: 8px;
  --card-radius: 12px;
  --danger: #C85A52;
  --danger-hover: #AE4640;
  --success: #5F8F50;
  --success-hover: #4F7942;
  --warning: #B77B28;
  --info-bg: #F0F5F9;
  --info-border: #D8E3EC;
  --info-text: #49677B;
  --success-bg: #F0F6ED;
  --success-border: #D6E6CE;
  --success-text: #426B39;
  --danger-bg: #FBF0EF;
  --danger-border: #EED3D0;
  --danger-text: #9D433D;
  --warning-bg: #FAF5EA;
  --warning-border: #EADDBF;
  --warning-text: #89601E;
  --success-button-text: #17200F;
  --table-min-width: 760px;
  --section-gap: 20px;
  --page-top-gap: 24px;
  font-family: Inter, "Noto Sans", ui-sans-serif, system-ui, sans-serif;
}

html, body { min-width: 320px; max-width: 100%; }
body { overflow-x: clip; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
body, button, input, select, textarea { font-family: var(--font-sans); }
body.auth-page { background: #F1F3EF; }
.auth-card { border-color: #E4E7DF; border-radius: 12px; box-shadow: 0 14px 40px rgba(16,17,13,.07); }
.auth-card form > .btn { width: 100%; justify-self: stretch; margin-top: 10px; }
a { color: #526D34; }
a:hover { color: #354822; }
:focus-visible { outline: 3px solid rgba(153, 194, 74, .58); outline-offset: 2px; }

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  position: sticky; z-index: 500; top: 0; display: flex; width: 204px; height: 100vh; flex: 0 0 204px;
  flex-direction: column; padding: 22px 14px 14px; overflow: hidden; background: #10110D; color: #F5F6F1;
}
.brand { display: flex; min-height: 44px; align-items: center; gap: 11px; padding: 0 8px; color: #F5F6F1; font-size: 14px; font-weight: 700; letter-spacing: -.2px; }
.brand:hover { color: white; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; overflow: hidden; border: 1px solid rgba(199,243,107,.22); border-radius: 9px; background: #20291A; }
.brand-mark svg { width: 23px; height: 23px; fill: none; stroke: var(--accent); stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo { width: 26px; height: 26px; object-fit: contain; }
.brand-name { color: inherit; font-size: 14px; letter-spacing: -.2px; text-transform: none; }
.brand-name > span { display: inline; color: #AEB3A6; }
.sidebar-label { margin: 31px 10px 10px; color: #858A7D; font-size: 10px; font-weight: 700; letter-spacing: 1.15px; }
.sidebar-nav { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 3px; overflow: auto; padding: 0 0 12px; scrollbar-width: thin; scrollbar-color: #45483F transparent; }
.sidebar-nav > a, .sidebar-nav summary {
  position: relative; display: flex; min-height: 40px; align-items: center; gap: 12px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 7px; color: #C1C4BB; font-size: 12.5px; font-weight: 550; line-height: 1.35;
}
.sidebar-nav > a { text-decoration: none; }
.sidebar-nav > a::before, .sidebar-nav summary::before {
  display: grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; color: #92988A;
  font-size: 15px; font-weight: 500; line-height: 1;
}
.sidebar-nav > a[href="dashboard.php"]::before { content: "▦"; }
.sidebar-nav > a[href="assignments.php"]::before { content: "⇄"; }
.sidebar-nav > a[href="employees.php"]::before { content: "♙"; }
.sidebar-nav > a[href="credentials.php"]::before { content: "◈"; }
.sidebar-nav > a[href="categories.php"]::before { content: "▧"; }
.sidebar-nav > a[href="departments.php"]::before { content: "⌂"; }
.sidebar-nav > a[href="orders.php"]::before { content: "▤"; }
.sidebar-nav > a[href="vendors.php"]::before { content: "◇"; }
.sidebar-nav > a[href="history.php"]::before { content: "◷"; }
.sidebar-nav > a[href="users.php"]::before { content: "♧"; }
.sidebar-nav > a[href="employee-software-api-tokens.php"]::before { content: "⌘"; }
.sidebar-nav > a[href="employee-software-status.php"]::before { content: "▣"; }
.sidebar-nav details > summary::before { content: "▦"; }
.sidebar-nav > a:hover, .sidebar-nav summary:hover, .sidebar-nav summary:focus-visible {
  border-color: transparent; background: rgba(255,255,255,.065); color: #F6F7F3; text-decoration: none;
}
.sidebar-nav > a.active, .sidebar-nav summary.active {
  border-color: var(--accent); background: var(--accent); color: #22281A; font-weight: 700; box-shadow: 0 3px 10px rgba(150,193,70,.14);
}
.sidebar-nav > a.active::before, .sidebar-nav summary.active::before { color: #354725; }
.sidebar-nav .nav-inventory-dropdown, .sidebar-nav .nav-audit-dropdown { min-width: 0; }
.sidebar-nav details > summary { list-style: none; cursor: pointer; }
.sidebar-nav details > summary::-webkit-details-marker { display: none; }
.sidebar-nav details > summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-right: 1px solid #8E9388; border-bottom: 1px solid #8E9388; transform: rotate(45deg) translateY(-2px); }
.sidebar-nav details[open] > summary::after { transform: rotate(225deg) translate(-1px,-1px); }
.sidebar-nav .nav-inventory-links, .sidebar-nav .nav-audit-links { display: grid; gap: 2px; margin: 3px 0 7px 20px; padding-left: 12px; border-left: 1px solid #393C34; }
.sidebar-nav .nav-inventory-links a, .sidebar-nav .nav-audit-links a { display: flex; min-height: 34px; align-items: center; padding: 0 10px; border-radius: 6px; color: #AEB2A8; font-size: 11.5px; text-decoration: none; }
.sidebar-nav .nav-inventory-links a::before { content: ""; width: 4px; height: 4px; margin-right: 9px; border-radius: 50%; background: #73786C; }
.sidebar-nav .nav-inventory-links a:hover, .sidebar-nav .nav-audit-links a:hover, .sidebar-nav .nav-inventory-links a.active, .sidebar-nav .nav-audit-links a.active { background: rgba(255,255,255,.055); color: #E7E9E2; }
.sidebar-nav .nav-inventory-links a.active::before { background: var(--accent); }
.sidebar-nav .nav-count { min-width: 19px; height: 19px; padding: 1px 5px; border-radius: 10px; background: var(--accent); color: #22261A; text-align: center; font-size: 10px; font-weight: 700; }
.sidebar-account { display: flex; min-height: 61px; align-items: center; gap: 10px; padding: 12px 4px 0; border-top: 1px solid #30322C; }
.account-avatar, .header-user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid rgba(199,243,107,.22); border-radius: 50%; background: #30372A; color: #D8F59D; font-size: 11px; font-weight: 700; }
.account-copy, .header-user-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
.account-copy strong, .header-user-copy strong { overflow: hidden; color: #F3F4F0; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small, .header-user-copy small { color: #94998E; font-size: 10px; }
.sidebar-account form { margin: 0; }
.sidebar-account .sidebar-logout { display: grid; width: 32px; height: 32px; min-height: 32px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #969B90; cursor: pointer; }
.sidebar-logout:hover { background: rgba(255,255,255,.08); color: #F4F5F0; }
.sidebar-logout svg, .header-notifications svg, .sidebar-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-workspace { display: flex; min-width: 0; min-height: 100vh; flex: 1; flex-direction: column; }
.topbar { position: sticky; z-index: 300; top: 0; display: flex; min-height: 66px; flex: 0 0 66px; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 3vw, 42px); border: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.topbar-leading { display: flex; min-width: 0; align-items: center; gap: 12px; }
.topbar-context { overflow: hidden; color: #777B72; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-context span { padding: 0 8px; color: #B5B9B0; }
.sidebar-toggle { display: none; width: 36px; height: 36px; min-height: 36px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text-strong); cursor: pointer; }
.header-actions { display: flex; min-width: 0; flex: 0 1 auto; align-items: center; gap: 13px; }
.global-search { position: relative; display: flex; width: min(340px, 32vw); height: 37px; align-items: center; gap: 8px; margin: 0; padding: 0 10px; border: 1px solid #E7E9E4; border-radius: 7px; background: #F8F9F7; }
.global-search:focus-within { border-color: #A9C77A; background: white; box-shadow: 0 0 0 3px rgba(199,243,107,.16); }
.global-search .search-leading { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: #858A7E; stroke-width: 1.8; stroke-linecap: round; }
.global-search input { width: 100%; min-width: 0; height: 100% !important; min-height: 0; padding: 0; border: 0; outline: 0; background: transparent; box-shadow: none; font-size: 11px; }
.global-search input:focus { border: 0; box-shadow: none; }
.global-search kbd { flex: 0 0 auto; padding: 1px 5px; border: 1px solid #E1E4DD; border-radius: 4px; background: white; color: #8C9087; font: 10px var(--font-sans); }
.header-notifications { position: relative; display: grid; width: 34px; height: 34px; place-items: center; color: #656A60; }
.header-notifications:hover { color: #25281F; }
.notification-dot { position: absolute; top: 1px; right: -2px; display: grid; min-width: 16px; height: 16px; place-items: center; padding: 0 4px; border: 1px solid #fff; border-radius: 999px; background: #D85D55; color: #fff; font-size: 8px; font-weight: 750; line-height: 1; }
.header-divider { width: 1px; height: 29px; background: var(--line); }
.header-user-avatar { width: 31px; height: 31px; flex-basis: 31px; border-color: #E1E6D7; background: #EFF4E5; color: #526B34; }
.header-user-copy strong { color: #34372F; font-size: 11px; }
.header-user-copy small { color: #858A80; }
.header-profile { position: relative; }
.header-profile > summary { display: flex; min-width: 0; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.header-profile > summary::-webkit-details-marker { display: none; }
.profile-chevron { width: 6px; height: 6px; margin: -3px 1px 0 0; border-right: 1px solid #83877F; border-bottom: 1px solid #83877F; transform: rotate(45deg); }
.header-profile[open] .profile-chevron { margin-top: 3px; transform: rotate(225deg); }
.profile-menu { position: absolute; z-index: 350; top: calc(100% + 12px); right: 0; display: grid; width: 220px; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(16,17,13,.12); }
.profile-menu-label { color: #969A91; font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.profile-menu > strong { overflow-wrap: anywhere; color: #33372E; font-size: 12px; }
.profile-menu > small { color: #83887D; font-size: 10px; }
.profile-menu form { margin: 9px 0 0; padding-top: 10px; border-top: 1px solid #ECEEE9; }
.profile-menu .btn { width: 100%; justify-content: center; }
.container { width: min(1440px, calc(100% - clamp(36px, 6vw, 84px))); max-width: 1440px; flex: 1; margin: 0 auto; padding: 25px 0 38px; }
.container > .page-back { margin: 0 0 14px; color: #71766B; }
.page-head { margin: 0 0 23px; padding: 0; }
.page-head .eyebrow { margin-bottom: 5px; color: #858A7D; font-size: 10px; font-weight: 650; letter-spacing: .9px; }
.page-head h1 { margin: 0; color: #24261F; font-size: clamp(23px, 2.2vw, 29px); font-weight: 650; letter-spacing: -.8px; line-height: 1.18; }
.app-footer { padding: 0 0 18px; color: #92968D; text-align: center; font-size: 10px; }
.app-footer span { padding: 0 4px; color: #C3C6BF; }
.sidebar-scrim { display: none; }

/* Shared surfaces and controls */
.card, .dashboard-panel, .modal, dialog, .profile-panel, .employee-profile-section, .detail-card, .section-card {
  border: 1px solid var(--line) !important; border-radius: 10px !important; background: #fff !important;
  box-shadow: 0 1px 2px rgba(16,17,13,.025), 0 5px 18px rgba(16,17,13,.035) !important;
}
.card { padding: 19px; }
.grid { gap: 15px; }
.page-head + .card, .page-head + .grid { margin-top: 0; }
h2, h3, h4 { color: #30332B; letter-spacing: -.25px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.section-heading, .dashboard-section-heading, .product-panel-heading { gap: 12px; }
.section-heading h2, .dashboard-section-heading h2 { margin: 0; font-size: 15px; font-weight: 650; }
.muted, small.muted { color: var(--muted); }
.btn, button.btn, input[type="submit"].btn {
  min-height: 37px; padding: 8px 13px; border: 1px solid #E0E3DC; border-radius: 7px;
  background: #fff; color: #45493F; box-shadow: none; font-size: 11.5px; font-weight: 600;
  line-height: 1.25; text-decoration: none; transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover, button.btn:hover { transform: translateY(-1px); border-color: #C8CEC0; background: #F9FAF7; color: #25281F; box-shadow: 0 3px 9px rgba(16,17,13,.06); text-decoration: none; }
.btn:active, button.btn:active { transform: translateY(0); }
.btn-primary, .btn-glow, button.btn-primary { border-color: #B5DB61; background: var(--accent); color: #24291A; box-shadow: none; }
.btn-primary:hover, .btn-glow:hover, button.btn-primary:hover { border-color: #A4CD50; background: #B8E75A; color: #22271A; }
.btn-success { border-color: #D3E5CC; background: var(--success-bg); color: var(--success-text); }
.btn-danger { border-color: #EDD1CE; background: var(--danger-bg); color: var(--danger-text); }
.btn-warning { border-color: #E9DDBF; background: var(--warning-bg); color: var(--warning-text); }
button, .btn, a, input, select, textarea { transition-duration: .15s; }
button:disabled, .btn:disabled { opacity: .55; }
input, select, textarea {
  min-height: 39px; padding: 9px 11px; border-color: #DDE1D8; border-radius: 7px; background-color: #fff;
  color: #2D3029; font-size: 12px; box-shadow: none;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select { height: 39px; }
input::placeholder, textarea::placeholder { color: #A0A49B; }
input:focus, select:focus, textarea:focus { border-color: #A4C86A; box-shadow: 0 0 0 3px rgba(199,243,107,.2); outline: none; }
label { margin-bottom: 5px; color: #51564C; font-size: 11px; font-weight: 600; }
textarea { min-height: 92px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; }
.form-actions { gap: 9px; margin-top: 8px; }
.alert { margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--info-border); border-radius: 8px; background: var(--info-bg); color: var(--info-text); font-size: 12px; }
.alert.success { border-color: var(--success-border); background: var(--success-bg); color: var(--success-text); }
.alert.warning { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning-text); }
.alert.error, .alert.danger { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.badge, .status-badge, .assignment-status-pill, .history-action-pill { border-radius: 20px; font-size: 10px; font-weight: 600; }

/* Table system */
.table-scroll, .assignment-table-scroll, .audit-table-scroll { max-width: 100%; min-width: 0; overflow: auto; border: 1px solid #EAEBE7; border-radius: 8px; background: #fff; }
table { border-collapse: separate; border-spacing: 0; color: #373A33; font-size: 11.5px; }
table th { padding: 11px 12px; border-bottom: 1px solid #E6E8E2; background: #F8F9F7; color: #777C72; font-size: 10px; font-weight: 650; letter-spacing: .15px; text-align: left; }
table td { padding: 10px 12px; border-bottom: 1px solid #EEF0EC; background: #fff; color: #43473F; vertical-align: middle; }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr:hover td { background: #FAFBF8; }
table tbody tr:focus-within td { background: #F7FAF0; }
table th:first-child { border-top-left-radius: 7px; }
table th:last-child { border-top-right-radius: 7px; }
.table-scroll table { min-width: var(--table-min-width, 720px); }
.pagination { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.pagination .btn[aria-current="page"], .pagination a[aria-current="page"] { border-color: #B7DA6B; background: var(--accent-soft); color: #384A22; }
.toolbar, .compact-toolbar { gap: 10px; }
.toolbar input, .toolbar select, .compact-toolbar input, .compact-toolbar select { min-height: 38px; }
.empty-state { padding: 30px 18px; color: var(--muted); text-align: center; }
dialog { padding: 22px; color: var(--text); }
dialog::backdrop { background: rgba(21,24,17,.46); backdrop-filter: blur(2px); }
.modal-header, dialog > :first-child { margin-top: 0; }

/* Dashboard and detail hierarchy */
.dashboard-welcome { display: flex; align-items: center; gap: 12px; margin: 0 0 15px; padding: 13px 15px; border: 1px solid #E6E9E1; border-radius: 9px; background: #fff; }
.dashboard-welcome__icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 8px; background: #F0F6E4; color: #657F3D; }
.dashboard-welcome__icon svg { width: 18px; height: 18px; }
.dashboard-welcome__name { margin: 0; color: #373A33; font-size: 12px; font-weight: 650; }
.dashboard-welcome__time { margin: 1px 0 0; color: #888D82; font-size: 10px; }
.dashboard-page-head { margin-bottom: 17px; }
.dashboard-stat-section { margin-bottom: 17px; }
.dashboard-section-heading { margin-bottom: 10px; }
.dashboard-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dashboard-stats .stat, .dashboard-stat-link { min-height: 112px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: 0 1px 2px rgba(16,17,13,.025); }
.dashboard-stat-link:hover { border-color: #D3DFBF; background: #FEFFFC; box-shadow: 0 5px 14px rgba(16,17,13,.06); transform: translateY(-1px); }
.dashboard-stat-link > span:not(.stat-icon):not(.visually-hidden) { color: #74796F; font-size: 10.5px; font-weight: 550; }
.dashboard-stat-link > strong { color: #292C25; font-size: 24px; font-weight: 650; letter-spacing: -.65px; }
.stat-icon { width: 31px; height: 31px; border-radius: 8px; background: #F1F5E9; color: #687F45; }
.stat-icon-warning { background: var(--warning-bg); color: var(--warning); }
.dashboard-layout-row { gap: 14px; margin-bottom: 15px; }
.dashboard-panel { padding: 17px; }
.dashboard-metric-grid { gap: 9px; }
.dashboard-metric-tile { padding: 11px; border: 1px solid #ECEEE9; border-radius: 7px; background: #FBFCFA; }
.dashboard-metric-tile span { color: #7D8278; font-size: 10px; }
.dashboard-metric-tile strong { color: #32362C; font-size: 19px; }
.page-back { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 550; text-decoration: none; }

/* Responsive workspace */
@media (max-width: 1100px) {
  .app-sidebar { width: 204px; flex-basis: 204px; }
  .container { width: calc(100% - 48px); }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.sidebar-open { overflow: hidden; }
  .app-sidebar { position: fixed; left: 0; width: min(280px, 84vw); height: 100dvh; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 12px 0 36px rgba(0,0,0,.18); }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 490; inset: 0; display: block; width: 100%; height: 100%; min-height: 100%; padding: 0; border: 0; background: rgba(15,17,12,.42); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  body.sidebar-open .sidebar-scrim { opacity: 1; pointer-events: auto; }
  .sidebar-toggle { display: grid; }
  .topbar { min-height: 60px; flex-basis: 60px; padding-inline: 20px; }
  .container { width: calc(100% - 40px); padding-top: 20px; }
}
@media (max-width: 600px) {
  .topbar { gap: 10px; padding-inline: 12px; }
  .topbar-context { display: none; }
  .header-actions { gap: 8px; }
  .global-search { width: clamp(150px, 46vw, 240px); }
  .global-search kbd, .header-user-copy, .header-divider { display: none; }
  .header-user-avatar { width: 30px; height: 30px; }
  .container { width: calc(100% - 26px); padding-top: 17px; }
  .page-head { margin-bottom: 17px; }
  .page-head h1 { font-size: 23px; }
  .dashboard-stats { gap: 9px; }
  .dashboard-stats .stat, .dashboard-stat-link { min-height: 102px; padding: 12px; }
  .dashboard-stat-link > strong { font-size: 21px; }
  .card { padding: 14px; }
  .table-scroll, .assignment-table-scroll, .audit-table-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
  .table-scroll table { width: max-content; min-width: 100%; }
  .table-scroll:focus-visible { outline-offset: 1px; }
  .form-grid, .profile-form, .department-form { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid > *, .profile-form > *, .department-form > * { grid-column: 1 !important; }
  .inline-actions, .form-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Rich operational dashboard */
.dashboard-v2 { display: grid; gap: 21px; min-width: 0; }
.dashboard-v2 :is(h1,h2,p) { margin-top: 0; }
.dashboard-hero {
  position: relative; display: flex; min-height: 174px; align-items: center; justify-content: space-between; gap: 24px;
  overflow: hidden; padding: 27px 34px; border: 1px solid #DDE8CC; border-radius: 14px;
  background: radial-gradient(ellipse at 84% 12%, rgba(207,240,158,.64), transparent 33%), linear-gradient(112deg,#F8FBF2 0%,#EFF6E7 52%,#E4F0D5 100%);
  box-shadow: 0 4px 18px rgba(65,95,37,.055);
}
.dashboard-hero::before, .dashboard-hero::after { position: absolute; content: ""; pointer-events: none; }
.dashboard-hero::before { right: 15%; bottom: -115px; width: 390px; height: 200px; border: 1px solid rgba(114,153,72,.13); border-radius: 50%; transform: rotate(-17deg); }
.dashboard-hero::after { top: -105px; right: -55px; width: 290px; height: 220px; border: 1px solid rgba(114,153,72,.12); border-radius: 50%; transform: rotate(24deg); }
.dashboard-hero-copy { position: relative; z-index: 2; min-width: 0; }
.dashboard-hero-kicker, .dashboard-overline { display: block; color: #788C62; font-size: 9px; font-weight: 750; letter-spacing: 1.2px; }
.dashboard-hero h1 { display: flex; align-items: center; gap: 10px; margin: 8px 0 7px; color: #242C1D; font-size: clamp(26px,3vw,35px); font-weight: 680; letter-spacing: -1.15px; line-height: 1.14; }
.dashboard-greeting-icon { width: 27px; height: 27px; flex: 0 0 27px; fill: none; stroke: #7FAD43; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-hero p { margin: 0 0 15px; color: #6E7862; font-size: 12px; }
.dashboard-hero-date { display: inline-flex; align-items: center; gap: 7px; color: #6E7A61; font-size: 10px; font-weight: 600; }
.dashboard-hero-date svg { width: 14px; height: 14px; fill: none; stroke: #80946A; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-hero-art { position: absolute; z-index: 1; top: 0; right: 0; width: 38%; height: 100%; opacity: .92; }
.dashboard-hero-art > svg { position: absolute; right: 11px; bottom: 0; width: min(100%,310px); height: 100%; overflow: visible; }
.hero-art-line { fill: none; stroke: #73A444; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hero-art-area { fill: url(#hero-fill); opacity: .22; }
.dashboard-hero-art > svg::before { fill: #86B94B; }
.dashboard-hero-art circle { fill: #F5FAED; stroke: #78A94A; stroke-width: 2; }
.dashboard-hero-art rect { fill: #CBE5A5; stroke: rgba(88,125,51,.25); stroke-width: 1; }
.dashboard-hero-art rect + path { fill: none; stroke: #688F3D; stroke-width: 1.8; stroke-linecap: round; }
.hero-orbit { position: absolute; display: block; border: 1px solid rgba(107,149,67,.17); border-radius: 50%; }
.hero-orbit--one { top: 18px; right: 12%; width: 74px; height: 74px; }
.hero-orbit--two { right: 6%; bottom: 13px; width: 28px; height: 28px; background: rgba(255,255,255,.28); }

.dashboard-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.dashboard-kpi { position: relative; display: grid; min-width: 0; min-height: 176px; grid-template-columns: 1fr 116px; grid-template-rows: auto auto auto 1fr; align-items: start; gap: 3px 8px; overflow: hidden; padding: 17px 18px 13px; border: 1px solid #E7EAE3; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(24,31,17,.035); color: #30342B; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.dashboard-kpi:hover { transform: translateY(-2px); border-color: #D7E2C7; box-shadow: 0 9px 22px rgba(24,31,17,.08); color: #30342B; text-decoration: none; }
.dashboard-kpi-icon { display: grid; width: 39px; height: 39px; grid-column: 1 / -1; place-items: center; margin-bottom: 2px; border-radius: 11px; background: #EDF5E4; color: #66933A; }
.dashboard-kpi-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-kpi-label { grid-column: 1; color: #73786E; font-size: 10px; font-weight: 650; }
.dashboard-kpi-value { grid-column: 1; color: #252A20; font-size: clamp(25px,2.4vw,32px); font-weight: 690; letter-spacing: -1px; line-height: 1.16; }
.dashboard-kpi-note { grid-column: 1; color: #92968E; font-size: 9px; }
.dashboard-kpi-trend { display: inline-flex; grid-column: 1; align-items: center; gap: 4px; align-self: end; margin-top: 8px; color: #648C3F; font-size: 9px; font-weight: 650; }
.dashboard-kpi-trend .trend-arrow { font-size: 14px; line-height: 10px; }
.dashboard-kpi-trend--neutral { color: #898F84; font-weight: 500; }
.dashboard-kpi-trend--warning { color: #BC7040; }
.dashboard-sparkline { position: absolute; right: 12px; bottom: 13px; width: 113px; height: 43px; overflow: visible; }
.dashboard-sparkline polyline { vector-effect: non-scaling-stroke; }
.dashboard-sparkline--neutral path { fill: none; stroke: #BCC9AD; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 3 3; }
.dashboard-kpi--available .dashboard-kpi-icon { background: #EAF5E8; color: #5D9A5B; }
.dashboard-kpi--assigned .dashboard-kpi-icon { background: #E6F2EE; color: #3E8069; }
.dashboard-kpi--warning .dashboard-kpi-icon { background: #FCF0E8; color: #C3743E; }
.dashboard-kpi--warning { border-color: #F0E5DA; }

.dashboard-analytics-grid { display: grid; grid-template-columns: minmax(245px,1fr) minmax(390px,1.62fr) minmax(228px,.92fr); gap: 14px; align-items: stretch; }
.dashboard-analytic-card { min-width: 0; padding: 20px; border: 1px solid #E7EAE3; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(24,31,17,.035); }
.dashboard-card-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.dashboard-card-heading h2 { margin: 4px 0 0; color: #30342C; font-size: 15px; font-weight: 680; letter-spacing: -.3px; }
.dashboard-card-heading p { margin: 4px 0 0; color: #92968E; font-size: 9px; }
.dashboard-text-link { flex: 0 0 auto; color: #698C48; font-size: 9px; font-weight: 650; text-decoration: none; }
.dashboard-text-link:hover { color: #45652B; text-decoration: none; }
.dashboard-text-link span { padding-left: 2px; font-size: 12px; }
.distribution-body { display: grid; grid-template-columns: minmax(136px,1fr) minmax(110px,.95fr); align-items: center; gap: 8px; min-height: 214px; }
.donut-wrap { display: grid; min-width: 0; place-items: center; }
.dashboard-donut { display: block; width: min(100%,210px); overflow: visible; }
.donut-track { fill: none; stroke: #F0F2ED; stroke-width: 25; }
.dashboard-donut > g circle { stroke-linecap: butt; transition: stroke-dasharray .3s ease; }
.donut-total { fill: #293026; font-size: 30px; font-weight: 700; letter-spacing: -1px; text-anchor: middle; }
.donut-caption { fill: #91968C; font-size: 8px; font-weight: 700; letter-spacing: 1px; text-anchor: middle; }
.donut-legend { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.donut-legend li { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #697065; font-size: 9px; }
.legend-label { display: flex; min-width: 0; align-items: center; gap: 7px; }
.legend-label i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--legend-color); }
.legend-value { color: #33382E; font-size: 10px; font-weight: 650; text-align: right; }
.legend-value small { display: block; margin-top: 1px; color: #9A9E95; font-size: 8px; font-weight: 500; }
.dashboard-trend-card { overflow: hidden; }
.dashboard-trend-heading { align-items: flex-end; }
.trend-legend { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 11px; padding-bottom: 2px; color: #777D72; font-size: 9px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 5px; }
.trend-legend i { width: 7px; height: 7px; border-radius: 50%; background: #8FC642; }
.trend-legend .trend-legend-assigned { background: #386E4B; }
.line-chart-wrap { width: 100%; min-width: 0; }
.dashboard-line-chart { display: block; width: 100%; height: auto; aspect-ratio: 720 / 286; overflow: visible; }
.chart-grid-line { stroke: #EDF0EA; stroke-width: 1; }
.chart-axis-label { fill: #9A9E95; font-size: 9px; font-family: var(--font-sans); }
.chart-month-label { fill: #767C70; font-size: 9px; }
.chart-added-line, .chart-assigned-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-added-line { stroke: #7DAD3F; }
.chart-assigned-line { stroke: #386E4B; }
.chart-added-point { fill: #fff; stroke: #7DAD3F; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: crosshair; }
.chart-assigned-point { fill: #fff; stroke: #386E4B; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: crosshair; }
.chart-empty-label { fill: #93988E; font-size: 11px; font-family: var(--font-sans); }
.dashboard-icon-link { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 7px; background: #F3F6EE; color: #71865D; font-size: 13px; }
.status-summary-list { display: grid; gap: 13px; }
.status-summary-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: #74796F; font-size: 9px; }
.status-summary-label strong { color: #373C32; font-size: 10px; }
.status-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #F0F2EE; }
.status-progress span { display: block; width: var(--status-value); height: 100%; border-radius: inherit; background: var(--status-color); }
.status-summary-item > small { display: block; margin-top: 4px; color: #A0A49B; font-size: 8px; }

.dashboard-operations-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: stretch; }
.dashboard-operations-grid > * { min-width: 0; }
.dashboard-quick-actions-section { min-width: 0; }
.dashboard-quick-actions-section > .dashboard-quick-card { width: 100%; }
.department-bars { display: grid; gap: 3px; }
.department-bar-row { display: grid; min-width: 0; grid-template-columns: 34px minmax(0,1fr) 50px; align-items: center; gap: 11px; padding: 7px 4px; border-radius: 8px; color: #33382E; text-decoration: none; }
.department-bar-row:hover { background: #FAFBF8; color: #33382E; text-decoration: none; }
.department-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: #F0F5E9; color: #79934F; }
.department-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.department-bar-copy { display: grid; min-width: 0; gap: 7px; }
.department-bar-copy > strong, .department-bar-row .department-bar-copy > strong { min-width: 0; color: #4B5046; font-size: 10px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.department-track { display: block; height: 6px; overflow: hidden; border-radius: 99px; background: #EFF2EA; }
.department-track i { display: block; width: var(--department-value); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#9ACD56,#6EA73B); }
.department-icon--software { background: #F1EDF8; color: #806AA5; }
.department-track--software i { background: linear-gradient(90deg,#B7A7D7,#806AA5); }
.department-asset-count { display: grid; justify-items: end; gap: 0; }
.department-asset-count strong { color: #353B30; font-size: 13px; font-weight: 700; }
.department-asset-count small { color: #9A9E95; font-size: 8px; }
.dashboard-empty-note { margin: 7px 0; color: #93988E; font-size: 10px; }
.dashboard-quick-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.dashboard-action-card { position: relative; display: grid; min-height: 82px; align-content: space-between; gap: 7px; padding: 10px; border: 1px solid transparent; border-radius: 9px; color: #43483E; font-size: 9px; font-weight: 600; line-height: 1.2; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-action-card:hover { transform: translateY(-2px); border-color: rgba(75,90,55,.12); box-shadow: 0 6px 14px rgba(34,40,26,.09); color: #31362B; text-decoration: none; }
.action-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: rgba(255,255,255,.75); color: #64863F; }
.action-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.action-arrow { position: absolute; top: 10px; right: 8px; width: 13px; height: 13px; fill: none; stroke: #899081; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .68; }
.dashboard-action-card--green { background: #EEF6E5; }.dashboard-action-card--violet { background: #F2EFF9; }.dashboard-action-card--blue { background: #EDF3F8; }.dashboard-action-card--orange { background: #FBF1E7; }.dashboard-action-card--purple { background: #F3EEF8; }.dashboard-action-card--rose { background: #F9EEF0; }.dashboard-action-card--teal { background: #EAF4F1; }.dashboard-action-card--slate { background: #F0F2F2; }
.dashboard-action-card--violet .action-icon, .dashboard-action-card--purple .action-icon { color: #7965A1; }.dashboard-action-card--blue .action-icon { color: #54799A; }.dashboard-action-card--orange .action-icon { color: #AD7840; }.dashboard-action-card--rose .action-icon { color: #A95D65; }.dashboard-action-card--teal .action-icon { color: #4C8577; }

.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.95fr); gap: 14px; align-items: stretch; }
.activity-timeline { position: relative; display: grid; gap: 0; margin: 2px 0 0; padding: 0; list-style: none; }
.activity-timeline::before { position: absolute; top: 17px; bottom: 17px; left: 15px; width: 1px; background: #DDE8D2; content: ""; }
.activity-item { position: relative; display: grid; min-width: 0; grid-template-columns: 31px minmax(0,1fr) 7px; align-items: start; gap: 10px; padding: 8px 2px; }
.activity-marker { position: relative; z-index: 1; display: grid; width: 29px; height: 29px; place-items: center; border: 3px solid white; border-radius: 50%; background: #EDF5E5; color: #72984B; box-shadow: 0 0 0 1px #E3EBDC; }
.activity-marker svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.activity-copy { min-width: 0; padding-top: 1px; }
.activity-copy > a { color: #40453B; text-decoration: none; }
.activity-copy > a:hover { color: #56753B; }
.activity-copy strong { font-size: 10px; font-weight: 650; }
.activity-copy p { overflow: hidden; margin: 2px 0 3px; color: #70766B; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy small { color: #A0A49B; font-size: 8px; }
.activity-kind-dot { width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: #A5C87C; }
.activity-item--software .activity-marker { background: #F1EDF8; color: #806AA5; box-shadow: 0 0 0 1px #E6DFF0; }
.activity-item--return .activity-marker { background: #EDF4F3; color: #568B79; box-shadow: 0 0 0 1px #DDEBE7; }
.dashboard-empty-state { display: grid; justify-items: center; padding: 28px 10px; color: #8E9489; text-align: center; }
.empty-state-icon { display: grid; width: 38px; height: 38px; margin-bottom: 8px; place-items: center; border-radius: 11px; background: #F0F4EB; color: #7D9563; }
.empty-state-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-empty-state strong { color: #52584D; font-size: 11px; }
.dashboard-empty-state p { margin: 3px 0 0; font-size: 9px; }
.recent-stock-list { display: grid; }
.stock-change-row { display: grid; min-width: 0; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #F0F1ED; color: #464B41; text-decoration: none; }
.stock-change-row:last-child { border-bottom: 0; }
.stock-change-row:hover { color: #526E36; text-decoration: none; }
.stock-change-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: #EDF5E7; color: #6D9D48; }
.stock-change-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.stock-change-icon--out { background: #FBF1E8; color: #C17E4B; }
.stock-change-icon--other { background: #F0F2EE; color: #777E72; }
.stock-change-copy { display: grid; min-width: 0; gap: 3px; }
.stock-change-copy strong { overflow: hidden; color: #454A40; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.stock-change-copy small { overflow: hidden; color: #969B91; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stock-change-quantity { color: #5D8540; font-size: 10px; font-weight: 700; }

@media (max-width: 1280px) {
  .dashboard-analytics-grid { grid-template-columns: minmax(230px,1fr) minmax(380px,1.6fr); }
  .dashboard-status-card { grid-column: 1 / -1; }
  .status-summary-list { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 14px; }
  .dashboard-operations-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-kpi { grid-template-columns: 1fr 90px; }
  .dashboard-sparkline { width: 90px; }
}
@media (max-width: 900px) {
  .dashboard-v2 { gap: 16px; }
  .dashboard-hero { min-height: 155px; padding: 22px 24px; }
  .dashboard-hero-art { width: 36%; opacity: .65; }
  .dashboard-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-analytics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-trend-card, .dashboard-status-card { grid-column: 1 / -1; }
  .dashboard-operations-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-bottom-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .dashboard-v2 { gap: 13px; }
  .dashboard-hero { min-height: 150px; padding: 20px 18px; }
  .dashboard-hero h1 { max-width: 90%; font-size: 25px; }
  .dashboard-hero-art { right: -15%; width: 54%; opacity: .34; }
  .dashboard-kpis { gap: 9px; }
  .dashboard-kpi { min-height: 165px; grid-template-columns: 1fr 70px; padding: 13px; }
  .dashboard-kpi-value { font-size: 26px; }
  .dashboard-sparkline { right: 8px; width: 70px; }
  .dashboard-analytics-grid, .dashboard-bottom-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-trend-card, .dashboard-status-card { grid-column: auto; }
  .dashboard-analytic-card { padding: 16px; }
  .dashboard-line-chart text { font-size: 18px; }
  .dashboard-line-chart .chart-added-point, .dashboard-line-chart .chart-assigned-point { r: 6px; }
  .distribution-body { grid-template-columns: minmax(130px,.9fr) minmax(125px,1fr); }
  .dashboard-donut { max-width: 180px; }
  .status-summary-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-quick-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .dashboard-action-card { min-height: 74px; padding: 8px; font-size: 8px; }
}
@media (max-width: 390px) {
  .dashboard-hero { padding: 18px 15px; }
  .dashboard-hero-art { opacity: .22; }
  .dashboard-kpi { min-height: 158px; grid-template-columns: 1fr 56px; padding: 11px; }
  .dashboard-sparkline { width: 58px; }
  .dashboard-kpi-trend { max-width: 110px; font-size: 8px; }
  .dashboard-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-action-card { min-height: 79px; padding: 10px; font-size: 9px; }
  .distribution-body { grid-template-columns: minmax(0,1fr); }
  .donut-legend { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .status-summary-list { grid-template-columns: minmax(0,1fr); }
  .dashboard-trend-heading { align-items: flex-start; flex-direction: column; }
}

/* Application-wide readable type scale */
body { font-size: 15px; line-height: 1.5; }
body :is(a, p, span, li, dt, dd, small, summary, th, td, button, label, input, select, textarea, text) { font-size: max(12px, 1em) !important; }
body h1 { font-size: clamp(28px, 2.35vw, 32px) !important; line-height: 1.2; }
body h2 { font-size: 21px !important; line-height: 1.3; }
body :is(.card, .dashboard-analytic-card, .section-card, .modal, dialog) h2 { font-size: 19px !important; }
body h3 { font-size: 17px !important; line-height: 1.35; }
body h4 { font-size: 16px !important; line-height: 1.4; }
body :is(p, li, dd, dt) { line-height: 1.5; }
body label { font-size: 14px !important; line-height: 1.4; }
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { font-size: 15px !important; }
body :is(.btn, button.btn, input[type="submit"], input[type="button"], .menu-button, .nav-logout button) { font-size: 14px !important; }
body table { font-size: 14px !important; }
body table :is(th, td) { min-height: 46px; padding-top: 12px; padding-bottom: 12px; font-size: 14px !important; line-height: 1.45; }
body small { font-size: max(12px, 1em) !important; line-height: 1.4; }
body .muted { color: #5E6878; font-size: max(13px, 1em) !important; }
body :is(.eyebrow, .sidebar-label, .dashboard-overline, .auth-eyebrow) { font-size: 12px !important; }
body .sidebar-nav > a, body .sidebar-nav summary { min-height: 44px; padding-block: 7px; font-size: 14px !important; line-height: 1.3; overflow-wrap: anywhere; }
body .sidebar-nav .nav-inventory-links a, body .sidebar-nav .nav-audit-links a { min-height: 38px; font-size: 13px !important; }
body .sidebar-label { font-size: 12px !important; }
body .account-copy strong, body .header-user-copy strong { font-size: 13px !important; }
body .account-copy small, body .header-user-copy small { font-size: 12px !important; }
body .topbar-context { font-size: 14px; }
body .nav-count, body .sidebar-nav .nav-count { font-size: 12px !important; }
body .dashboard-hero h1 { font-size: clamp(27px, 2.2vw, 32px) !important; }
body .dashboard-hero p { font-size: 15px !important; }
body .dashboard-hero-date { font-size: 13px !important; }
body .dashboard-kpi-label { font-size: 14px !important; }
body .dashboard-kpi-value { font-size: clamp(30px, 2.5vw, 36px) !important; }
body .dashboard-kpi-note, body .dashboard-kpi-trend { font-size: 12px !important; }
body .dashboard-action-card, body .dashboard-text-link, body .trend-legend { font-size: 13px !important; }
body .dashboard-empty-state :is(strong, p), body .dashboard-empty-note { font-size: 13px !important; }
body .dashboard-card-heading h2 { font-size: 19px !important; }
body .dashboard-card-heading p { font-size: 13px !important; }
body .dashboard-card-heading .dashboard-overline { font-size: 12px !important; }
body .chart-axis-label, body .chart-month-label, body .chart-empty-label, body .donut-caption { font-size: 12px !important; }
body .donut-legend li, body .status-summary-label, body .department-bar-copy strong { font-size: 14px !important; }
body .legend-value, body .department-asset-count, body .activity-copy p { font-size: 13px !important; }
body .activity-copy small, body .stock-change-copy small { font-size: 12px !important; }

/* Login uses the shared Inventory Manager theme tokens and controls. */
.auth-login-page { display: block; min-height: 100vh; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.08fr) minmax(440px, .92fr); }
.auth-brand-panel { position: relative; display: flex; min-width: 0; min-height: 100vh; flex-direction: column; overflow: hidden; padding: clamp(34px, 5vw, 68px) clamp(34px, 6vw, 92px) 26px; background: radial-gradient(ellipse at 82% 15%, rgba(199,243,107,.13), transparent 34%), radial-gradient(ellipse at 12% 90%, rgba(199,243,107,.07), transparent 35%), linear-gradient(145deg, #10110D 0%, #171A12 62%, #20251A 100%); color: #F8FAF5; }
.auth-brand-panel::before, .auth-brand-panel::after { position: absolute; content: ""; pointer-events: none; border: 1px solid rgba(199,243,107,.12); border-radius: 50%; }
.auth-brand-panel::before { top: -190px; right: -170px; width: 520px; height: 520px; }
.auth-brand-panel::after { right: 7%; bottom: -280px; width: 620px; height: 620px; }
.auth-brand-lockup, .auth-mobile-brand { position: relative; z-index: 2; display: inline-flex; width: fit-content; align-items: center; gap: 12px; color: #F8FAF5; font-size: 17px; font-weight: 650; letter-spacing: -.2px; text-decoration: none; }
.auth-brand-lockup:hover, .auth-mobile-brand:hover { color: inherit; text-decoration: none; }
.auth-brand-lockup strong { color: var(--accent); font-weight: 650; }
.auth-brand-mark { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 1px solid rgba(199,243,107,.44); border-radius: var(--control-radius); background: rgba(199,243,107,.1); box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 20px rgba(0,0,0,.15); }
.auth-brand-mark svg { width: 27px; height: 27px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-brand-copy { position: relative; z-index: 2; max-width: 560px; margin-top: clamp(46px, 8vh, 92px); }
.auth-brand-copy .auth-eyebrow { display: block; margin-bottom: 17px; color: var(--accent); font-size: 12px !important; font-weight: 750; letter-spacing: 1.6px; }
.auth-brand-copy h1 { margin: 0 0 18px; color: #F8FAF5; font-size: clamp(36px, 4.2vw, 56px) !important; font-weight: 700; letter-spacing: -1.8px; line-height: 1.08; }
.auth-brand-copy h1 span { color: var(--accent); }
.auth-brand-copy p { max-width: 430px; margin: 0; color: #C3C9BA; font-size: 17px; line-height: 1.65; }
.auth-illustration { position: relative; z-index: 1; display: flex; min-height: 280px; flex: 1; align-items: center; justify-content: center; margin: 18px -15px 0; }
.auth-asset-illustration { position: relative; z-index: 1; width: min(100%, 590px); max-height: 390px; overflow: visible; }
.auth-illustration-orbit { position: absolute; display: block; border: 1px solid rgba(199,243,107,.14); border-radius: 50%; }
.auth-illustration-orbit--one { top: 13%; left: 11%; width: 68px; height: 68px; }
.auth-illustration-orbit--two { right: 9%; bottom: 12%; width: 34px; height: 34px; background: rgba(199,243,107,.07); }
.auth-brand-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 9px; margin-top: 12px; color: #C3C9BA; font-size: 13px; }
.auth-foot-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(199,243,107,.13); }
.auth-main { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; align-items: center; justify-content: center; padding: clamp(28px, 5vw, 70px); background: var(--bg); }
.auth-card { width: min(100%, 464px); padding: clamp(27px, 4vw, 42px); border: 1px solid var(--line); border-radius: var(--card-radius); background: var(--panel); box-shadow: var(--shadow); }
.auth-mobile-brand { display: none; }
.auth-card-heading { margin-bottom: 28px; }
.auth-card-heading .auth-eyebrow { display: block; margin-bottom: 9px; color: var(--muted-strong); font-size: 12px !important; font-weight: 750; letter-spacing: 1.35px; }
.auth-card-heading h2 { margin: 0 0 7px; color: var(--navy); font-size: 30px !important; font-weight: 700; letter-spacing: -.8px; line-height: 1.2; }
.auth-card-heading p { margin: 0; color: var(--muted); font-size: 15px; }
.auth-feedback { margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--danger-border); border-radius: var(--control-radius); background: var(--danger-bg); color: var(--danger-text); font-size: 14px; line-height: 1.45; }
.auth-feedback--notice { border-color: var(--accent-border-alpha); background: var(--accent-tint); color: var(--text-strong); }
.auth-form { display: grid; gap: 20px; }
.auth-field { display: grid; min-width: 0; gap: 8px; }
.auth-field label { margin: 0; color: var(--text-strong); font-size: 14px !important; font-weight: 600; }
.auth-input-wrap { position: relative; display: flex; min-width: 0; align-items: center; }
.auth-input-wrap > svg { position: absolute; z-index: 1; left: 15px; width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.auth-input-wrap input { width: 100%; height: 52px !important; min-height: 52px !important; padding: 0 47px; border: 1px solid var(--line-strong); border-radius: var(--control-radius); background: var(--panel); color: var(--text); font-size: 15px !important; box-shadow: none; }
.auth-input-wrap input::placeholder { color: var(--muted); opacity: .82; }
.auth-input-wrap input:hover { border-color: var(--muted); }
.auth-input-wrap input:focus { border-color: var(--accent-border-alpha); outline: none; box-shadow: 0 0 0 3px var(--accent-focus); }
.auth-password-wrap input { padding-right: 51px; }
.auth-password-toggle { position: absolute; right: 8px; display: grid; width: 36px; height: 36px; min-height: 36px; place-items: center; padding: 0; border: 0; border-radius: var(--control-radius); background: transparent; color: var(--muted-strong); cursor: pointer; }
.auth-password-toggle:hover, .auth-password-toggle:focus-visible { background: var(--accent-tint); color: var(--text); }
.auth-password-toggle:focus-visible { outline: 2px solid var(--accent-border-alpha); outline-offset: 1px; }
.auth-password-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-submit { display: flex !important; width: 100%; min-height: 52px !important; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; padding: 0 18px; border: 1px solid var(--accent) !important; border-radius: var(--control-radius) !important; background: var(--accent) !important; color: var(--button-text) !important; box-shadow: 0 4px 12px rgba(16,17,13,.09) !important; font-size: 16px !important; font-weight: 650; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
.auth-submit:hover { transform: translateY(-1px); border-color: var(--accent-hover) !important; background: var(--accent-hover) !important; color: var(--button-text) !important; box-shadow: 0 7px 16px rgba(16,17,13,.13) !important; }
.auth-submit:focus-visible { outline: 3px solid var(--accent-border-alpha); outline-offset: 3px; }
.auth-submit:disabled { cursor: wait; opacity: .72; }
.auth-submit > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-submit-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(32,34,29,.25); border-top-color: currentColor; border-radius: 50%; animation: auth-spin .7s linear infinite; }
.auth-submit[aria-busy="true"] .auth-submit-spinner { display: block; }
.auth-submit[aria-busy="true"] > svg { display: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-card-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 25px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.auth-card-foot svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: var(--success); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-copyright { margin: 22px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-copyright span { margin: 0 5px; color: var(--muted); }
@media (max-width: 1050px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(400px, .95fr); }
  .auth-brand-panel { padding-inline: clamp(28px, 4vw, 52px); }
  .auth-brand-copy h1 { font-size: clamp(34px, 4.4vw, 48px) !important; }
  .auth-illustration { min-height: 230px; }
}
@media (max-width: 760px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
  .auth-brand-panel { min-height: auto; padding: 24px clamp(20px, 6vw, 42px) 20px; }
  .auth-brand-lockup { font-size: 15px; }
  .auth-brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .auth-brand-copy { margin-top: 23px; }
  .auth-brand-copy .auth-eyebrow { margin-bottom: 8px; }
  .auth-brand-copy h1 { margin-bottom: 8px; font-size: clamp(27px, 7vw, 36px) !important; letter-spacing: -.8px; }
  .auth-brand-copy p { max-width: 560px; font-size: 14px; line-height: 1.5; }
  .auth-illustration, .auth-brand-foot { display: none; }
  .auth-main { min-height: auto; padding: 24px 20px 20px; }
  .auth-card { width: min(100%, 500px); padding: clamp(24px, 6vw, 34px); }
  .auth-mobile-brand { display: inline-flex; margin-bottom: 24px; color: var(--text); }
  .auth-mobile-brand strong { color: var(--text); font-weight: 700; }
  .auth-mobile-brand .auth-brand-mark { width: 36px; height: 36px; flex-basis: 36px; border-color: var(--accent-border-alpha); background: var(--accent-tint); box-shadow: none; }
  .auth-mobile-brand .auth-brand-mark svg { width: 24px; height: 24px; stroke: #5D7735; }
}
@media (max-width: 420px) {
  .auth-brand-panel { padding: 20px 18px 18px; }
  .auth-main { padding: 16px 12px 20px; }
  .auth-card { padding: 23px 18px; border-radius: 14px; }
  .auth-card-heading { margin-bottom: 22px; }
  .auth-card-heading h2 { font-size: 27px !important; }
  .auth-form { gap: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-submit-spinner { animation-duration: 1.5s; }
  .auth-submit { transition: none; }
}

/* Shared typography hierarchy: strong titles, clear section labels, quiet support text. */
body :is(h1, .page-head h1, .hardware-page-heading h1, .users-list-page-head h1, .users-edit-page-head h1, .users-create-page-head h1, .dashboard-hero h1) { font-weight: var(--weight-bold) !important; }
body :is(h2, .page-section-heading, .section-heading h2, .dashboard-section-heading h2, .dashboard-card-heading h2, .category-detail-heading h2, .history-section-heading h2) { color: var(--navy); font-weight: 650 !important; }
body :is(h3, h4, .card-heading, .employee-software-group h3, .software-details-section h3) { color: var(--navy); font-weight: 650 !important; }
body :is(label, legend, .filter-label, .field-label, .hardware-filter-form label, .employee-software-filter-grid label) { color: var(--text-strong); font-weight: var(--weight-semibold) !important; }
body table th, body .table-scroll table th, body .permission-table-scroll table th { color: var(--muted-strong); font-weight: 700 !important; }
body table td { font-weight: var(--weight-regular); font-variant-numeric: tabular-nums; }
body .sidebar-nav > a, body .sidebar-nav > details > summary { font-weight: 550 !important; }
body .sidebar-nav > a.active, body .sidebar-nav > details > summary.active { color: #20221D; font-weight: 650 !important; }
body .sidebar-nav .nav-inventory-links a, body .sidebar-nav .nav-audit-links a { font-weight: 500 !important; }
body .sidebar-nav .nav-inventory-links a.active, body .sidebar-nav .nav-audit-links a.active { color: var(--accent); font-weight: 650 !important; }
body :is(.btn, button:not(.icon-button):not(.auth-password-toggle), input[type="submit"], input[type="button"], .menu-button, .nav-logout button, .order-action-button) { font-weight: var(--weight-semibold) !important; }
body .topbar-context, body :is(.breadcrumb, .breadcrumbs, .breadcrumb a, .breadcrumbs a) { font-weight: var(--weight-medium) !important; }
body :is(.stat strong, .metric-card strong, .dashboard-kpi-value, .dashboard-stat-link > strong, .dashboard-metric-tile > strong, .hardware-summary-card strong, .employee-hardware-metric strong) { font-weight: var(--weight-bold) !important; font-variant-numeric: tabular-nums; }
body :is(.stat strong, .metric-card strong, .dashboard-kpi-value, .dashboard-stat-link > strong, .dashboard-metric-tile > strong, .hardware-summary-card strong, .employee-hardware-metric strong, .history-page .history-value-amount, .category-inventory-values .category-active-value, .category-inventory-values .category-total-value) { color: var(--success-text); }
body :is(.badge, .status-badge, .assignment-status-pill, .history-action-pill, .order-status, .state-pill, .count-chip) { font-weight: var(--weight-semibold) !important; }
body :is(.activity-copy strong, .stock-change-copy strong, .department-bar-copy strong, .status-summary-label strong, .legend-value, .profile-summary strong, .account-copy strong, .header-user-copy strong) { font-weight: var(--weight-semibold) !important; }
body :is(.dashboard-card-heading p, .auth-card-heading p, .page-head p, .muted, .helper-text, .field-help) { color: var(--muted-strong); font-weight: var(--weight-regular); }
body .auth-submit { font-weight: var(--weight-semibold) !important; }
body .history-page .history-table :is(td:nth-child(5), td:nth-child(6)) { font-weight: var(--weight-semibold); }
body .history-page .history-section-heading h2 { font-size: clamp(18px, 2vw, 22px); }

/* Dashboard welcome banner quick-create menu */
.dashboard-quick-create { position: absolute; z-index: 5; top: 19px; right: 22px; }
.dashboard-quick-create-trigger { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid rgba(73,103,42,.2); border-radius: 12px; background: #C7F36B; color: #202719; box-shadow: 0 5px 14px rgba(59,82,32,.16); cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.dashboard-quick-create-trigger:hover, .dashboard-quick-create-trigger[aria-expanded="true"] { transform: translateY(-1px); background: #B8E957; box-shadow: 0 7px 17px rgba(59,82,32,.23); }
.dashboard-quick-create-trigger:focus-visible { outline: 3px solid rgba(63,97,37,.42); outline-offset: 3px; }
.dashboard-quick-create-trigger svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dashboard-quick-create-menu { position: fixed; z-index: 600; top: 10px; right: 10px; display: grid; width: min(238px, calc(100vw - 36px)); gap: 3px; padding: 7px; border: 1px solid #E5E9DF; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(25,35,17,.18); }
.dashboard-quick-create-menu[hidden] { display: none; }
.dashboard-quick-create-menu a { display: grid; min-height: 42px; grid-template-columns: 30px minmax(0,1fr) 16px; align-items: center; gap: 9px; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; color: #343A2F; font-size: 12px; font-weight: 600; text-decoration: none; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.dashboard-quick-create-menu a:hover, .dashboard-quick-create-menu a:focus-visible { border-color: #E3EBD8; outline: none; background: #F4F8EE; color: #26331C; }
.quick-create-item-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: #EEF6E5; color: #608A36; }
.quick-create-item-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.quick-create-item-arrow { width: 14px; height: 14px; fill: none; stroke: #8B9382; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  .dashboard-quick-create { top: 14px; right: 14px; }
  .dashboard-quick-create-trigger { width: 37px; height: 37px; border-radius: 11px; }
  .dashboard-hero h1 { max-width: calc(100% - 42px); }
}

/* Keep wrapped sidebar labels in their own scrollable flex rows. */
.app-sidebar { min-height: 0; }
.app-sidebar > .brand, .app-sidebar > .sidebar-label, .app-sidebar > .sidebar-account { flex: 0 0 auto; }
.sidebar-nav { min-height: 0; flex: 1 1 auto; flex-direction: column; gap: 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.sidebar-nav > a, .sidebar-nav > details { min-width: 0; flex: 0 0 auto; }
.sidebar-nav > a { height: auto; min-height: 44px; align-items: flex-start; padding: 10px 11px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.sidebar-nav > a::before { flex: 0 0 18px; align-self: flex-start; margin-top: 2px; }
.sidebar-nav > details > summary { display: flex; height: auto; min-height: 44px; align-items: flex-start; padding: 10px 11px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.sidebar-nav > details > summary::before { flex: 0 0 18px; margin-top: 2px; }
.sidebar-nav > details > summary::after { flex: 0 0 6px; align-self: center; margin-top: 0; }
.sidebar-nav .nav-inventory-links, .sidebar-nav .nav-audit-links { min-width: 0; }
.sidebar-nav .nav-inventory-links a, .sidebar-nav .nav-audit-links a { min-width: 0; min-height: 38px; height: auto; flex: 0 0 auto; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.sidebar-nav > a .nav-count { flex: 0 0 auto; align-self: flex-start; margin: 2px 0 0 auto; }

/* Interactive states for the server-rendered SVG inventory trend chart. */
.trend-legend-toggle { display: inline-flex; min-width: 0; min-height: 30px !important; align-items: center; gap: 7px; padding: 3px 5px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: inherit; font: inherit; font-size: 13px !important; font-weight: 600; line-height: 1.25; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, opacity .15s ease; }
.trend-legend-toggle:hover, .trend-legend-toggle:focus-visible { border-color: #E4EBDD; outline-offset: 1px; background: #F7F9F4; }
.trend-legend-toggle[aria-pressed="false"] { opacity: .48; text-decoration: line-through; text-decoration-thickness: 1px; }
.trend-legend-toggle[aria-pressed="false"] i { background: #A9AEA3; }
.trend-legend-toggle i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.line-chart-wrap { position: relative; }
.chart-series-hidden { display: none !important; }
.chart-crosshair { stroke: #AEBBA0; stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; pointer-events: none; transition: x1 .12s ease, x2 .12s ease; }
.chart-data-point { cursor: crosshair; transition: r .14s ease, stroke-width .14s ease, filter .14s ease; }
.chart-data-point:hover, .chart-data-point:focus, .chart-data-point.is-active { r: 6px; stroke-width: 2.7; filter: drop-shadow(0 1px 2px rgba(37,57,27,.22)); outline: none; }
.chart-month-label { transition: fill .14s ease, font-weight .14s ease; }
.chart-month-label.is-active { fill: #3F5432; font-weight: 700; }
.dashboard-chart-tooltip { position: absolute; z-index: 4; display: grid; min-width: 164px; gap: 7px; padding: 10px 12px; border: 1px solid #E0E7D9; border-radius: 9px; background: rgba(255,255,255,.98); box-shadow: 0 9px 24px rgba(27,38,20,.14); color: #4B5145; font-size: 12px; line-height: 1.35; pointer-events: none; transition: opacity .12s ease, transform .12s ease; }
.dashboard-chart-tooltip[hidden] { display: none; }
.dashboard-chart-tooltip > strong { margin-bottom: 1px; color: #2E3528; font-size: 13px; font-weight: 700; }
.dashboard-chart-tooltip > span { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 7px; white-space: nowrap; }
.dashboard-chart-tooltip b { color: #32392D; font-size: 12px; font-weight: 700; }
.dashboard-chart-tooltip i { width: 8px; height: 8px; border-radius: 50%; }
.tooltip-added-dot { background: #83B343; }
.tooltip-assigned-dot { background: #386E4B; }
@media (prefers-reduced-motion: reduce) {
  .trend-legend-toggle, .chart-data-point, .chart-month-label, .chart-crosshair, .dashboard-chart-tooltip { transition-duration: .01ms; }
}

/* Shared shell and notice overflow fixes. */
.app-shell, .app-workspace, .app-sidebar, .container { min-width: 0; }
.brand { min-width: 0; flex: 0 1 auto; white-space: normal; }
.brand-name { min-width: 0; flex: 1 1 auto; white-space: normal; line-height: 1.2; overflow-wrap: normal; }
.topbar-leading, .header-actions { min-width: 0; }
.topbar-context { min-width: 0; max-width: 100%; }
.page-head { min-width: 0; flex-wrap: wrap; }
.page-head > :first-child { min-width: 0; flex: 1 1 220px; }
.page-head > .btn, .page-head > a.btn { flex: 0 1 auto; white-space: normal; text-align: center; }
.hardware-page-heading { align-items: flex-start; flex-wrap: wrap; }
.hardware-page-heading h1 { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
.hardware-page-actions { min-width: 0; max-width: 100%; flex: 0 1 auto; }
.hardware-page-actions > .btn, .hardware-page-actions > details > summary { max-width: 100%; white-space: normal; text-align: center; }
.alert, .hardware-attention { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.alert.is-dismissible, .hardware-attention.is-dismissible { position: relative; padding-right: 48px; }
.alert-dismiss {
  position: absolute; top: 50%; right: 9px; display: inline-grid; width: 30px; height: 30px;
  min-height: 30px; place-items: center; transform: translateY(-50%); padding: 0;
  border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit;
  font: 500 22px/1 var(--font-sans); cursor: pointer; opacity: .78;
}
.alert-dismiss:hover { background: rgba(255,255,255,.55); opacity: 1; }
.alert-dismiss:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 1100px) {
  .topbar { gap: 12px; }
  .header-actions { gap: 8px; }
  .global-search { min-width: 0; width: clamp(150px, 24vw, 280px); }
}
@media (max-width: 900px) {
  .app-sidebar { width: min(280px, 84vw); flex-basis: min(280px, 84vw); }
  .topbar { min-width: 0; flex-wrap: wrap; }
  .topbar-leading { flex: 1 1 180px; }
  .header-actions { flex: 0 1 auto; }
  .hardware-page-heading { align-items: flex-start; }
  .hardware-page-actions { flex: 1 1 100%; justify-content: flex-start; }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 24px); }
  .page-head { align-items: flex-start; }
  .page-head > :first-child { flex-basis: 100%; }
  .page-head > .btn, .page-head > a.btn { flex: 1 1 140px; }
  .hardware-page-heading { flex-direction: column; }
  .hardware-page-actions { width: 100%; }
  .alert.is-dismissible, .hardware-attention.is-dismissible { padding-right: 44px; }
}
