:root {
  --bg: #f7f9fc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --ink: #152033;
  --muted: #667085;
  --line: #dbe3ee;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --mint: #0f766e;
  --mint-soft: #ccfbf1;
  --warn: #b45309;
  --warn-soft: #ffedd5;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --shadow: 0 18px 50px rgba(21, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

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

button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  padding: 11px 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

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: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.94)),
    radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.2), transparent 20rem);
}

.login-screen.hidden {
  display: none;
}

.login-card {
  width: min(460px, 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.login-brand h1 {
  margin: 3px 0 0;
  font-size: 26px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-reset {
  width: 100%;
  justify-content: center;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  width: 100%;
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  height: 34px;
  min-width: 54px;
  border: 0;
  border-radius: 8px;
  background: #eaf1ff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.login-note {
  margin-top: 18px;
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

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

.app-shell.locked {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  padding: 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.brand-mark.large {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-size: 20px;
}

.brand small {
  display: block;
  color: var(--muted);
}

nav {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-btn {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.nav-btn small {
  color: var(--muted);
  font-weight: 700;
}

.nav-btn.active,
.nav-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

main {
  min-width: 0;
  padding: 28px;
}

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

.topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 3vw, 38px);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-chip {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 9px 12px;
}

.user-chip span,
.user-chip small {
  display: block;
}

.user-chip span {
  font-weight: 900;
}

.user-chip small {
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.55fr);
}

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

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

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-head h2,
.panel h2 {
  margin: 0;
  font-size: 20px;
}

.muted {
  color: var(--muted);
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 233, 0.08)),
    #fff;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero-panel h2 {
  margin: 6px 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.metric::after {
  content: "";
  position: absolute;
  right: -22px;
  top: -22px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: var(--accent-soft);
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  position: relative;
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.item-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  text-align: left;
}

.item-card button {
  width: 100%;
}

.cart {
  display: grid;
  gap: 12px;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.qty-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.qty-controls button,
.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  border-radius: 16px;
  background: var(--panel-soft);
  padding: 14px;
  font-size: 23px;
}

.tax-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
}

.tax-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

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

.recent-order {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  margin-top: 8px;
}

.recent-order span {
  color: var(--muted);
  font-size: 13px;
}

.recipe-builder {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.recipe-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px auto;
  gap: 8px;
  align-items: center;
}

.purchase-row {
  grid-template-columns: minmax(260px, 1.5fr) 92px 96px 118px 108px 138px minmax(150px, 0.8fr) auto;
}

.purchase-row-header {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 6px;
  padding: 0 4px;
}

.purchase-ingredient-picker {
  display: grid;
  gap: 6px;
}

.purchase-new-ingredient-fields {
  display: grid;
  grid-template-columns: minmax(150px, 1fr);
  gap: 6px;
}

.purchase-new-ingredient-fields[hidden] {
  display: none;
}

.purchase-conversion-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stock-count-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 140px minmax(160px, 0.7fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.pill.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.pill.blue {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

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

.checklist-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.checklist-row.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.checklist-row.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.checklist-row.danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.checklist-row strong,
.checklist-row p {
  display: block;
  margin: 0;
}

.checklist-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.catalog-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
}

.catalog-action-bar button {
  min-width: 150px;
}

.danger-btn {
  background: var(--danger);
}

.secondary-btn {
  background: var(--mint);
}

.disabled-row {
  opacity: 0.58;
}

.pos-board {
  display: grid;
  grid-template-columns: minmax(520px, 1.55fr) minmax(420px, 0.95fr);
  gap: 12px;
  min-height: calc(100vh - 132px);
}

.pos-menu-pane,
.pos-order-pane {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.pos-menu-pane {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  overflow: hidden;
}

.pos-tabs {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
}

.pos-tab {
  min-width: 116px;
  border-radius: 0;
  background: #fff;
  color: var(--accent-dark);
  box-shadow: none;
}

.pos-tab.active {
  background: #0f7db8;
  color: #fff;
}

.pos-search {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.table-map-panel {
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
}

.table-map-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.table-map-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.table-map-stats span {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 7px 8px;
  color: var(--muted);
  font-size: 12px;
}

.table-map-stats strong {
  color: var(--ink);
  font-size: 15px;
}

.warn-text,
.warn-text strong {
  color: #b45309;
}

.table-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  max-height: 232px;
  overflow: auto;
}

.table-tile {
  display: grid;
  gap: 4px;
  min-height: 116px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--ink);
  padding: 8px;
  text-align: left;
  box-shadow: none;
}

.table-tile.occupied {
  border-color: #f97316;
  background: #fff7ed;
  color: #9a3412;
}

.table-tile.active {
  border-color: #0f7db8;
  box-shadow: 0 0 0 2px rgba(15, 125, 184, 0.14);
}

.table-tile.long-running,
.recent-order.long-running {
  border-color: #f59e0b;
  background: #fffbeb;
}

.long-running-row {
  background: #fffbeb;
}

.table-tile span {
  font-size: 12px;
  font-weight: 700;
}

.table-tile small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.25;
}

.floor-page {
  align-items: start;
}

.floor-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 5px;
  vertical-align: middle;
  background: #e2e8f0;
}

.legend-dot.occupied {
  background: #fb923c;
}

.legend-dot.warning {
  background: #f59e0b;
}

.pos-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding: 14px;
}

.pos-item-tile {
  position: relative;
  display: grid;
  grid-template-rows: 72px auto auto;
  min-height: 164px;
  border: 1px solid #e6edf5;
  border-radius: 4px;
  background: #f6f7f9;
  color: var(--ink);
  padding: 10px;
  text-align: center;
  box-shadow: none;
}

.pos-item-tile:hover {
  border-color: #55a9d5;
  background: #fff;
}

.pos-price {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 72px;
  background: #4ea6d2;
  color: #fff;
  padding: 6px 8px;
  font-weight: 900;
}

.pos-food-art {
  place-self: center;
  display: grid;
  place-items: center;
  width: 82px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dbeafe);
  color: #2563eb;
  font-weight: 900;
  box-shadow: inset 0 -8px 18px rgba(37, 99, 235, 0.12);
}

