/* United Autolion — industrial workshop design system */

@font-face {
  font-family: 'Big Shoulders';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/big-shoulders-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Big Shoulders';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/big-shoulders-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  /* Blue / white / grey system: navy chrome, azure actions, grey text & lines */
  --steel-950: #0d1b2e;
  --steel-900: #12263f;
  --steel-800: #1b3557;
  --steel-700: #2c4a70;
  --steel-500: #5b6b7d;
  --steel-300: #9aa7b4;
  --steel-150: #d6dde4;
  --steel-100: #e6ebf0;
  --steel-050: #f2f5f8;
  --paper: #f8fafc;
  --accent: #1d6fd1;        /* primary action blue */
  --accent-deep: #14549f;
  --accent-wash: #e8f1fc;
  /* Functional status colors (alerts must contrast with the blue/grey chrome) */
  --amber: #e8a13a;
  --amber-deep: #b57713;
  --amber-wash: #fdf4e3;
  --green: #2e8b57;
  --green-wash: #e7f4ec;
  --red: #c0392b;
  --red-wash: #faeae8;
  --blue: #1d6fd1;
  --blue-wash: #e8f1fc;

  --font-display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --radius: 4px;
  --sidebar-w: 232px;
  --hazard: repeating-linear-gradient(-45deg, var(--accent) 0 10px, var(--steel-900) 10px 20px);
  --warn-stripe: repeating-linear-gradient(-45deg, var(--amber) 0 8px, #fff 8px 16px);
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--steel-900);
  background: var(--paper);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--steel-900);
  color: var(--steel-150);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--steel-700);
}
.brand::before {
  content: '';
  display: block;
  height: 6px;
  margin-bottom: 14px;
  background: var(--hazard);
  border-radius: 2px;
}
.brand-logo {
  display: block;
  height: 60px;
  width: auto;
  margin-bottom: 10px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7db4ee;
  margin-top: 5px;
}

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-section {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-500);
  padding: 14px 8px 6px;
}
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--steel-150);
  font-weight: 500;
  font-size: 15.5px;
}
.nav a:hover { background: var(--steel-800); text-decoration: none; }
.nav a.active { background: var(--steel-800); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  padding: 1px 7px;
  border-radius: 9px;
  font-weight: 500;
}

.sidebar-user {
  border-top: 1px solid var(--steel-700);
  padding: 14px 18px;
  font-size: 14.5px;
}
.sidebar-user .who { color: #fff; font-weight: 600; }
.sidebar-user .role {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-300);
}
.sidebar-user form { margin-top: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.main-content { flex: 1; padding: 28px 32px 0; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--steel-700);
}

/* ---------- Cards, stats ---------- */
.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero-card {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 18px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--steel-900), var(--accent-deep));
  color: #fff;
  box-shadow: 0 20px 50px rgba(13, 27, 46, 0.16);
}
.hero-copy h2 {
  color: #fff;
  font-size: 28px;
  margin: 0 0 8px;
}
.eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8fbef0;
}
.hero-text {
  margin: 0 0 16px;
  max-width: 680px;
  color: #dfe9f7;
}
.hero-card .search-shell {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  align-items: center;
}
.hero-card .search-shell input {
  min-width: 280px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.96);
}
.hero-card .search-shell .btn {
  padding: 10px 18px;
  margin-left: 12px;
  margin-top: 1px;
}
.hero-card .search-shell input {
  margin-right: 6px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}
.hero-preview {
  display: grid;
  gap: 10px;
  align-content: start;
}
.filter-search-card {
  border: 1px solid var(--steel-150);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.filter-search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-search-row input {
  flex: 1;
  min-width: 220px;
}
.filter-search-row .btn {
  margin-left: 4px;
  padding: 10px 16px;
}
.filter-search-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.filter-search-logo img {
  height: 48px;
  width: auto;
  display: block;
}
.filter-search-hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--steel-700);
  background: var(--accent-wash);
  border: 1px solid var(--steel-150);
  border-radius: 8px;
  padding: 8px 10px;
}
.filter-search-hint.is-error {
  color: #8a1c1c;
  background: #fdecec;
  border-color: #f3c2c2;
}
.preview-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.preview-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #cfe3f8;
}
.preview-pill strong {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}
.preview-pill .needs-attention {
  color: #ffd56b;
}
.card {
  background: #fff;
  border: 1px solid var(--steel-150);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.card-head a {
  font-size: 13px;
  font-weight: 600;
}
.dashboard-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  align-items: start;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.stat {
  background: #fff;
  border: 1px solid var(--steel-150);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(13, 27, 46, 0.04);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel-500);
}
.stat .value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  margin-top: 4px;
}
.stat.alert { border-color: var(--amber); background: var(--amber-wash); }
.stat.alert .value { color: var(--amber-deep); }

