@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --primary: #00a684;
  --primary-dark: #007d65;
  --primary-soft: #e8f8f4;
  --secondary: #ff9f2a;
  --warning: #ffd33f;
  --danger: #db003d;
  --text: #23302d;
  --muted: #7b8a86;
  --line: #e8efec;
  --line-strong: #d7e3df;
  --page: #f4f8f7;
  --card: #ffffff;
  --sidebar: #ffffff;
  --shadow: 0 18px 45px rgba(35, 48, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: "Poppins", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}

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

button {
  cursor: pointer;
}

.shell {
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0;
}

.hidden {
  display: none !important;
}

.auth-view {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 440px);
  align-items: center;
  gap: 34px;
}

.hero-logo {
  display: block;
  width: min(330px, 70vw);
  height: auto;
  margin: 0 0 24px;
  filter: drop-shadow(0 18px 28px rgba(5, 170, 139, 0.18));
}

.brand-panel h1,
.topbar h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
  font-weight: 800;
}

.brand-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

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

.branch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.branch-list span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  box-shadow: none;
}

.auth-card,
.metrics article,
.insight-card,
.entry-form,
.table-wrap,
.data-panel,
.sidebar,
.topbar,
.welcome-card,
.amount-card,
.chart-card,
.status-card,
.catalog-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 28px;
  align-self: center;
  box-shadow: none;
}

.auth-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.auth-heading h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
}

.auth-switch,
.tabs {
  display: grid;
  gap: 8px;
}

.grouped-tabs {
  align-content: start;
  gap: 16px;
}

.tab-group {
  display: grid;
  gap: 6px;
}

.tab-group p {
  margin: 10px 0 4px;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-switch {
  grid-template-columns: 1fr 1fr;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #edf5f3;
}

.tabs {
  margin: 18px 0;
}

.auth-switch button,
.tabs button,
.user-pill button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
  padding: 0 13px;
  font-weight: 700;
}

.tabs button {
  text-align: left;
}

.auth-switch button.active,
.tabs button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 22px rgba(5, 170, 139, 0.22);
}

.auth-form,
.entry-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(5, 170, 139, 0.12);
}

.primary-btn,
.light-btn {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 20px rgba(5, 170, 139, 0.24);
}

.primary-btn:hover {
  background: var(--primary-dark);
}

.light-btn {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid rgba(5, 170, 139, 0.16);
}

.primary-btn:disabled,
.light-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button,
.primary-btn,
.light-btn,
.mini-save-btn,
.detail-toggle,
.request-send-btn {
  transition: transform .14s ease, filter .14s ease, background-color .14s ease, border-color .14s ease;
}

button:active,
.primary-btn:active,
.light-btn:active,
.mini-save-btn:active,
.detail-toggle:active,
.request-send-btn:active {
  transform: scale(.97);
  filter: brightness(.96);
}

button.is-saving,
.primary-btn.is-saving,
.mini-save-btn.is-saving,
.request-send-btn.is-saving {
  position: relative;
  pointer-events: none;
  transform: scale(.98);
  filter: brightness(.95);
}

button.is-saving::after,
.primary-btn.is-saving::after,
.mini-save-btn.is-saving::after,
.request-send-btn.is-saving::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, .24);
  animation: button-save-pulse .45s ease;
}

@keyframes button-save-pulse {
  from { opacity: .75; transform: scale(.92); }
  to { opacity: 0; transform: scale(1.08); }
}

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

.dashboard {
  min-height: calc(100vh - 36px);
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.sidebar-brand strong,
.sidebar-brand span,
.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-brand strong {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 800;
}

.sidebar-brand span,
.sidebar-note span,
.metrics span,
.metrics small,
.catalog-grid span,
.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border-radius: 8px;
  background: var(--primary-soft);
}

.sidebar-note strong {
  margin-top: 6px;
}

.workspace {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  display: grid;
  gap: 22px;
}

.topbar {
  margin-bottom: 8px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
}

.topbar h1 {
  font-size: clamp(26px, 3.6vw, 44px);
}

.branch-title-select {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.branch-heading-wrap {
  position: relative;
  display: inline-block;
  padding-right: 34px;
}

.branch-heading-wrap::after {
  content: "⌄";
  position: absolute;
  right: 0;
  bottom: 8px;
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 800;
  pointer-events: none;
}

.branch-heading-wrap .branch-title-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-left: auto;
}

.top-actions label {
  min-width: 138px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 9px 7px 12px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
}

.profile-stack {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.user-pill button {
  min-height: 34px;
  color: var(--danger);
}

.profile-clock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.clock-mini {
  min-height: 28px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  font-size: 11px;
}

.clock-mini.out {
  background: #fff0f4 !important;
  color: var(--danger) !important;
}

#clockInlineMessage {
  min-height: 16px;
  font-size: 11px;
  font-weight: 700;
}

.avatar {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  overflow: hidden;
}

.avatar.small {
  width: 34px;
  height: 34px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 14px;
}

.welcome-card {
  min-height: 176px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 211, 63, 0.28), transparent 28%),
    linear-gradient(135deg, #ffffff, #eefaf6);
}

.welcome-card h2 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 800;
}

.welcome-card img {
  width: 132px;
  height: 132px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(5, 170, 139, 0.18));
}

.amount-card,
.chart-card {
  padding: 18px;
  display: grid;
  align-content: space-between;
  min-height: 176px;
}