.pos-item-tile strong {
  align-self: end;
  min-height: 42px;
}

.pos-item-tile small {
  color: var(--muted);
}

.pos-pane-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 800;
}

.pos-order-pane {
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr) auto auto auto auto auto;
  background: #f3f5f8;
  overflow: hidden;
}

.pos-order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f7db8;
  color: #fff;
  padding: 11px 14px;
}

.pos-order-meta {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.field.compact label {
  margin-bottom: 4px;
  font-size: 11px;
}

.field.compact input,
.field.compact select,
.pos-customer-grid input {
  border-radius: 4px;
  padding: 9px 10px;
}

.pos-customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 10px 10px;
  background: #fff;
}

.pos-order-table {
  overflow: auto;
  background: #fff;
}

.pos-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 118px 36px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.pos-order-title {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f7f7;
  font-weight: 900;
}

.pos-empty-order {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 310px;
  color: #9aa4b2;
  text-align: center;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 14px solid #c7cbd1;
  border-radius: 999px;
  color: #a5abb3;
  font-size: 28px;
  font-weight: 900;
}

.pos-extra-actions,
.pos-bottom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #fff;
}

.pos-extra-actions {
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.stock-warning {
  margin: 0 10px 10px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  padding: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.stock-warning.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.stock-warning strong,
.stock-warning p,
.stock-warning small {
  display: block;
  margin: 0 0 4px;
}

.pos-order-pane .pos-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 10px;
  background: #fff;
}

.pos-order-pane .tax-summary {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.pos-bottom-actions {
  justify-content: flex-end;
  background: #d9dde3;
}

.pos-bottom-actions button:last-child {
  background: #f97316;
}

.pos-side-list {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.pos-side-list summary {
  cursor: pointer;
  font-weight: 900;
}

.kitchen-board {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.kitchen-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.kitchen-card.cooking {
  border-left-color: var(--warn);
  background: #fffbeb;
}

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

.kitchen-card span,
.kitchen-card small {
  color: var(--muted);
  font-size: 12px;
}

.cashflow-columns {
  align-items: start;
}

.cashflow-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  overflow-x: auto;
}

.cashflow-column.full-ledger {
  margin: 12px;
}

.cashflow-column h3 {
  margin: 0 0 10px;
}

.cashflow-balance {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.cashbook-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.cashbook-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cashbook-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
}

.cukcuk-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.35fr);
  gap: 14px;
}

.cukcuk-module {
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.report-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.report-card h3 {
  margin: 10px 0 6px;
  font-size: 22px;
}

.cukcuk-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.cukcuk-title h2 {
  margin: 0;
}

.cukcuk-tabs {
  display: flex;
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #e5e7eb;
}

.cukcuk-tabs button {
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.cukcuk-tabs button.active {
  color: #0f7db8;
  box-shadow: inset 0 3px 0 #0f7db8;
}

.cukcuk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f3f4f6;
  padding: 8px 12px;
}

.cukcuk-toolbar label {
  color: var(--muted);
  font-weight: 800;
}

.cukcuk-toolbar input,
.cukcuk-toolbar select {
  width: auto;
  min-width: 150px;
  border-radius: 3px;
  padding: 7px 9px;
}

.cukcuk-table {
  overflow: auto;
}

.wide-page {
  display: block;
  max-width: none;
  width: 100%;
}

.view:has(.wide-page) {
  width: 100%;
}

.wide-page .cukcuk-module {
  width: 100%;
}

.cukcuk-table table {
  min-width: 860px;
}

.cukcuk-table th {
  background: #eeeeee;
  color: #111827;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}

.cukcuk-table td {
  padding: 9px 10px;
}

.compact-table table {
  min-width: 420px;
}

.cashbook-wide-table table {
  min-width: 1280px;
}

.cashbook-wide-table th,
.cashbook-wide-table td {
  white-space: nowrap;
}

.cashbook-wide-table td:nth-child(4) {
  min-width: 280px;
  white-space: normal;
}

.cashbook-wide-table td:nth-child(5),
.cashbook-wide-table td:nth-child(6),
.cashbook-wide-table td:nth-child(7),
.cashbook-wide-table tfoot td {
  text-align: right;
}

.cashbook-wide-table .opening-row td {
  background: #f8fafc;
  font-weight: 800;
}

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

.mini-report {
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.mini-report .panel-head {
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.mini-report .panel-head h3 {
  margin: 0 0 4px;
}

.mini-report .cukcuk-table table {
  min-width: 560px;
}

.selected-row {
  background: #e0f2fe;
}

.detail-panel {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.detail-panel h3 {
  margin: 0 0 10px;
  color: #0f7db8;
}

.detail-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  margin-bottom: 12px;
}

.debt-ledger-grid {
  padding: 0 12px 12px;
}

.debt-ledger-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  overflow-x: auto;
}

.debt-ledger-card h3 {
  margin: 0 0 10px;
}

dialog {
  width: min(780px, calc(100vw - 28px));
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 28px 90px rgba(21, 32, 51, 0.28);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  padding: 20px;
}

.modal-head,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
}

#modalBody {
  margin: 18px 0;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  padding: 22px;
  text-align: center;
  background: var(--panel-soft);
}

.secure-note {
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  color: #1e3a8a;
  padding: 12px 14px;
  line-height: 1.5;
}

.panel table {
  min-width: 680px;
}

.panel {
  overflow-x: auto;
}

.receipt {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .receipt,
  .receipt * {
    visibility: visible;
  }
  .receipt {
    position: fixed;
    inset: 20px;
    display: block;
    color: #000;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.45;
  }

  .receipt h2 {
    margin: 0 0 6px;
    text-align: center;
    text-transform: uppercase;
  }

  .receipt p {
    margin: 6px 0;
  }

  .receipt-lines p {
    border-bottom: 1px dashed #999;
    padding-bottom: 6px;
  }

  .receipt-lines span,
  .receipt-total span {
    font-weight: 900;
  }

  .receipt-lines strong {
    float: right;
  }
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid.two,
  .grid.three,
  .grid.four,
  .pos-board,
  .cukcuk-page,
  .pos-order-meta,
  .pos-customer-grid,
  .table-map-stats,
  .close-checklist,
  .form-grid,
  .report-card-grid,
  .report-detail-grid,
  .pos-meta,
  .recipe-row,
  .purchase-row,
  .stock-count-row {
    grid-template-columns: 1fr;
  }
  .topbar,
  .top-actions,
  .hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-stack {
    justify-content: flex-start;
  }

  .pos-order-pane .pos-meta,
  .pos-order-row {
    grid-template-columns: 1fr;
  }

  .pos-board {
    min-height: auto;
  }
}
