:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --bg-elevated: #fafaf8;
  --surface: rgba(255, 255, 252, 0.84);
  --surface-strong: #fffffc;
  --surface-secondary: #f1f3ed;
  --surface-warm: #fff8e7;
  --text-primary: #18231d;
  --text-secondary: #66736a;
  --text-tertiary: #929b93;
  --brand-green: #174c33;
  --brand-green-2: #2d7a4b;
  --brand-sage: #dbe9dc;
  --brand-yellow: #f4bc45;
  --brand-mango: #f69b38;
  --accent-blue: #286fe7;
  --accent-cyan: #2baeb3;
  --accent-violet: #625bd8;
  --danger: #d8564b;
  --danger-soft: #fbe9e5;
  --warning: #ad7115;
  --warning-soft: #fff1cf;
  --success: #24764b;
  --success-soft: #e5f3e7;
  --border: rgba(30, 45, 36, 0.1);
  --border-strong: rgba(30, 45, 36, 0.16);
  --shadow-sm: 0 8px 30px rgba(20, 30, 25, 0.05);
  --shadow-md: 0 18px 52px rgba(20, 30, 25, 0.09);
  --shadow-lg: 0 28px 90px rgba(20, 30, 25, 0.16);
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-modal: 28px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sidebar-width: 244px;
  --sidebar-collapsed: 86px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(244, 188, 69, 0.13), transparent 28%),
    radial-gradient(circle at 86% 0%, rgba(43, 174, 179, 0.1), transparent 28%),
    linear-gradient(180deg, #fbfbf8 0%, var(--bg) 34%, #f3f5f0 100%);
  color: var(--text-primary);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(43, 174, 179, 0.28);
  outline-offset: 2px;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
  box-shadow: none !important;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  min-height: 100vh;
  flex: 0 0 var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.82), rgba(247, 247, 244, 0.72)),
    linear-gradient(140deg, rgba(23, 76, 51, 0.1), rgba(244, 188, 69, 0.08));
  border-right: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 18px 0 50px rgba(30, 45, 36, 0.07);
  backdrop-filter: blur(26px) saturate(170%);
  transition:
    width 220ms var(--ease),
    min-width 220ms var(--ease),
    flex-basis 220ms var(--ease);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
  max-width: var(--sidebar-collapsed);
  flex-basis: var(--sidebar-collapsed);
}

.brand-row {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 8px;
  min-height: 112px;
  margin-bottom: 14px;
  padding-inline: 42px;
}

.brand-lockup {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: center;
}

.logo-slot {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #fffef9;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    0 12px 26px rgba(20, 30, 25, 0.08);
}

.logo-slot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.brand-copy strong {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.15;
}

.sidebar.collapsed .brand-row {
  min-height: 118px;
  padding-inline: 0;
  justify-content: center;
}

.sidebar.collapsed .brand-lockup {
  justify-content: center;
}

.sidebar.collapsed .user-box,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logout-button .nav-label {
  display: none;
}

.sidebar.collapsed .logo-slot {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 18px;
}

