:root {
  --bg: #eef4f3;
  --surface: #ffffff;
  --surface-muted: #eef6f4;
  --line: #d9e1e4;
  --ink: #1d2528;
  --muted: #657378;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --client-accent: #d7a449;
  --client-soft: #f7f0df;
  --ink-panel: #112b2f;
  --amber: #b7791f;
  --rose: #b42318;
  --green: #177245;
  --shadow: 0 14px 38px rgba(29, 37, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 164, 73, 0.16), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.14), transparent 24%),
    linear-gradient(135deg, #eef4f3 0%, #f8faf8 48%, #edf3f7 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.4;
  overflow-x: hidden;
}

body[data-theme="dark"] {
  --bg: #0d1719;
  --surface: #132326;
  --surface-muted: #182e31;
  --line: rgba(221, 235, 236, 0.14);
  --ink: #ecf6f5;
  --muted: #9db4b7;
  --shadow: 0 14px 42px rgba(0, 0, 0, 0.28);
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 164, 73, 0.12), transparent 26%),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.24), transparent 24%),
    linear-gradient(135deg, #0b1113 0%, #102224 52%, #071112 100%);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] output.readonly-value,
body[data-theme="dark"] button.secondary,
body[data-theme="dark"] .nav-tabs,
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .section-head,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .metric,
body[data-theme="dark"] .status-pill,
body[data-theme="dark"] .setup-check-item,
body[data-theme="dark"] .payment-summary-item,
body[data-theme="dark"] .ai-status-card,
body[data-theme="dark"] .install-step,
body[data-theme="dark"] .team-row,
body[data-theme="dark"] .module-card,
body[data-theme="dark"] .brand-preview-card,
body[data-theme="dark"] .portal-login-card,
body[data-theme="dark"] .void-sale-summary > div,
body[data-theme="dark"] .receipt-meta > div,
body[data-theme="dark"] .receipt-customer,
body[data-theme="dark"] .receipt-totals > div,
body[data-theme="dark"] .helper-note,
body[data-theme="dark"] .qa-card {
  background: rgba(19, 35, 38, 0.94);
  color: var(--ink);
}

body[data-theme="dark"] .portal-identity-panel {
  background:
    linear-gradient(135deg, rgba(19, 35, 38, 0.96), rgba(13, 31, 34, 0.92)),
    radial-gradient(circle at 92% 10%, rgba(215, 164, 73, 0.16), transparent 28%);
}

body[data-theme="dark"] .portal-login-card {
  border-color: rgba(221, 235, 236, 0.14);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] th,
body[data-theme="dark"] td,
body[data-theme="dark"] label,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .empty-state,
body[data-theme="dark"] .status-pill span,
body[data-theme="dark"] .team-row span,
body[data-theme="dark"] .module-card span,
body[data-theme="dark"] .module-card small,
body[data-theme="dark"] .brand-preview-card span,
body[data-theme="dark"] .brand-preview-card small,
body[data-theme="dark"] .payment-summary-item span,
body[data-theme="dark"] .payment-summary-item small,
body[data-theme="dark"] .metric span,
body[data-theme="dark"] .metric small,
body[data-theme="dark"] .setup-check-item span,
body[data-theme="dark"] .setup-progress-summary span,
body[data-theme="dark"] .setup-progress-summary small,
body[data-theme="dark"] .ai-status-card span,
body[data-theme="dark"] .ai-status-card small {
  color: var(--muted);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select {
  border-color: rgba(221, 235, 236, 0.18);
  background: #0d1b1d;
  color: var(--ink);
}

body[data-theme="dark"] table,
body[data-theme="dark"] .table-wrap {
  color: var(--ink);
}

body[data-theme="dark"] th,
body[data-theme="dark"] td {
  border-bottom-color: rgba(221, 235, 236, 0.12);
}

body[data-theme="dark"] .dashboard-board > .metric-grid .metric:nth-child(1),
body[data-theme="dark"] .dashboard-board > .metric-grid .metric:nth-child(3),
body[data-theme="dark"] .dashboard-board > .metric-grid .metric:nth-child(6),
body[data-theme="dark"] .reports-board > .metric-grid .metric:nth-child(1),
body[data-theme="dark"] .reports-board > .metric-grid .metric:nth-child(4),
body[data-theme="dark"] .module-card,
body[data-theme="dark"] .brand-preview-card {
  background: linear-gradient(180deg, rgba(19, 35, 38, 0.96), rgba(13, 27, 29, 0.96));
}

body[data-theme="dark"] .badge.good {
  background: rgba(34, 197, 94, 0.16);
  color: #8ef0b2;
}

body[data-theme="dark"] .badge.warn {
  background: rgba(245, 158, 11, 0.16);
  color: #ffd37a;
}

body[data-theme="dark"] .badge.bad {
  background: rgba(248, 113, 113, 0.16);
  color: #ffaaa5;
}

body[data-theme="dark"] .pos-subtab {
  border-color: rgba(221, 235, 236, 0.16);
  background: rgba(13, 27, 29, 0.92);
  color: var(--ink);
}

body[data-theme="dark"] .workspace-subnav,
body[data-theme="dark"] .workspace-subtab,
body[data-theme="dark"] .report-filter-strip,
body[data-theme="dark"] .checkout-drawer-head,
body[data-theme="dark"] .engineering-card {
  border-color: rgba(221, 235, 236, 0.16);
  background: rgba(19, 35, 38, 0.94);
  color: var(--ink);
}

body[data-theme="dark"] .workspace-subtab.active {
  border-color: color-mix(in srgb, var(--teal) 70%, #ffffff 8%);
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #ffffff;
}

body[data-theme="dark"] .checkout-drawer-head span,
body[data-theme="dark"] .engineering-card span,
body[data-theme="dark"] .engineering-card small {
  color: var(--muted);
}

body[data-theme="dark"] .pos-subtab.active {
  border-color: color-mix(in srgb, var(--teal) 70%, #ffffff 8%);
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #ffffff;
}

body[data-theme="dark"] .pos-item-tile,
body[data-theme="dark"] .ticket-item {
  border-color: rgba(221, 235, 236, 0.15);
  background: linear-gradient(180deg, rgba(19, 35, 38, 0.98), rgba(13, 27, 29, 0.98));
  color: var(--ink);
}

body[data-theme="dark"] .pos-item-tile:hover {
  border-color: color-mix(in srgb, var(--teal) 72%, #ffffff 8%);
  background: linear-gradient(180deg, rgba(20, 61, 62, 0.98), rgba(15, 45, 47, 0.98));
  color: var(--ink);
}

body[data-theme="dark"] .pos-item-tile span,
body[data-theme="dark"] .pos-item-tile small,
body[data-theme="dark"] .ticket-item span,
body[data-theme="dark"] .ticket-total span,
body[data-theme="dark"] .ticket-hint,
body[data-theme="dark"] .checkout-notice span {
  color: var(--muted);
}

body[data-theme="dark"] .checkout-notice {
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(20, 83, 45, 0.24);
  color: #8ef0b2;
}

body[data-theme="dark"] .daily-closeout-summary > div,
body[data-theme="dark"] .reorder-summary > div,
body[data-theme="dark"] .setup-progress-summary > div,
body[data-theme="dark"] .expense-metrics > div,
body[data-theme="dark"] .shift-z-metrics > div,
body[data-theme="dark"] .shift-z-head > div,
body[data-theme="dark"] .shift-z-ledger > div {
  border-color: rgba(221, 235, 236, 0.15);
  background: linear-gradient(180deg, rgba(19, 35, 38, 0.98), rgba(13, 27, 29, 0.98));
  color: var(--ink);
}

body[data-theme="dark"] .daily-closeout-summary span,
body[data-theme="dark"] .daily-closeout-summary small,
body[data-theme="dark"] .reorder-summary span,
body[data-theme="dark"] .reorder-summary small,
body[data-theme="dark"] .setup-progress-summary span,
body[data-theme="dark"] .setup-progress-summary small,
body[data-theme="dark"] .shift-z-metrics span,
body[data-theme="dark"] .shift-z-metrics small,
body[data-theme="dark"] .shift-z-head span,
body[data-theme="dark"] .shift-z-head small,
body[data-theme="dark"] .shift-z-ledger span,
body[data-theme="dark"] .shift-z-ledger small {
  color: var(--muted);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes promptIn {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), #0c8a80);
  color: #ffffff;
  cursor: pointer;
  padding: 0 16px;
  font-weight: 700;
}

button:hover {
  background: linear-gradient(135deg, var(--teal-dark), #08766d);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:disabled:hover {
  background: var(--teal);
}

button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

button.secondary:hover {
  background: var(--surface-muted);
}

button.secondary:disabled:hover,
.nav-tab:disabled:hover {
  background: var(--surface);
}

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

button.danger:hover {
  background: #8f1d14;
}

input,
select,
output.readonly-value {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
}

output.readonly-value {
  display: flex;
  align-items: center;
  background: var(--surface-muted);
  color: var(--ink);
}

output.total-due {
  min-height: 54px;
  font-size: 1.15rem;
  font-weight: 800;
}

output.readonly-value.warn {
  border-color: #efd69d;
  background: #fff8e8;
  color: var(--amber);
}

output.readonly-value.bad {
  border-color: #efbeb9;
  background: #fff0ee;
  color: var(--rose);
}

.checkline {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.checkline input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td {
  font-size: 0.94rem;
}

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

body[data-authenticated="false"] {
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 199, 160, 0.24), transparent 28%),
    radial-gradient(circle at 28% 78%, rgba(215, 164, 73, 0.18), transparent 24%),
    linear-gradient(180deg, #07110f 0%, #0a1628 58%, #07110f 100%);
}

body[data-authenticated="false"] .topbar {
  display: none;
}

body[data-authenticated="false"] .app-shell {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

body[data-authenticated="false"] main {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 24px;
}

body[data-authenticated="false"] .app-shell {
  grid-template-columns: 1fr;
}

body[data-authenticated="false"] #portal.view.active {
  width: min(100%, 1180px);
  min-height: auto;
  gap: 0;
}

body[data-authenticated="false"] .portal-section-head {
  display: none;
}

body[data-authenticated="false"] .portal-board {
  gap: 0;
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 0;
}

body[data-authenticated="false"] .portal-identity-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body[data-authenticated="false"] .portal-login-card {
  width: min(100%, 386px);
}

body[data-authenticated="false"] .portal-login-layout {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 17, 15, 0.72);
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.screen-prompt {
  position: fixed;
  top: 82px;
  right: clamp(12px, 3vw, 30px);
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(430px, calc(100vw - 24px));
  border: 1px solid #b9e6ca;
  border-radius: 8px;
  background: #effbf4;
  box-shadow: 0 18px 45px rgba(29, 37, 40, 0.18);
  color: var(--green);
  padding: 14px;
  animation: promptIn 0.24s ease both;
}

.screen-prompt strong,
.screen-prompt span,
.screen-prompt small {
  display: block;
}

.screen-prompt strong {
  font-size: 1rem;
}

.screen-prompt span {
  margin-top: 2px;
  color: var(--ink);
  font-weight: 800;
}

.screen-prompt small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.screen-prompt button {
  min-height: 34px;
  padding: 0 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(29, 37, 40, 0.38);
  padding: 18px;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(29, 37, 40, 0.24);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.icon-close {
  min-height: 34px;
  padding: 0 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.receipt-content {
  display: grid;
  gap: 14px;
  padding: 16px 0;
}

.receipt-brand {
  display: grid;
  gap: 2px;
  text-align: center;
}

.receipt-brand strong {
  font-size: 1.25rem;
}

.receipt-brand span,
.receipt-brand small,
.receipt-meta span,
.receipt-customer span,
.receipt-totals span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.receipt-meta,
.receipt-customer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.receipt-meta > div,
.receipt-customer > div,
.receipt-totals > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.receipt-meta strong,
.receipt-customer strong,
.receipt-totals strong {
  display: block;
  margin-top: 3px;
}

.receipt-table-wrap {
  margin: 0;
}

.receipt-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.receipt-totals > div:nth-child(3) {
  border-color: #b9e1de;
  background: #eff9f7;
}

.receipt-note {
  margin: 0;
  border: 1px solid #efd69d;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--amber);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px;
}

.void-sale-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 0;
}

.void-sale-summary > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.void-sale-summary span,
.void-sale-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.void-sale-summary strong {
  display: block;
  margin: 5px 0;
}

.void-audit {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.void-audit small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(217, 225, 228, 0.76);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  padding: 14px clamp(16px, 3vw, 28px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar h1,
.section-head h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
}

.topbar > div:first-child {
  border-left: 4px solid var(--client-accent);
  padding-left: 12px;
}

.brand-owner {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.brand-owner::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--client-accent);
  vertical-align: 1px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  border: 1px solid rgba(217, 225, 228, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 5px;
}

.role-control {
  display: flex;
  align-items: end;
  gap: 10px;
  padding-left: 8px;
}

.role-control label {
  min-width: 132px;
}

.role-control label[hidden] {
  display: none !important;
}

.role-control select {
  min-height: 38px;
}

.session-action {
  min-height: 34px;
  padding: 0 12px;
  border-color: rgba(15, 118, 110, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--teal-dark);
}

.session-action:hover {
  background: var(--teal);
  color: #ffffff;
}

.session-action[hidden] {
  display: none !important;
}

.nav-tab {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.nav-tab[hidden] {
  display: none !important;
}

.nav-tab.active {
  border-color: rgba(15, 118, 110, 0.16);
  background: linear-gradient(135deg, var(--ink-panel), var(--teal));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.nav-tab:not(:disabled):hover {
  transform: translateY(-1px);
}

.workspace-subnav {
  position: static;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 52px;
  border: 1px solid rgba(217, 225, 228, 0.86);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  padding: 8px;
  backdrop-filter: blur(14px);
}

.workspace-subtab {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workspace-subtab.active {
  border-color: color-mix(in srgb, var(--teal) 74%, #ffffff 12%);
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.workspace-subtab:not(.active):hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
}

[data-workspace-panel][hidden] {
  display: none !important;
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2.4vw, 24px);
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 12px;
  min-height: 0;
  animation: viewIn 0.22s ease both;
}

.workspace-board {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.workspace-board > *,
.content-grid > *,
.panel {
  min-width: 0;
}

.section-head,
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.panel-head h3 {
  font-size: 1rem;
}

.panel-head.compact {
  align-items: center;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.toolbar label {
  min-width: 180px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 13px;
}

.metric span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.16rem, 2.4vw, 1.72rem);
}

.metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.daily-closeout-panel {
  display: grid;
  gap: 14px;
}

.daily-closeout-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.daily-closeout-summary > div {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.daily-closeout-summary span,
.daily-closeout-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.daily-closeout-summary strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
}

.daily-closeout-summary strong.good {
  color: var(--green);
}

.daily-closeout-summary strong.warn {
  color: var(--amber);
}

.daily-closeout-summary strong.bad {
  color: var(--rose);
}

.reorder-panel {
  display: grid;
  gap: 14px;
}

.reorder-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reorder-summary > div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.reorder-summary span,
.reorder-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.reorder-summary strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
}

.reorder-summary strong.good {
  color: var(--green);
}

.reorder-summary strong.warn {
  color: var(--amber);
}

.reorder-summary strong.bad {
  color: var(--rose);
}

.closeout-grid {
  align-items: start;
}

.content-grid {
  display: grid;
  gap: 16px;
}

.content-grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.content-grid.menu-layout {
  grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
}

.content-grid.expense-layout {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
}

.profile-panel,
.prospect-panel {
  display: grid;
  gap: 14px;
}

.device-qa-panel {
  display: none;
}

.profile-form,
.prospect-form {
  display: grid;
  gap: 12px;
}

.device-qa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.qa-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.qa-card strong,
.qa-card span {
  display: block;
}

.qa-card > div > span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.shift-gate {
  min-height: min(620px, calc(100vh - 220px));
  display: grid;
  align-content: center;
  justify-content: center;
  gap: 22px;
  padding: clamp(22px, 6vw, 64px);
  text-align: center;
}

.shift-gate h3 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
}

.shift-gate p {
  max-width: 560px;
  margin: 8px auto 0;
  color: var(--muted);
}

.shift-gate .shift-controls {
  width: min(620px, 100%);
  margin: 0 auto;
  text-align: left;
}

.pos-workspace {
  display: grid;
  gap: 16px;
}

.pos-appbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

.pos-subnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pos-subtab {
  min-height: 38px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.pos-subtab.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.pos-panel {
  display: none;
}

.pos-panel.active {
  display: block;
}

.pos-register-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: start;
}

.register-left-stack {
  display: grid;
  gap: 16px;
}

.pos-tiles-panel {
  display: grid;
  gap: 12px;
}

.pos-item-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pos-item-tile {
  min-height: 122px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.pos-item-tile:hover {
  border-color: var(--teal);
  background: #eff9f7;
  color: var(--ink);
}

.pos-item-tile:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.pos-item-tile strong,
.pos-item-tile span,
.pos-item-tile small {
  display: block;
}

.pos-item-tile span,
.pos-item-tile small {
  color: var(--muted);
  font-size: 0.8rem;
}

.pos-item-tile em {
  margin-top: 4px;
  font-style: normal;
}

.ticket-panel {
  position: sticky;
  top: 120px;
  display: grid;
  gap: 16px;
}

.checkout-notice {
  display: grid;
  gap: 4px;
  border: 1px solid #b9e6ca;
  border-radius: 8px;
  background: #effbf4;
  color: var(--green);
  padding: 12px;
}

.checkout-notice strong,
.checkout-notice span {
  display: block;
}

.checkout-notice span {
  font-size: 0.86rem;
  font-weight: 700;
}

.ticket-total {
  display: grid;
  gap: 8px;
}

.ticket-total span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.ticket-grid {
  display: grid;
  gap: 12px;
}

.ticket-checkout {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.checkout-toggle {
  width: 100%;
}

.ticket-checkout.collapsed {
  display: none;
}

.checkout-drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--teal) 20%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(215, 164, 73, 0.08));
  padding: 12px;
}

.checkout-drawer-head strong,
.checkout-drawer-head span {
  display: block;
}

.checkout-drawer-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.ticket-items {
  display: grid;
  gap: 8px;
  min-height: 74px;
}

.ticket-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

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

.ticket-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.ticket-item .row-actions {
  justify-content: flex-end;
}

.ticket-hint {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding-top: 12px;
}

.ticket-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.report-filter-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 12px;
}

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

.engineering-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.engineering-card strong,
.engineering-card span,
.engineering-card small {
  display: block;
}

.engineering-card span,
.engineering-card small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.engineering-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.shift-controls {
  display: grid;
  align-content: start;
  gap: 16px;
}

.shift-summary {
  display: grid;
  gap: 10px;
}

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

.shift-report-item {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.shift-report-item span,
.shift-report-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.shift-report-item strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
}

.shift-z-report {
  display: grid;
  gap: 14px;
}

.shift-z-head,
.shift-z-metrics,
.shift-z-ledger {
  display: grid;
  gap: 10px;
}

.shift-z-head {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shift-z-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shift-z-ledger {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shift-z-head > div,
.shift-z-metrics > div,
.shift-z-ledger > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.shift-z-head span,
.shift-z-metrics span,
.shift-z-ledger span,
.shift-z-metrics small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.shift-z-head strong,
.shift-z-metrics strong,
.shift-z-ledger strong {
  display: block;
  margin-top: 5px;
  font-size: 1.02rem;
}

.shift-z-metrics strong.good {
  color: var(--green);
}

.shift-z-metrics strong.warn {
  color: var(--amber);
}

.shift-z-metrics strong.bad {
  color: var(--rose);
}

.shift-z-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cash-log {
  display: grid;
  gap: 8px;
}

.cash-log-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

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

.cash-log-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.daily-sales-panel {
  margin-top: 16px;
}

.order-history-panel {
  margin-top: 16px;
}

.history-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px 150px;
  gap: 10px;
  margin-top: 12px;
}

.payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.payment-summary-item {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.payment-summary-item.total {
  border-color: #b9e1de;
  background: #eff9f7;
}

.payment-summary-item span,
.payment-summary-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.payment-summary-item strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
}

.setup-progress-panel {
  display: grid;
  gap: 14px;
}

.setup-progress-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.setup-progress-summary > div {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.setup-progress-summary span,
.setup-progress-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.setup-progress-summary strong {
  display: block;
  margin: 5px 0;
  font-size: 1.05rem;
}

.setup-progress-summary strong.good {
  color: var(--green);
}

.setup-progress-summary strong.warn {
  color: var(--amber);
}

.setup-progress-summary strong.bad {
  color: var(--rose);
}

.setup-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.setup-checklist {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.setup-check-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.setup-check-item.done {
  border-color: #ccebd8;
  background: #f0fbf5;
}

.setup-check-item.pending {
  border-color: #efd69d;
  background: #fff8e8;
}

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

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

.portal-board {
  display: grid;
  gap: 16px;
}

.portal-identity-panel {
  display: grid;
  gap: 14px;
}

.portal-login-layout {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  align-items: stretch;
}

.portal-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.portal-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--client-accent), #f6df8b);
  color: #07110f;
  font-size: 1rem;
  font-weight: 900;
}

.portal-login-card,
.portal-admin-form {
  display: grid;
  gap: 12px;
}

.portal-login-card {
  width: min(100%, 386px);
  justify-self: stretch;
  align-content: center;
  min-height: 560px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: rgba(7, 17, 15, 0.78);
  box-shadow: none;
  color: #ffffff;
  padding: clamp(30px, 5vw, 62px);
  backdrop-filter: blur(10px);
}

.portal-login-card-head {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
}

.portal-login-card-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 500;
}

.portal-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 1.24rem;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-login-card label {
  color: #c9a84c;
  font-size: 0.78rem;
  font-weight: 900;
}

.portal-login-card input {
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.portal-login-card input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.portal-login-card input:focus {
  border-color: rgba(121, 255, 224, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 199, 160, 0.14);
}

.portal-login-card button[type="submit"] {
  min-height: 50px;
  border-radius: 0;
  background: var(--client-accent);
  color: #07110f;
}

.portal-login-card button[type="submit"]:hover {
  background: #f0d580;
  color: #07110f;
}

.portal-byline {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.78rem;
  text-align: center;
}

.link-button {
  min-height: auto;
  justify-self: start;
  border: 0;
  background: transparent;
  color: #79ffe0;
  padding: 0;
  box-shadow: none;
}

.link-button:hover {
  color: #ffffff;
  background: transparent;
}

.portal-session-card {
  display: none;
}

.portal-visual-panel {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 560px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 17, 15, 0.2), rgba(7, 17, 15, 0.84)),
    radial-gradient(circle at 72% 42%, rgba(0, 199, 160, 0.32), transparent 28%),
    radial-gradient(circle at 46% 78%, rgba(202, 168, 90, 0.24), transparent 24%),
    linear-gradient(135deg, #07110f, #102b24 58%, #07110f);
  color: #ffffff;
  padding: clamp(34px, 6vw, 76px);
}

.portal-visual-panel:before {
  content: "";
  position: absolute;
  inset: 18% 6% auto 6%;
  height: 240px;
  border-radius: 999px;
  border: 1px solid rgba(121, 255, 224, 0.38);
  transform: rotate(-6deg);
}

.portal-visual-panel:after {
  content: "";
  position: absolute;
  right: -74px;
  bottom: -82px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(0, 199, 160, 0.13);
}

.portal-visual-mark,
.portal-visual-panel strong,
.portal-visual-panel span,
.portal-visual-bars {
  position: relative;
  z-index: 1;
}

.portal-visual-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--client-accent), #f6df8b);
  color: #07110f;
  font-weight: 950;
}

.portal-visual-panel strong {
  display: block;
  color: #ffffff;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  font-weight: 500;
  line-height: 0.98;
}

.portal-visual-panel span {
  display: block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.portal-visual-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  width: min(360px, 100%);
  height: 92px;
  margin-top: 42px;
}

.portal-visual-bars i {
  flex: 1;
  min-height: 16px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(to top, var(--teal), #79ffe0);
}

.portal-visual-bars i:nth-child(1) { height: 42%; }
.portal-visual-bars i:nth-child(2) { height: 76%; background: linear-gradient(to top, var(--client-accent), #f6df8b); }
.portal-visual-bars i:nth-child(3) { height: 58%; }
.portal-visual-bars i:nth-child(4) { height: 92%; background: linear-gradient(to top, var(--client-accent), #f6df8b); }
.portal-visual-bars i:nth-child(5) { height: 68%; }

#portal-admin-grid[hidden],
#portal-service-grid[hidden] {
  display: none !important;
}

.portal-brand-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.portal-brand-card h3 {
  margin: 0 0 6px;
  color: #ffffff;
}

.portal-brand-card .eyebrow {
  color: #efd287;
}

.portal-brand-card span {
  color: #b9d7d9;
  font-weight: 700;
}

.portal-session-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.portal-session-grid > div,
.ai-status-card,
.install-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.portal-session-grid > div {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.portal-session-grid span,
.portal-session-grid small,
.portal-install-flow small,
.ai-status-card span,
.ai-status-card small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.portal-session-grid span,
.portal-session-grid small {
  color: #b9d7d9;
}

.portal-session-grid strong,
.ai-status-card strong {
  display: block;
  margin: 5px 0;
  font-size: 1.02rem;
}

.portal-session-grid strong {
  color: #ffffff;
}

.portal-account-table {
  margin-top: 14px;
}

.ai-status-summary {
  margin-bottom: 12px;
}

.portal-install-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.brand-form,
.team-invite-form {
  display: grid;
  gap: 12px;
}

.brand-preview {
  margin-top: 14px;
}

.brand-preview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(238, 246, 244, 0.92)),
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--client-accent) 28%, transparent), transparent 28%);
  padding: 14px;
}

.brand-preview-card span,
.brand-preview-card small,
.module-card span,
.module-card small,
.team-row span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.brand-preview-card strong {
  display: block;
  margin: 5px 0;
  font-size: 1.18rem;
}

.brand-swatches {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.brand-swatches i {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.team-row,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.module-card {
  min-height: 112px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 246, 244, 0.96));
}

.module-card strong {
  display: block;
  margin: 8px 0 5px;
  font-size: 1rem;
}

.install-step strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #e7f4f3;
  color: var(--teal);
}

.dashboard-board > .metric-grid .metric:nth-child(1),
.dashboard-board > .metric-grid .metric:nth-child(3),
.reports-board > .metric-grid .metric:nth-child(1) {
  border-color: rgba(15, 118, 110, 0.2);
  background: linear-gradient(180deg, #ffffff, #edf8f5);
}

.dashboard-board > .metric-grid .metric:nth-child(6),
.reports-board > .metric-grid .metric:nth-child(4) {
  border-color: rgba(215, 164, 73, 0.32);
  background: linear-gradient(180deg, #ffffff, var(--client-soft));
}

.install-step span {
  display: block;
  margin: 8px 0 4px;
  font-weight: 800;
}

.table-section-head {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.content-grid.inventory-layout,
.content-grid.analytics-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  padding: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.panel:hover {
  border-color: rgba(15, 118, 110, 0.2);
  box-shadow: 0 16px 42px rgba(29, 37, 40, 0.13);
}

.metric,
.payment-summary-item,
.setup-progress-summary > div,
.portal-session-grid > div,
.ai-status-card,
.install-step,
.status-pill,
.setup-check-item {
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.metric:hover,
.payment-summary-item:hover,
.setup-progress-summary > div:hover,
.portal-session-grid > div:hover,
.ai-status-card:hover,
.install-step:hover,
.status-pill:hover,
.setup-check-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.22);
}

.form-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

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

.helper-note {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 10px;
}

.helper-note.good {
  border-color: #ccebd8;
  background: #f0fbf5;
  color: var(--green);
}

.helper-note.warn {
  border-color: #efd69d;
  background: #fff8e8;
  color: var(--amber);
}

.helper-note.bad {
  border-color: #efbeb9;
  background: #fff0ee;
  color: var(--rose);
}

.hidden {
  display: none !important;
}

.table-wrap {
  margin: 12px -6px -6px;
  overflow-x: auto;
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.status-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.status-pill strong {
  display: block;
}

.status-pill span {
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.good {
  background: #e8f6ef;
  color: var(--green);
}

.badge.warn {
  background: #fff5df;
  color: var(--amber);
}

.badge.bad {
  background: #fdeceb;
  color: var(--rose);
}

.recipe-builder {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

#recipe-rows {
  display: grid;
  gap: 10px;
}

.recipe-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 88px;
  gap: 8px;
  align-items: end;
}

.recipe-row button {
  padding: 0;
}

.summary-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: var(--ink);
}

.summary-box p {
  margin: 0;
}

.summary-box ul {
  margin: 0;
  padding-left: 20px;
}

.empty-state {
  color: var(--muted);
  padding: 12px 10px;
}

.money {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.row-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

@media (min-width: 981px) {
  body {
    overflow: hidden;
  }

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

  .topbar {
    position: static;
    height: 100vh;
    align-items: stretch;
    align-self: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 18px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 22px 18px;
    overflow: auto;
  }

  .topbar > div:first-child {
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .nav-tabs {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .nav-tab {
    width: 100%;
    justify-content: flex-start;
    padding: 0 12px;
    text-align: left;
  }

  .role-control {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    padding-left: 0;
  }

  .role-control label {
    min-width: 0;
  }

  main {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 18px;
    overflow: hidden;
  }

  .view.active {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
  }

  .section-head {
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 14px 16px;
  }

  .workspace-board {
    height: 100%;
    overflow: auto;
    padding: 2px 8px 20px 2px;
  }

  .workspace-board::-webkit-scrollbar,
  .pos-panel::-webkit-scrollbar,
  .ticket-panel::-webkit-scrollbar,
  .table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  .workspace-board::-webkit-scrollbar-thumb,
  .pos-panel::-webkit-scrollbar-thumb,
  .ticket-panel::-webkit-scrollbar-thumb,
  .table-wrap::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #b9c7cb;
    background-clip: padding-box;
  }

  .dashboard-board {
    grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.4fr);
    align-items: start;
  }

  .dashboard-board > .metric-grid,
  .dashboard-board > .daily-closeout-panel,
  .dashboard-board > .device-qa-panel,
  .dashboard-board > .content-grid,
  .dashboard-board > article:last-child {
    grid-column: 1 / -1;
  }

  .pos-board {
    align-content: stretch;
    overflow: hidden;
    padding-right: 0;
  }

  .pos-workspace {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .pos-panel.active {
    min-height: 0;
    overflow: auto;
    padding-right: 8px;
  }

  .pos-register-layout {
    min-height: 0;
  }

  .register-left-stack,
  .ticket-panel {
    min-height: 0;
    max-height: calc(100vh - 178px);
    overflow: auto;
  }

  .ticket-panel {
    position: static;
  }

  .inventory-board,
  .reports-board {
    grid-auto-rows: min-content;
  }

  .table-wrap {
    max-height: min(46vh, 520px);
    overflow: auto;
  }

  .pos-panel .table-wrap,
  .inventory-board .table-wrap,
  .reports-board .table-wrap {
    max-height: min(42vh, 470px);
  }

  .menu-board .content-grid.menu-layout,
  .expenses-board .content-grid.expense-layout,
  .inventory-board .content-grid.inventory-layout {
    align-items: start;
  }
}

@media print {
  body.receipt-printing {
    background: #ffffff;
  }

  body.receipt-printing .app-shell,
  body.receipt-printing .screen-prompt,
  body.receipt-printing .modal-actions,
  body.receipt-printing .icon-close {
    display: none !important;
  }

  body.receipt-printing .modal {
    position: static;
    display: block !important;
    padding: 0;
    background: #ffffff;
  }

  body.receipt-printing .modal-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .topbar,
  .toolbar,
  #dashboard,
  #pos,
  #inventory,
  #expenses,
  #menu {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  main {
    padding: 0;
  }

  .panel,
  .metric {
    box-shadow: none;
  }

  #reports.view {
    display: grid !important;
  }
}

body[data-authenticated="false"] main {
  width: 100%;
  max-width: none;
}

body[data-authenticated="false"] #portal.view.active {
  width: min(100%, 430px);
}

body[data-authenticated="false"] .portal-board,
body[data-authenticated="false"] .portal-identity-panel,
body[data-authenticated="false"] .portal-login-layout {
  width: 100%;
}

body[data-authenticated="false"] .portal-login-card {
  width: min(100%, 386px);
}

@media (max-width: 980px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .app-shell {
    height: 100vh;
    overflow: hidden;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    position: static;
  }

  .nav-tabs {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .metric-grid,
  .daily-closeout-summary,
  .reorder-summary,
  .device-qa-grid,
  .content-grid.two,
  .content-grid.menu-layout,
  .content-grid.expense-layout,
  .content-grid.inventory-layout,
  .content-grid.analytics-layout {
    grid-template-columns: 1fr;
  }

  main {
    height: calc(100vh - 190px);
    overflow: hidden;
    padding: 12px;
  }

  .view.active {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    overflow: hidden;
  }

  .section-head {
    min-height: auto;
    padding: 12px;
  }

  .workspace-board {
    height: 100%;
    overflow: auto;
    padding: 1px 4px 16px 1px;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar button,
  .toolbar label {
    min-width: auto;
  }

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

  .workspace-subnav {
    position: static;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .workspace-subnav::-webkit-scrollbar {
    display: none;
  }

  .workspace-subtab {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .setup-progress-summary,
  .setup-layout,
  .portal-login-layout,
  .portal-layout,
  .portal-session-grid,
  .portal-install-flow,
  .settings-layout,
  .module-map {
    grid-template-columns: 1fr;
  }

  .shift-z-head,
  .shift-z-metrics,
  .shift-z-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-appbar,
  .pos-register-layout,
  .report-filter-strip,
  .menu-engineering-grid {
    grid-template-columns: 1fr;
  }

  .pos-item-tiles,
  .history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-subnav {
    justify-content: flex-start;
  }

  .ticket-panel {
    position: static;
  }

  .table-wrap {
    max-height: min(34vh, 360px);
    overflow: auto;
  }

  .pos-item-tiles {
    max-height: min(32vh, 360px);
    overflow: auto;
    padding-right: 2px;
  }

  .ticket-items {
    max-height: min(26vh, 280px);
    overflow: auto;
  }

  .ticket-checkout {
    max-height: min(44vh, 460px);
    overflow: auto;
    padding-right: 2px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    max-height: 178px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
  }

  .topbar > div:first-child {
    min-width: 0;
    padding-left: 10px;
  }

  .topbar h1 {
    max-width: 100%;
    overflow: hidden;
    font-size: 1.12rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand-owner {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  main {
    height: calc(100vh - 178px);
    padding: 10px;
  }

  .section-head,
  .panel-head,
  .panel-actions,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .section-head {
    gap: 8px;
  }

  .section-head h2 {
    font-size: 1.22rem;
  }

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

  .toolbar label {
    grid-column: 1 / -1;
  }

  .toolbar button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .panel {
    padding: 12px;
  }

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

  .metric {
    min-height: 84px;
    padding: 11px;
  }

  .metric span,
  .metric small {
    font-size: 0.72rem;
  }

  .metric strong {
    font-size: 1.12rem;
  }

  .shift-gate {
    min-height: calc(100vh - 210px);
    padding: 22px 14px;
  }

  .shift-gate h3 {
    font-size: 1.55rem;
  }

  .pos-appbar {
    padding: 10px;
  }

  .screen-prompt {
    top: 12px;
    right: 12px;
    grid-template-columns: 1fr;
  }

  .modal {
    align-items: stretch;
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .modal-head,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .receipt-meta,
  .receipt-customer,
  .receipt-totals,
  .void-sale-summary,
  .shift-z-head,
  .shift-z-metrics,
  .shift-z-ledger {
    grid-template-columns: 1fr;
  }

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

  .pos-subtab {
    padding: 0 8px;
  }

  .form-row,
  .recipe-row,
  .shift-report-grid,
  .payment-summary,
  .setup-progress-summary,
  .setup-layout,
  .pos-item-tiles,
  .history-filters,
  .ticket-actions,
  .module-map {
    grid-template-columns: 1fr;
  }

  .portal-session-grid,
  .portal-install-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-board {
    gap: 10px;
  }

  .table-wrap {
    max-height: 280px;
  }

  .pos-item-tiles {
    max-height: 300px;
  }

  .setup-check-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .recipe-row button {
    width: 100%;
  }

  th,
  td {
    padding: 10px 8px;
  }
}

@media (min-width: 760px) and (max-width: 980px) {
  body {
    overflow: hidden;
  }

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

  .topbar {
    position: static;
    height: 100vh;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding: 18px 14px;
    overflow: auto;
  }

  .topbar > div:first-child {
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
  }

  .nav-tabs {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .nav-tab {
    width: 100%;
    justify-content: flex-start;
    padding: 0 12px;
    text-align: left;
  }

  .role-control {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    padding-left: 0;
  }

  .role-control label {
    min-width: 0;
  }

  main {
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 14px;
    overflow: hidden;
  }

  .view.active {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    overflow: hidden;
  }

  .section-head {
    min-height: 68px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 12px 14px;
  }

  .workspace-board {
    height: 100%;
    overflow: auto;
    padding: 2px 6px 18px 2px;
  }

  .pos-board {
    align-content: stretch;
    overflow: hidden;
    padding-right: 0;
  }

  .pos-workspace {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .pos-panel.active {
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
  }

  .ticket-panel {
    position: static;
  }

  .table-wrap {
    max-height: min(44vh, 480px);
    overflow: auto;
  }
}

body[data-authenticated="false"] {
  min-height: 100vh;
  overflow: hidden;
  background-color: #07110f;
  background-image:
    linear-gradient(115deg, rgba(215, 164, 73, 0.18), transparent 28%, rgba(0, 199, 160, 0.14) 66%, transparent 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 74px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 74px),
    linear-gradient(180deg, #07110f 0%, #0c1724 56%, #061714 100%);
  color: #ffffff;
}

body[data-authenticated="false"] main {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(16px, 3vw, 32px);
}

body[data-authenticated="false"] .app-shell {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

body[data-authenticated="false"] #portal.view.active {
  width: min(1180px, 100%);
  height: auto;
  min-height: 0;
  grid-template-rows: none;
  overflow: visible;
}

body[data-authenticated="false"] .portal-board,
body[data-authenticated="false"] .portal-identity-panel,
body[data-authenticated="false"] .portal-login-layout {
  width: 100%;
}

body[data-authenticated="false"] .portal-board,
body[data-authenticated="false"] .portal-identity-panel {
  height: auto;
  overflow: visible;
}

body[data-authenticated="false"] .portal-login-layout {
  position: relative;
  grid-template-columns: minmax(350px, 430px) minmax(0, 1fr);
  min-height: min(720px, calc(100vh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    linear-gradient(180deg, rgba(8, 18, 16, 0.98), rgba(8, 18, 26, 0.94));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

body[data-authenticated="false"] .portal-login-layout:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 26%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 22px);
  opacity: 0.34;
}

body[data-authenticated="false"] .portal-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
  align-content: center;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    rgba(6, 16, 15, 0.86);
  box-shadow: none;
  color: #ffffff;
  padding: clamp(34px, 5vw, 62px);
  backdrop-filter: blur(16px);
}

body[data-authenticated="false"] .portal-login-card-head {
  gap: 24px;
  margin-bottom: 18px;
}

body[data-authenticated="false"] .portal-wordmark {
  color: #ffffff;
}

body[data-authenticated="false"] .portal-login-card-head h3 {
  color: #ffffff;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.05;
}

body[data-authenticated="false"] .portal-login-card label {
  color: rgba(239, 210, 135, 0.95);
  letter-spacing: 0;
}

body[data-authenticated="false"] .portal-login-card input {
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.085);
  color: #ffffff;
  font-size: 0.96rem;
}

body[data-authenticated="false"] .portal-login-card input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

body[data-authenticated="false"] .portal-login-card button[type="submit"] {
  min-height: 54px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d7a449, #f4d884);
  color: #06100f;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(215, 164, 73, 0.22);
}

body[data-authenticated="false"] .portal-login-card button[type="submit"]:hover {
  transform: translateY(-1px);
}

body[data-authenticated="false"] .link-button {
  justify-self: center;
  color: rgba(121, 255, 224, 0.86);
}

body[data-authenticated="false"] .portal-byline {
  color: rgba(255, 255, 255, 0.62);
}

body[data-authenticated="false"] .portal-visual-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  background:
    linear-gradient(160deg, rgba(0, 199, 160, 0.18), transparent 36%),
    linear-gradient(30deg, rgba(215, 164, 73, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(9, 28, 32, 0.94), rgba(6, 16, 15, 0.9));
  color: #ffffff;
  padding: clamp(28px, 5vw, 68px);
  overflow: hidden;
}

body[data-authenticated="false"] .portal-visual-panel:before,
body[data-authenticated="false"] .portal-visual-panel:after {
  content: "";
  position: absolute;
  pointer-events: none;
}

body[data-authenticated="false"] .portal-visual-panel:before {
  inset: 28px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

body[data-authenticated="false"] .portal-visual-panel:after {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 56px);
  opacity: 0.46;
}

.portal-preview-shell {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(7, 17, 15, 0.74);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
  padding: clamp(18px, 3vw, 28px);
}

.portal-preview-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  color: #ffffff;
}

.portal-preview-top strong {
  font-size: 1.05rem;
}

.portal-preview-top i {
  width: 72px;
  height: 10px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(121, 255, 224, 0.38);
  box-shadow: 0 0 28px rgba(121, 255, 224, 0.28);
}

.portal-preview-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d7a449, #f6df8b);
  color: #07110f;
  font-weight: 950;
}

.portal-preview-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
}

.portal-preview-card,
.portal-preview-list {
  min-height: 122px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  padding: 16px;
}

.portal-preview-card-wide {
  grid-row: span 2;
  min-height: 256px;
}

.portal-preview-card span,
.portal-preview-card small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-preview-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1;
}

.portal-preview-card small {
  margin-top: 10px;
}

.portal-preview-chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 116px;
  margin-top: 34px;
}

.portal-preview-chart i {
  flex: 1;
  min-height: 18px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #79ffe0, #0f766e);
  animation: previewBars 3s ease-in-out infinite alternate;
}

.portal-preview-chart i:nth-child(1) { height: 38%; }
.portal-preview-chart i:nth-child(2) { height: 62%; animation-delay: 0.1s; }
.portal-preview-chart i:nth-child(3) { height: 48%; animation-delay: 0.2s; }
.portal-preview-chart i:nth-child(4) { height: 86%; background: linear-gradient(180deg, #f6df8b, #d7a449); animation-delay: 0.3s; }
.portal-preview-chart i:nth-child(5) { height: 58%; animation-delay: 0.4s; }
.portal-preview-chart i:nth-child(6) { height: 74%; background: linear-gradient(180deg, #f6df8b, #d7a449); animation-delay: 0.5s; }

.portal-preview-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  min-height: 96px;
}

.portal-preview-list span {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08));
}

.portal-preview-list span:nth-child(2) {
  width: 76%;
}

.portal-preview-list span:nth-child(3) {
  width: 58%;
}

.product-preview-shell {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(6, 15, 20, 0.82);
  box-shadow: 0 28px 78px rgba(0, 0, 0, 0.34);
  padding: clamp(18px, 3vw, 28px);
}

.product-preview-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #ffffff;
}

.product-preview-top strong {
  color: #ffffff;
  font-size: 1.04rem;
  letter-spacing: 0;
}

.product-preview-top i {
  width: 74px;
  height: 10px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(121, 255, 224, 0.34);
  box-shadow: 0 0 28px rgba(121, 255, 224, 0.22);
}

.product-preview-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #d7a449, #f6df8b);
  color: #07110f;
  font-weight: 950;
}

.product-preview-body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
}

.product-preview-rail {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 13px;
}

.product-preview-rail span {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
}

.product-preview-rail span:first-child {
  background: linear-gradient(135deg, rgba(121, 255, 224, 0.85), rgba(15, 118, 110, 0.78));
}

.product-preview-workspace {
  display: grid;
  gap: 12px;
}

.product-preview-row {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.product-preview-kpi,
.product-preview-chart,
.product-preview-list {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
}

.product-preview-kpi {
  min-height: 112px;
  padding: 16px;
}

.product-preview-kpi span,
.product-preview-kpi small {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-preview-kpi strong {
  display: block;
  margin-top: 9px;
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.product-preview-chart {
  display: flex;
  align-items: end;
  gap: 9px;
  height: 134px;
  padding: 18px;
}

.product-preview-chart i {
  flex: 1;
  min-height: 20px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #79ffe0, #0f766e);
  animation: previewBars 3s ease-in-out infinite alternate;
}

.product-preview-chart i:nth-child(1) { height: 42%; }
.product-preview-chart i:nth-child(2) { height: 68%; animation-delay: 0.1s; }
.product-preview-chart i:nth-child(3) { height: 54%; animation-delay: 0.2s; }
.product-preview-chart i:nth-child(4) { height: 92%; background: linear-gradient(180deg, #f6df8b, #d7a449); animation-delay: 0.3s; }
.product-preview-chart i:nth-child(5) { height: 64%; animation-delay: 0.4s; }
.product-preview-chart i:nth-child(6) { height: 78%; background: linear-gradient(180deg, #f6df8b, #d7a449); animation-delay: 0.5s; }

.product-preview-list {
  display: grid;
  gap: 10px;
  min-height: 84px;
  padding: 16px;
}

.product-preview-list span {
  display: block;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
}

.product-preview-list span:nth-child(2) {
  width: 78%;
}

.product-preview-list span:nth-child(3) {
  width: 56%;
}

@keyframes previewBars {
  from {
    transform: scaleY(0.84);
    transform-origin: bottom;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

@media (max-width: 900px) {
  body[data-authenticated="false"] main {
    padding: 18px;
  }

  body[data-authenticated="false"] .portal-login-layout {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 36px);
  }

  body[data-authenticated="false"] .portal-login-card {
    min-height: auto;
    border-right: 0;
    padding: clamp(26px, 8vw, 50px);
  }

  body[data-authenticated="false"] .portal-visual-panel {
    min-height: 250px;
    padding: 22px;
  }

  .portal-preview-shell {
    width: min(100%, 520px);
  }
}

@media (max-width: 560px) {
  body[data-authenticated="false"] {
    overflow: auto;
  }

  body[data-authenticated="false"] main {
    min-height: 100vh;
    overflow: visible;
    padding: 14px;
  }

  body[data-authenticated="false"] #portal.view.active {
    width: 100%;
  }

  body[data-authenticated="false"] .portal-login-layout {
    min-height: auto;
  }

  body[data-authenticated="false"] .portal-login-card {
    min-height: calc(100vh - 28px);
  }

  body[data-authenticated="false"] .portal-visual-panel {
    display: none;
  }
}
