*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --nav: #20374c;
  --nav-deep: #172b3f;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16b98a;
  --red: #e11d48;
  --amber: #d97706;
  --bg: #f6f8fc;
  --card: #ffffff;
  --line: #e7ebf3;
  --line-dark: #d7deea;
  --text: #182334;
  --muted: #7b8798;
  --soft: #f8fafc;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(31, 45, 61, .08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --color-text: var(--text);
  --color-text-muted: var(--muted);
  --color-border: var(--line);
  --color-primary: var(--blue);
  --color-primary-dark: var(--blue-dark);
}

/* Purchase workstation */
:root{--border:var(--line)}
.purchase-entry-card{padding:0;overflow:hidden}.purchase-meta-grid{display:grid;grid-template-columns:1fr 1.35fr 1fr 1.1fr;gap:16px;padding:24px}.purchase-notes{grid-column:span 2}.purchase-section-title{display:flex;align-items:center;justify-content:space-between;padding:18px 24px 10px;border-top:1px solid var(--border)}.purchase-section-title div{display:grid;gap:3px}.purchase-section-title small{color:var(--muted)}.purchase-entry-card .tx-line-head,.purchase-entry-card .line-items{margin-left:24px!important;margin-right:24px!important}.purchase-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:1px;margin-top:22px;background:#dce7f2;border-top:1px solid #dce7f2}.purchase-summary>div{display:grid;gap:6px;padding:17px 20px;background:#f7fafc}.purchase-summary span{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#687991}.purchase-summary strong{font-size:20px;color:#10253d}.purchase-summary .purchase-summary-main{background:#102a43}.purchase-summary-main span,.purchase-summary-main strong{color:#fff}.purchase-entry-card .app-modal-foot{justify-content:space-between;background:#f8fbfe}
@media(max-width:1100px){.purchase-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.purchase-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.purchase-meta-grid{grid-template-columns:1fr;padding:18px}.purchase-notes{grid-column:auto}.purchase-entry-card .tx-line-head{display:none}.purchase-entry-card .line-items{margin:0 18px!important}.purchase-section-title{padding:16px 18px}.purchase-summary{grid-template-columns:1fr 1fr}.purchase-summary-main{grid-column:span 2}.purchase-entry-card .app-modal-foot{align-items:stretch}.purchase-entry-card .app-modal-foot .muted{display:none}}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