.sidebar.collapsed .brand-copy strong {
  max-width: 64px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-box {
  margin: 0 0 20px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(30, 45, 36, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.68);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-list {
  flex: 0 0 auto;
  display: grid;
  align-content: start;
  gap: 6px;
}

.nav-item,
.logout-button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--text-secondary);
  padding: 0 10px;
  font-weight: 650;
  text-align: left;
  transition:
    transform 180ms var(--ease),
    background-color 180ms var(--ease),
    border-color 180ms var(--ease),
    color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.nav-item:hover,
.logout-button:hover {
  background: rgba(255, 255, 252, 0.68);
  border-color: rgba(30, 45, 36, 0.08);
  color: var(--text-primary);
}

.nav-item.active {
  background:
    linear-gradient(135deg, rgba(23, 76, 51, 0.11), rgba(43, 174, 179, 0.08)),
    rgba(255, 255, 252, 0.74);
  border-color: rgba(23, 76, 51, 0.14);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.nav-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(23, 76, 51, 0.08);
  color: var(--brand-green);
  font-size: 14px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.nav-list .nav-item:nth-child(2) .nav-mark { background: rgba(45, 122, 75, 0.12); }
.nav-list .nav-item:nth-child(3) .nav-mark { background: rgba(43, 174, 179, 0.12); color: #126b70; }
.nav-list .nav-item:nth-child(4) .nav-mark { background: rgba(244, 188, 69, 0.18); color: #8a5d0a; }
.nav-list .nav-item:nth-child(5) .nav-mark { background: rgba(98, 91, 216, 0.12); color: var(--accent-violet); }
.nav-list .nav-item:nth-child(6) .nav-mark { background: rgba(216, 86, 75, 0.11); color: var(--danger); }
.nav-list .nav-item:nth-child(7) .nav-mark { background: rgba(30, 45, 36, 0.08); color: var(--text-secondary); }

.nav-item.active .nav-mark {
  background: linear-gradient(135deg, var(--brand-green), var(--accent-cyan));
  color: #ffffff;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  margin-top: 16px;
  color: var(--danger);
}

.logout-button .nav-mark {
  background: var(--danger-soft);
  color: var(--danger);
}

.main-panel {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content {
  width: min(1560px, 100%);
  align-self: center;
  flex: 1;
  padding: 28px clamp(22px, 3vw, 44px) 42px;
}

.page-hero,
.business-toolbar,
.section-head,
.module-toolbar,
.people-panel-head,
.reimburse-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 152px;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 18%, rgba(244, 188, 69, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 252, 0.94), rgba(239, 247, 239, 0.82));
  box-shadow: var(--shadow-sm);
}

.business-hero {
  justify-content: center;
  text-align: center;
}

.business-hero > div:first-child {
  position: relative;
  z-index: 1;
}

.business-hero::after {
  content: "";
  position: absolute;
  right: 30px;
  bottom: 24px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.72), transparent 22%),
    linear-gradient(135deg, rgba(45, 122, 75, 0.16), rgba(43, 174, 179, 0.14));
  opacity: 0.9;
  pointer-events: none;
}

.compact-hero {
  min-height: 126px;
}

.eyebrow,
.store-kicker {
  margin: 0 0 8px;
  color: var(--brand-green-2);
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-hero h1,
.business-toolbar h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(28px, 3.1vw, 40px);
  font-weight: 780;
  line-height: 1.05;
}

.page-hero p:not(.eyebrow),
.business-toolbar p,
.people-panel-head p {
  margin: 9px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.business-hero .hero-actions {
  position: absolute;
  right: 28px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.approve-button,
.reject-button,
.record-button,
.upload-button,
.compact-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 15px;
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background-color 160ms var(--ease),
    border-color 160ms var(--ease),
    color 160ms var(--ease);
}

.primary-button,
.upload-button {
  background: linear-gradient(135deg, var(--brand-green), var(--accent-cyan));
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(23, 76, 51, 0.18);
}

.primary-button:hover,
.upload-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(23, 76, 51, 0.22);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active,
.approve-button:active,
.reject-button:active,
.record-button:active,
.upload-button:active {
  transform: scale(0.98);
}

.secondary-button {
  background: rgba(255, 255, 252, 0.78);
  color: var(--text-primary);
  border-color: var(--border);
}

.secondary-button:hover {
  background: #ffffff;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.ghost-button,
.record-button {
  background: transparent;
  color: var(--accent-blue);
  border-color: rgba(40, 111, 231, 0.12);
}

.ghost-button:hover,
.record-button:hover {
  background: rgba(40, 111, 231, 0.07);
}

.danger-button,
.reject-button {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(216, 86, 75, 0.14);
}

.danger-button:hover,
.reject-button:hover {
  background: #f9d9d3;
}

.approve-button {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(36, 118, 75, 0.14);
}

.approve-button:hover {
  background: #d8eddd;
}

.compact-button {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 13px;
}

.icon-button,
.stock-edit-button,
.close-button {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 252, 0.82);
  color: var(--text-secondary);
  transition:
    transform 160ms var(--ease),
    background-color 160ms var(--ease),
    border-color 160ms var(--ease);
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 18px;
}

.icon-button:hover,
.stock-edit-button:hover,
.close-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
  border-color: var(--border-strong);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview-card,
.metric-card,
.chart-block,
.notice-strip,
.inventory-module,
.section-block,
.people-section,
.approved-store-section,
.record-item,
.empty-state {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.overview-card {
  min-height: 148px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 9px;
  padding: 22px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.overview-card.highlight {
  min-height: 168px;
  background:
    radial-gradient(circle at 85% 18%, rgba(43, 174, 179, 0.18), transparent 32%),
    linear-gradient(135deg, #173f30, #246c4a 56%, #23858a);
  color: #ffffff;
}

.overview-card.sage {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(135deg, #edf6ed, #fdfefb);
}

.overview-card.amber {
  background:
    radial-gradient(circle at 86% 16%, rgba(246, 155, 56, 0.2), transparent 30%),
    linear-gradient(135deg, #fff9ea, #ffffff);
}

.overview-card.quiet {
  background: rgba(255, 255, 252, 0.76);
}

.overview-card span,
.metric-item span,
.store-primary-number span,
.summary-card-head,
.approved-reimburse-total span,
.approved-store-meta span,
.stock-note,
.form-help,
.record-item span,
.muted-text {
  color: var(--text-secondary);
}

.overview-card.highlight span,
.overview-card.highlight small {
  color: rgba(255, 255, 255, 0.72);
}

.overview-card strong {
  color: inherit;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.overview-card small {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
}

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

.store-column {
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.92), rgba(250, 250, 247, 0.78));
}

.store-column:hover,
.inventory-module:hover,
.people-section:hover,
.section-block:hover {
  box-shadow: var(--shadow-md);
}

.store-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.store-heading h2,
.people-panel-head h3,
.reimburse-history-head h3,
.section-head h2,
.chart-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 730;
  line-height: 1.2;
}

.store-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.store-tag,
.badge,
.category-badge,
.stock-risk-badge,
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 252, 0.72);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.store-tag.live,
.badge.approved,
.success-badge {
  background: var(--success-soft);
  border-color: rgba(36, 118, 75, 0.14);
  color: var(--success);
}

.store-tag.loading,
.store-tag.pending,
.badge.pending,
.warning-badge {
  background: var(--warning-soft);
  border-color: rgba(173, 113, 21, 0.14);
  color: var(--warning);
}

.store-tag.offline,
.badge.rejected {
  background: var(--danger-soft);
  border-color: rgba(216, 86, 75, 0.14);
  color: var(--danger);
}

.role-badge.role-boss {
  background: linear-gradient(135deg, rgba(23, 76, 51, 0.12), rgba(244, 188, 69, 0.18));
  color: var(--brand-green);
}

.role-badge.role-admin {
  background: rgba(43, 174, 179, 0.1);
  color: #126b70;
}

.role-badge.role-staff {
  background: rgba(40, 111, 231, 0.08);
  color: var(--accent-blue);
}

.store-alert {
  margin: -5px 0 14px;
  border: 1px solid rgba(216, 86, 75, 0.14);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  line-height: 1.45;
}

.store-primary-number {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.store-primary-number strong {
  font-size: clamp(30px, 3vw, 36px);
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.store-primary-number small {
  color: var(--text-secondary);
}

.store-share-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(30, 45, 36, 0.08);
  margin-bottom: 16px;
}

.store-share-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-green-2), var(--accent-cyan));
}

.store-tumushuke .store-share-bar span {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
}

.store-alaer .store-share-bar span {
  background: linear-gradient(90deg, var(--brand-yellow), var(--brand-mango));
}

.store-period-list {
  display: grid;
  grid-template-rows: repeat(3, minmax(128px, auto));
  gap: 0;
  margin-bottom: 16px;
}

.metric-row {
  min-height: 128px;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  align-content: start;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(30, 45, 36, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

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

.metric-title {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 158px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 720;
  text-align: center;
}

.metric-title span {
  min-width: 0;
  justify-self: center;
}

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

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

.metric-item {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.metric-item strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 740;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric-date-input,
.search-input,
.form-input,
.form-select,
.form-textarea,
.month-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 252, 0.86);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition:
    border-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    background-color 160ms var(--ease);
}

.metric-date-input {
  min-height: 42px;
  width: 100%;
  padding: 0 13px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.metric-date-input.weekly,
.metric-date-input.monthly {
  width: 100%;
}

.metric-date-input:focus,
.search-input:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.month-input:focus {
  background: #ffffff;
  border-color: rgba(43, 174, 179, 0.42);
  box-shadow: 0 0 0 4px rgba(43, 174, 179, 0.12);
}

.metric-date-input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
}

.sales-chart-stack {
  display: grid;
  gap: 12px;
}

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

.mini-segment,
.segment {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 252, 0.72);
  padding: 3px;
}

.mini-segment button,
.segment button,
.category-filter button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.mini-segment button.active,
.segment button.active,
.category-filter button.active {
  background: var(--brand-green);
  color: #ffffff;
}

.chart-block {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 252, 0.66);
  box-shadow: none;
}

.chart-box {
  width: 100%;
  min-height: 188px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  padding: 8px 6px 2px;
}

.chart-button:hover {
  background: rgba(43, 174, 179, 0.04);
}

.chart-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-label {
  fill: var(--text-tertiary);
  font-size: 11px;
  font-weight: 650;
}

.chart-axis,
.chart-grid {
  stroke: rgba(30, 45, 36, 0.12);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  stroke: #ffffff;
  stroke-width: 2;
}

.chart-hit-area {
  fill: transparent;
}

.chart-tooltip {
  position: fixed;
  z-index: 80;
  max-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background: rgba(24, 35, 29, 0.9);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  padding: 8px 10px;
  font-size: 12px;
  pointer-events: none;
}

.notice-strip,
.inventory-module,
.section-block,
.people-section {
  border-radius: var(--radius-xl);
  margin-bottom: 18px;
}

.notice-strip {
  padding: 20px;
  background:
    radial-gradient(circle at 86% 18%, rgba(244, 188, 69, 0.2), transparent 34%),
    linear-gradient(135deg, #fffaf0, rgba(255, 255, 252, 0.86));
}

.notice-strip.calm {
  background:
    radial-gradient(circle at 88% 20%, rgba(45, 122, 75, 0.12), transparent 34%),
    linear-gradient(135deg, #f4fbf4, rgba(255, 255, 252, 0.86));
}

.notice-title {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.inventory-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.inventory-alert-head .notice-title {
  margin-bottom: 0;
}

.notice-title span {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 720;
}

.notice-title strong {
  color: var(--text-primary);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 780;
  line-height: 1;
}

.notice-title small {
  color: var(--warning);
  font-weight: 700;
}

.notice-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.notice-group-head {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 252, 0.72);
  color: var(--text-primary);
  padding: 0 14px;
}

.notice-group.urgent .notice-group-head {
  border-color: rgba(216, 86, 75, 0.18);
  background: rgba(251, 233, 229, 0.7);
}

.notice-group-head span {
  font-weight: 730;
}

.notice-group-head strong,
.notice-group-head small {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.notice-empty {
  color: var(--text-secondary);
  line-height: 1.5;
}

.inventory-module,
.section-block,
.people-section {
  padding: 20px;
  background: rgba(255, 255, 252, 0.74);
}

.module-toolbar {
  align-items: flex-start;
  margin-bottom: 16px;
}

.toolbar-left {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 12px;
}

.search-input {
  width: min(420px, 100%);
  min-height: 42px;
  padding: 0 14px;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.category-filter button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 252, 0.72);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.category-add-button,
.category-edit-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0 !important;
  font-size: 28px !important;
  font-weight: 780 !important;
  line-height: 1 !important;
}

.table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 252, 0.62);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(30, 45, 36, 0.08);
  padding: 15px 16px;
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(249, 250, 247, 0.94);
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 760;
  text-align: left;
}

.data-table tbody tr {
  transition: background-color 140ms var(--ease);
}

.data-table tbody tr:hover {
  background: rgba(43, 174, 179, 0.045);
}

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

.inventory-table {
  min-width: 920px;
}

.inventory-table .inv-col-image { width: 88px; }
.inventory-table .inv-col-name { width: 28%; }
.inventory-table .inv-col-category { width: 13%; }
.inventory-table .inv-col-stock { width: 22%; }
.inventory-table .inv-col-actions { width: 18%; }
.inventory-table .inv-col-records { width: 13%; }

.inventory-table th:nth-child(1),
.inventory-table td:nth-child(1),
.inventory-table th:nth-child(3),
.inventory-table td:nth-child(3),
.inventory-table th:nth-child(4),
.inventory-table td:nth-child(4),
.inventory-table th:nth-child(5),
.inventory-table td:nth-child(5),
.inventory-table th:nth-child(6),
.inventory-table td:nth-child(6) {
  text-align: center;
}

.inventory-table td:nth-child(3) .category-badge,
.inventory-table td:nth-child(4) .stock-cell,
.inventory-table td:nth-child(5) .action-row,
.inventory-table td:nth-child(6) .record-button {
  margin-inline: auto;
}

.inventory-table td:nth-child(5) .action-row {
  justify-content: center;
}

.image-cell {
  text-align: center !important;
}

.thumb-button {
  width: 62px;
  height: 62px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  padding: 0;
  box-shadow: 0 8px 20px rgba(20, 30, 25, 0.06);
}

.thumb-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-info-cell {
  text-align: left;
}

.product-info-cell strong,
.person-name {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 720;
}

.category-badge {
  background: rgba(43, 174, 179, 0.08);
  color: #126b70;
}

.stock-risk-badge {
  margin-left: 8px;
  background: var(--warning-soft);
  color: var(--warning);
  border-color: rgba(173, 113, 21, 0.14);
}

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

.stock-summary {
  display: grid;
  gap: 5px;
}

.stock-number {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 770;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stock-note {
  font-size: 12px;
  line-height: 1.35;
}

.stock-note-warning {
  color: var(--warning);
  font-weight: 720;
}

.stock-edit-button {
  min-height: 32px;
  border-radius: 10px;
  padding: 0 11px;
  color: var(--warning);
  background: var(--warning-soft);
}

.action-row,
.vertical-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.vertical-actions .secondary-button,
.vertical-actions .danger-button,
.vertical-actions .ghost-button,
.record-button {
  min-height: 34px;
  padding-inline: 11px;
  font-size: 13px;
}

.data-table .secondary-button,
.data-table .ghost-button,
.data-table .record-button {
  background: rgba(255, 255, 252, 0.48);
}

.data-table .danger-button {
  background: transparent;
  color: var(--danger);
}

.data-table .danger-button:hover {
  background: var(--danger-soft);
}

.record-cell {
  white-space: nowrap;
}

.inventory-row-warning {
  background: rgba(255, 241, 207, 0.32);
}

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

.people-section {
  padding: 0;
  overflow: hidden;
}

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

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

.people-panel-head h3 {
  font-size: 22px;
}

.people-table {
  min-width: 1120px;
}

.people-table .people-col-name { width: 12%; }
.people-table .people-col-id { width: 20%; }
.people-table .people-col-bank { width: 18%; }
.people-table .people-col-phone { width: 13%; }
.people-table .people-col-salary { width: 10%; }
.people-table .people-col-note { width: 12%; }
.people-table .people-col-actions { width: 15%; }

.unclassified-people-table {
  min-width: 720px;
}

.unclassified-people-table .unclassified-col-name { width: 28%; }
.unclassified-people-table .unclassified-col-role { width: 22%; }
.unclassified-people-table .unclassified-col-scope { width: 30%; }
.unclassified-people-table .unclassified-col-password { width: 20%; }

.employee-id-cell {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 13px;
}

.employee-bank-card {
  color: var(--text-tertiary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.money {
  color: var(--text-primary);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.reimburse-workspace {
  display: grid;
  gap: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.reimburse-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.reimburse-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(560px, 2.6fr);
  gap: 12px;
  align-items: stretch;
}

.reimburse-summary-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 82% 18%, rgba(45, 122, 75, 0.15), transparent 30%),
    rgba(255, 255, 252, 0.82);
  color: var(--text-primary);
  padding: 16px;
  text-align: left;
}

.summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 720;
}

.reimburse-summary-card strong {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.reimburse-summary-card small {
  color: var(--text-secondary);
}

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

.reimburse-store-chip {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 104px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 252, 0.66);
  color: var(--text-primary);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition:
    transform 160ms var(--ease),
    border-color 160ms var(--ease),
    background-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.reimburse-store-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(255, 255, 252, 0.86);
  box-shadow: var(--shadow-sm);
}

.reimburse-store-chip span,
.reimburse-store-chip small {
  color: var(--text-secondary);
}

.reimburse-store-chip strong {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.summary-month-input-shell {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.month-picker-shell {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.summary-month-picker {
  display: none;
}

.month-picker-icon {
  display: none;
}

.month-picker-icon::before,
.month-picker-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: var(--text-secondary);
}

.month-picker-icon::after {
  inset: 7px 2px auto;
  height: 0;
  border-width: 1px 0 0;
  border-radius: 0;
}

.reimburse-history-head {
  margin-bottom: 12px;
}

.reimburse-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reimburse-filter .month-picker-shell {
  display: inline-flex;
  align-items: center;
}

.reimburse-filter .month-picker-icon {
  display: none;
}

.month-input {
  min-height: 44px;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}

.month-input::-webkit-calendar-picker-indicator {
  display: none;
  opacity: 0;
}

.approved-reimburse-modal,
.approved-store-list {
  display: grid;
  gap: 12px;
}

.approved-reimburse-total,
.approved-detail-summary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 84% 18%, rgba(244, 188, 69, 0.2), transparent 30%),
    rgba(255, 255, 252, 0.78);
  padding: 18px;
}

.approved-reimburse-total strong,
.approved-detail-summary strong {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

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

.approved-store-section {
  min-height: 120px;
  display: grid;
  gap: 12px;
  align-content: end;
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--text-primary);
  text-align: left;
}

.approved-store-section h3 {
  margin: 0;
  font-size: 17px;
}

.approved-store-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.settings-table .table-wrap {
  overflow-x: auto;
}

.compact-settings-table {
  min-width: 860px;
}

.compact-settings-table th,
.compact-settings-table td {
  text-align: left;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 30, 25, 0.36);
  backdrop-filter: blur(14px) saturate(150%);
  animation: modalFade 180ms var(--ease);
}

.modal-card {
  width: min(640px, 100%);
  max-height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-modal);
  background: rgba(255, 255, 252, 0.94);
  box-shadow: var(--shadow-lg);
  animation: modalPop 220ms var(--ease);
}

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

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

