:root {
  --bg: #f5efe4;
  --panel: rgba(255, 252, 246, 0.88);
  --panel-strong: #fffaf0;
  --ink: #1f2933;
  --muted: #68707a;
  --line: rgba(31, 41, 51, 0.1);
  --brand: #0d5c63;
  --brand-2: #d08c60;
  --accent: #f2c14e;
  --danger: #b93838;
  --success: #2f7d59;
  --shadow: 0 24px 60px rgba(13, 92, 99, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #11161a;
  --panel: rgba(21, 29, 34, 0.88);
  --panel-strong: #182127;
  --ink: #eef3f5;
  --muted: #a8b4bb;
  --line: rgba(230, 239, 242, 0.12);
  --brand: #4ba6ad;
  --brand-2: #d9a275;
  --accent: #f2c14e;
  --danger: #d35d5d;
  --success: #54aa7f;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(208, 140, 96, 0.28), transparent 30%),
    radial-gradient(circle at top right, rgba(13, 92, 99, 0.18), transparent 26%),
    linear-gradient(180deg, #f8f4eb 0%, #efe4d2 100%);
}

body.theme-dark {
  background:
    radial-gradient(circle at top left, rgba(217, 162, 117, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(75, 166, 173, 0.16), transparent 28%),
    linear-gradient(180deg, #11161a 0%, #1a2329 100%);
}

body {
  padding: 24px;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(13, 92, 99, 0.16);
}

button.secondary {
  background: rgba(13, 92, 99, 0.1);
  color: var(--brand);
}

body.theme-dark button.secondary {
  background: rgba(75, 166, 173, 0.14);
}

button.warn {
  background: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.layout {
  max-width: 1450px;
  margin: 0 auto;
}

.login-shell,
.app-shell {
  display: grid;
  gap: 22px;
}

.login-shell {
  min-height: calc(100vh - 48px);
  align-items: center;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 50%;
  filter: blur(10px);
}

.brand-panel::before {
  width: 320px;
  height: 320px;
  right: -60px;
  top: -80px;
  background: rgba(13, 92, 99, 0.12);
}

.brand-panel::after {
  width: 220px;
  height: 220px;
  left: -70px;
  bottom: -70px;
  background: rgba(242, 193, 78, 0.2);
}

.eyebrow {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--brand);
  margin-bottom: 14px;
}

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 4vw, 4.6rem);
  line-height: 0.95;
  max-width: 9ch;
}

.lead {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 16px;
}

.metric-strip {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric-tile {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(13, 92, 99, 0.09);
}

.metric-tile strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.login-panel {
  align-self: center;
}

.stack {
  display: grid;
  gap: 16px;
}

.field-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.single {
  grid-template-columns: 1fr;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.93rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 14px;
  color: var(--ink);
  outline: none;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(11, 17, 21, 0.76);
  color: var(--ink);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(13, 92, 99, 0.36);
  box-shadow: 0 0 0 4px rgba(13, 92, 99, 0.09);
}

.hint,
.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

body.theme-dark .hint,
body.theme-dark .muted {
  color: #c1cdd3;
}

.demo-users {
  margin-top: 6px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(13, 92, 99, 0.07);
  display: grid;
  gap: 8px;
}

.demo-user-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.demo-user-row small {
  display: block;
  margin-top: 4px;
}

.suggestion-list,
.permissions-grid {
  display: grid;
  gap: 10px;
}

.autocomplete {
  position: relative;
}

.suggestion-list.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 18px 30px rgba(31, 41, 51, 0.12);
}

.suggestion-list.dropdown.open {
  display: grid;
}

.suggestion-item {
  width: 100%;
  text-align: left;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.suggestion-item strong,
.suggestion-item span {
  display: block;
}

.suggestion-item span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(13, 92, 99, 0.05);
  border: 1px solid rgba(13, 92, 99, 0.08);
}

.permission-item input {
  width: auto;
}

.pagination {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(31, 41, 51, 0.35);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--panel-strong);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(31, 41, 51, 0.25);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.modal-card-wide {
  width: min(1200px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.bill-editor-form {
  gap: 18px;
}

.item-filter-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.sales-filters { display: grid; grid-template-columns: minmax(200px, 2fr) 1fr 1fr auto; gap: 14px; align-items: end; }
.sales-table-scroll { overflow-x: auto; min-width: 0; max-width: 100%; }
.sales-bills-table { border-collapse: collapse; width: 100%; font-size: 0.86rem; }
.sales-bills-table th { color: var(--muted); font-weight: 700; text-align: left; white-space: nowrap; background: rgba(13, 92, 99, 0.05); }
.sales-bills-table th, .sales-bills-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sales-bills-table tbody tr:hover { background: rgba(13, 92, 99, 0.04); }
.sales-bills-table .muted { margin-top: 4px; font-size: 0.78rem; }
.sales-bills-table .status { white-space: normal; max-width: 100%; }
.sales-actions-heading { width: 1%; }
.sales-row-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; white-space: nowrap; }
.sales-next-stage { grid-column: 1 / -1; }
.sales-row-actions button { padding: 8px 12px; font-size: 0.78rem; }
.sales-register { table-layout: fixed; min-width: 850px; }
.sales-register th:nth-last-child(2) { width: 160px; }
.sales-register th:last-child { width: 170px; }
.sales-register th:nth-last-child(-n+2), .sales-register td:nth-last-child(-n+2) { position: sticky; background: var(--panel-strong); box-shadow: -6px 0 10px rgba(0,0,0,0.08); z-index: 1; }
.sales-register th:last-child, .sales-register td:last-child { right: 0; }
.sales-register th:nth-last-child(2), .sales-register td:nth-last-child(2) { right: 170px; }
.sales-register th:nth-last-child(-n+2) { z-index: 2; }
body.theme-dark .sales-register th:nth-last-child(-n+2) { background: #182127; }
.sales-register td:nth-child(2), .sales-register td:nth-child(3) { min-width: 135px; }
.sales-register td:nth-child(4) { white-space: nowrap; }
.product-items-table { table-layout: fixed; min-width: 1150px; }
.product-items-table th:first-child { width: 190px; }
.product-items-table th:nth-child(2) { width: 130px; }
.product-items-table th:nth-child(3) { width: 100px; }
.product-items-table th:nth-child(4) { width: 90px; }
.product-items-table th:nth-child(5) { width: 150px; }
.product-items-table th:nth-child(6) { width: 80px; }
.product-items-table th:nth-child(7) { width: 110px; }
.product-items-table th:nth-last-child(2) { width: 155px; }
.product-items-table th:last-child { width: 120px; }
.product-items-table td { overflow-wrap: anywhere; }
.product-items-table th:nth-last-child(-n+2), .product-items-table td:nth-last-child(-n+2) { position: sticky; z-index: 1; background: var(--panel-strong); box-shadow: -6px 0 10px rgba(0,0,0,0.08); }
.product-items-table th:last-child, .product-items-table td:last-child { right: 0; }
.product-items-table th:nth-last-child(2), .product-items-table td:nth-last-child(2) { right: 120px; }
.product-items-table th:nth-last-child(-n+2) { z-index: 2; }
body.theme-dark .product-items-table th:nth-last-child(-n+2) { background: #182127; }
.product-next-stage { padding: 8px 10px; font-size: 0.78rem; white-space: nowrap; }
.tailor-register { min-width: 950px; }
.tailor-register th:first-child { min-width: 150px; }
.tailor-register th:last-child, .tailor-register td:last-child { position: sticky; right: 0; min-width: 170px; background: var(--panel-strong); box-shadow: -6px 0 10px rgba(0,0,0,.08); }
body.theme-dark .tailor-register th:last-child { background: #182127; }
[data-tailor-manager-form] { gap: 14px; }
[data-tailor-manager-form] .hint { margin: 0; }
.staff-role-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.staff-role-guide h3 { margin: 0 0 8px; }
.staff-role-guide p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.staff-register { min-width: 880px; }
.staff-register th:last-child, .staff-register td:last-child { min-width: 280px; position: sticky; right: 0; background: var(--panel-strong); }
body.theme-dark .staff-register th:last-child { background: #182127; }
.staff-register button { padding: 8px 10px; font-size: .75rem; }
[data-staff-form] { gap: 14px; }
@media (max-width: 800px) {
  .staff-role-guide { grid-template-columns: 1fr; }
  .staff-register th:last-child, .staff-register td:last-child { min-width: 150px; width: 150px; }
  .staff-register .topbar-actions { display: grid; gap: 6px; }
}
.bill-quick-view .sales-bills-table td:first-child { white-space: nowrap; }
body.theme-dark .sales-bills-table .status, body.theme-dark .bill-quick-view .status { color: var(--ink); }
.sales-stage-breakdown { min-width: 150px; max-width: 230px; margin-top: 6px; font-size: 0.75rem; color: var(--muted); line-height: 1.6; }
.status.Mixed { background: rgba(208, 140, 96, 0.16); color: var(--ink); }
.sales-empty { padding: 40px !important; text-align: center; color: var(--muted); }
.sales-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sales-page-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sales-page-buttons button { font-size: 0.8rem; padding: 9px 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
dialog.bill-quick-view { width: min(1200px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); color: var(--ink); }
dialog.bill-quick-view::backdrop { background: rgba(3, 8, 12, 0.7); }
.quick-view-summary { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; padding: 18px; background: rgba(13, 92, 99, 0.05); border-radius: 16px; }
dialog.sales-stage-modal { width: min(760px, calc(100vw - 40px)); }
.sales-stage-modal > label { display: grid; gap: 8px; margin: 16px 0; }
.sales-stage-modal .stack { gap: 12px; }
.sales-stage-modal .stack > p { margin: 0; }
.stage-route { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 6px 0; }
.stage-box-notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.stage-box-notice p { margin: 6px 0; }
.stage-box-notice ul { padding-left: 20px; margin: 6px 0; }
.bill-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.bill-metadata dt, .event-details dt { color: var(--muted); font-size: 0.78rem; text-transform: capitalize; }
.bill-metadata dd, .event-details dd { margin: 5px 0 0; overflow-wrap: anywhere; }
.quick-view-section { margin-top: 28px; }
.quick-view-section > h3 { margin-bottom: 12px; }
.bill-event-timeline { list-style: none; padding: 0 0 0 22px; margin-left: 8px; border-left: 2px solid var(--line); }
.bill-event-timeline > li { position: relative; margin-bottom: 10px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.bill-event-timeline > li::before { content: ''; position: absolute; left: -29px; top: 15px; width: 10px; height: 10px; background: var(--brand); border: 2px solid var(--panel-strong); border-radius: 50%; }
.bill-event-heading { display: flex; align-items: baseline; gap: 4px 18px; flex-wrap: wrap; }
.bill-event-heading time { margin-left: auto; color: var(--muted); font-size: 0.8rem; }
.bill-event-actor { font-size: 0.8rem; overflow-wrap: anywhere; }
.event-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 6px 16px; margin: 8px 0 0; }
.event-details > div { min-width: 0; border-top: 1px solid var(--line); padding-top: 5px; }
.event-details dd { margin-top: 2px; font-size: 0.85rem; line-height: 1.4; }
.event-detail-group { grid-column: 1 / -1; }
.event-detail-group > dd > .event-details { margin-top: 4px; }
body.theme-dark .bill-quick-view { border-color: var(--line); scrollbar-color: #425761 #182127; }
body.theme-dark .sales-bills-table th, body.theme-dark .quick-view-summary { background: rgba(75, 166, 173, 0.08); }
@media (max-width: 800px) {
  .product-items-table th:nth-last-child(2), .product-items-table td:nth-last-child(2) { position: static; box-shadow: none; }
  .sales-filters { grid-template-columns: 1fr; }
  .sales-register th:nth-last-child(2), .sales-register td:nth-last-child(2) { position: static; box-shadow: none; }
  .sales-register th:last-child { width: 125px; }
  .sales-register .sales-row-actions { grid-template-columns: 1fr; }
  .quick-view-summary { grid-template-columns: 1fr; }
  .bill-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-details { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 6px 12px; }
  dialog.bill-quick-view { padding: 18px; }
}
.tracked-item { display: grid; gap: 14px; align-content: start; }
.tracked-item h3, .tracked-item p { margin: 0; }
.tracking-tag { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.status.Dispatched { background: rgba(77, 135, 196, 0.2); color: var(--ink); }
.item-actions { display: grid; gap: 12px; }
.item-actions details, .item-history { border-top: 1px solid var(--line); padding-top: 12px; }
.item-actions summary, .item-history summary { cursor: pointer; color: var(--brand); font-weight: 700; margin-bottom: 12px; }
.item-event-details { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.8rem; }
.item-table-scroll { overflow-x: auto; margin-top: 16px; }
.workspace > *, .list-grid > *, .form-grid > * { min-width: 0; }
.item-table-scroll { max-width: 100%; min-width: 0; }
.item-table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.item-table-scroll th, .item-table-scroll td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.package-pick-list { display: grid; gap: 10px; max-height: 400px; overflow-y: auto; }
.package-pick { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.package-pick input { width: 20px; flex-shrink: 0; }
@media (max-width: 1300px) { .item-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 650px) { .item-filter-grid { grid-template-columns: 1fr; } }

.bill-item-list {
  display: grid;
  gap: 16px;
}

.bill-item-row {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

body.theme-dark .modal-backdrop {
  background: rgba(3, 8, 12, 0.72);
}

body.theme-dark .modal-card,
body.theme-dark .branch-search-dialog {
  background: #182127;
  border-color: var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  scrollbar-color: #425761 #182127;
}

body.theme-dark .bill-item-row {
  background: #111a20;
  border-color: rgba(168, 190, 202, 0.18);
}

body.theme-dark .suggestion-list.dropdown {
  background: #182127;
  border-color: var(--line);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
}

body.theme-dark .suggestion-item {
  background: #111a20;
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark .suggestion-item:hover,
body.theme-dark .branch-search-result:hover {
  background: #243b43;
}

body.theme-dark .bill-editor-form input,
body.theme-dark .bill-editor-form select,
body.theme-dark .bill-editor-form textarea {
  background: #0e161c;
  border-color: rgba(168, 190, 202, 0.24);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #94a8b4;
  opacity: 1;
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(75, 166, 173, 0.18);
}

.app-shell {
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 18px;
  overflow-y: auto;
  padding: 10px 10px 10px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(13, 92, 99, 0.42) rgba(255, 255, 255, 0.32);
}

.sidebar::-webkit-scrollbar {
  width: 10px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.32);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(13, 92, 99, 0.72), rgba(208, 140, 96, 0.72));
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.34);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(13, 92, 99, 0.9), rgba(208, 140, 96, 0.9));
}

body.theme-dark .sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(75, 166, 173, 0.78), rgba(217, 162, 117, 0.72));
  border-color: rgba(17, 22, 26, 0.65);
}

body.theme-dark .sidebar::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(75, 166, 173, 0.96), rgba(217, 162, 117, 0.88));
}

.brand-mini {
  padding: 22px;
}

.brand-mini h2 {
  font-size: 1.2rem;
  margin-top: 8px;
}

.nav-list {
  display: grid;
  gap: 10px;
}

.nav-item {
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  border: 1px solid transparent;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--brand), #083f43);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.workspace {
  display: grid;
  gap: 22px;
}

.theme-toggle {
  min-width: 120px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.topbar h1 {
  max-width: none;
  font-size: clamp(1.7rem, 2vw, 2.6rem);
  line-height: 1;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.summary-grid,
.dashboard-grid,
.form-grid,
.report-grid,
.list-grid {
  display: grid;
  gap: 18px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card {
  padding: 22px;
  border-radius: var(--radius-xl);
  color: white;
  background: linear-gradient(145deg, rgba(13, 92, 99, 0.96), rgba(8, 63, 67, 0.95));
  min-height: 148px;
}

.summary-card:nth-child(2) {
  background: linear-gradient(145deg, rgba(208, 140, 96, 0.98), rgba(165, 102, 56, 0.96));
}

.summary-card:nth-child(3) {
  background: linear-gradient(145deg, rgba(47, 125, 89, 0.96), rgba(30, 92, 63, 0.96));
}

.summary-card:nth-child(4) {
  background: linear-gradient(145deg, rgba(77, 94, 125, 0.95), rgba(44, 57, 80, 0.95));
}

.summary-card strong {
  display: block;
  font-size: 2.3rem;
  margin: 20px 0 8px;
}

.dashboard-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.form-grid {
  grid-template-columns: 1.05fr 0.95fr;
}

.report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.list-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title h3 {
  font-size: 1.2rem;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 92, 99, 0.08);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(13, 92, 99, 0.08);
  font-size: 0.84rem;
  font-weight: 700;
}

.status.Rejected,
.status.Overdue {
  background: rgba(185, 56, 56, 0.12);
  color: var(--danger);
}

.status.Rework {
  background: rgba(242, 193, 78, 0.2);
  color: #8f6600;
}

.status.Delivered,
.status.Approved,
.status.Packed {
  background: rgba(47, 125, 89, 0.14);
  color: var(--success);
}

.status.Assigned,
.status.Checked,
.status.Stitched {
  background: rgba(13, 92, 99, 0.11);
  color: var(--brand);
}

.status.Booked {
  background: rgba(208, 140, 96, 0.16);
  color: #8c5d37;
}

.status.To { background: rgba(77, 135, 196, 0.18); color: var(--ink); }
.status.At, .status.With { background: rgba(13, 92, 99, 0.14); color: var(--ink); }
.status.Stitching, .status.Back { background: rgba(47, 125, 89, 0.18); color: var(--ink); }
body.theme-dark .status.Booked { color: var(--ink); }

.order-list,
.timeline,
.report-list,
.user-list {
  display: grid;
  gap: 14px;
}

.order-card,
.timeline-item,
.report-item,
.user-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

body.theme-dark .order-card,
body.theme-dark .timeline-item,
body.theme-dark .report-item,
body.theme-dark .user-card {
  background: rgba(24, 33, 39, 0.92);
}

.order-head,
.item-row,
.timeline-head,
.report-head,
.user-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.order-meta,
.order-actions,
.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.order-actions button,
.inline-actions button {
  padding: 9px 14px;
}

.subbill-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.subbill-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(13, 92, 99, 0.05);
  border: 1px solid rgba(13, 92, 99, 0.08);
}

body.theme-dark .subbill-item {
  background: rgba(75, 166, 173, 0.08);
  border-color: rgba(75, 166, 173, 0.14);
}

.history-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tracking-summary,
.stage-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stage-chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(13, 92, 99, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

body.theme-dark .stage-chip {
  background: rgba(75, 166, 173, 0.08);
  color: #c8d4d9;
}

.stage-chip.done {
  background: rgba(47, 125, 89, 0.14);
  color: var(--success);
}

.history-details {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.history-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(13, 92, 99, 0.05);
}

body.theme-dark .history-detail-row {
  background: rgba(75, 166, 173, 0.08);
}

.history-json {
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(13, 92, 99, 0.05);
  font-size: 0.82rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

body.theme-dark .history-json {
  background: rgba(75, 166, 173, 0.08);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.status-deck {
  display: grid;
  gap: 14px;
}

.status-stage {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(13, 92, 99, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

body.theme-dark .status-stage {
  border-color: rgba(75, 166, 173, 0.14);
  background: rgba(24, 33, 39, 0.88);
}

.status-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.status-stage-head h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.status-stage-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.status-bill-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
}

body.theme-dark .status-bill-card {
  background: rgba(15, 22, 27, 0.96);
}

.status-bill-card strong {
  display: block;
  overflow-wrap: anywhere;
}

.kanban-column {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(13, 92, 99, 0.08);
  min-height: 260px;
}

body.theme-dark .kanban-column {
  background: rgba(24, 33, 39, 0.88);
  border-color: rgba(75, 166, 173, 0.14);
}

.kanban-column h4 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
}

.kanban-item {
  padding: 12px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

body.theme-dark .kanban-item {
  background: rgba(15, 22, 27, 0.96);
}

.search-bar {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(13, 92, 99, 0.2);
  border-radius: var(--radius-lg);
}

body.theme-dark .empty {
  color: #d3dde1;
  border-color: rgba(75, 166, 173, 0.22);
  background: rgba(15, 22, 27, 0.72);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.danger-text {
  color: var(--danger);
}

.print-note {
  padding: 14px 16px;
  background: rgba(242, 193, 78, 0.18);
  border-radius: 16px;
  color: #7d5c00;
}

.flash-banner {
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.flash-banner.success {
  background: rgba(47, 125, 89, 0.14);
  color: var(--success);
  border: 1px solid rgba(47, 125, 89, 0.2);
}

.flash-banner.error {
  background: rgba(185, 56, 56, 0.12);
  color: var(--danger);
  border: 1px solid rgba(185, 56, 56, 0.2);
}

.inline-banner {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

.inline-banner.success {
  background: rgba(47, 125, 89, 0.14);
  color: var(--success);
  border: 1px solid rgba(47, 125, 89, 0.2);
}

.inline-banner.error {
  background: rgba(185, 56, 56, 0.12);
  color: var(--danger);
  border: 1px solid rgba(185, 56, 56, 0.2);
}

.invoice-warning {
  display: none;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a66238;
}

.invoice-warning.show {
  display: block;
}

.branch-field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.branch-input-actions {
  display: flex;
  gap: 8px;
}

.branch-input-actions input {
  flex: 1;
  min-width: 0;
}

.branch-input-actions button {
  flex-shrink: 0;
}

.branch-search-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.branch-search-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.branch-search-dialog > input {
  margin-top: 8px;
}

.branch-search-results {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.branch-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  overflow-wrap: anywhere;
}

.branch-search-result[aria-pressed="true"] {
  border-color: var(--brand);
}

.sidebar.app-sidebar {
  position: sticky;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 18px;
  height: calc(100vh - 48px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.sidebar-brand, .sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand strong, .sidebar-user strong {
  display: block;
  font-size: 0.9rem;
}

.sidebar-brand .muted, .sidebar-user .muted {
  display: block;
  margin-top: 3px;
  font-size: 0.75rem;
}

.sidebar-monogram, .sidebar-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--panel-strong);
  font-weight: 800;
}

.sidebar-create { width: 100%; padding: 12px; }
.sidebar-menu-toggle { display: none; }
.mobile-navigation-bar, .sidebar-backdrop { display: none; }
.sidebar-navigation { flex: 1; min-height: 0; overflow-y: auto; }
.sidebar-group + .sidebar-group { margin-top: 18px; }
.sidebar-group-label { padding: 0 12px 8px; color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.app-sidebar .nav-item { display: flex; align-items: center; gap: 10px; border-radius: 10px; padding: 10px 12px; margin-bottom: 3px; background: transparent; font-size: 0.85rem; font-weight: 600; box-shadow: none; }
.app-sidebar .nav-item:hover { background: rgba(13, 92, 99, 0.07); transform: none; }
.app-sidebar .nav-item.active { background: var(--brand); color: var(--panel-strong); }
.nav-icon { display: flex; width: 19px; height: 19px; flex-shrink: 0; }
.nav-icon svg { width: 100%; height: 100%; }
.sidebar-footer { border-top: 1px solid var(--line); padding-top: 14px; }
.sidebar-avatar { width: 32px; height: 32px; border-radius: 50%; }
.sidebar-utilities { display: flex; gap: 8px; margin-top: 12px; }
.sidebar-utilities button { flex: 1; padding: 8px; font-size: 0.75rem; }
.app-sidebar .sidebar-credit { font-size: 0.66rem; text-align: center; border: 0; padding-top: 6px; }
.branch-management-list { display: grid; gap: 12px; }
.logs-page { display: grid; gap: 18px; min-width: 0; }
.logs-page .eyebrow { margin-bottom: 8px; }
.logs-page .lead { margin: 10px 0 0; font-size: .84rem; }
.logs-page .logs-register { padding: 0; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 30px rgba(13, 92, 99, .05); min-width: 0; overflow: hidden; }
.logs-register-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.logs-register-header h2 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 5px; }
.logs-register-header .muted { font-size: .7rem; }
.logs-count { color: var(--brand); background: rgba(75, 166, 173, .12); font: 700 .7rem 'Manrope', sans-serif; padding: 3px 7px; border-radius: 6px; }
.logs-access-label { font-size: .65rem; color: var(--muted); white-space: nowrap; }
.logs-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 12px; align-items: end; padding: 16px 20px; }
.logs-toolbar label { font-size: .7rem; font-weight: 700; gap: 6px; }
.logs-toolbar :is(input, select) { padding: 10px 12px; border-radius: 8px; font-size: .78rem; min-height: 40px; }
.logs-toolbar button, .logs-footer button { font-size: .7rem; border-radius: 8px; min-height: 36px; padding: 8px 12px; }
.logs-toolbar button { min-height: 40px; }
.logs-table-scroll { overflow-x: auto; }
.logs-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: .75rem; }
.logs-table th { background: rgba(75, 166, 173, .05); border-block: 1px solid var(--line); text-align: left; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px; }
.logs-table th:first-child { width: 155px; }
.logs-table th:nth-child(3) { width: 150px; }
.logs-table th:last-child { width: 160px; }
.logs-table td { padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; line-height: 1.5; font-size: .73rem; }
.logs-table tbody tr:hover { background: rgba(75, 166, 173, .035); }
.logs-table small { display: block; color: var(--muted); font-size: .65rem; margin-top: 4px; }
.logs-time { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.logs-category { display: inline-block; border-radius: 5px; padding: 2px 6px; background: rgba(75, 166, 173, .07); color: var(--brand); font-size: .65rem; }
.logs-event > strong, .logs-event summary strong { font-weight: 700; font-size: .75rem; }
.logs-event summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; list-style: none; }
.logs-event summary::-webkit-details-marker { display: none; }
.logs-detail-toggle { flex-shrink: 0; color: var(--brand); font-size: .64rem; white-space: nowrap; }
.logs-detail-toggle::after { content: ' +'; }
.logs-event details[open] .logs-detail-toggle::after { content: ' −'; }
.logs-page .history-details { margin-top: 12px; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.logs-page .history-detail-row { display: grid; grid-template-columns: minmax(70px, .65fr) minmax(0, 1fr); gap: 10px; padding: 7px 9px; border-radius: 0; font-size: .69rem; overflow-wrap: anywhere; }
.logs-page .history-detail-row + .history-detail-row { border-top: 1px solid var(--line); }
.logs-page .history-detail-row strong { font-weight: 500; min-width: 0; }
.logs-page .history-detail-row :is(span, strong) { font-size: .69rem; }
.logs-footer, .logs-footer nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logs-footer { padding: 12px 20px; font-size: .68rem; color: var(--muted); }
.logs-page :is(button, input, select, summary):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (min-width: 701px) and (max-width: 1000px) {
  .logs-table th:first-child { width: 125px; }
  .logs-table th:nth-child(3) { width: 120px; }
  .logs-table th:last-child { width: 130px; }
  .logs-table :is(td, th) { padding-inline: 12px; }
}
@media (max-width: 700px) {
  .logs-page .topbar { flex-direction: column; }
  .logs-register-header { flex-wrap: wrap; padding-inline: 16px; }
  .logs-access-label { display: none; }
  .logs-table .logs-time { font-size: .64rem; }
  .logs-toolbar { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .logs-toolbar > label:first-child { grid-column: 1 / -1; }
  .logs-table, .logs-table tbody { display: block; }
  .logs-table thead { display: none; }
  .logs-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 16px; padding: 13px 16px; border-top: 1px solid var(--line); }
  .logs-table td { display: block; padding: 0; border: 0; }
  .logs-table .logs-event { grid-row: 1; grid-column: 1 / -1; }
  .logs-table .logs-time { grid-row: 2; grid-column: 1; }
  .logs-table .logs-time small { display: inline; margin-left: 6px; }
  .logs-table .logs-actor { grid-row: 3; grid-column: 1; font-size: .69rem; }
  .logs-table .logs-reference { grid-row: 2 / 4; grid-column: 2; text-align: right; }
  .logs-footer { padding-inline: 16px; }
  .logs-footer nav { width: 100%; }
}
.staff-page { display: grid; gap: 22px; min-width: 0; }
.staff-page .lead { margin: 12px 0 0; }
.staff-page .eyebrow { margin-bottom: 10px; }
.staff-page .card { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 30px rgba(13, 92, 99, .05); }
.staff-page .staff-role-guide .card { padding: 20px; }
.staff-role-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.staff-role-heading h2 { font-size: 1rem; }
.staff-role-total { font-size: .7rem; font-weight: 700; color: var(--brand); background: rgba(75, 166, 173, .1); padding: 5px 9px; border-radius: 7px; }
.staff-page .staff-directory { padding: 0; overflow: hidden; }
.staff-directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.staff-directory-heading h2 { display: flex; gap: 10px; align-items: center; font-size: 1.15rem; }
.staff-directory-heading p { font-size: .78rem; margin: 8px 0 0; }
.staff-total { font-size: .75rem; color: var(--brand); background: rgba(75, 166, 173, .1); border-radius: 7px; padding: 4px 8px; }
.staff-admin-badge { color: var(--muted); font-size: .7rem; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.staff-filters { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px; gap: 14px; padding: 22px 24px; }
.staff-filters label { font-size: .75rem; font-weight: 700; }
.staff-filters :is(input, select) { font-size: .8rem; border-radius: 10px; min-height: 44px; }
.staff-page .staff-register { min-width: 0; }
.staff-page .staff-register :is(th, td) { vertical-align: middle; padding: 17px 20px; }
.staff-page .staff-register th { font-size: .67rem; text-transform: uppercase; letter-spacing: .06em; }
.staff-page .staff-register :is(th, td):last-child { position: static; background: transparent; min-width: 0; width: auto; }
.staff-page .staff-register thead { background: rgba(75, 166, 173, .04); }
.staff-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.staff-identity > div { min-width: 0; }
.staff-identity strong { display: block; overflow-wrap: anywhere; font-size: .84rem; }
.staff-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: rgba(75, 166, 173, .1); color: var(--brand); font-weight: 800; }
.staff-username { display: block; margin-top: 5px; font-size: .73rem; color: var(--muted); overflow-wrap: anywhere; }
.staff-role-badge { display: inline-block; padding: 5px 8px; font-size: .72rem; border: 1px solid var(--line); border-radius: 7px; white-space: nowrap; }
.staff-account-status { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; white-space: nowrap; }
.staff-account-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.staff-account-status.is-active { color: var(--success); }
.staff-account-status.is-inactive { color: var(--muted); }
.staff-account-status.is-blocked { color: var(--danger); }
.staff-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-page .staff-row-actions button { font-size: .7rem; border-radius: 8px; min-height: 36px; padding: 8px 10px; }
.staff-page button.staff-toggle { background: transparent; color: var(--brand); }
.staff-page button.is-deactivate { color: var(--danger); }
.staff-directory-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 24px; font-size: .72rem; color: var(--muted); }
.staff-directory > .empty { margin: 18px 24px; }
.staff-directory > .inline-banner { margin: 16px 24px 0; }
.staff-page-note { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.8; }
.staff-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); color: var(--ink); border-color: var(--line); }
.staff-dialog::backdrop { background: rgba(3, 8, 12, .65); backdrop-filter: blur(4px); }
.staff-dialog h2 { font-size: 1.35rem; }
.staff-dialog .section-title { align-items: start; margin-bottom: 24px; }
.staff-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.staff-dialog label { color: var(--ink); font-weight: 700; font-size: .82rem; }
.staff-dialog :is(input, select) { border-radius: 10px; font-size: .85rem; }
.staff-dialog small { font-size: .72rem; line-height: 1.6; }
.staff-dialog p { margin: 0; line-height: 1.8; font-size: .85rem; overflow-wrap: anywhere; }
.staff-role-hint { border-left: 3px solid var(--brand); background: rgba(75, 166, 173, .07); padding: 12px 14px; color: var(--muted); font-size: .78rem; line-height: 1.7; border-radius: 0 8px 8px 0; }
.staff-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.staff-dialog button { border-radius: 10px; font-size: .8rem; min-height: 42px; }
.staff-page :is(input, select, button):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 800px) {
  .staff-page .topbar { flex-direction: column; }
  .staff-page .topbar-actions { width: 100%; }
  .staff-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 18px; }
  .staff-filters > label:first-child { grid-column: 1 / -1; }
  .staff-directory-heading { padding: 20px 18px 0; align-items: start; flex-wrap: wrap; }
  .staff-page .staff-register, .staff-page .staff-register tbody { display: block; }
  .staff-page .staff-register thead { display: none; }
  .staff-page .staff-register tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px; gap: 16px; border-top: 1px solid var(--line); }
  .staff-page .staff-register td { display: block; padding: 0; border: 0; min-width: 0; }
  .staff-page .staff-register td:first-child, .staff-page .staff-register td:last-child { grid-column: 1 / -1; }
  .staff-page .staff-register td:nth-child(2)::before, .staff-page .staff-register td:nth-child(3)::before { content: attr(data-label); display: block; font-size: .67rem; color: var(--muted); margin-bottom: 7px; }
  .staff-row-actions { padding-top: 4px; }
  .staff-page .staff-row-actions button { flex: 1; min-height: 42px; }
  .staff-directory-footer { padding-inline: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 500px) {
  .staff-form-grid { grid-template-columns: 1fr; }
  .staff-dialog { padding: 20px; }
  .staff-dialog-actions button { flex: 1; }
}
.tailor-editor-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; border: 1px solid var(--line); background: var(--panel-strong); color: var(--ink); }
.tailor-editor-dialog::backdrop { background: rgba(3, 8, 12, .65); backdrop-filter: blur(4px); }
.tailor-editor-dialog .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tailor-editor-dialog .hint { margin: 0; font-size: .8rem; line-height: 1.7; color: var(--muted); }
@media (max-width: 600px) { .tailor-editor-dialog .field-grid { grid-template-columns: 1fr; } }
.branches-page { display: grid; gap: 26px; min-width: 0; }
.branches-page .eyebrow { margin-bottom: 10px; }
.branches-page .lead { margin: 12px 0 0; }
.branches-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.branches-layout > .card { min-width: 0; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 30px rgba(13, 92, 99, .05); }
.branches-page h2 { font-size: 1.15rem; line-height: 1.4; }
.branches-directory { padding: 0; overflow: hidden; }
.branches-directory-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.branches-directory-header h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.branches-directory-header p, .branch-editor > p { font-size: .82rem; line-height: 1.7; margin: 8px 0 0; }
.branch-count { display: inline-grid; place-items: center; min-width: 27px; padding: 3px 8px; border-radius: 8px; font: 700 .75rem 'Manrope', sans-serif; color: var(--brand); background: rgba(75, 166, 173, .12); }
.branch-directory-icon, .branch-editor-icon, .branch-avatar { display: grid; place-items: center; flex-shrink: 0; color: var(--brand); background: rgba(75, 166, 173, .1); border-radius: 12px; width: 42px; height: 42px; }
.branch-directory-icon svg, .branch-editor-icon svg, .branch-avatar svg { width: 22px; height: 22px; }
.branch-directory-icon { background: transparent; color: var(--muted); }
.branches-search { display: grid; gap: 8px; padding: 22px 24px; }
.branches-search label { font-size: .75rem; font-weight: 700; }
.branches-search-field { position: relative; }
.branches-search-field > svg { position: absolute; top: 14px; left: 14px; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.branches-search-field input { padding-left: 42px; border-radius: 10px; font-size: .82rem; min-height: 46px; }
.branch-list-heading, .branch-directory-row { display: grid; grid-template-columns: minmax(0, 1fr) 65px 136px; gap: 14px; align-items: center; padding: 16px 24px; }
.branch-list-heading { padding-top: 11px; padding-bottom: 11px; border-block: 1px solid var(--line); background: rgba(75, 166, 173, .04); font-size: .67rem; letter-spacing: .07em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.branch-list-heading > :last-child { text-align: right; }
.branches-page .branch-management-list { gap: 0; }
.branch-directory-row + .branch-directory-row { border-top: 1px solid var(--line); }
.branch-directory-row:hover, .branch-directory-row.is-editing { background: rgba(75, 166, 173, .06); }
.branch-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.branch-identity > div { min-width: 0; }
.branch-identity strong { display: block; font-size: .86rem; overflow-wrap: anywhere; line-height: 1.5; }
.branch-code { display: inline-block; margin-top: 5px; color: var(--muted); font: 600 .7rem 'Manrope', sans-serif; letter-spacing: .05em; overflow-wrap: anywhere; }
.branch-bills { font-size: .8rem; font-variant-numeric: tabular-nums; }
.branch-bills > span { display: none; }
.branch-row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.branch-row-actions button { padding: 8px 10px; border-radius: 8px; font-size: .72rem; min-height: 36px; }
.branches-page button.branch-remove { background: transparent; color: var(--danger); }
.branches-page button.branch-remove:hover { background: rgba(211, 93, 93, .08); box-shadow: none; }
.branch-directory-footer { border-top: 1px solid var(--line); padding: 15px 24px; font-size: .72rem; color: var(--muted); }
.branches-directory .empty { margin: 18px 24px; padding: 28px 16px; }
.branches-directory .empty p { margin-bottom: 0; font-size: .82rem; }
.branch-editor { padding: 24px; }
.branch-editor-icon { margin-bottom: 18px; }
.branch-editor form { margin-top: 24px; gap: 18px; }
.branch-editor label { font-size: .8rem; font-weight: 700; color: var(--ink); }
.branch-editor input { border-radius: 10px; font-size: .82rem; min-height: 46px; }
.branch-editor small { margin-top: -8px; font-size: .7rem; line-height: 1.6; }
.branch-editor button { border-radius: 10px; min-height: 44px; font-size: .82rem; }
.branch-editor-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .73rem; line-height: 1.8; color: var(--muted); }
.branches-page :is(button, input):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 1050px) {
  .branches-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .branches-page .topbar { flex-direction: column; }
  .branches-page .topbar-actions { width: 100%; }
  .branches-page .topbar-actions button { flex: 1; font-size: .75rem; }
  .branches-directory-header { padding: 20px 18px 0; }
  .branches-search { padding: 20px 18px; }
  .branch-list-heading { display: none; }
  .branch-directory-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 18px; border-top: 1px solid var(--line); }
  .branch-identity { grid-column: 1 / -1; }
  .branch-bills { color: var(--muted); padding-left: 54px; }
  .branch-bills > span { display: inline; }
  .branch-row-actions button { min-height: 40px; padding-inline: 12px; }
  .branch-directory-footer { padding-inline: 18px; }
  .branch-editor { padding: 20px; }
}
.commission-page { display: grid; gap: 22px; min-width: 0; }
.external-work-page { display: grid; gap: 22px; min-width: 0; }
.external-work-page h1, .external-work-page h2, .external-work-page h3, .external-work-page p { margin: 0; }
.external-work-page h2 { font-size: 1.15rem; }
.external-work-page .lead { margin-top: 12px; }
.external-work-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.external-work-card { display: grid; align-content: start; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-strong); min-width: 0; overflow-wrap: anywhere; }
.external-work-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
.external-work-card dt { color: var(--muted); font-size: .75rem; }
.external-work-card dd { margin: 6px 0 0; font-weight: 700; }
.external-work-card .muted { font-size: .8rem; line-height: 1.6; }
.external-work-notes { white-space: pre-wrap; font-size: .85rem; }
@media (max-width: 800px) {
  .external-work-list { grid-template-columns: 1fr; }
  .external-work-page .topbar { flex-direction: column; }
  .external-work-page > .card { padding: 18px; }
}
.commission-page { gap: 22px; }
.commission-page .eyebrow { margin-bottom: 10px; }
.commission-page .lead { margin: 12px 0 0; font-size: .88rem; }
.commission-page h2 { font-size: 1.1rem; margin: 0; }
.commission-page .card { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 30px rgba(13, 92, 99, .05); }
.commission-page button { border-radius: 10px; font-size: .78rem; min-height: 40px; }
.commission-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.commission-metric { display: grid; align-content: start; gap: 16px; padding: 20px; }
.commission-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .73rem; color: var(--muted); font-weight: 700; }
.commission-metric-heading svg { width: 21px; height: 21px; flex-shrink: 0; color: var(--brand); }
.commission-metric > strong { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.25rem, 1.8vw, 1.9rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.commission-metric > small { color: var(--muted); font-size: .68rem; line-height: 1.6; }
.commission-page .commission-metric:first-child { background: #104f54; border-color: transparent; color: #fff; }
.commission-metric:first-child :is(.commission-metric-heading, small, svg) { color: #c5e1df; }
.commission-metric:nth-child(3) > strong { color: var(--success); }
.commission-page .commission-filter-panel { padding: 0; overflow: hidden; }
.commission-filter-toolbar { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; padding: 20px; }
.commission-filter-toolbar label, .commission-extra-filters label { font-size: .72rem; font-weight: 700; min-width: 0; }
.commission-page :is(input, select) { border-radius: 9px; font-size: .78rem; min-height: 44px; }
.commission-page .commission-more-button { min-height: 44px; display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.commission-extra-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 20px 20px; }
.commission-filter-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 10px 20px; }
.commission-status-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.commission-status-tabs button { color: var(--muted); background: transparent; font-size: .72rem; padding: 8px 11px; min-height: 36px; box-shadow: none; }
.commission-status-tabs button[aria-pressed="true"] { color: var(--brand); background: rgba(75, 166, 173, .12); }
.commission-page button.commission-reset { background: transparent; color: var(--muted); font-size: .7rem; padding: 8px 0; white-space: nowrap; box-shadow: none; }
.commission-register { padding: 22px; min-width: 0; }
.commission-register .section-title { margin-bottom: 8px; }
.commission-entry-count { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.commission-register-description, .commission-page-note { color: var(--muted); font-size: .74rem; line-height: 1.8; margin: 0; }
.commission-page .item-table-scroll { margin-top: 20px; }
.commission-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.commission-table th { text-align: left; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(75, 166, 173, .05); color: var(--muted); padding: 13px 12px; border-block: 1px solid var(--line); white-space: nowrap; }
.commission-table td { padding: 18px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.5; }
.commission-table tbody tr:hover { background: rgba(75, 166, 173, .04); }
.commission-table td:first-child { width: 35%; overflow-wrap: anywhere; }
.commission-table small, .commission-tailors small { display: block; margin-top: 5px; font-size: .69rem; }
.commission-work-name { display: block; font-size: .85rem; margin-top: 7px; }
.commission-work-type { display: inline-block; font-size: .6rem; text-transform: uppercase; letter-spacing: .055em; color: var(--brand); font-weight: 800; }
.commission-work-type.is-external { color: var(--brand-2); }
.commission-reference { color: var(--ink); }
.commission-work-date { font-size: .72rem; white-space: nowrap; color: var(--muted); }
.commission-tailor-identity, .commission-tailor-card-heading { display: flex; gap: 9px; align-items: center; min-width: 0; }
.commission-tailor-identity > div, .commission-tailor-card-heading > div { min-width: 0; overflow-wrap: anywhere; }
.commission-tailor-identity strong { font-size: .78rem; }
.commission-tailor-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(75, 166, 173, .1); color: var(--brand); font-weight: 800; font-size: .75rem; flex-shrink: 0; }
.commission-amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-family: 'Space Grotesk', sans-serif; font-size: .9rem; }
.commission-badge { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); padding: 5px 8px; border-radius: 7px; white-space: nowrap; font-size: .65rem; }
.commission-badge::before { content: ''; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.commission-badge.is-finalized { color: var(--success); background: rgba(84, 170, 127, .1); border-color: transparent; }
.commission-badge.is-completed { color: var(--brand); background: rgba(75, 166, 173, .1); border-color: transparent; }
.commission-badge.is-progress { color: var(--brand-2); background: rgba(217, 162, 117, .1); border-color: transparent; }
.commission-work-stage { max-width: 16ch; }
.commission-pagination, .commission-pagination > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.commission-pagination { padding-top: 20px; font-size: .72rem; }
.commission-pagination button { padding: 8px 12px; }
.commission-tailors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.commission-tailors article { padding: 18px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow-wrap: anywhere; }
.commission-tailor-card-heading strong { font-size: .83rem; }
.commission-tailors dl { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 18px 0; }
.commission-tailors dl > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.commission-tailors dt { font-size: .69rem; color: var(--muted); }
.commission-tailors dd { margin: 0; font-size: .73rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.commission-completion { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .65rem; margin-bottom: 8px; }
.commission-progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 9px; overflow: hidden; background: var(--line); accent-color: var(--brand); }
.commission-progress::-webkit-progress-bar { background: var(--line); }
.commission-progress::-webkit-progress-value { background: var(--brand); border-radius: 9px; }
.commission-page :is(button, input, select):focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
@media (max-width: 1100px) {
  .commission-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commission-filter-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commission-tailors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .commission-page .topbar { flex-direction: column; }
  .commission-page .topbar-actions { width: 100%; gap: 7px; }
  .commission-page .topbar-actions button { flex: 1; padding: 10px; font-size: .7rem; }
  .commission-metric { padding: 16px; gap: 12px; }
  .commission-metric-heading { font-size: .68rem; align-items: start; }
  .commission-metric-heading svg { width: 17px; height: 17px; }
  .commission-metric > strong { font-size: clamp(1rem, 4.5vw, 1.3rem); }
  .commission-currency { display: block; font: 700 .65rem 'Manrope', sans-serif; margin-bottom: 4px; color: var(--muted); }
  .commission-metric:first-child .commission-currency { color: #c5e1df; }
  .commission-filter-toolbar { padding: 16px; gap: 12px; }
  .commission-filter-toolbar .commission-search { grid-column: 1 / -1; }
  .commission-more-button { grid-column: 1 / -1; }
  .commission-extra-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 16px; }
  .commission-filter-footer { flex-wrap: wrap; padding: 10px 16px; }
  .commission-register { padding: 18px; }
  .commission-register .section-title { flex-wrap: wrap; gap: 10px; }
  .commission-tailors { grid-template-columns: 1fr; }
  .commission-table thead { display: none; }
  .commission-table, .commission-table tbody { display: block; }
  .commission-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .commission-table tr:first-child { padding-top: 0; }
  .commission-table td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
  .commission-table td:first-child { grid-column: 1 / -1; width: auto; }
  .commission-table td:nth-child(4)::before, .commission-table td:nth-child(5)::before { content: attr(data-label); display: block; font: 500 .65rem 'Manrope', sans-serif; color: var(--muted); margin-bottom: 7px; }
  .commission-table .commission-work-date { text-align: right; white-space: normal; }
  .commission-table .commission-amount { white-space: normal; }
  .commission-pagination > div { width: 100%; }
}
@media (max-width: 400px) {
  .commission-extra-filters { grid-template-columns: 1fr; }
  .commission-metric-heading svg { display: none; }
}
@media print {
  .commission-filter-panel, .commission-pagination { display: none; }
  .commission-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .commission-register, .commission-tailors article { break-inside: avoid; }
  .commission-page .commission-metric:first-child { background: white; color: black; border: 1px solid #ddd; }
  .commission-metric:first-child :is(.commission-metric-heading, small, svg) { color: #555; }
}
.workspace { min-width: 0; align-content: start; }
[hidden] { display: none !important; }

@media (min-width: 1221px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr) !important; }
}

@media (max-width: 1220px) {
  .mobile-navigation-bar { display: flex; align-items: center; gap: 16px; }
  .mobile-navigation-bar button, .sidebar-menu-toggle { min-width: 44px; min-height: 44px; }
  .sidebar.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    height: 100dvh;
    max-height: none;
    border-radius: 0 22px 22px 0;
    z-index: 51;
    visibility: hidden;
    transform: translateX(-100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .sidebar.app-sidebar.sidebar-open { visibility: visible; transform: translateX(0); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 50; width: 100%; height: 100%; border-radius: 0; padding: 0; background: rgba(0, 0, 0, 0.45); }
  .sidebar-backdrop:hover { transform: none; box-shadow: none; }
  .sidebar-menu-toggle { display: block; margin-left: auto; padding: 8px 12px; }
  .app-sidebar > * { flex-shrink: 0; }
  .app-sidebar .sidebar-navigation { flex: 0 0 auto; min-height: auto; overflow: visible; }
  .app-sidebar .sidebar-footer { margin-top: auto; }
  body:has(.app-sidebar.sidebar-open) { overflow: hidden; }
}

.sidebar-credit {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.5;
}

.sidebar-credit a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.sidebar-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 1220px) {
  .app-shell,
  .hero,
  .dashboard-grid,
  .form-grid,
  .report-grid,
  .list-grid,
  .field-grid,
  .summary-grid,
  .search-bar,
  .split,
  .kanban {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.settings-grid > *, .field-grid > *, .search-bar > * { min-width: 0; }
.settings-grid h2, .settings-grid p { margin: 0; }
.settings-grid p, .install-steps { line-height: 1.7; overflow-wrap: anywhere; }
.settings-grid button { justify-self: start; white-space: normal; }
.install-steps { margin: 0; padding-left: 24px; }
.install-steps li + li { margin-top: 10px; }

@media screen and (max-width: 1220px) {
  body { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .mobile-navigation-bar { position: sticky; top: 0; z-index: 40; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-strong); }
  .topbar { flex-wrap: wrap; }
  .topbar > *, .topbar-actions { min-width: 0; max-width: 100%; }
  .topbar-actions { flex-wrap: wrap; }
  .modal-backdrop { padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .modal-card, .modal-card-wide, dialog[open] { max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  .sales-table-scroll, .item-table-scroll, .logs-table-scroll { min-width: 0; max-width: 100%; overscroll-behavior-x: contain; }
}

/* Keep useful two-column forms on portrait and landscape tablets. */
@media screen and (min-width: 701px) and (max-width: 1220px) {
  .field-grid, .search-bar, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 22px; }
}

@media screen and (max-width: 700px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-grid button { width: 100%; }
  .card { padding: 18px; }
  .modal-card, .modal-card-wide { padding: 18px; border-radius: 18px; }
}

/* Touch tablets also include wider landscape devices with a desktop sidebar. */
@media screen and (pointer: coarse) {
  button, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, summary { min-height: 48px; }
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: max(16px, 1em); }
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; flex-shrink: 0; }
  .app-sidebar .nav-item, .sidebar-utilities button, .topbar-actions button, .inline-actions button, .sales-row-actions button { min-height: 48px; }
  button { touch-action: manipulation; }
  button:hover { transform: none; }
  .sidebar.app-sidebar { height: calc(100dvh - 48px); }
  .sidebar.app-sidebar.sidebar-open { height: 100dvh; }
  .modal-card, .modal-card-wide, dialog[open] { max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .item-filter-grid, .item-actions { display: none !important; }
  .item-table-scroll { overflow: visible; }
  .item-table-scroll table { font-size: 8pt; table-layout: fixed; }
  .item-table-scroll th, .item-table-scroll td { padding: 5px; overflow-wrap: anywhere; }
  body {
    padding: 0;
    background: white;
  }

  .sidebar,
  .mobile-navigation-bar,
  .topbar-actions,
  .nav-list,
  button {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .card,
  .summary-card,
  .order-card,
  .report-item {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
  }
}