@media (max-width: 900px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .search-shell {
    flex-direction: column;
  }
  .search-shell input {
    min-width: 100%;
  }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--steel-150); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: left;
  color: var(--steel-500);
  background: var(--steel-050);
  padding: 9px 12px;
  border-bottom: 1px solid var(--steel-150);
  white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--steel-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--steel-050); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--steel-500); }
.small { font-size: 13px; }

/* Signature: hazard-striped low-stock rows */
tr.low-stock td:first-child { position: relative; padding-left: 18px; }
tr.low-stock td:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--warn-stripe);
}
tr.low-stock { background: var(--amber-wash); }
tr.low-stock:hover { background: #fbecd2; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-low { background: var(--amber); color: var(--steel-950); }
.badge-ok { background: var(--green-wash); color: var(--green); }
.badge-out { background: var(--red); color: #fff; }
.badge-pending { background: var(--blue-wash); color: var(--blue); }
.badge-approved { background: var(--green-wash); color: var(--green); }
.badge-rejected { background: var(--red-wash); color: var(--red); }
.badge-ordered { background: var(--steel-100); color: var(--steel-700); }
.badge-admin { background: var(--steel-900); color: #9cc4f2; }
.badge-staff { background: var(--steel-100); color: var(--steel-700); }
.badge-inactive { background: var(--red-wash); color: var(--red); }
.badge-receive, .badge-initial { background: var(--green-wash); color: var(--green); }
.badge-issue { background: var(--red-wash); color: var(--red); }
.badge-adjustment { background: var(--blue-wash); color: var(--blue); }

/* ---------- Forms & buttons ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.hint { font-weight: 400; color: var(--steel-500); font-size: 12px; }
input[type='text'], input[type='password'], input[type='number'], input[type='search'],
select, textarea {
  width: 100%;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--steel-300);
  border-radius: var(--radius);
  background: #fff;
  color: var(--steel-900);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
textarea { resize: vertical; min-height: 70px; }
.field { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--steel-900); color: #fff; }
.btn-primary:hover { background: var(--steel-800); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-deep); }
.btn-outline { background: #fff; border-color: var(--steel-300); color: var(--steel-900); }
.btn-outline:hover { background: var(--steel-050); }
.btn-danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-wash); }
.btn-sm { font-size: 13px; padding: 5px 10px; }
.btn-link { background: none; border: none; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.btn-link:hover { text-decoration: underline; }

.inline-form { display: inline; }

/* ---------- Alerts ---------- */
.alert-box { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert-error { background: var(--red-wash); border-color: var(--red); color: var(--red); }
.alert-success { background: var(--green-wash); border-color: var(--green); color: var(--green); }
.alert-info { background: var(--blue-wash); border-color: var(--blue); color: var(--blue); }

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  background: #fff;
  border: 1px solid var(--steel-150);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.filter-bar .field { margin-bottom: 0; }
.filter-bar .grow { flex: 1; min-width: 180px; }

.checkbox-row { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; padding-bottom: 9px; }
.checkbox-row input { width: auto; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 14px; font-size: 14px; flex-wrap: wrap; }
.pagination a, .pagination .current {
  padding: 5px 11px;
  border: 1px solid var(--steel-150);
  border-radius: var(--radius);
  background: #fff;
}
.pagination .current { background: var(--steel-900); color: #fff; border-color: var(--steel-900); }

/* ---------- Detail page ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 20px; }
.detail-grid .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-500);
}
.detail-grid .val { font-weight: 500; }
.qty-hero {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--steel-050);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.qty-hero .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 52px;
  line-height: 1;
}
.qty-hero.warn { background: var(--amber-wash); border-left: 6px solid var(--amber); }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--steel-900);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 6px;
  padding: 34px 32px 30px;
  width: 100%;
  max-width: 380px;
}
.login-card::before {
  content: '';
  display: block;
  height: 8px;
  background: var(--hazard);
  border-radius: 3px;
  margin-bottom: 22px;
}
.login-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}
.login-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 6px 0 22px;
}

/* ---------- Mobile ---------- */
.menu-toggle { display: none; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .nav { display: none; padding-bottom: 16px; }
  .nav.open { display: block; }
  .sidebar-user { display: none; }
  .sidebar-user.open { display: block; }
  .menu-toggle {
    display: block;
    position: absolute;
    top: 24px;
    right: 16px;
    background: var(--steel-800);
    border: 1px solid var(--steel-700);
    color: #fff;
    font: inherit;
    font-size: 13px;
    padding: 7px 12px;
    border-radius: var(--radius);
    cursor: pointer;
  }
  .brand { position: relative; }
  .main { padding: 20px 16px 50px; }
  h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12px;
  }
  .shell, .main, .page-head, .table-wrap, .card {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
  }
  .sidebar, .filter-bar, .form-actions, .btn, .pagination, .page-actions, .nav, .sidebar-user {
    display: none !important;
  }
  .main {
    padding: 0 !important;
    margin: 0 !important;
  }
  .page-head {
    display: block !important;
    margin-bottom: 12px;
    padding: 0 0 8px;
    border-bottom: 1px solid #ccc;
  }
  .page-head h1 {
    font-size: 22px !important;
    color: #000 !important;
  }
  .table-wrap {
    overflow: visible !important;
    page-break-inside: auto;
  }
  table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 11px;
  }
  th, td {
    border: 1px solid #aaa !important;
    padding: 6px 8px !important;
    color: #000 !important;
    background: #fff !important;
  }
  tr {
    page-break-inside: avoid;
  }
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
}

/* Appended: role badges for the three-role model */
.badge-manager { background: var(--blue-wash); color: var(--blue); }
.badge-technician { background: var(--steel-100); color: var(--steel-700); }

/* Appended: sidebar global search */
.nav-search { padding: 4px 8px 2px; }
.nav-search input {
  width: 100%;
  background: var(--steel-800);
  border: 1px solid var(--steel-700);
  color: #fff;
  padding: 7px 10px;
  border-radius: var(--radius);
  font-size: 14px;
}
.nav-search input::placeholder { color: var(--steel-300); }
.nav-search input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
@media (max-width: 860px) {
  .nav-search { padding-top: 10px; }
}

/* Purchase order statuses */
.badge-draft { background: var(--steel-100); color: var(--steel-700); }
.badge-sent { background: var(--blue-wash); color: var(--blue); }
.badge-partially_received { background: var(--amber-wash); color: var(--amber-deep); }
.badge-received { background: var(--green-wash); color: var(--green); }
.badge-cancelled { background: var(--red-wash); color: var(--red); }

/* Notification bell in the sidebar */
.notif-bell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-bell .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.notif-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--steel-150);
  margin-bottom: 8px;
  background: #fff;
}
.notif-item.unread { background: var(--accent-wash); border-color: #b9d6f5; }
.notif-item .notif-title { font-weight: 600; margin-bottom: 2px; }
.notif-item .notif-meta { color: var(--steel-500); font-size: 12px; margin-top: 4px; }

/* Line-item rows for purchase order / supplier forms */
.line-items { border: 1px solid var(--steel-150); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.line-item-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 90px 110px auto;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--steel-100);
  align-items: end;
}
.line-item-row:last-child { border-bottom: none; }
.line-item-row .field { margin-bottom: 0; }
.line-item-row .remove-row { padding: 8px 10px; }
@media (max-width: 720px) {
  .line-item-row { grid-template-columns: 1fr; }
}

/* Analytics KPI tiles + simple bar charts (self-hosted, no chart library) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-tile {
  background: #fff;
  border: 1px solid var(--steel-150);
  border-radius: 10px;
  padding: 16px 18px;
}
.kpi-tile .kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-500);
  margin-bottom: 6px;
}
.kpi-tile .kpi-value { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--steel-900); line-height: 1; }
.kpi-tile .kpi-sub { color: var(--steel-500); font-size: 12px; margin-top: 6px; }

.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: 8px 0; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 4px; }
.bar-chart .bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  transition: opacity 0.15s;
}
.bar-chart .bar.issued { background: var(--red); margin-top: 2px; }
.bar-chart .bar-col:hover .bar { opacity: 0.75; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--steel-500); margin-top: 8px; }
.chart-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }

.category-bar-row { display: grid; grid-template-columns: 160px 1fr 90px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.category-bar-track { background: var(--steel-050); border-radius: 4px; overflow: hidden; height: 18px; }
.category-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; }

/* Printable QR/barcode label */
.label-sheet { max-width: 340px; margin: 24px auto; padding: 20px; border: 2px dashed var(--steel-300); border-radius: 10px; text-align: center; background: #fff; }
.label-sheet .label-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.label-sheet .label-sku { font-family: var(--font-mono); color: var(--steel-500); font-size: 13px; margin-bottom: 12px; }
.label-sheet img { width: 200px; height: 200px; }
.label-sheet .label-code { font-family: var(--font-mono); font-size: 13px; margin-top: 10px; letter-spacing: 0.05em; }
@media print {
  body { background: #fff; }
  .label-sheet { border-style: solid; box-shadow: none; }
}

/* Barcode scan quick-lookup box (dashboard + parts list) */
.scan-box {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.scan-box input { min-width: 200px; }

/* Partner/brand logo strip pinned to the very bottom of the white content
   area (sticky-footer pattern via .main's flex column) — lives inside .main
   so it never extends under the sidebar's blue column, and .main-content's
   flex:1 pushes it to the bottom edge even on short pages. */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 20px 32px 24px;
  border-top: 1px solid var(--steel-150);
}
.app-footer img {
  height: 48px;
  width: auto;
  display: block;
}
@media (max-width: 860px) {
  .app-footer { justify-content: center; }
}