.modal-card.stock-modal,
.modal-card.confirm-modal {
  width: min(520px, 100%);
}

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

.modal-card.image-modal.voucher-fullscreen {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
}

.modal-header {
  position: relative;
  justify-content: space-between;
  border-bottom: 1px solid rgba(30, 45, 36, 0.08);
}

.modal-header h2 {
  margin: 0;
  padding-right: 42px;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 740;
  line-height: 1.25;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid rgba(30, 45, 36, 0.08);
  background: rgba(247, 247, 244, 0.72);
}

.close-button {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
}

.modal-error {
  margin: 14px 22px 0;
  border: 1px solid rgba(216, 86, 75, 0.16);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  line-height: 1.45;
}

.modal-error[hidden] {
  display: none;
}

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

.form-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

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

.form-field label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 720;
}

.form-input,
.form-select {
  min-height: 44px;
  width: 100%;
  padding: 0 13px;
}

.form-textarea {
  min-height: 110px;
  width: 100%;
  padding: 12px 13px;
  resize: vertical;
}

.form-help {
  font-size: 12px;
}

.upload-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(247, 247, 244, 0.68);
  padding: 12px;
}

.upload-card-compact {
  align-items: stretch;
  flex-direction: column;
}

.upload-preview {
  width: 124px;
  height: 124px;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
}