body { min-height: 100vh; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--nav), var(--nav-deep));
  color: #e8eef7;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255,255,255,.08);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #284a68;
  color: #9fd0ff;
  font-weight: 800;
  font-size: 11px;
}
.side-brand strong { display:block; font-size: 16px; letter-spacing: .02em; }
.side-brand small { display:block; color:#aab7c7; font-size: 11px; margin-top: 2px; }

.side-user {
  text-align: center;
  padding: 24px 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.side-avatar {
  width: 66px;
  height: 66px;
  margin: 0 auto 10px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #244db5;
  color: #fff;
  border: 6px solid rgba(255,255,255,.08);
  font-weight: 800;
  overflow: hidden;
}
.side-avatar img,
.topbar-user b img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.side-user strong { display:block; font-size: 14px; }
.side-user span { display:block; margin-top: 3px; color:#9fb0c3; font-size: 11px; letter-spacing: .08em; }

.side-nav {
  padding: 14px 14px;
  display: grid;
  gap: 4px;
}
.side-section {
  margin: 18px 10px 8px;
  padding: 0;
  border: 0;
  background: transparent;
  width: calc(100% - 20px);
  text-align: left;
  color: #7f93aa;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 800;
  cursor: pointer;
}
.side-section::after {
  content: "+";
  float: right;
  color: #b8c6d5;
}
.nav-group.is-open > .side-section::after { content: "-"; }
.side-group-body {
  display: none;
  gap: 4px;
}
.nav-group.is-open > .side-group-body {
  display: grid;
}
.side-link,
.side-logout {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #dce6f1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.side-link span,
.side-logout span {
  width: 21px;
  height: 21px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #9ec5ff;
  background: rgba(255,255,255,.08);
}
.ui-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.side-link span .ui-icon,
.side-logout span .ui-icon {
  width: 15px;
  height: 15px;
}
.side-link:hover,
.side-link.is-active {
  background: #fff;
  color: #1b2c3e;
}
.side-link.is-active span,
.side-link:hover span {
  background: #e9f0ff;
  color: var(--blue);
}
.side-logout {
  margin: auto 14px 18px;
  color: #ffd8df;
  border-top: 1px solid rgba(255,255,255,.08);
  border-radius: 0;
  padding-top: 16px;
}

.barcode-label-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.barcode-label {
  min-height: 88px;
  border: 1px solid #111827;
  border-radius: 4px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: #fff;
  color: #111827;
  text-align: center;
}
.barcode-label strong {
  font-size: 12px;
  line-height: 1.25;
}
.barcode-label span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 6px 0;
  border-top: 2px solid #111827;
  border-bottom: 2px solid #111827;
}
.barcode-label em {
  font-style: normal;
  font-weight: 800;
}
.text-danger { color: var(--red) !important; }
.compact-table th,
.compact-table td {
  padding: 8px;
}
.text-center { text-align: center; }

@media print {
  .app-sidebar,
  .app-topbar,
  .page-hero,
  form,
  .side-logout {
    display: none !important;
  }
  .app-shell,
  .app-workspace,
  .page-main,
  .page-container {
    display: block;
    margin: 0;
    padding: 0;
    background: #fff;
  }
  .card {
    box-shadow: none;
    border: 0;
  }
}

.app-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-topbar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .04em;
}
.topbar-title span {
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--blue);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.shift-pill {
  border: 1px solid #dbeafe;
  background: #f8fafc;
  color: #64748b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
}
.shift-pill.is-open {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.topbar-user {
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar-user b {
  width: 34px;
  height: 34px;
  display:grid;
  place-items:center;
  border-radius: 8px;
  background:#eef5ff;
  color:var(--blue);
  border:1px solid #d8e5f7;
  overflow: hidden;
}
.topbar-user span { display:grid; line-height:1.2; }
.topbar-user strong { font-size:13px; }
.topbar-user small { color:var(--muted); font-size:10px; letter-spacing:.08em; }

.page-main { flex: 1; }
.page-container {
  width: min(100%, 1620px);
  margin: 0 auto;
  padding: 30px 30px 44px;
}

.page-hero {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom: 24px;
}
.page-hero h1 {
  margin: 0 0 5px;
  font-size: 24px;
  letter-spacing: -.01em;
}
.page-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .16em;
  margin-bottom: 8px;
}

.card,
.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card {
  padding: 24px;
  margin-bottom: 24px;
}
.card-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.card-subtitle,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.kpi-grid {
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.kpi-card {
  min-height: 88px;
  padding: 20px;
  display:flex;
  align-items:center;
  gap:16px;
}
.kpi-card::before {
  content: attr(data-icon);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display:grid;
  place-items:center;
  background: #eef6ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}
.kpi-card span {
  display:block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.kpi-card strong {
  display:block;
  margin-top:4px;
  font-size: 25px;
  letter-spacing:-.02em;
}

.dashboard-grid {
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.dashboard-wide { grid-column: span 2; }
.mini-stat {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 16px 0;
}
.donut {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: conic-gradient(var(--blue) var(--sold, 3%), #d9e1ef 0);
  position: relative;
}
.donut::after {
  content: "";
  position:absolute;
  inset: 24px;
  border-radius:999px;
  background:#fff;
}
.bar-list { display:grid; gap:14px; }
.bar-row { display:grid; grid-template-columns: 150px 1fr 70px; gap:10px; align-items:center; font-size:12px; }
.bar-track { height: 10px; border-radius:999px; background:#eef2f7; overflow:hidden; }
.bar-fill { height:100%; border-radius:999px; background:#1e3a52; }
.line-chart {
  min-height: 250px;
  display:flex;
  align-items:end;
  gap:18px;
  padding: 20px 10px 4px;
  border-top: 1px solid var(--line);
  background: linear-gradient(#fff, #f8fbff);
}
.line-stick {
  flex:1;
  min-width: 36px;
  display:grid;
  align-items:end;
  gap:7px;
  color:var(--muted);
  font-size:11px;
  text-align:center;
}
.line-stick span {
  display:block;
  min-height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, #2dd4bf, #2563eb);
}
.empty-state {
  min-height: 190px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
}
.empty-state strong { display:block; color:var(--text); margin-bottom:5px; }

.form-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 16px;
}
.form-group { display:grid; gap:6px; }
.form-group label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.input,
.select,
.textarea {
  width:100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: #93b7ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.11);
}
.textarea { min-height: 86px; resize: vertical; }
.lookup-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  min-width: 0;
}
.lookup-field .input {
  min-width: 0;
}
.lookup-field .btn-secondary,
.lookup-field .btn-primary {
  white-space: nowrap;
}
.date-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 180px));
  gap: 12px;
  align-items: end;
}
.toolbar-filter {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, max-content));
  gap: 12px;
  align-items:end;
}
.toolbar-filter .input[type="date"] {
  width: 150px;
}
.toolbar-filter .lookup-field {
  min-width: min(520px, 100%);
}
.toolbar-filter .filter-grow {
  min-width: min(520px, 100%);
}
.form-span-2 { grid-column: span 2; }
.check-row { display:flex; align-items:center; gap:8px; font-size:13px; }

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-dark {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 9px 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  cursor:pointer;
  font-size: 13px;
  font-weight: 800;
}
.btn-primary { background: var(--blue); color:#fff; box-shadow: 0 10px 22px rgba(37,99,235,.22); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background:#f3f6fb; color:#233348; border-color:var(--line); }
.btn-dark { background:#112238; color:#fff; }
.btn-danger { background:#e11d48; color:#fff; }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; }

.table-wrap { overflow-x:auto; }
.table {
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table th,
.table td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align:left;
  vertical-align: middle;
}
.table th {
  color:#97a2b3;
  font-size: 12px;
  font-weight: 850;
  background:#fff;
}
.table tbody tr:hover td { background:#fbfdff; }
.text-right,
.table td.text-right,
.table th.text-right {
  text-align:right !important;
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
}

.badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
}
.badge-pill { background:#e9fbf4; color:#047857; }
.badge-danger { background:#fff1f2; color:#be123c; }
.badge-warning { background:#fff7ed; color:#b45309; }
.badge-blue { background:#eff6ff; color:#1d4ed8; }

.alert {
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.alert-success { border:1px solid #bbf7d0; background:#ecfdf5; color:#166534; }
.alert-danger { border:1px solid #fecdd3; background:#fff1f2; color:#be123c; }
.alert-warning { border:1px solid #fed7aa; background:#fff7ed; color:#9a3412; }

.line-items { display:grid; gap:10px; }
.tx-line-head {
  display:grid;
  gap:10px;
  align-items:center;
  padding: 0 4px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.line-row {
  display:grid;
  grid-template-columns: minmax(220px, 1fr) 80px 120px 120px 36px;
  gap:10px;
  align-items:center;
}
.line-total { text-align:right; font-weight:850; font-variant-numeric: tabular-nums; }
.product-label {
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}
.tx-purchase-head,
.tx-purchase-line { grid-template-columns: minmax(320px, 1.2fr) 110px minmax(170px, .65fr) 140px 34px; }
.tx-po-head,
.tx-po-line { grid-template-columns: minmax(300px, 1.15fr) 100px minmax(190px, .8fr) 150px 140px 34px; }
.tx-adjust-head,
.tx-adjust-line { grid-template-columns: minmax(360px, 1.1fr) 140px minmax(220px, .8fr) 34px; }
.tx-transfer-head,
.tx-transfer-line { grid-template-columns: minmax(360px, 1.2fr) 120px minmax(200px, .8fr) 34px; }
.mini-action {
  width:36px;
  height:36px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  cursor:pointer;
}
.total-panel {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border-radius:8px;
  background:#10243a;
  color:#fff;
  padding:18px;
  margin-top:16px;
}
.total-panel span { color:#9fb2c8; font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.total-panel strong { font-size: 30px; letter-spacing: .02em; }

.pos-layout {
  display:grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.pos-panel,
.pos-summary { margin-bottom:0; }
.barcode-row {
  display:grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap:12px;
  margin-bottom: 16px;
}
.pos-line {
  grid-template-columns: minmax(230px, 1fr) 76px 112px 88px 104px 34px;
}
.line-stock { color:var(--muted); font-size:12px; }
.pos-submit { width:100%; margin-top: 12px; }
.pos-total { margin: 18px 0 12px; }
.pos-footer-bar {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  margin-top: 18px;
  border-radius: 8px;
  background: #10243a;
  color: #fff;
  padding: 16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .18);
}
.pos-footer-bar > div { display:grid; gap:4px; }
.pos-footer-bar .muted {
  color:#9fb2c8;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:800;
}
.pos-footer-bar strong {
  color:#fff;
  font-size: 24px;
  line-height:1.1;
}
.pos-browse-modal { width:min(1080px, 96vw); }

.modal-backdrop {
  display:none;
  position:fixed;
  inset:0;
  z-index:900;
  background: rgba(15,23,42,.48);
  backdrop-filter: blur(5px);
}
.app-modal {
  display:none;
  position:fixed;
  inset:0;
  z-index:901;
  place-items:center;
  padding:20px;
}
.app-modal.is-open { display:grid; }
.app-modal-box {
  width:min(760px, 96vw);
  max-height: calc(100vh - 40px);
  overflow:auto;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow: 0 28px 90px rgba(15,23,42,.32);
  padding:22px;
}
.app-modal-head,
.app-modal-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.app-modal-head { margin-bottom: 14px; }
.app-modal-foot { justify-content:flex-end; margin-top: 18px; }

.product-modal-box {
  width: min(1180px, calc(100vw - 28px));
  padding: 24px;
}
.product-modal-body {
  display: grid;
  gap: 16px;
}
.product-fieldset {
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  background: #f9fbff;
  padding: 16px;
}
.product-fieldset.is-stock { background: #f8fffb; border-color: #cfeedd; }
.product-fieldset.is-uom { background: #fffaf4; border-color: #f2dfc4; }
.product-fieldset.is-supplier { background: #fbf8ff; border-color: #e3d8f4; }
.product-fieldset.is-marketplace { background: #f7fbff; border-color: #d8e7fb; }
.product-fieldset-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.product-fieldset-head strong {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-fieldset-head small {
  color: var(--muted);
  font-size: 12px;
}
.product-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}
.product-form-grid .form-span-2 { grid-column: span 2; }
.product-check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 14px;
}
.product-uom-list,
.product-supplier-list {
  display: grid;
  gap: 10px;
}
.product-uom-row,
.product-supplier-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.78);
  padding: 12px;
}
.product-uom-grid {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(130px, .75fr) minmax(280px, 1.6fr) 36px;
  gap: 10px;
  align-items: end;
}
.product-uom-grid.is-values {
  grid-template-columns: repeat(4, minmax(160px, 1fr)) minmax(76px, .45fr) minmax(76px, .45fr) 36px;
  margin-top: 10px;
}
.product-supplier-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(190px, 1fr) minmax(150px, .75fr) minmax(130px, .6fr) minmax(150px, .7fr) minmax(86px, .4fr) 36px;
  gap: 10px;
  align-items: end;
}
.mini-field {
  display: grid;
  gap: 5px;
}
.mini-field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-uom-row .input,
.product-supplier-row .input,
.product-supplier-row .select {
  min-height: 38px;
}

@media (max-width: 980px) {
  .product-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-uom-grid,
  .product-uom-grid.is-values,
  .product-supplier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .product-modal-box { width: calc(100vw - 16px); padding: 16px; }
  .product-form-grid { grid-template-columns: 1fr; }
  .product-form-grid .form-span-2 { grid-column: auto; }
  .product-check-grid { grid-template-columns: 1fr; }
  .product-uom-grid,
  .product-uom-grid.is-values,
  .product-supplier-grid { grid-template-columns: 1fr; }
}

.confirm-modal-box {
  width:min(520px, 94vw);
}
.confirm-icon {
  width:48px;
  height:48px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#eff6ff;
  color:var(--blue);
  font-weight:900;
  margin-bottom:12px;
}
.confirm-title {
  margin:0 0 6px;
  font-size:20px;
  letter-spacing:-.01em;
}
.confirm-message {
  margin:0;
  color:var(--muted);
  line-height:1.55;
  font-size:14px;
}
.confirm-summary {
  margin-top:14px;
  border:1px solid var(--line);
  background:#f8fafc;
  border-radius:8px;
  padding:12px;
  color:#334155;
  font-size:13px;
  line-height:1.5;
}

.report-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 11px;
}
.report-card {
  min-height: 104px;
  padding: 14px 15px;
  border:1px solid #d9e5f6;
  border-radius:8px;
  background: linear-gradient(135deg, #f9fcff 0%, #eef5ff 100%);
  text-decoration:none;
  display:grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 12px;
  align-content:center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 18px rgba(15,23,42,.04);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.report-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #2563eb, #2dd4bf);
  opacity: .82;
}
.report-card:hover {
  transform: translateY(-1px);
  border-color:#9dbcf7;
  background: linear-gradient(135deg, #ffffff 0%, #e8f1ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 14px 28px rgba(37,99,235,.13);
}
.report-card span {
  width:36px;
  height:36px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color:var(--blue);
  font-size:12px;
  font-weight:900;
  grid-row: 1 / span 2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.report-card span .ui-icon {
  width: 20px;
  height: 20px;
}
.report-card strong {
  color: #0f2238;
  font-size:14px;
  line-height:1.25;
  align-self:end;
}
.report-card small {
  color:var(--muted);
  line-height:1.35;
  font-size:12px;
  align-self:start;
}

.pagination {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin-top:16px;
  flex-wrap:wrap;
}
.page-link {
  min-width:36px;
  height:36px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:8px;
  text-decoration:none;
  font-weight:800;
  background:#fff;
}
.page-link.is-active { background:var(--blue); color:#fff; border-color:var(--blue); }
.page-meta { color:var(--muted); font-size:12px; margin-left:6px; }

.shift-card {
  width:min(440px, 100%);
  margin: 56px auto;
  text-align:center;
}
.shift-summary {
  margin: 20px 0;
  display:grid;
  gap:11px;
  text-align:left;
}
.shift-summary div {
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--line);
}

body.login-page {
  display:grid;
  place-items:center;
  min-height:100vh;
  padding: 24px;
  background:
    linear-gradient(110deg, rgba(12,30,54,.95), rgba(18,45,74,.82) 48%, rgba(8,24,44,.94)),
    url("../img/login-bg.jpg");
  background-color:#10243a;
  background-size:cover;
  background-position:center;
}
.login-shell {
  width:min(1080px, 100%);
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  min-height: 620px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 34px 90px rgba(0,0,0,.36);
  background:rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
}
.login-intro {
  padding:42px;
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  background:
    linear-gradient(180deg, rgba(37,99,235,.16), rgba(16,185,129,.08)),
    rgba(7,20,38,.42);
}
.login-kicker {
  display:inline-flex;
  align-self:flex-start;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  border-radius:999px;
  padding:8px 12px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.login-intro h1 {
  margin:24px 0 12px;
  font-size:48px;
  line-height:1.05;
  letter-spacing:-.02em;
}
.login-intro p {
  margin:0;
  color:#c8d5e6;
  font-size:16px;
  line-height:1.7;
  max-width:620px;
}
.login-metrics {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:12px;
  margin-top:34px;
}
.login-metric {
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  border-radius:10px;
  padding:14px;
}
.login-metric strong { display:block; font-size:20px; }
.login-metric span { display:block; color:#b9c7d8; font-size:11px; margin-top:4px; text-transform:uppercase; letter-spacing:.08em; }
.login-card {
  width:100%;
  background:#fff;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:42px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.login-header { display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.brand-mark {
  width:52px;
  height:52px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#eef5ff;
  overflow:hidden;
}
.login-badge { color:var(--blue); font-size:11px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.login-title { font-size:22px; font-weight:900; }
.login-sub { color:var(--muted); font-size:13px; line-height:1.5; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; min-height:auto; }
  .login-intro { padding:28px; }
  .login-intro h1 { font-size:34px; }
  .login-metrics { grid-template-columns:1fr; }
  .login-card { padding:28px; }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { position:relative; height:auto; }
  .side-nav { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .side-user, .side-logout { display:none; }
  .kpi-grid, .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-wide { grid-column: span 2; }
  .pos-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-container { padding: 20px 14px 34px; }
  .app-topbar { height:auto; align-items:flex-start; flex-direction:column; padding:14px; gap:10px; }
  .topbar-actions { width:100%; justify-content:space-between; flex-wrap:wrap; }
  .page-hero { flex-direction:column; }
  .kpi-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-wide { grid-column: span 1; }
  .toolbar-filter, .barcode-row, .line-row, .pos-line, .tx-line-head, .date-range-fields { grid-template-columns: 1fr; }
  .toolbar-filter .input[type="date"] { width: 100%; }
  .tx-line-head { display:none; }
  .pos-footer-bar { position:static; flex-direction:column; align-items:stretch; }
  .form-span-2 { grid-column: span 1; }
  .table th, .table td { padding: 12px 10px; }
}

/* ========================================================================== 
   EOS COMPUTER — TECHNOLOGY RETAIL DESIGN SYSTEM 2026
   ========================================================================== */
:root {
  --nav: #07111f;
  --nav-deep: #030812;
  --blue: #0ea5e9;
  --blue-dark: #0284c7;
  --green: #10b981;
  --red: #f43f5e;
  --amber: #f59e0b;
  --bg: #f2f5f9;
  --card: rgba(255,255,255,.94);
  --line: #dfe6ef;
  --line-dark: #cbd5e1;
  --text: #111c2d;
  --muted: #68758a;
  --soft: #f7f9fc;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 48px rgba(15,23,42,.07);
  --shadow-strong: 0 26px 70px rgba(2,8,23,.14);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { scroll-behavior:smooth; background:var(--bg); }
body {
  background:
    radial-gradient(circle at 82% -15%, rgba(14,165,233,.12), transparent 30rem),
    linear-gradient(180deg,#f7f9fc 0,#f2f5f9 40rem);
  letter-spacing:-.006em;
}
::selection { background:#bae6fd; color:#082f49; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }

.app-shell { grid-template-columns:278px minmax(0,1fr); }
.app-sidebar {
  background:
    radial-gradient(circle at 10% 8%,rgba(14,165,233,.2),transparent 16rem),
    linear-gradient(175deg,#0b1728 0%,#07111f 48%,#030812 100%);
  border-right:1px solid rgba(148,163,184,.13);
  box-shadow:16px 0 45px rgba(2,8,23,.08);
  scrollbar-width:thin;
  scrollbar-color:#25354a transparent;
  z-index:50;
}
.side-brand { padding:24px 22px 20px; gap:14px; border-color:rgba(148,163,184,.12); }
.side-brand-icon {
  width:46px;height:46px;border-radius:15px;
  color:#e0f2fe;background:linear-gradient(145deg,#0ea5e9,#2563eb);
  box-shadow:0 12px 28px rgba(14,165,233,.3),inset 0 1px 0 rgba(255,255,255,.35);
  font-size:12px;letter-spacing:.08em;
}
.side-brand strong { font-size:15px;letter-spacing:.08em;color:#fff; }
.side-brand small { margin-top:4px;color:#8292a9;font-size:10px;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.side-user { padding:18px 18px 17px;text-align:left;display:grid;grid-template-columns:42px minmax(0,1fr);column-gap:11px;align-items:center; }
.side-avatar { width:42px;height:42px;margin:0;grid-row:1 / span 2;border:2px solid rgba(56,189,248,.28);background:linear-gradient(145deg,#164e63,#1e40af);font-size:12px; }
.side-user strong { font-size:12px;color:#f8fafc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.side-user span { margin:3px 0 0;color:#38bdf8;font-size:9px;font-weight:800; }
.side-nav { padding:14px 12px 24px;gap:3px; }
.side-section { margin:15px 11px 7px;width:calc(100% - 22px);font-size:9px;letter-spacing:.18em;color:#64748b; }
.side-section::after { content:"⌄";font-size:13px;transform:rotate(-90deg);transition:transform .2s ease; }
.nav-group.is-open>.side-section::after { content:"⌄";transform:rotate(0); }
.side-group-body { gap:3px; }
.side-link,.side-logout { min-height:42px;padding:9px 11px;border-radius:11px;color:#aebbd0;font-size:12px;font-weight:650;transition:.18s ease; }
.side-link span,.side-logout span { width:28px;height:28px;border-radius:9px;background:rgba(148,163,184,.08);color:#7dd3fc; }
.side-link:hover { background:rgba(255,255,255,.07);color:#fff;transform:translateX(2px); }
.side-link.is-active { background:linear-gradient(100deg,rgba(14,165,233,.22),rgba(37,99,235,.12));color:#fff;box-shadow:inset 3px 0 #38bdf8; }
.side-link.is-active span,.side-link:hover span { background:rgba(14,165,233,.16);color:#7dd3fc; }
.side-logout { margin:8px 14px 20px;color:#fda4af;border-color:rgba(148,163,184,.12); }

.app-workspace { min-width:0; }
.app-topbar {
  position:sticky;top:0;z-index:35;height:76px;padding:0 30px;
  background:rgba(248,250,252,.82);border-bottom:1px solid rgba(203,213,225,.72);
  backdrop-filter:blur(18px) saturate(150%);box-shadow:0 8px 30px rgba(15,23,42,.035);
}
.topbar-title { gap:12px;font-size:16px;text-transform:none;letter-spacing:-.02em;color:#0f172a; }
.topbar-title>span { width:4px;height:28px;border-radius:99px;background:linear-gradient(180deg,#38bdf8,#2563eb);box-shadow:0 0 14px rgba(14,165,233,.5); }
.topbar-title div { display:grid;gap:1px; }
.topbar-title small { font-size:8px;letter-spacing:.2em;color:#94a3b8; }
.topbar-user { padding:7px 10px 7px 7px;border:1px solid #dfe7f0;background:rgba(255,255,255,.7);border-radius:14px; }
.topbar-user b { width:35px;height:35px;background:linear-gradient(145deg,#0ea5e9,#1d4ed8); }
.topbar-user strong { font-size:11px; }.topbar-user small { color:#0ea5e9;font-size:8px; }
.mobile-nav-toggle { display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#0f172a;place-items:center; }
.sidebar-scrim { display:none; }

.page-main { min-height:calc(100vh - 76px); }
.page-container { max-width:1600px;padding:30px clamp(22px,3vw,48px) 56px; }
.page-heading,.page-hero {
  position:relative;overflow:hidden;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  padding:26px 28px;margin-bottom:20px;border:1px solid rgba(186,230,253,.7);border-radius:var(--radius-lg);
  background:
    linear-gradient(115deg,rgba(255,255,255,.98),rgba(240,249,255,.92)),
    #fff;box-shadow:var(--shadow);
}
.page-heading::after,.page-hero::after { content:"";position:absolute;right:-45px;top:-80px;width:230px;height:230px;border:38px solid rgba(14,165,233,.06);border-radius:50%;pointer-events:none; }
.page-heading h1,.page-hero h1 { margin:3px 0 5px;font-size:clamp(25px,2.5vw,38px);line-height:1.05;letter-spacing:-.045em;color:#0b1728; }
.page-heading p,.page-hero p { margin:0;max-width:760px;color:var(--muted);line-height:1.55;font-size:13px; }
.eyebrow { font-size:9px;letter-spacing:.19em;font-weight:900;color:#0284c7;text-transform:uppercase; }

.card,.exec-card,.exec-kpi {
  border:1px solid rgba(203,213,225,.72);border-radius:var(--radius-lg);background:var(--card);
  box-shadow:var(--shadow);backdrop-filter:blur(10px);
}
.card { margin-bottom:18px;overflow:hidden; }
.card-header { min-height:70px;padding:18px 22px;border-color:#e7edf4;background:linear-gradient(180deg,#fff,#fbfcfe); }
.card-title { font-size:15px;letter-spacing:-.02em;color:#101d30; }.card-subtitle { margin-top:4px;font-size:11px; }
.card-body { padding:22px; }
.stat-grid,.kpi-grid { gap:14px;margin-bottom:20px; }
.stat-card,.kpi-card {
  position:relative;overflow:hidden;padding:20px;border:1px solid #dfe7ef;border-radius:18px;background:linear-gradient(145deg,#fff,#f8fbff);box-shadow:0 12px 30px rgba(15,23,42,.055);
}
.stat-card::before,.kpi-card::before { content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:99px;background:linear-gradient(#38bdf8,#2563eb); }
.stat-card span,.kpi-card span { color:#718096;font-size:9px;letter-spacing:.13em;text-transform:uppercase;font-weight:850; }
.stat-card strong,.kpi-card strong { margin-top:9px;font-size:25px;letter-spacing:-.04em;color:#0f1c2e; }

.filter-bar,.toolbar-filter { gap:10px;padding:4px;align-items:end; }
.form-grid { gap:15px 16px; }
.form-group label { margin-bottom:7px;color:#42526a;font-size:10px;letter-spacing:.055em;text-transform:uppercase;font-weight:850; }
.input,.select,.textarea {
  min-height:44px;padding:10px 13px;border:1px solid #d7e0eb;border-radius:11px;background:#fff;color:#132238;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.025);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.textarea { min-height:92px;resize:vertical; }
.input:hover,.select:hover,.textarea:hover { border-color:#b8c7d9; }
.input:focus,.select:focus,.textarea:focus { outline:0;border-color:#38bdf8;background:#fff;box-shadow:0 0 0 4px rgba(14,165,233,.11); }
.input::placeholder,.textarea::placeholder { color:#a6b1c0; }
.check-row { border:1px solid #e3eaf2;border-radius:11px;padding:10px 12px;background:#f8fafc;font-size:12px; }
.check-row input { width:17px;height:17px;accent-color:#0284c7; }

.btn-primary,.btn-secondary,.btn-danger,.btn-link,.mini-action {
  min-height:41px;padding:9px 15px;border-radius:11px;font-size:11px;font-weight:850;letter-spacing:.015em;transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease;
}
.btn-primary { border:1px solid #0284c7;background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff;box-shadow:0 10px 24px rgba(14,165,233,.22); }
.btn-primary:hover { background:linear-gradient(135deg,#0284c7,#1d4ed8);transform:translateY(-1px);box-shadow:0 14px 30px rgba(14,165,233,.3); }
.btn-secondary { border:1px solid #d6e0eb;background:#fff;color:#24334a;box-shadow:0 4px 12px rgba(15,23,42,.035); }
.btn-secondary:hover { border-color:#9ec4e2;background:#f0f9ff;color:#0369a1;transform:translateY(-1px); }
.btn-danger { background:#fff1f2;color:#be123c;border:1px solid #fecdd3; }.btn-danger:hover{background:#ffe4e6;}
.btn-link { color:#0284c7;background:transparent;border:0;box-shadow:none; }

.table-wrap { scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent; }
.table { border-collapse:separate;border-spacing:0;width:100%; }
.table th { padding:13px 15px;background:#f6f8fb;color:#66758a;font-size:9px;letter-spacing:.11em;text-transform:uppercase;border-bottom:1px solid #dfe6ef; }
.table td { padding:14px 15px;border-bottom:1px solid #e9eef4;color:#26354a;font-size:12px;vertical-align:middle; }
.table tbody tr:last-child td { border-bottom:0; }
.table tbody tr:hover td { background:#f3faff; }
.table strong { color:#0f1e31; }.table small { color:#8491a4;line-height:1.5; }
.badge { min-height:25px;padding:5px 9px;border-radius:999px;font-size:8px;letter-spacing:.07em;font-weight:900; }
.badge-success,.badge-pill { background:#dcfce7;color:#047857;border:1px solid #bbf7d0; }
.badge-muted { background:#f1f5f9;color:#64748b;border:1px solid #e2e8f0; }
.badge-warning { background:#fff7ed;color:#c2410c;border:1px solid #fed7aa; }
.badge-danger { background:#fff1f2;color:#be123c;border:1px solid #fecdd3; }
.empty-state { padding:45px!important;text-align:center;color:#8794a7!important;background:#fbfcfe; }

.alert { padding:13px 15px;border-radius:13px;box-shadow:0 8px 20px rgba(15,23,42,.035);font-size:12px; }
.alert-success { border-color:#a7f3d0;background:linear-gradient(135deg,#ecfdf5,#f0fdfa); }
.alert-danger { border-color:#fecdd3;background:linear-gradient(135deg,#fff1f2,#fff7f7); }

.modal-backdrop { background:rgba(2,8,23,.58);backdrop-filter:blur(5px); }
.app-modal { padding:20px; }
.app-modal-box { border:1px solid rgba(255,255,255,.7);border-radius:22px;background:#fff;box-shadow:0 38px 100px rgba(2,8,23,.3);padding:0;overflow:hidden; }
.app-modal-head { min-height:72px;margin:0;padding:17px 22px;border-bottom:1px solid #e7edf4;background:linear-gradient(180deg,#fff,#f8fbff);align-items:center; }
.app-modal-head strong { font-size:16px;color:#101d30; }.app-modal-head small { display:block;margin-top:4px;color:#8290a3; }
.app-modal-box>.form-grid { padding:20px 22px; }
.app-modal-foot { margin:0;padding:16px 22px;border-top:1px solid #e5ebf2;background:#f8fafc; }

body .exec-shell { gap:20px; }
body .exec-hero { border-radius:24px;padding:30px;background:linear-gradient(120deg,#071525,#0b2b46 58%,#0c4a6e);box-shadow:0 28px 70px rgba(3,15,30,.2); }
body .exec-hero::before { content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(56,189,248,.05));pointer-events:none; }
body .exec-hero h1 { font-size:clamp(27px,3vw,42px);letter-spacing:-.045em; }
body .exec-kpis { gap:14px; }
body .exec-kpi { border-radius:18px;padding:20px; }
body .exec-card { border-radius:20px;padding:22px; }
body .track { height:7px;background:#e8eef5; } body .fill { background:linear-gradient(90deg,#0ea5e9,#2563eb); }

body.login-page {
  padding:clamp(16px,3vw,38px);
  background:
    radial-gradient(circle at 12% 18%,rgba(14,165,233,.22),transparent 28rem),
    radial-gradient(circle at 88% 80%,rgba(37,99,235,.18),transparent 30rem),
    #030914;
}
.login-shell { max-width:1160px;min-height:650px;border-radius:28px;border:1px solid rgba(125,211,252,.16);background:rgba(9,22,39,.75);box-shadow:0 48px 120px rgba(0,0,0,.5); }
.login-intro { padding:clamp(32px,5vw,64px);background:linear-gradient(145deg,rgba(14,165,233,.13),rgba(3,10,22,.1)); }
.login-intro h1 { max-width:620px;font-size:clamp(42px,5vw,66px);letter-spacing:-.055em; }
.login-intro p { color:#aebed2; }.login-kicker { border-color:rgba(125,211,252,.25);background:rgba(14,165,233,.1);color:#7dd3fc; }
.login-metric { border-radius:15px;border-color:rgba(148,163,184,.14);background:rgba(255,255,255,.045);padding:16px; }
.login-card { padding:clamp(32px,4vw,56px);background:linear-gradient(155deg,#fff,#f5f9fd); }
.brand-mark { width:58px;height:58px;border-radius:17px;background:linear-gradient(145deg,#e0f2fe,#dbeafe);box-shadow:0 12px 30px rgba(14,165,233,.14); }
.login-badge { color:#0284c7; }.login-title { font-size:25px;letter-spacing:-.035em; }
.login-header { margin-bottom:28px; }
.login-header .brand-mark img { width:48px;height:48px; }
.login-welcome { margin-bottom:24px; }
.login-welcome>span { display:block;color:#0284c7;font-size:9px;font-weight:900;letter-spacing:.18em; }
.login-welcome h2 { margin:7px 0 7px;font-size:29px;line-height:1.1;letter-spacing:-.045em;color:#0b1728; }
.login-welcome p { margin:0;color:#748196;font-size:13px;line-height:1.55; }
.login-form { display:grid;gap:20px; }
.login-fields { display:grid;gap:16px; }
.login-field label { font-size:9px;letter-spacing:.12em;color:#435168; }
.login-input-wrap { position:relative; }
.login-input-wrap .input { height:52px;padding-left:47px;padding-right:48px;border-radius:14px;background:rgba(255,255,255,.86);font-size:13px; }
.login-input-icon { position:absolute;left:15px;top:50%;z-index:1;width:20px;height:20px;transform:translateY(-50%);color:#7c8ba0;display:grid;place-items:center;pointer-events:none; }
.login-input-icon svg,.password-toggle svg,.login-submit svg,.login-trust svg { width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.login-input-wrap:focus-within .login-input-icon { color:#0284c7; }
.password-toggle { position:absolute;right:9px;top:50%;z-index:1;width:36px;height:36px;transform:translateY(-50%);display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#8a97a9;cursor:pointer; }
.password-toggle:hover,.password-toggle.is-visible { background:#eaf7ff;color:#0284c7; }
.login-submit { width:100%;height:50px;margin-top:2px;display:flex;align-items:center;justify-content:center;gap:11px;border-radius:14px;font-size:12px; }
.login-submit svg { width:18px;height:18px;transition:transform .18s ease; }.login-submit:hover svg{transform:translateX(3px)}
.login-trust { margin-top:27px;padding-top:20px;border-top:1px solid #e2e8f0;display:flex;align-items:center;justify-content:space-between;gap:15px; }
.login-trust>div { display:flex;align-items:center;gap:9px;color:#64748b; }.login-trust>div>svg{width:23px;height:23px;color:#0ea5e9}.login-trust b,.login-trust small{display:block}.login-trust b{font-size:10px;color:#344258}.login-trust small{margin-top:2px;font-size:9px;color:#8a96a8}
.login-status { display:inline-flex;align-items:center;gap:6px;color:#64748b;font-size:9px;font-weight:800;white-space:nowrap; }.login-status i{width:7px;height:7px;border-radius:50%;background:#10b981;box-shadow:0 0 0 4px rgba(16,185,129,.1)}
.login-intro-foot { display:flex;align-items:flex-start;gap:11px; }.login-intro-foot>span{width:24px;height:2px;margin-top:10px;background:#38bdf8;box-shadow:0 0 12px rgba(56,189,248,.6)}.login-intro-foot p{font-size:12px!important;line-height:1.6!important}

@media(max-width:1100px){
  .app-shell { grid-template-columns:1fr; }
  .app-sidebar { position:fixed;left:0;top:0;width:min(300px,86vw);height:100vh;transform:translateX(-105%);transition:transform .24s ease;box-shadow:25px 0 70px rgba(2,8,23,.3); }
  body.nav-open { overflow:hidden; } body.nav-open .app-sidebar { transform:translateX(0); }
  .sidebar-scrim { position:fixed;inset:0;z-index:45;background:rgba(2,8,23,.55);backdrop-filter:blur(3px); }
  body.nav-open .sidebar-scrim { display:block; }
  .mobile-nav-toggle { display:grid;flex:0 0 auto; }
  .side-user { display:grid; }.side-logout { display:flex; }.side-nav { display:block; }
  .app-topbar { padding:0 20px; }.page-container { padding-top:22px; }
}
@media(max-width:760px){
  .app-topbar { height:66px;flex-direction:row;align-items:center;padding:0 13px; }
  .topbar-title { font-size:13px;min-width:0; }.topbar-title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-title small{display:none}.topbar-user span{display:none}.topbar-user{padding:5px}.topbar-actions{width:auto;margin-left:auto}.topbar-user b{width:32px;height:32px}
  .page-main { min-height:calc(100vh - 66px); }.page-container { padding:16px 12px 35px; }
  .page-heading,.page-hero { padding:20px;border-radius:18px;align-items:flex-start; }.page-heading h1,.page-hero h1{font-size:26px}.page-heading>button,.page-heading>a{width:100%}
  .card,.exec-card { border-radius:17px; }.card-body { padding:16px; }.stat-grid{grid-template-columns:1fr 1fr!important}.stat-card{padding:16px}.stat-card strong{font-size:19px}
  .filter-bar { display:grid;grid-template-columns:1fr; }.filter-bar>*{width:100%; }
  .app-modal { align-items:end;padding:0; }.app-modal-box { width:100%!important;max-height:94vh;border-radius:22px 22px 0 0!important; }.app-modal-box>.form-grid{padding:17px}.app-modal-head{padding:15px 17px}.app-modal-foot{padding:14px 17px;position:sticky;bottom:0;z-index:2}
  .login-intro { display:none; }.login-shell { grid-template-columns:1fr;min-height:0;border-radius:22px; }.login-card{padding:28px 22px}.login-title{font-size:21px}.login-header{margin-bottom:23px}.login-welcome h2{font-size:26px}.login-trust{align-items:flex-start}.login-status{margin-top:3px}
}

/* KPI + filter alignment fix — shared by all master/report pages */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 14px;
  width: 100%;
}
.stat-grid .stat-card {
  min-width: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.stat-grid .stat-card strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(200px, 300px) max-content max-content;
  align-items: end;
  gap: 10px;
  width: 100%;
}
.filter-bar > .input,
.filter-bar > .select { min-width: 0; width: 100%; }
.filter-bar > .btn-primary,
.filter-bar > .btn-secondary,
.filter-bar > .btn-link { white-space: nowrap; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: minmax(240px, 1fr) minmax(180px, 260px) max-content max-content; }
}
@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 9px; }
  .stat-grid .stat-card { min-height: 92px; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar > * { width: 100%; }
}
@media (max-width: 430px) {
  .stat-grid { grid-template-columns: 1fr !important; }
}