.order-summary-card {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.order-summary-card:hover {
  border-color: var(--primary);
}

.click-hint {
  align-self: end;
  justify-self: end;
  color: rgba(123, 137, 133, .62);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.amount-card span,
.chart-card span {
  color: var(--muted);
  font-weight: 700;
}

.amount-card strong,
.chart-card strong {
  font-size: 30px;
  font-weight: 800;
}

.progress-line {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf5f3;
}

.progress-line span {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--primary);
}

.mini-chart {
  height: 82px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.mini-chart span {
  flex: 1;
  min-width: 10px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  transform-origin: bottom;
  animation: grow-bar 1.15s cubic-bezier(.2,.8,.2,1) both, pulse-bar 2.8s ease-in-out infinite;
}

.mini-chart span:nth-child(2) { animation-delay: .08s; }
.mini-chart span:nth-child(3) { animation-delay: .16s; }
.mini-chart span:nth-child(4) { animation-delay: .24s; }
.mini-chart span:nth-child(5) { animation-delay: .32s; }
.mini-chart span:nth-child(6) { animation-delay: .40s; }
.mini-chart span:nth-child(7) { animation-delay: .48s; }

@keyframes grow-bar {
  from { transform: scaleY(.08); opacity: .35; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes pulse-bar {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}

.amount-card {
  position: relative;
  overflow: hidden;
}

.amount-card::after {
  content: "";
  position: absolute;
  left: -15%;
  right: -15%;
  bottom: -42px;
  height: 96px;
  background:
    radial-gradient(circle at 16% 30%, rgba(255, 211, 63, .5) 0 7px, transparent 8px),
    radial-gradient(circle at 46% 20%, rgba(5, 170, 139, .32) 0 6px, transparent 7px),
    linear-gradient(135deg, rgba(5,170,139,.16), rgba(255,211,63,.24));
  transform: rotate(-5deg);
  animation: float-graphic 4s ease-in-out infinite alternate;
}

@keyframes float-graphic {
  from { transform: translateX(-10px) rotate(-5deg); }
  to { transform: translateX(14px) rotate(-3deg); }
}

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

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

.erp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.erp-card {
  min-height: 116px;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.erp-card.primary {
  background: #eaf7f4;
  border-color: #bfe3da;
}

.erp-card.danger {
  background: #fff3f5;
  border-color: #ffd3dc;
}

.erp-card.danger.positive {
  background: #eaf7f4;
  border-color: #9fd8cf;
}

.erp-card.danger.positive strong {
  color: var(--primary-dark);
}

.erp-card.cost-card {
  background: #fff3f5;
  border-color: #ffc8d3;
  border-left: 5px solid var(--danger);
}

.erp-card.cost-card strong {
  color: var(--danger);
}

.erp-card span,
.erp-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.erp-card small {
  margin-top: 8px;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 700;
}

.erp-card strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
}

#financeDashboardPanel .erp-grid {
  align-items: stretch;
}

.finance-main-card {
  min-height: 128px;
  padding: 20px;
}

.finance-main-card strong {
  font-size: 28px;
  line-height: 1.08;
}

.finance-detail-card {
  min-height: 82px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #fff;
}

.finance-detail-card span {
  font-size: 11px;
}

.finance-detail-card strong {
  margin-top: 7px;
  font-size: 19px;
  line-height: 1.1;
}

.finance-detail-card small {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.35;
}

.finance-analytics {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 14px;
}

.erp-bars {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.erp-bars article {
  display: grid;
  grid-template-columns: 130px 1fr 48px;
  gap: 10px;
  align-items: center;
}

.erp-bars div {
  height: 10px;
  border-radius: 999px;
  background: #edf3f1;
  overflow: hidden;
}

.erp-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.mini-line-chart {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 180px;
  padding: 18px 10px 0;
}

.mini-line-chart span {
  flex: 1;
  min-width: 18px;
  border-radius: 999px 999px 4px 4px;
  background: #bfe3da;
}

.insight-card {
  min-height: 150px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.insight-button {
  width: 100%;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.insight-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(35, 48, 45, 0.12);
}

.insight-button.has-alert {
  border-color: rgba(219, 0, 61, 0.35);
  background: #fff0f4;
}

.insight-button.has-alert .icon-box {
  color: #fff;
  background: var(--danger);
}

.insight-button.has-alert > strong {
  color: var(--danger);
}

.insight-card > strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
}

.insight-card small {
  color: var(--muted);
  font-weight: 600;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title .panel-filter {
  margin-left: auto;
  min-width: 180px;
  min-height: 38px;
  border: 1px solid rgba(5, 170, 139, 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.panel-search {
  margin-left: auto;
  min-width: 220px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8faf9;
  padding: 0 16px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.download-btn {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(5, 170, 139, 0.18);
}

.download-btn:hover {
  background: var(--primary-dark);
}

.ai-summary-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #00a684;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.ai-summary-btn:hover {
  background: #008f73;
}

.ai-summary-modal {
  width: min(720px, calc(100vw - 48px));
}

.ai-summary-box {
  min-height: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
  max-height: 560px;
  overflow: auto;
  white-space: normal;
}

.ai-report {
  display: grid;
  gap: 16px;
  color: var(--text);
}

.ai-report-head,
.ai-kpi-grid,
.ai-grid-2 {
  display: grid;
  gap: 12px;
}

.ai-report-head {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.ai-report-head h3 {
  margin: 2px 0 4px;
  font-size: 24px;
  font-weight: 700;
}

.ai-report-head span,
.ai-section p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
}

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

.ai-kpi-grid article,
.ai-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.ai-kpi-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.ai-kpi-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--primary-dark);
  font-size: 18px;
}

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

.ai-section h4 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.ai-section table {
  width: 100%;
  border-collapse: collapse;
}

.ai-section th,
.ai-section td {
  border-bottom: 1px solid #edf2f0;
  padding: 9px 7px;
  text-align: left;
  font-size: 12px;
}

.skeleton-block {
  height: 18px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef4f1, #f8fbfa, #eef4f1);
  background-size: 200% 100%;
  animation: skeletonMove 1.2s ease-in-out infinite;
}

.skeleton-block.short {
  width: 72%;
  margin-top: 12px;
}

@keyframes skeletonMove {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.form-hint,
.receipt-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.receipt-upload-label {
  align-self: stretch;
}

.receipt-upload-label input[type="file"] {
  min-height: 48px;
  width: 100%;
  border: 1px dashed #bedbd4;
  border-radius: 12px;
  background: linear-gradient(0deg, rgba(0, 166, 132, .045), rgba(0, 166, 132, .045)), #fff;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.receipt-upload-label input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.receipt-upload-label input[type="file"]:hover {
  border-color: var(--primary);
  background: #eefaf7;
}

.receipt-upload-label .form-hint {
  color: #7d8b86;
}

.ai-summary-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.priority-badge {
  display: inline-grid;
  place-items: center;
  min-width: 68px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.priority-badge.urgent {
  background: #ffe8ee;
  color: var(--danger);
}

.panel-title strong,
.panel-title small {
  display: block;
}

.panel-title strong {
  font-weight: 800;
}

.panel-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.icon-box {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.data-panel {
  overflow-x: auto;
  padding: 14px;
}

.data-panel table {
  min-width: 760px;
}

.min-qty-input {
  width: 120px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.mini-save-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.role-select,
.ingredient-name-input,
.ingredient-category-select {
  min-width: 132px;
  min-height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.ingredient-unit-select {
  min-width: 108px;
  min-height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.role-select:focus,
.ingredient-name-input:focus,
.ingredient-category-select:focus,
.ingredient-unit-select:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(0, 166, 132, .12);
}

.role-select:disabled,
.ingredient-name-input:disabled,
.ingredient-category-select:disabled,
.ingredient-unit-select:disabled {
  opacity: .65;
  cursor: wait;
}

.inline-photo-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  max-width: 360px;
}

.photo-file-input {
  display: none !important;
}

.employee-name-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.employee-name-btn:hover {
  color: var(--primary);
}

.expense-outlet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
  align-items: start;
}

.expense-card {
  border: 1px solid #d3ded9;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
}

.expense-card span,
.expense-card small,
.salary-slip span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.expense-card strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--primary-dark);
  font-size: 22px;
}

.outlet-expense-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  outline: 1px solid #e1e8e4;
  outline-offset: -1px;
  align-content: start;
  min-height: 0;
}

.outlet-expense-card.is-collapsed .expense-mini-list {
  display: none;
}

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

.expense-card-head strong {
  margin-bottom: 0;
}

.expense-card-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.expense-mini-list {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.expense-mini-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(110px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.expense-mini-row:last-child {
  border-bottom: 0;
}

.expense-mini-row b {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.expense-mini-row strong {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  text-align: right;
}

.expense-note {
  margin-top: 2px;
  color: #8a9691 !important;
  font-weight: 600 !important;
}

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

.section-note {
  margin: -8px 0 14px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.salary-panel {
  margin-top: 16px;
}

.salary-slip {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

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

.outlet-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.outlet-card strong {
  font-size: 18px;
  color: var(--text);
}

.outlet-card span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.outlet-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.salary-slip-logo {
  display: block;
  width: 170px;
  max-width: 52%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 16px;
}

.salary-slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.salary-slip table {
  width: 100%;
  border-collapse: collapse;
}

.salary-slip th,
.salary-slip td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.inline-photo-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.menu-photo-form {
  width: 100%;
}

.photo-picker-label {
  display: grid;
  gap: 8px;
}

.photo-picker-control {
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--muted);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
}

.branch-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 330px;
}

.branch-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d7e5e1;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.branch-chip em {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f1f4f3;
  color: #6d7b77;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.branch-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.branch-chip.active,
.branch-chip:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.branch-chip.active span,
.branch-chip:has(input:checked) span {
  color: #fff;
}

.branch-chip.active em,
.branch-chip:has(input:checked) em {
  background: rgba(255,255,255,.22);
  color: #fff;
}

.branch-min-btn {
  min-height: 24px;
  min-width: 34px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.branch-chip:not(.active):not(:has(input:checked)) .branch-min-btn {
  border-color: var(--line);
  background: #fff;
  color: var(--primary-dark);
}

.branch-chip:has(input:disabled) {
  cursor: not-allowed;
  opacity: .65;
}

.menu-branch-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 2px;
}

.menu-branch-picker .branch-chip {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.supplier-cell {
  display: grid;
  gap: 2px;
  min-width: 150px;
}

.used-in-cell {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.danger-btn {
  border-color: #ffd2dc;
  background: #fff1f4;
  color: var(--danger);
}

.recipe-edit-btn {
  margin-top: 8px;
}

.role-access-grid {
  display: grid;
  gap: 14px;
}

.role-access-card {
  display: grid;
  grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.role-access-card strong,
.role-access-card small {
  display: block;
}

.role-access-card small {
  color: var(--muted);
  font-size: 12px;
}

.role-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-feature-grid .branch-chip:not(.active):not(:has(input:checked)) {
  background: #fff;
  color: #6d7b77;
}

.role-feature-grid .branch-chip:not(.active):not(:has(input:checked)) span {
  color: #6d7b77;
}

.branch-chip.locked {
  opacity: .8;
}

.supplier-cell strong,
.supplier-cell small,
.supplier-cell a {
  display: block;
}

.supplier-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.supplier-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.supplier-cell a {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 34px minmax(48px, 74px) 34px;
  gap: 6px;
  align-items: center;
}

.qty-stepper button {
  min-height: 34px;
  border: 1px solid #bfe4dc;
  border-radius: 8px;
  background: #eaf7f4;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.qty-stepper input {
  text-align: center;
}

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

.request-overview-card {
  display: grid;
  gap: 12px;
  min-height: 120px;
  padding: 16px;
  border: 1px solid #d7e5e1;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.request-overview-card strong,
.request-overview-card span,
.request-overview-card b {
  display: block;
}

.block-text {
  display: block;
  margin-top: 3px;
}

.detail-toggle {
  appearance: none;
  margin-top: 9px;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(5, 170, 139, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.detail-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(5, 170, 139, 0.28);
}

.sales-entry-row td,
.profit-entry-row td {
  vertical-align: middle;
}

.detail-row td {
  padding: 0 14px 14px;
  background: #fbfdfc;
}

.sales-detail-list {
  display: grid;
  gap: 7px;
}

.compact-table table {
  min-width: 0;
}

.compact-table th,
.compact-table td {
  padding: 11px 12px;
}

.compact-table tfoot th {
  border-top: 1px solid var(--line-strong);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.sales-detail-list span {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.sales-detail-list span:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.modal-summary span,
.modal-summary strong {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.modal-summary strong {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.metrics article {
  padding: 17px;
}

.metrics span,
.metrics small {
  display: block;
}

.metrics strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 25px;
  letter-spacing: 0;
  font-weight: 800;
}

.metrics article:nth-child(1) strong,
.metrics article:nth-child(2) strong {
  color: var(--primary-dark);
}

.metrics article:nth-child(3) strong {
  color: #c47b00;
}

.metrics article:nth-child(4) strong {
  color: var(--danger);
}

.tab-panel {
  display: none;
}

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

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

.panel-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

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

.attendance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.attendance-kpi {
  min-height: 96px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.attendance-kpi span {
  color: var(--muted);
  font-size: 12px;
}

.attendance-kpi strong {
  display: block;
  margin-top: 12px;
  color: var(--primary-dark);
  font-size: 30px;
}

.attendance-kpi.danger-soft {
  background: #fff3f5;
  border-color: #ffd0d9;
}

.attendance-kpi.warn-soft {
  background: #fff8e8;
  border-color: #f5dfac;
}

.attendance-filter-form {
  margin: 14px 0;
}

.attendance-chart-panel {
  margin: 12px 0 16px;
}

.attendance-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  align-items: end;
  min-height: 140px;
  gap: 8px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdfc;
}

.attendance-bar-wrap {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  height: 112px;
  gap: 8px;
}

.attendance-bar-wrap span {
  display: block;
  min-height: 10px;
  border-radius: 999px 999px 4px 4px;
  background: #00a684;
}

.attendance-bar-wrap small {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

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

.attendance-list-bars {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.attendance-list-bar {
  display: grid;
  grid-template-columns: 130px 1fr 44px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.attendance-list-bar div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f1;
}

.attendance-list-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #00a684;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.attendance-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f7f3;
  color: #007f66;
  font-size: 11px;
  font-weight: 700;
}

.attendance-status.late,
.attendance-status.very-late {
  background: #ffe4ea;
  color: #ec4563;
}

.attendance-status.overtime {
  background: #fff2d9;
  color: #b87400;
}

.camera-modal {
  padding: 0;
}

.camera-modal-card {
  width: min(900px, calc(100vw - 24px));
}

.camera-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #10201d;
  aspect-ratio: 4 / 3;
}

.camera-stage video,
.camera-stage img,
.camera-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-location-box {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.camera-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.capture-btn {
  min-width: 150px;
}

.selfie-thumb {
  width: 54px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.status-card {
  padding: 14px 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}

.entry-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  padding: 16px;
  box-shadow: none;
}

.entry-form .wide {
  grid-column: span 2;
}

.sales-total {
  display: grid;
  gap: 4px;
  align-self: stretch;
  align-content: center;
  min-height: 70px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--primary-soft);
}

.sales-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sales-total strong {
  color: var(--primary-dark);
  font-size: 20px;
}

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

.sales-menu-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.sales-menu-card img,
.menu-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--primary-soft);
}

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

.sales-menu-card small {
  color: var(--muted);
  font-weight: 600;
}

.menu-price-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 6px;
  margin: 7px 0 5px;
}

.menu-price-stack span {
  padding: 5px 8px;
  border: 1px solid #d7e5e1;
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.menu-price-stack small {
  grid-column: 1 / -1;
  margin-top: -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.menu-price-stack b {
  color: var(--text);
}

.channel-inputs {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.online-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.platform-channel,
.offline-channel {
  display: grid;
  gap: 6px;
}

.platform-channel > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.platform-channel > span img {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
  border: 1px solid var(--line);
}

.qty-stepper.compact {
  grid-template-columns: 30px minmax(38px, 1fr) 30px;
  gap: 5px;
}

.qty-stepper.compact button {
  min-height: 32px;
}

.qty-stepper.compact input {
  min-width: 0;
}

.category-tabs button {
  border: 0;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
}

.channel-inputs label {
  gap: 4px;
}

.channel-inputs input {
  height: 36px;
  padding: 6px 8px;
}

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

.category-tabs button {
  min-height: 38px;
  padding: 0 14px;
}

.category-tabs button.active {
  background: var(--primary);
  color: #fff;
}

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

.bulk-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, .38fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

#requestBulkList .bulk-row {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, .5fr);
}

.manual-stock-branches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manual-stock-branch-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.manual-stock-branch-card:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: #f3fffb;
}

.manual-stock-branch-card strong {
  font-size: 16px;
}

.manual-stock-branch-card span,
.manual-stock-branch-card small {
  color: var(--muted);
  font-weight: 700;
}

.manual-stock-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.manual-stock-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(120px, .34fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.manual-stock-row strong,
.manual-stock-row span,
.manual-stock-row small {
  display: block;
}

.manual-stock-row span,
.manual-stock-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.manual-stock-field {
  display: grid;
  gap: 6px;
}

.manual-stock-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.recap-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 14px;
}

.warning-row td:last-child {
  color: var(--danger);
  font-weight: 900;
}

.warning-row {
  background: #fff7e8;
}

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

.stock-alert-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 14px;
  margin-bottom: 4px;
}

.section-kicker {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.stock-low-card {
  display: grid;
  gap: 10px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid #d7e5e1;
  border-radius: 10px;
  background: #f7fbfa;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.stock-low-card.has-alert {
  border-color: #f6a9b7;
  background: #fff6f8;
}

.stock-low-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.stock-low-head strong,
.stock-low-head span,
.stock-low-list span,
.stock-low-list b {
  display: block;
}

.stock-low-head strong {
  font-size: 15px;
}

.stock-low-head span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf7f4;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 900;
}

.stock-low-card.has-alert .stock-low-head span {
  background: #ffe3e9;
  color: var(--danger);
}

.stock-low-list {
  display: grid;
  gap: 7px;
}

.stock-low-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.stock-low-list b {
  color: var(--text);
  font-size: 12px;
}

.stock-low-line {
  display: grid !important;
  gap: 4px;
}

.stock-low-line em,
.stock-low-line small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.stock-low-line small {
  color: var(--danger);
  font-weight: 800;
}

.stock-low-line i {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #edf2f0;
  overflow: hidden;
}

.stock-low-line i::before {
  content: "";
  display: block;
  width: var(--stock-level);
  height: 100%;
  border-radius: inherit;
  background: #ef476f;
}

.stock-history-panel .panel-title {
  align-items: center;
}

.compact-action {
  margin-left: auto;
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.soft-btn {
  border: 1px solid #bfe4dc;
  border-radius: 8px;
  background: #eaf7f4;
  color: var(--primary-dark);
  font-weight: 900;
}

.collapsed {
  display: none !important;
}

.inventory-branch-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.inventory-branch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(35, 48, 45, 0.12);
}

.inventory-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.inventory-card-head > div span,
.clean-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.status-ok,
.status-alert {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-ok {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.status-alert {
  color: var(--danger);
  background: #fff0f4;
}

.inventory-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.inventory-mini-metrics span {
  padding: 9px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inventory-mini-metrics b {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.inventory-branch-card table {
  min-width: 0;
  font-size: 12px;
}

.inventory-branch-card th,
.inventory-branch-card td {
  padding: 9px 8px;
}

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

.sales-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 16px;
  margin: 0 0 18px;
}

.dashboard-chart-grid {
  margin-top: 0;
}

.modal-chart-grid {
  margin: 18px 0 0;
}

.chart-modal-card {
  width: min(1120px, calc(100vw - 48px));
}

.modal-chart-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.modal-chart-head label {
  min-width: 240px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sales-chart-panel {
  min-height: 300px;
}

.line-chart {
  min-height: 250px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 6px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.chart-legend b {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-canvas {
  position: relative;
  min-width: 0;
}

.chart-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.chart-description {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.chart-description span,
.chart-description p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.chart-description strong {
  display: block;
  margin: 7px 0 8px;
  color: var(--text);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.order-line-svg {
  width: 100%;
  height: 250px;
  display: block;
}

.order-line-svg .line-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}

.order-line-svg .line-path {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.order-line-svg circle {
  stroke-width: 2;
  cursor: pointer;
}

.order-line-svg text {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  max-width: 220px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
}

.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.pie-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 210px;
}

.menu-pie {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 12px solid var(--surface-soft);
  display: grid;
  place-items: center;
}

.pie-canvas {
  position: relative;
  width: 150px;
}

.pie-percent-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(31, 45, 42, .3);
  pointer-events: none;
}

.pie-legend {
  display: grid;
  gap: 10px;
}

.pie-legend span {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: default;
}

.pie-legend b {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.pie-legend em {
  font-style: normal;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend strong {
  color: var(--text);
  font-weight: 500;
}

.profit-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profit-card.primary {
  background: var(--primary);
  color: #fff;
}

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

.profit-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profit-card.primary span {
  color: rgba(255,255,255,.78);
}

.profit-card strong {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
}

.warehouse-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.4fr;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
}

.prep-grid {
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: 14px;
}

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

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

.prep-production-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, .45fr) minmax(130px, .45fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
}

.prep-production-row label {
  margin: 0;
}

.prep-remove-row-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.prep-add-row-btn {
  justify-self: start;
}

.prep-custom-form {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .45fr) minmax(160px, .45fr) auto;
  align-items: end;
}

.prep-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #d7e5e1;
  border-radius: 10px;
  background: #eaf7f4;
}

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

.prep-summary-card span {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.warehouse-hero h2 {
  margin: 4px 0 0;
  font-size: 30px;
}

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

.warehouse-metrics article,
.warehouse-metric-button {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.warehouse-metric-button {
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.warehouse-metric-button:hover {
  border-color: var(--danger);
  background: #fff7f8;
}

.warehouse-metrics span,
.warehouse-metrics strong,
.warehouse-metric-button small {
  display: block;
}

.warehouse-metrics span {
  color: var(--muted);
  font-weight: 700;
}

.warehouse-metrics strong {
  margin-top: 18px;
  font-size: 30px;
  font-weight: 800;
}

.warehouse-metric-button strong {
  color: var(--danger);
}

.warehouse-metric-button small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.warehouse-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 16px;
}

.warehouse-adjust-form {
  grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
  align-items: end;
}

.warehouse-adjust-form .primary-btn {
  min-height: 46px;
}

.warehouse-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.warehouse-list-panel {
  max-width: 100%;
  overflow-x: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.warehouse-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.warehouse-item-card {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(86px, 120px) minmax(220px, 320px);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d7e5e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.warehouse-tabs {
  margin: -4px 0 16px;
}

.warehouse-image {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  aspect-ratio: auto;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(135deg, #e8f8f4, #fff9e8);
  font-size: 24px;
}

.warehouse-item-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.warehouse-item-head strong,
.warehouse-item-head small {
  display: block;
}

.warehouse-item-head small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.warehouse-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 900;
}

.warehouse-icon.protein {
  background: #fff0f4;
  color: var(--danger);
}

.warehouse-icon.spice--sauce {
  background: #fff4df;
  color: #c47b00;
}

.warehouse-icon.fresh {
  background: #edf9e2;
  color: #5d9b22;
}

.warehouse-icon.dry-goods {
  background: #f1f4f3;
  color: #60716d;
}

.warehouse-icon.packaging {
  background: #eef3ff;
  color: #4266b2;
}

.warehouse-qty {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.warehouse-qty strong {
  font-size: 22px;
  line-height: 1;
}

.warehouse-qty span {
  color: var(--muted);
  font-weight: 700;
}

.warehouse-min-field {
  display: grid;
  gap: 3px;
  min-width: 86px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.warehouse-min-field input {
  min-height: 34px;
  width: 86px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.warehouse-card-form {
  display: grid;
  grid-template-columns: minmax(86px, 92px) minmax(72px, 1fr) 74px;
  gap: 8px;
  min-width: 0;
}

.warehouse-card-form select,
.warehouse-card-form input {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.warehouse-card-form button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.warehouse-waste-card {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.warehouse-manual-waste {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px auto;
  gap: 10px;
  align-items: end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.warehouse-manual-waste label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.low-stock-list,
.activity-list {
  display: grid;
  gap: 12px;
}

.low-stock-item,
.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 48, 45, 0.06);
}

.low-stock-item strong,
.low-stock-item span,
.activity-item strong,
.activity-item small {
  display: block;
}

.low-stock-item span,
.activity-item small {
  color: var(--muted);
  font-weight: 600;
}

.low-stock-item b {
  color: var(--danger);
  font-size: 20px;
}

.stock-bar {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1f4f3;
}

.stock-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff405c, #ff9f2a);
}

.activity-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.activity-item b {
  font-size: 20px;
}

.menu-profit-grid {
  display: grid;
  gap: 10px;
}

.menu-profit-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.menu-profit-card img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--primary-soft);
}

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

.menu-profit-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.menu-profit-card b {
  color: var(--primary-dark);
}

.inline-link {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
  font-weight: 800;
  text-align: left;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: var(--primary-soft);
}

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

.request-branch-card {
  min-height: 140px;
  display: grid;
  align-content: space-between;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.request-branch-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(35, 48, 45, 0.12);
}

.request-branch-card > strong {
  font-size: 28px;
  font-weight: 800;
}

.request-branch-card > small {
  color: var(--muted);
  font-weight: 600;
}

.modal-card.compact {
  width: min(920px, 100%);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(20, 32, 30, 0.42);
  backdrop-filter: blur(3px);
}

.modal-card {
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(215, 227, 223, 0.88);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(35, 48, 45, 0.24);
}

.modal-card::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.modal-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd8d4;
}

.modal-card h2 {
  margin: 2px 0 18px;
  color: var(--text);
  font-size: 26px;
  letter-spacing: 0;
}

.modal-card > .eyebrow {
  margin: 0;
  color: var(--primary-dark);
}

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

.wide-button {
  grid-column: 1 / -1;
}

.modal-close {
  float: none;
  position: sticky;
  top: 0;
  z-index: 2;
  margin-left: auto;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  min-height: 36px;
  padding: 0 16px;
  font-weight: 800;
}

.modal-close:hover {
  background: var(--primary);
  color: #fff;
}

.late-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-weight: 900;
}

.late-summary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff0f4;
  color: var(--danger);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.late-summary-btn:hover {
  background: var(--danger);
  color: #fff;
}

.ok-badge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.bulk-row strong,
.bulk-row span {
  display: block;
}

.bulk-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 10px;
}

.form-footer .primary-btn {
  min-width: 190px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 800px;
}

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

th {
  border-bottom-color: var(--line-strong);
  color: var(--muted);
  background: #fbfdfc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 14px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.modal-card .table-wrap {
  border: 0;
  border-radius: 12px;
  background: #fff;
}

.modal-card table {
  min-width: 0;
}

.modal-card th,
.modal-card td {
  padding: 16px 18px;
  border-right: 0;
  border-bottom: 1px solid #edf2f0;
}

.modal-card th {
  background: #f8faf9;
  color: #6d7b77;
  font-size: 11px;
}

.modal-card td {
  color: #53605d;
  font-size: 13px;
  line-height: 1.45;
}

.modal-card tbody tr:hover td {
  background: #fbfdfc;
}

.empty-row {
  color: var(--muted);
  text-align: center;
}

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

.catalog-grid article {
  padding: 17px;
  min-height: 104px;
  display: grid;
  align-content: space-between;
}

.menu-card {
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(35, 48, 45, 0.12);
}

.menu-card img {
  margin-bottom: 12px;
}

.catalog-grid strong,
.catalog-grid span,
.muted {
  display: block;
}

.recipe-group {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.recipe-group:last-child {
  border-bottom: 0;
}

.recipe-group h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.recipe-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

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

.recipe-price-row span {
  display: grid;
  gap: 3px;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid #d7e5e1;
  border-radius: 8px;
  background: #f7fbfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.recipe-price-row b {
  color: var(--text);
  font-size: 14px;
}

.master-menu-form,
.recipe-editor-form {
  margin-bottom: 16px;
}

.recipe-editor-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.recipe-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.recipe-builder-table {
  grid-column: 1 / -1;
  max-height: 420px;
  overflow: auto;
}

.recipe-builder-table table {
  min-width: 0;
  table-layout: fixed;
}

.recipe-builder-row input,
.recipe-builder-row select {
  min-width: 0;
}

.recipe-builder-row [name="ingredient_name"] {
  min-width: 0;
}

.recipe-builder-row td:first-child {
  width: 24%;
}

.recipe-builder-row td:nth-child(2) {
  width: 38%;
}

.recipe-builder-row td:nth-child(3),
.recipe-builder-row td:nth-child(4) {
  width: 14%;
}

.recipe-builder-row td:last-child {
  width: 10%;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1160px) {
  .dashboard,
  .auth-view {
    grid-template-columns: 1fr;
  }

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

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

  .tabs button {
    text-align: center;
  }
}

@media (max-width: 920px) {
  .topbar,
  .user-pill {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .clock-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .metrics,
  .insight-grid,
  .erp-grid,
  .expense-outlet-grid,
  .outlet-grid,
  .profit-grid,
  .sales-chart-grid,
  .request-card-grid,
  .dashboard-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-card {
    grid-column: 1 / -1;
  }

  .entry-form {
    grid-template-columns: 1fr;
  }

  .warehouse-hero,
  .warehouse-layout,
  .finance-analytics,
  .pie-layout,
  .chart-body,
  .prep-grid {
    grid-template-columns: 1fr;
  }

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

  .warehouse-card-grid {
    grid-template-columns: 1fr;
  }

  .menu-picker {
    grid-template-columns: 1fr;
  }

  .bulk-row {
    grid-template-columns: 1fr;
  }

  #requestBulkList .bulk-row,
  .manual-stock-branches,
  .manual-stock-row,
  .recap-grid,
  .inventory-summary {
    grid-template-columns: 1fr;
  }

  .entry-form .wide {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1360px);
    padding: 12px 0;
  }

  .hero-logo {
    width: min(240px, 68vw);
  }

  .warehouse-card-grid,
  .warehouse-waste-card,
  .warehouse-manual-waste,
  .warehouse-card-form {
    grid-template-columns: 1fr;
  }

  .warehouse-item-card {
    grid-template-columns: 1fr;
  }

  .warehouse-qty,
  .warehouse-card-form,
  .channel-inputs {
    grid-column: 1 / -1;
  }

  .online-platform-grid {
    grid-template-columns: 1fr;
  }

  .metrics,
  .insight-grid,
  .erp-grid,
  .profit-grid,
  .sales-chart-grid,
  .request-card-grid,
  .tabs,
  .dashboard-hero,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .welcome-card {
    align-items: start;
    flex-direction: column;
  }

  .sales-menu-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .channel-inputs {
    grid-column: 1 / -1;
  }

  .online-platform-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsive motion layer */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.mobile-menu-toggle,
.sidebar-backdrop {
  display: none;
}

.workspace,
.tab-panel.active,
.dashboard-hero,
.insight-grid,
.profit-grid,
.data-panel,
.entry-form,
.table-wrap {
  animation: fadeSlideIn .28s ease both;
}

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

.modal:not(.hidden) {
  display: grid;
  animation: modalBackdropIn .18s ease both;
}

.modal:not(.hidden) .modal-card {
  animation: modalCardIn .24s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes modalBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.primary-btn,
.light-btn,
.soft-btn,
.download-btn,
.tabs button,
.category-tabs button,
.mini-save-btn,
.insight-card,
.chart-card,
.menu-card,
.warehouse-item-card,
.request-branch-card {
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.primary-btn:hover,
.light-btn:hover,
.soft-btn:hover,
.download-btn:hover,
.tabs button:hover,
.category-tabs button:hover,
.mini-save-btn:hover,
.insight-card:hover,
.chart-card:hover,
.menu-card:hover,
.warehouse-item-card:hover,
.request-branch-card:hover {
  transform: translateY(-1px);
}

.primary-btn:active,
.light-btn:active,
.soft-btn:active,
.download-btn:active,
.tabs button:active,
.category-tabs button:active,
.mini-save-btn:active {
  transform: translateY(0) scale(.985);
}

.auth-card,
.sidebar,
.topbar,
.data-panel,
.entry-form,
.table-wrap,
.modal-card,
.welcome-card,
.amount-card,
.chart-card,
.insight-card,
.profit-card,
.warehouse-card,
.warehouse-list-panel,
.warehouse-item-card,
.menu-card,
.sales-menu-card,
.request-branch-card,
.expense-card,
.salary-slip {
  background: rgba(255, 255, 255, .86) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(31, 45, 42, .055) !important;
}

.table-wrap {
  max-width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
}

.topbar,
.entry-form,
.compact-form,
.bulk-row,
.sales-menu-card,
.warehouse-item-card,
.warehouse-card-form,
.request-pick-row {
  min-width: 0;
}

.stock-shortage-row td {
  background: #fff7f8;
}

.stock-shortage-note {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 800;
}

.stock-status-alert {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffe8ee;
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.is-loading .data-panel,
.is-loading .table-wrap,
.is-loading .insight-card {
  position: relative;
  overflow: hidden;
}

.is-loading .data-panel::after,
.is-loading .table-wrap::after,
.is-loading .insight-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: skeletonSweep 1.15s ease infinite;
}

@keyframes skeletonSweep {
  to { transform: translateX(100%); }
}

@media (min-width: 1536px) {
  .shell {
    width: min(1680px, calc(100% - 48px));
  }

  .dashboard {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .menu-picker,
  .warehouse-card-grid,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .dashboard-hero,
  .finance-analytics,
  .prep-grid,
  .warehouse-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .top-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 18px, 100%);
    padding-top: 64px;
  }

  .dashboard {
    display: block;
    min-height: 100vh;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    position: fixed;
    z-index: 80;
    left: 14px;
    top: 12px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    color: var(--primary-dark);
    padding: 0 16px;
    font-weight: 900;
    backdrop-filter: blur(12px);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(23, 34, 31, .32);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }

  .sidebar {
    position: fixed !important;
    z-index: 90;
    top: 0 !important;
    left: 0;
    width: min(82vw, 320px);
    height: 100dvh !important;
    max-height: 100dvh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
    border-radius: 0 18px 18px 0 !important;
    transform: translateX(-105%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    box-shadow: 18px 0 60px rgba(31, 45, 42, .16) !important;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace {
    gap: 16px;
  }

  .topbar,
  .insight-grid,
  .profit-grid,
  .erp-grid,
  .expense-outlet-grid,
  .outlet-grid,
  .sales-chart-grid,
  .request-card-grid,
  .inventory-summary,
  .recap-grid,
  .menu-picker {
    grid-template-columns: 1fr !important;
  }

  .topbar {
    padding: 18px;
  }

  .top-actions,
  .user-pill,
  .branch-heading-wrap {
    width: 100%;
  }

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

  .top-actions label,
  .top-actions button,
  .branch-title-select,
  .user-pill {
    min-height: 44px;
  }

  .welcome-card {
    min-height: 150px;
  }

  .welcome-card img {
    width: 104px;
  }

  .modal-card {
    width: min(100% - 20px, 720px);
    max-height: min(86dvh, 760px);
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 12px, 100%);
  }

  .topbar h1 {
    font-size: clamp(30px, 11vw, 44px);
  }

  .panel-head,
  .salary-slip-head,
  .modal-chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .entry-form,
  .compact-form,
  .bulk-row,
  .warehouse-card-form,
  .sales-menu-card,
  .online-platform-grid,
  .request-pick-row {
    grid-template-columns: 1fr !important;
  }

  .sales-menu-card img,
  .menu-card img {
    width: 64px;
    height: 64px;
  }

  .channel-inputs,
  .sales-menu-card > div {
    grid-column: 1 / -1;
  }

  .qty-stepper {
    grid-template-columns: 44px minmax(64px, 1fr) 44px;
  }

  .qty-stepper button,
  .primary-btn,
  .light-btn,
  .soft-btn,
  .download-btn,
  .mini-save-btn {
    min-height: 44px;
  }

  .modal-card {
    width: calc(100% - 12px);
    padding: 18px;
    border-radius: 16px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Clean AdminUIUX-inspired solid theme */
:root {
  --primary: #00a684;
  --primary-dark: #007d65;
  --primary-soft: #eaf8f3;
  --secondary: #f6a43a;
  --warning: #f3c94a;
  --danger: #e84863;
  --text: #1f2d2a;
  --muted: #7b8985;
  --line: #edf2ef;
  --line-strong: #dce7e2;
  --page: #f6f8f7;
  --card: #ffffff;
  --sidebar: #ffffff;
  --shadow: 0 10px 30px rgba(33, 46, 42, 0.055);
}

body {
  background: var(--page);
  color: var(--text);
}

.shell {
  width: min(1420px, calc(100% - 32px));
  padding: 14px 0;
}

.auth-card,
.metrics article,
.insight-card,
.entry-form,
.table-wrap,
.data-panel,
.sidebar,
.topbar,
.welcome-card,
.amount-card,
.chart-card,
.status-card,
.catalog-grid article,
.profit-card,
.warehouse-hero,
.warehouse-card,
.warehouse-list-panel,
.warehouse-item-card,
.request-branch-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.sidebar {
  padding: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 166, 132, .35) transparent;
}

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

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 166, 132, .35);
}

.sidebar-brand {
  padding-bottom: 18px;
}

.sidebar-brand img {
  width: 46px;
  height: 46px;
}

.tabs {
  gap: 6px;
  min-height: 0;
}

.tabs button {
  min-height: 44px;
  border-radius: 10px;
  color: #66736f;
}

.tabs button.active {
  background: var(--primary);
  color: #fff;
}

.sidebar-note,
.clock-mini,
.light-btn,
.category-tabs button,
.priority-badge,
.ok-badge {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.topbar {
  min-height: 118px;
  padding: 20px 22px;
  align-items: center;
}

.topbar h1,
.brand-panel h1 {
  letter-spacing: 0;
}

.branch-title-select,
.panel-filter,
.panel-search,
input,
select,
textarea {
  border-color: var(--line-strong);
  background: #fbfcfb;
}

.dashboard-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .65fr);
}

.welcome-card {
  background: #ffffff;
}

.welcome-card img,
.hero-logo {
  filter: none;
}

.amount-card::after {
  display: none;
}

.mini-chart span,
.progress-line span {
  background: var(--primary);
}

.progress-line {
  background: #eef3f1;
}

.amount-card,
.chart-card,
.insight-card {
  min-height: 150px;
}

.insight-button:hover,
.request-branch-card:hover,
.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(33, 46, 42, 0.08);
}

.profit-card.primary {
  background: var(--primary);
}

.warehouse-metrics article,
.warehouse-metric-button,
.warehouse-image,
.amount-card,
.chart-card {
  background: #ffffff;
}

.warehouse-metrics article,
.warehouse-metric-button {
  border: 1px solid var(--line);
}

.warehouse-image {
  border: 1px solid var(--line);
  background: #f7faf8;
}

.stock-bar span {
  background: var(--danger);
}

.detail-toggle,
.download-btn,
.primary-btn,
.warehouse-card-form button {
  background: var(--primary);
  color: #fff !important;
  box-shadow: none;
}

.detail-toggle:hover,
.download-btn:hover,
.primary-btn:hover,
.warehouse-card-form button:hover {
  background: var(--primary-dark);
}

.table-wrap {
  border-color: var(--line);
  box-shadow: none;
}

th {
  background: #f8faf9;
  color: #7a8884;
}

td {
  color: #3f4d49;
}

.modal {
  background: rgba(31, 45, 42, 0.34);
}

.modal-card {
  box-shadow: 0 24px 70px rgba(31, 45, 42, 0.18);
}

.welcome-card {
  background: #eefaf6;
  border-left: 5px solid var(--primary);
}

.amount-card {
  background: #f1f8e8;
  border-left: 5px solid #8bbf3f;
}

.chart-card {
  background: #eef5ff;
  border-left: 5px solid #5f8ee8;
  color: var(--text);
}

.chart-card span,
.chart-card small {
  color: #5d6b68 !important;
}

.insight-grid .insight-card:nth-child(1) {
  background: #eefaf6;
  border-left: 5px solid var(--primary);
}

.insight-grid .insight-card:nth-child(2) {
  background: #f1f8e8;
  border-left: 5px solid #8bbf3f;
}

.insight-grid .insight-card:nth-child(3) {
  background: #fff7f8;
  border-left: 5px solid var(--danger);
}

.insight-card .icon-box {
  background: #ffffff;
}

.amount-card strong,
.insight-grid .insight-card:nth-child(2) strong {
  color: #4f7d24;
}

.chart-card strong {
  color: #315fba;
}

.recipe-summary-card {
  display: grid;
  gap: 14px;
}

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

.recipe-summary-card table {
  display: none;
}

.insight-grid .insight-card:nth-child(1) strong {
  color: var(--primary-dark);
}

.welcome-card,
.amount-card,
.chart-card,
.insight-card,
.profit-card,
.warehouse-metrics article {
  box-shadow: none;
}

.auth-card,
.metrics article,
.insight-card,
.entry-form,
.table-wrap,
.data-panel,
.sidebar,
.topbar,
.welcome-card,
.amount-card,
.chart-card,
.status-card,
.catalog-grid article,
.profit-card,
.warehouse-hero,
.warehouse-card,
.warehouse-list-panel,
.warehouse-item-card,
.request-branch-card,
.menu-card,
.sales-menu-card,
.modal-card,
.user-pill,
.branch-list span,
.hero-logo,
.welcome-card img {
  box-shadow: none !important;
  filter: none !important;
}

.welcome-card,
.amount-card,
.chart-card,
.insight-card,
.profit-card {
  border: 1.5px solid #d7e3df !important;
}

.profit-grid .profit-card:nth-child(1) {
  background: #3f7fe8 !important;
  border-left: 5px solid #5f8ee8;
  color: #fff;
}

.profit-grid .profit-card:nth-child(1) strong {
  color: #fff;
}

.profit-grid .profit-card:nth-child(2) {
  background: var(--danger) !important;
  border-left: 5px solid var(--danger);
  color: #fff;
}

.profit-grid .profit-card:nth-child(2) strong {
  color: #fff;
}

.profit-grid .profit-card.primary {
  background: var(--primary) !important;
  border-left: 5px solid var(--primary-dark);
  color: #fff;
}

.profit-grid .profit-card span {
  color: rgba(255, 255, 255, 0.82);
}

/* Text hierarchy cleanup */
body {
  font-size: 13px;
}

.topbar h1 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: .96;
}

.panel-head h2,
.warehouse-hero h2 {
  font-size: 26px;
  line-height: 1.08;
}

#salesPanel .panel-head h2 {
  color: var(--primary-dark);
}

.section-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.welcome-card h2 {
  font-size: 30px;
  line-height: 1.05;
}

.amount-card strong,
.chart-card strong,
.insight-card > strong,
.profit-card strong,
.warehouse-metrics strong {
  font-size: 26px;
  line-height: 1.05;
}

.sales-total strong,
.warehouse-qty strong,
.request-branch-card > strong {
  font-size: 24px;
}

.panel-title strong,
.tabs button,
.sidebar-brand strong,
th {
  font-size: 12px;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 10px;
}

.panel-title small,
.insight-card small,
.amount-card small,
.chart-card span,
.warehouse-item-head small,
.activity-item small,
.low-stock-item span,
.muted,
.clean-note,
.sidebar-brand span,
.sidebar-note span {
  font-size: 11px;
  line-height: 1.35;
}

.welcome-card p.muted,
.amount-card small:empty,
.insight-card > small:empty {
  display: none;
}

.panel-title {
  margin-bottom: 10px;
}

.welcome-card,
.amount-card,
.chart-card,
.insight-card {
  min-height: 128px;
  padding: 18px;
}

.profit-card {
  padding: 16px;
}

.sidebar-note {
  padding: 12px;
}

.sidebar-note {
  display: none !important;
}

.dashboard-hero,
.insight-grid,
.profit-grid,
.warehouse-layout,
.warehouse-card-grid {
  gap: 12px;
}

.table-wrap th,
.table-wrap td {
  padding: 12px 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.pick-control {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.pick-control input {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
}

.pick-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pick-buttons button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.pick-buttons button:nth-child(1) {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.pick-buttons button:nth-child(2) {
  background: #fff6e7;
  color: #b16c00;
}

.pick-buttons button:nth-child(3) {
  background: #fff0f4;
  color: var(--danger);
}

.pick-buttons button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.metric-icon::before {
  font-size: 17px;
  line-height: 1;
}

.sales-icon::before {
  content: "↗";
}

.stock-icon::before {
  content: "□";
}

.request-icon::before {
  content: "!";
}

.request-icon {
  color: #fff;
  background: var(--danger) !important;
}

.utility-icon::before {
  content: "UT";
  font-size: 12px;
}

.utility-icon {
  color: #2f7fbd !important;
  background: #e9f6ff !important;
}

.purchase-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.8a2 2 0 0 0 2-1.6L22 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.8a2 2 0 0 0 2-1.6L22 6H6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.purchase-icon {
  color: #fff;
  background: var(--primary) !important;
}

#purchaseShortcutCard {
  background: #ffffff;
  border-color: #d3ded9;
}

.utility-usage-card {
  min-height: 0;
  aspect-ratio: 1.78 / 1;
  padding: 0 !important;
  overflow: hidden;
  isolation: isolate;
  background:
    url("/utility-usage-card-bg.png?v=20260520-equipment-asset-1") center center / cover no-repeat !important;
  background-color: #f7ead7 !important;
  border: 1px solid #e7cfc5 !important;
  border-left: 1px solid #e7cfc5 !important;
  box-shadow: none !important;
  transform: translateZ(0);
}

.utility-usage-card > * {
  display: none !important;
}

.utility-usage-card:hover {
  background-size: cover !important;
  transform: translateY(-1px);
}

.equipment-tabs,
.equipment-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.equipment-tabs button {
  border: 1px solid #d7e7e3;
  background: #eef9f6;
  color: #00745d;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.equipment-tabs button.active,
.equipment-tabs button:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.equipment-view {
  display: none;
}

.equipment-view.active {
  display: block;
  animation: fadeSlideIn .22s ease;
}

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

.equipment-summary-grid article {
  border: 1px solid #dbe7e3;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
}

.equipment-summary-grid span,
.equipment-detail-grid small,
.equipment-request-card small,
.equipment-request-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.equipment-summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  color: var(--ink);
}

.equipment-filter-row input,
.equipment-filter-row select,
.equipment-request-actions select {
  min-height: 44px;
  border: 1px solid #cfe1dc;
  border-radius: 10px;
  background: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
}

.equipment-filter-row input {
  min-width: min(320px, 100%);
  flex: 1;
}

.equipment-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(150px, 1fr));
  align-items: center;
}

.equipment-filter-row input,
.equipment-filter-row select {
  width: 100%;
  min-width: 0;
}

.equipment-table-wrap {
  width: 100%;
  max-width: calc(100vw - 340px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.equipment-table {
  width: max-content;
  min-width: 1160px;
}

.equipment-table th,
.equipment-table td {
  padding: 14px 12px;
  vertical-align: top;
}

.equipment-table th:nth-child(1),
.equipment-table td:nth-child(1) {
  min-width: 140px;
}

.equipment-table th:nth-child(2),
.equipment-table td:nth-child(2),
.equipment-table th:nth-child(3),
.equipment-table td:nth-child(3) {
  min-width: 110px;
}

.equipment-table th:nth-child(6),
.equipment-table td:nth-child(6) {
  min-width: 160px;
}

.table-link {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.table-link span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.condition-badge,
.asset-status,
.attention-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.condition-badge.good,
.asset-status.active,
.asset-status.approved-for-repair,
.asset-status.approved-for-replacement {
  background: #e4f7f1;
  color: #00866b;
}

.condition-badge.maintenance-needed,
.condition-badge.medium,
.asset-status.repair,
.asset-status.pending {
  background: #fff4d7;
  color: #ad7100;
}

.condition-badge.damaged,
.condition-badge.critical,
.asset-status.replacement-requested,
.asset-status.rejected {
  background: #ffe4ec;
  color: #ec4067;
}

.condition-badge.lost,
.asset-status.archived,
.asset-status.replaced {
  background: #edf0f1;
  color: #5b6663;
}

.condition-badge.minor {
  background: #e7f7ff;
  color: #2e7eb7;
}

.attention-badge {
  display: inline-flex;
  margin-top: 8px;
  background: #ffe4ec;
  color: #ec4067;
}

.equipment-request-grid,
.equipment-alert-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.equipment-request-card,
.equipment-alert-card {
  border: 1px solid #dbe7e3;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}

.equipment-alert-card.danger {
  background: #fff6f8;
  border-color: #ffb8c7;
}

.equipment-request-top,
.equipment-request-actions,
.equipment-request-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.equipment-request-card h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.equipment-request-card p,
.detail-note {
  color: var(--muted);
  line-height: 1.55;
}

.equipment-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e4eeeb;
  margin-top: 12px;
}

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

.equipment-detail-grid article {
  border: 1px solid #dbe7e3;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}

.equipment-detail-grid strong {
  display: block;
  margin-top: 6px;
}

.timeline {
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  align-items: start;
  border-top: 1px solid #e2ece8;
  padding: 14px 0;
}

.timeline-item span,
.timeline-item p {
  color: var(--muted);
}

.photo-picker-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.photo-picker-control {
  border: 1px dashed #bcd3cc;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fbfa;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 980px) {
  .prep-production-row {
    grid-template-columns: 1fr;
  }

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

  .equipment-filter-row input {
    grid-column: 1 / -1;
  }

  .equipment-table-wrap {
    max-width: calc(100vw - 32px);
  }

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

@media (max-width: 640px) {
  .equipment-filter-row {
    grid-template-columns: 1fr;
  }

  .equipment-table-wrap {
    max-width: calc(100vw - 32px);
  }

  .equipment-summary-grid,
  .equipment-request-grid,
  .equipment-alert-grid,
  .equipment-detail-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Typography refinement */
body,
button,
input,
select,
textarea {
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  line-height: 1.45;
}

h1,
h2,
h3,
strong,
th,
.tabs button,
.primary-btn,
.light-btn,
.download-btn {
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(32px, 3.7vw, 52px);
  line-height: 1;
  font-weight: 800;
}

.panel-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 800;
}

.welcome-card h2 {
  font-size: 28px;
  line-height: 1.12;
}

.amount-card strong,
.chart-card strong,
.insight-card > strong,
.profit-card strong {
  font-size: 25px;
  line-height: 1.08;
  font-weight: 800;
}

.profit-card strong {
  font-size: 26px;
}

.panel-title {
  gap: 10px;
}

.panel-title strong {
  font-size: 13px;
  line-height: 1.25;
}

.panel-title small,
.insight-card small,
.warehouse-item-head small,
td,
label {
  line-height: 1.45;
}

.eyebrow {
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0;
}

th {
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
}

td {
  font-size: 13px;
}

.tabs button {
  font-size: 13px;
  font-weight: 700;
}

.insight-card {
  min-height: 128px;
  padding: 18px 20px;
  align-content: start;
  gap: 14px;
}

.insight-card .panel-title {
  margin: 0;
  min-height: 34px;
  align-items: center;
}

.insight-card .icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.insight-card > strong {
  display: block;
  margin: 2px 0 0;
  font-size: 25px;
}

.insight-card > small {
  display: block;
  margin-top: -8px;
  color: var(--muted);
}

.insight-card .panel-title strong {
  font-size: 15px;
  font-weight: 800;
}

.metric-icon::before {
  font-size: 20px;
  font-weight: 900;
}

.insight-grid .insight-card:nth-child(3) > strong {
  color: var(--danger);
}

.auth-view .auth-card {
  min-height: 332px;
  border-radius: 8px;
  box-shadow: none !important;
}

body.role-employee .gross-sales-card,
body.role-employee #salesPanel .profit-grid,
body.role-employee .online-net-note,
body.role-employee .system-input,
body.role-employee .system-col,
body.role-employee .variance-col,
body.role-employee .sales-money-col,
body.role-employee [data-tab="prep"],
body.role-employee [data-tab="ingredients"],
body.role-employee [data-tab="financeDashboard"],
body.role-employee [data-tab="expenses"],
body.role-employee [data-tab="profitAnalysis"],
body.role-employee [data-tab="warehouse"],
body.role-employee [data-tab="employees"],
body.role-employee [data-tab="roles"] {
  display: none !important;
}

body.role-employee .finance-nav-group {
  display: none !important;
}

.request-priority-select {
  min-width: 130px;
}

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

.employee-detail-form .wide,
.employee-detail-form .wide-action {
  grid-column: 1 / -1;
}

#employeeDetailModal .modal-card {
  max-width: 980px;
}

.inactive-employee-panel {
  margin-top: 18px;
  border-color: #ffd0d9;
  background: #fff7f8;
}

.inactive-employee-row {
  background: #fff6f8;
}

.profile-form-page {
  min-height: 100vh;
  background: #f3f6f4;
}

.profile-form-shell {
  width: min(980px, calc(100% - 28px));
  margin: 32px auto;
}

.profile-form-card {
  width: 100%;
  max-width: none;
}

.welcome-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12)),
    url("/goji-family-hero-20260518.png") center center / cover no-repeat !important;
  border-color: #d7e3df !important;
}

.welcome-card h2,
.welcome-card p,
.welcome-card small,
.welcome-card span {
  color: #fff !important;
}

.welcome-card img {
  display: none;
}

@media (max-width: 760px) {
  .attendance-kpi-grid,
  .attendance-mini-grid {
    grid-template-columns: 1fr;
  }

  .attendance-list-bar {
    grid-template-columns: 96px 1fr 38px;
  }

  .camera-modal-card {
    width: calc(100vw - 12px);
    min-height: calc(100dvh - 12px);
  }

  .camera-stage {
    aspect-ratio: 3 / 4;
  }

  .camera-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .employee-detail-form {
    grid-template-columns: 1fr;
  }
}

/* Premium mobile-first SaaS redesign layer */
:root {
  --page: #f6f5f0;
  --card: #fffdf8;
  --surface: #ffffff;
  --surface-2: #f0f7f4;
  --cream: #fbf6e9;
  --ink: #1f2d29;
  --text: #21302b;
  --muted: #7f8d88;
  --line: #e5ece7;
  --line-strong: #d2dfd8;
  --primary: #00a684;
  --primary-dark: #007f67;
  --primary-soft: #e4f8f2;
  --blue-soft: #eaf3ff;
  --red-soft: #fff0f3;
  --amber-soft: #fff7df;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --shadow-soft: 0 18px 48px rgba(29, 49, 43, 0.08);
  --shadow-float: 0 28px 80px rgba(29, 49, 43, 0.18);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  color: var(--ink);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(1480px, calc(100% - 28px));
  padding: 18px 0 96px;
}

.dashboard {
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.sidebar,
.topbar,
.data-panel,
.entry-form,
.table-wrap,
.auth-card,
.welcome-card,
.amount-card,
.chart-card,
.status-card,
.insight-card,
.profit-card,
.modal-card,
.catalog-grid article,
.warehouse-list-row,
.sales-menu-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  background: rgba(255, 253, 248, 0.94);
}

.sidebar {
  position: sticky;
  top: 18px;
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 20px 16px;
  backdrop-filter: blur(18px);
}

.sidebar::-webkit-scrollbar,
.workspace::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.workspace::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: #cbd8d2;
  border-radius: 999px;
}

.sidebar-brand {
  padding: 4px 8px 20px;
}

.tabs button {
  min-height: 48px;
  border-radius: 16px;
  padding: 0 16px;
  color: #62706b;
  transition: transform .18s var(--ease-out), background .18s var(--ease-out), color .18s var(--ease-out);
}

.tabs button:hover {
  background: #eef8f4;
  color: var(--primary-dark);
  transform: translateX(2px);
}

.tabs button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.tab-group p {
  padding: 0 12px;
  color: var(--primary-dark);
}

.workspace {
  min-width: 0;
}

.topbar {
  padding: 22px;
  margin-bottom: 28px;
  align-items: center;
}

.topbar h1 {
  font-size: clamp(34px, 6vw, 64px);
  font-weight: 800;
}

.top-actions {
  gap: 10px;
}

.top-actions label,
.entry-form label {
  font-size: 12px;
  color: #7a8984;
}

input,
select,
textarea {
  min-height: 48px;
  border-radius: 16px;
  background: #fff;
  border-color: #dbe7e2;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(0, 166, 132, .12);
}

.primary-btn,
.light-btn,
.modal-close,
.ai-summary-btn {
  border-radius: 16px;
  min-height: 48px;
  box-shadow: none;
  transition: transform .16s var(--ease-out), filter .16s var(--ease-out), background .16s var(--ease-out);
}

.primary-btn:active,
.light-btn:active,
.modal-close:active,
.ai-summary-btn:active {
  transform: scale(.98);
}

.light-btn {
  background: #eef8f4;
  color: var(--primary-dark);
  border: 1px solid #cbe7de;
}

.dashboard-hero,
.insight-grid,
.profit-grid,
.metrics,
.erp-grid {
  gap: 18px;
}

.welcome-card {
  min-height: 196px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.welcome-card h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
}

.chart-card,
.insight-card,
.amount-card,
.profit-card {
  min-height: 150px;
  padding: 24px;
}

.insight-card .panel-title strong,
.chart-card span,
.amount-card span,
.profit-card span {
  font-size: 15px;
}

.insight-card > strong,
.amount-card strong,
.chart-card strong,
.profit-card strong {
  font-size: clamp(28px, 3.6vw, 38px);
}

.panel-head {
  margin: 28px 0 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.04;
  color: var(--primary-dark);
}

.panel-head p:not(.eyebrow) {
  margin-top: 6px;
  color: var(--muted);
}

.entry-form {
  padding: 18px;
}

.data-panel {
  padding: 20px;
}

.table-wrap {
  overflow: auto;
  border-radius: 22px;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

th {
  background: #f7faf8;
  color: #778680;
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

td,
th {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

tr:last-child td {
  border-bottom: 0;
}

.modal {
  backdrop-filter: blur(12px);
  background: rgba(28, 42, 38, .42);
}

.modal-card {
  border-radius: 30px;
  box-shadow: var(--shadow-float);
  animation: modalRise .24s var(--ease-out);
}

@keyframes modalRise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mobile-bottom-nav {
  display: none;
}

.sales-menu-card {
  border: 1px solid var(--line);
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #fff;
  transition: transform .18s var(--ease-out), border-color .18s var(--ease-out), background .18s var(--ease-out);
}

.sales-menu-card:hover {
  transform: translateY(-2px);
  border-color: #b9ded3;
  background: #fbfffd;
}

.sales-menu-card img {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 20px;
  background: #eef8f4;
}

.sales-menu-card-body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.sales-menu-card-body strong {
  font-size: 16px;
  line-height: 1.2;
}

.sales-menu-card small {
  color: var(--muted);
}

.menu-price-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-price-stack span,
.menu-price-stack small {
  width: auto;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef8f4;
  color: #52645e;
  font-size: 11px;
}

.sales-card-qty-pill {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #f3f6f4;
  color: var(--muted);
}

.sales-card-qty-pill span {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.sales-card-qty-pill small {
  font-size: 10px;
  margin-top: -10px;
}

.sales-card-qty-pill.active {
  background: var(--primary);
  color: #fff;
}

.sales-card-qty-pill.active small {
  color: rgba(255,255,255,.82);
}

.sales-bottom-sheet-modal {
  align-items: end;
  padding: 0;
}

.sales-bottom-sheet {
  width: min(720px, 100%);
  max-height: min(86dvh, 760px);
  margin: 0 auto;
  border-radius: 30px 30px 0 0;
  padding: 18px;
  animation: sheetUp .26s var(--ease-out);
}

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

.sheet-grabber {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: #d5dfda;
  margin: 4px auto 16px;
}

.sales-sheet-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-right: 84px;
}

.sales-sheet-head img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 24px;
  background: #eef8f4;
}

.sales-sheet-head h2 {
  margin: 0;
  line-height: 1.12;
}

.sales-sheet-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.sales-sheet-price-row span {
  background: var(--primary-soft);
  border: 1px solid #cde9e1;
  border-radius: 18px;
  padding: 13px 14px;
  color: #5d6c67;
}

.sales-sheet-price-row b {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.sales-sheet-channels {
  display: grid;
  gap: 12px;
}

.sheet-channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}

.sheet-channel > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.sheet-channel span img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 8px;
  margin-right: 8px;
  vertical-align: middle;
}

.sheet-channel small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.qty-stepper {
  display: grid;
  grid-template-columns: 52px minmax(58px, 1fr) 52px;
  gap: 8px;
  align-items: center;
}

.qty-stepper button {
  min-height: 48px;
  border: 1px solid #bde8de;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 800;
}

.qty-stepper input {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 95 !important;
    width: min(88vw, 330px);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
    border-radius: 0 28px 28px 0;
    transform: translateX(-105%);
    transition: transform .28s var(--ease-out);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    z-index: 80 !important;
    transition: opacity .24s var(--ease-out);
  }

  .sidebar .tabs {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-content: start;
    gap: 14px;
    margin-bottom: 96px;
  }

  .sidebar .tabs button {
    justify-content: flex-start;
    text-align: left !important;
    touch-action: manipulation;
  }

  .sidebar .tab-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.sidebar-open {
    overflow: hidden;
    touch-action: none;
  }

  body.sidebar-open .sidebar {
    touch-action: pan-y;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .top-actions,
  .user-pill {
    width: 100%;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    position: sticky;
    top: 10px;
    z-index: 35;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--primary-dark);
    font-weight: 800;
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 16px, 760px);
    padding-bottom: 116px;
  }

  .auth-view {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    padding-top: 18px;
  }

  .hero-logo {
    width: 180px;
  }

  .dashboard-hero,
  .insight-grid,
  .profit-grid,
  .metrics,
  .erp-grid,
  .report-grid,
  .dashboard .two-column {
    grid-template-columns: 1fr !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(210, 223, 216, .86);
    border-radius: 26px;
    background: rgba(255, 253, 248, .92);
    box-shadow: var(--shadow-float);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav button {
    min-height: 54px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #7a8984;
    font-size: 10px;
    font-weight: 700;
  }

  .mobile-bottom-nav button span {
    display: block;
    margin: 0 auto 3px;
    width: 24px;
    height: 24px;
    border-radius: 9px;
    background: #edf6f2;
    color: var(--primary-dark);
    line-height: 24px;
    font-size: 13px;
  }

  .mobile-bottom-nav button.active {
    background: var(--primary);
    color: #fff;
  }

  .mobile-bottom-nav button.active span {
    background: rgba(255,255,255,.2);
    color: #fff;
  }

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

  .panel-head h2 {
    font-size: 34px;
  }

  .sales-menu-card {
    grid-template-columns: 68px minmax(0, 1fr) 54px;
    padding: 12px;
    border-radius: 24px;
  }

  .sales-menu-card img {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .sales-menu-card-body strong {
    font-size: 14px;
  }

  .menu-price-stack span,
  .menu-price-stack small {
    font-size: 10px;
    min-height: 24px;
  }

  .sales-card-qty-pill {
    width: 50px;
    height: 50px;
    border-radius: 17px;
  }

  .sales-card-qty-pill span {
    font-size: 18px;
  }

  .sheet-channel {
    grid-template-columns: 1fr;
  }

  .sales-sheet-price-row {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border-radius: 20px;
  }
}

/* Operational polish: app-native confirmation + request decisions */
.decision-modal {
  backdrop-filter: blur(14px);
}

.decision-card {
  width: min(520px, calc(100vw - 28px));
  padding: 28px;
  border: 1px solid rgba(198, 216, 210, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 24px 64px rgba(35, 48, 45, 0.18);
}

.decision-card h2 {
  margin-bottom: 10px;
  font-size: 28px;
  letter-spacing: 0;
}

.decision-card p:not(.eyebrow) {
  margin: 0;
  color: #5f6c68;
  font-weight: 600;
  line-height: 1.6;
}

.decision-reason {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #6f7d78;
  font-size: 12px;
  font-weight: 800;
}

.decision-reason textarea {
  min-height: 110px;
  resize: vertical;
}

.decision-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.decision-actions button {
  min-width: 116px;
  border-radius: 16px;
}

.danger-confirm {
  background: #ef476f !important;
  color: #fff !important;
}

.reject-request-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #ffd1dc;
  border-radius: 14px;
  background: #fff0f4;
  color: #ef476f;
  font-weight: 800;
}

.reject-request-btn:hover:not(:disabled) {
  background: #ef476f;
  color: #fff;
}

.reject-request-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.reject-reason-note,
.stock-shortage-note {
  display: block;
  margin-top: 6px;
  color: #ef476f;
  font-size: 11px;
  font-weight: 800;
}

.stock-shortage-row td {
  background: #fff4f6 !important;
}