.upload-preview img,
.upload-preview-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-control {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.upload-file-name {
  max-width: 240px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-preview-grid,
.voucher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.upload-preview-grid:empty {
  display: none;
}

.upload-preview-grid img,
.voucher-button,
.image-large {
  border-radius: 16px;
  background: #ffffff;
}

.voucher-button {
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 0;
  aspect-ratio: 1;
}

.voucher-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-large {
  max-width: 100%;
  max-height: 68vh;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

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

.record-item,
.empty-state {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: rgba(255, 255, 252, 0.7);
  box-shadow: none;
}

.record-item {
  display: grid;
  gap: 6px;
}

.record-item strong {
  color: var(--text-primary);
  font-weight: 720;
}

.empty-state {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  text-align: left;
}

.empty-state strong {
  color: var(--text-primary);
  font-size: 16px;
}

.elevated-empty {
  min-height: 112px;
  align-content: center;
  border-style: dashed;
}

.confirm-delete {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 10px 0;
}

.confirm-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 22px;
  font-weight: 780;
}

.confirm-delete p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.stock-adjust-panel {
  display: grid;
  gap: 16px;
}

.stock-adjust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.8fr);
  gap: 14px;
}

.current-stock {
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 252, 0.72);
  padding: 18px;
}

.current-stock strong {
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.current-stock-warning {
  background: var(--warning-soft);
}

.stock-action-stack {
  display: grid;
  gap: 8px;
}

.stock-action-stack button {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 252, 0.72);
  color: var(--text-secondary);
  min-height: 48px;
  font-weight: 720;
}

.stock-action-stack button.active[data-mode="increase"] {
  background: var(--success-soft);
  color: var(--success);
}

.stock-action-stack button.active[data-mode="decrease"] {
  background: var(--danger-soft);
  color: var(--danger);
}

.voucher-viewer {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 10px;
}

.voucher-zoom-button {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.voucher-large {
  max-height: 62vh;
}

.voucher-viewer.zoomed .voucher-large {
  width: 100%;
  max-height: none;
}

.voucher-slide-button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(255, 255, 252, 0.82);
  color: var(--text-secondary);
  font-size: 30px;
}

.voucher-counter {
  margin-top: 10px;
  color: var(--text-secondary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(244, 188, 69, 0.16), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(43, 174, 179, 0.12), transparent 26%),
    linear-gradient(135deg, #fbfbf8, #f2f6f0);
}

body.auth-locked {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body.auth-locked #loginRoot {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: auto;
}

body.auth-locked .app-shell,
body.auth-locked #modalRoot {
  display: none;
}

body:not(.auth-locked) #loginRoot {
  display: none;
}

.login-panel {
  width: min(430px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-modal);
  background: rgba(255, 255, 252, 0.9);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  backdrop-filter: blur(24px) saturate(160%);
}

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

.login-brand img {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: #ffffff;
  object-fit: contain;
}

.login-brand h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 760;
  line-height: 1.2;
}

.login-brand p {
  margin: 6px 0 0;
  color: var(--text-secondary);
}

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

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

.login-form span {
  color: var(--text-secondary);
  font-weight: 720;
}

.login-form .primary-button {
  width: 100%;
  min-height: 46px;
}

.login-error {
  border: 1px solid rgba(216, 86, 75, 0.16);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 10px 12px;
  line-height: 1.45;
}

.login-home-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--brand-green);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.login-home-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.icp-footer {
  align-self: center;
  padding: 0 24px 24px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.icp-footer a {
  color: inherit;
  text-decoration: none;
}

.icp-footer a:hover {
  color: var(--brand-green);
}

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

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

@media (max-width: 1280px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-grid {
    grid-template-columns: 1fr;
  }

  .store-column {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(420px, 1.2fr);
    column-gap: 18px;
  }

  .store-heading,
  .store-alert,
  .store-primary-number,
  .store-share-bar {
    grid-column: 1;
  }

  .store-period-list,
  .sales-chart-stack {
    grid-column: 2;
  }

  .store-period-list {
    grid-row: 1 / span 3;
    margin-bottom: 0;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-width: 214px;
  }

  .content {
    padding-inline: 20px;
  }

  .reimburse-summary,
  .reimburse-store-split {
    grid-template-columns: 1fr;
  }

  .approved-store-list {
    grid-template-columns: 1fr;
  }

  .store-column {
    display: block;
  }

  .store-period-list {
    margin-bottom: 16px;
  }
}

@media (max-width: 900px) {
  body:not(.auth-locked) {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .app-shell {
    display: block;
  }

  .sidebar,
  .sidebar.collapsed {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: auto;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(30, 45, 36, 0.08);
  }

  .brand-row,
  .sidebar.collapsed .brand-row {
    display: flex;
    align-items: center;
    min-height: 54px;
    margin-bottom: 0;
    padding-right: 52px;
    padding-left: 0;
    justify-content: flex-start;
  }

  .brand-lockup,
  .sidebar.collapsed .brand-lockup {
    display: flex;
    align-items: center;
    justify-items: start;
    gap: 12px;
    text-align: left;
  }

  .brand-copy,
  .sidebar.collapsed .brand-copy {
    display: grid;
    justify-items: start;
    text-align: left;
  }

  .logo-slot,
  .sidebar.collapsed .logo-slot {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 15px;
  }

  .user-box,
  .sidebar.collapsed .user-box {
    position: absolute;
    left: 72px;
    right: 66px;
    top: calc(38px + env(safe-area-inset-top));
    display: block;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 12px;
  }

  .logout-button,
  .sidebar.collapsed .logout-button {
    position: absolute;
    right: 12px;
    top: calc(14px + env(safe-area-inset-top));
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    padding: 0;
  }

  .logout-button .nav-label,
  .sidebar.collapsed .logout-button .nav-label {
    display: none;
  }

  .logout-button .nav-mark {
    justify-self: center;
  }

  .nav-list,
  .sidebar.collapsed .nav-list {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(30, 45, 36, 0.08);
    background: rgba(255, 255, 252, 0.92);
    box-shadow: 0 -14px 32px rgba(20, 30, 25, 0.1);
    backdrop-filter: blur(18px) saturate(160%);
    scrollbar-width: none;
  }

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

  .nav-item,
  .sidebar.collapsed .nav-item {
    flex: 0 0 76px;
    min-width: 76px;
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 30px auto;
    justify-items: center;
    align-content: center;
    gap: 3px;
    padding: 5px 6px;
    text-align: center;
  }

  .nav-mark,
  .sidebar.collapsed .nav-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }

  .nav-label,
  .sidebar.collapsed .nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .content {
    padding: 14px 12px 18px;
  }

  .page-hero,
  .module-toolbar,
  .people-panel-head,
  .reimburse-history-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero {
    min-height: auto;
    padding: 20px;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .business-hero::after {
    width: 86px;
    height: 86px;
    right: 16px;
    bottom: 16px;
  }

  .hero-actions,
  .hero-actions .primary-button,
  .people-panel-head .primary-button {
    width: 100%;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .search-input,
  .form-input,
  .form-select,
  .month-input,
  .metric-date-input,
  .metric-date-input.weekly,
  .metric-date-input.monthly {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .modal-backdrop {
    align-items: end;
    place-items: end stretch;
    padding: 0;
  }

  .modal-card,
  .modal-card.wide,
  .modal-card.product-modal,
  .modal-card.stock-modal,
  .modal-card.confirm-modal,
  .modal-card.image-modal {
    width: 100%;
    max-height: 88dvh;
    border-radius: 24px 24px 0 0;
  }

  .modal-footer {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }

  .form-grid,
  .stock-adjust-grid {
    grid-template-columns: 1fr;
  }

  .icp-footer {
    padding-bottom: calc(20px + 78px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 680px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .inventory-table,
  .people-table,
  .reimburse-table,
  .compact-settings-table,
  .self-settings-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
  }

  .inventory-table colgroup,
  .people-table colgroup,
  .reimburse-table colgroup,
  .compact-settings-table colgroup,
  .inventory-table thead,
  .people-table thead,
  .reimburse-table thead,
  .compact-settings-table thead {
    display: none;
  }

  .inventory-table,
  .inventory-table tbody,
  .inventory-table tr,
  .inventory-table td,
  .people-table,
  .people-table tbody,
  .people-table tr,
  .people-table td,
  .reimburse-table,
  .reimburse-table tbody,
  .reimburse-table tr,
  .reimburse-table td,
  .compact-settings-table,
  .compact-settings-table tbody,
  .compact-settings-table tr,
  .compact-settings-table td {
    display: block;
    width: 100%;
  }

  .inventory-table tr,
  .people-table tr,
  .reimburse-table tr,
  .compact-settings-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 252, 0.82);
    padding: 12px;
  }

  .inventory-table td,
  .people-table td,
  .reimburse-table td,
  .compact-settings-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 9px 0;
    text-align: right;
  }

  .inventory-table td::before,
  .people-table td::before,
  .reimburse-table td::before,
  .compact-settings-table td::before {
    content: attr(data-label);
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 760;
    text-align: left;
  }

  .inventory-table .image-cell,
  .inventory-table .product-info-cell,
  .people-table td:nth-child(5),
  .reimburse-table td:nth-child(3) {
    text-align: right;
  }

  .stock-cell,
  .stock-summary {
    align-items: end;
    justify-content: end;
    text-align: right;
  }

  .action-row,
  .vertical-actions {
    justify-content: flex-end;
  }
}

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

/* Brand access screen: display only; authentication and dashboard behavior stay in app.js. */
.login-screen {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 28px;
  background: #f3f5ef;
}
.login-layout {
  width: min(1120px, 100%);
  min-height: min(680px, calc(100dvh - 110px));
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-radius: 28px;
  overflow: hidden;
  background: #fffefa;
  box-shadow: 0 30px 90px rgba(19, 54, 31, .09);
}
.login-intro {
  position: relative;
  min-height: 560px;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background: #174c33;
  color: #f6f9f2;
}
.login-intro::before,.login-intro::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(215, 234, 207, .19);
  border-radius: 50%;
  right: -140px;
  top: 9%;
}
.login-intro::after { width: 315px; height: 315px; right: -75px; top: 20%; }
.login-intro-index,.login-intro-bottom {
  position: relative;
  z-index: 1;
  color: #b8d3bc;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 700;
}
.login-intro > div { position: relative; z-index: 1; }
.login-intro-line { display: block; width: 40px; height: 2px; background: var(--brand-yellow); }
.login-intro p {
  margin: 25px 0 22px;
  color: #fffefa;
  font-size: clamp(36px, 3.4vw, 54px);
  font-weight: 720;
  letter-spacing: -.045em;
  line-height: 1.35;
}
.login-intro small { color: #c2d8c7; font-size: 14px; letter-spacing: .06em; }
.login-screen .login-panel {
  align-self: center;
  justify-self: center;
  width: min(430px, calc(100% - 72px));
  padding: 35px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.login-screen .login-brand { display: block; margin-bottom: 34px; }
.login-screen .login-brand img { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 26px; }
.login-screen .login-brand h1 { font-size: 29px; line-height: 1.4; letter-spacing: -.035em; }
.login-screen .login-brand p { font-size: 14px; margin-top: 8px; }
.login-screen .login-form { gap: 19px; }
.login-screen .login-form label { gap: 8px; }
.login-screen .login-form span { color: #3a4c40; font-size: 13px; }
.login-screen .form-input { height: 48px; border-radius: 11px; background: #fafbf8; }
.login-screen .form-input:focus { border-color: #2d7a4b; box-shadow: 0 0 0 3px rgba(45,122,75,.12); }
.login-screen .login-form .primary-button { min-height: 48px; margin-top: 7px; }
.login-screen .login-form .primary-button { background: #174c33; box-shadow: none; }
.login-screen .login-form .primary-button:hover { background: #246a42; }
.login-screen .login-home-link { margin-top: 28px; }
.login-screen .icp-footer { padding: 22px 10px 0; }
@media (max-width: 760px) {
  .login-screen { padding: 16px; }
  .login-layout { display: flex; flex-direction: column; min-height: 0; border-radius: 20px; }
  .login-intro { min-height: 180px; padding: 24px; }
  .login-intro p { font-size: 26px; margin: 16px 0 7px; }
  .login-intro small { font-size: 11px; }
  .login-intro-bottom { display: none; }
  .login-screen .login-panel { width: calc(100% - 48px); padding: 30px 0 34px; }
  .login-screen .login-brand { margin-bottom: 25px; }
  .login-screen .login-brand img { width: 52px; height: 52px; margin-bottom: 13px; }
  .login-screen .login-brand h1 { font-size: 23px; }
}
