:root {
  --bg: #f4f7f1;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-soft: #f2f7ef;
  --line: #d8e4d4;
  --text: #18231d;
  --muted: #68756f;
  --green: #2f7d46;
  --green-dark: #174c33;
  --mint: #dcefe1;
  --amber: #ffb84c;
  --red: #ff5c7a;
  --blue: #35b6ff;
  --pink: #ff8ac2;
  --yellow: #dfcf88;
  --purple: #9f8cff;
  --gold-soft: #efe4b8;
  --sage: #bfd3bf;
  --sidebar: #173b2f;
  --sidebar-2: #214f3d;
  --shadow: 0 18px 42px rgba(26, 57, 40, 0.12);
  --soft-shadow: 0 8px 22px rgba(26, 57, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background: linear-gradient(135deg, #f7f8f2 0%, #eef5ee 48%, #fbf7ea 100%);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

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;
}

button {
  cursor: pointer;
}

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

.sidebar {
  width: 252px;
  min-width: 252px;
  max-width: 252px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #f7fbf4;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  transition: width 180ms ease;
  flex: 0 0 252px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 38px rgba(17, 47, 34, 0.18);
}

.sidebar.collapsed {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  flex-basis: 82px;
  overflow: hidden;
}

.brand-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 206px;
  margin-bottom: 6px;
  position: relative;
}

.logo-slot {
  width: 198px;
  height: 198px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  justify-self: center;
  overflow: visible;
  box-shadow: none;
}

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

.collapse-button {
  position: absolute;
  top: 80px;
  right: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  color: #f7fbf4;
  font-size: 24px;
  line-height: 1;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(18px);
}

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

.sidebar.collapsed .brand-row {
  grid-template-columns: 1fr;
  justify-content: center;
  gap: 8px;
  min-height: 104px;
}

.sidebar.collapsed .collapse-button {
  position: static;
  justify-self: center;
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(180deg);
}

.sidebar.collapsed .logo-slot {
  width: 58px;
  height: 58px;
}

.user-box {
  margin: 0 0 16px;
  padding: 0 12px 4px;
  color: rgba(247, 251, 244, 0.9);
  font-size: 14px;
  font-weight: 700;
}

.sidebar.collapsed .user-box {
  display: none;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #a6f7c8;
  color: #063d23;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.user-text strong {
  display: block;
  font-size: 14px;
}

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

.nav-list {
  display: grid;
  gap: 7px;
  flex: 1;
  align-content: start;
}

.nav-item,
.logout-button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 251, 244, 0.86);
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active,
.logout-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(10, 29, 20, 0.18);
  backdrop-filter: blur(18px);
}

.nav-item.active .nav-mark {
  background: #dcefe1;
  color: var(--green-dark);
}

.nav-mark {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #ffffff;
  font-weight: 700;
  color: #17212b;
}

.nav-list .nav-item:nth-child(1) .nav-mark { background: #c9ead2; }
.nav-list .nav-item:nth-child(2) .nav-mark { background: #edd2dc; }
.nav-list .nav-item:nth-child(3) .nav-mark { background: #cfe2e5; }
.nav-list .nav-item:nth-child(4) .nav-mark { background: #e8d9ba; }
.nav-list .nav-item:nth-child(5) .nav-mark { background: #d8d3e8; }
.nav-list .nav-item:nth-child(6) .nav-mark { background: #efd1c8; }
.nav-list .nav-item:nth-child(7) .nav-mark { background: #d8eac3; }

.sidebar.collapsed .nav-item,
.sidebar.collapsed .logout-button {
  grid-template-columns: 32px;
  justify-content: center;
  padding: 0;
}

.logout-button {
  width: 100%;
  margin-top: 14px;
}

.logout-button .nav-mark {
  background: #ff8fab;
}

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

.topbar {
  height: 84px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.status-pill {
  min-width: 152px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.content {
  padding: 22px 28px 40px;
  flex: 1;
}

.sync-status {
  align-self: flex-end;
  margin: 0 28px 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.sync-status[hidden] {
  display: none;
}

.sync-status.saving {
  color: var(--accent);
}

.sync-status.saved {
  color: var(--green-dark);
}

.sync-status.error {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(255, 235, 239, 0.9);
  color: #b42342;
}

.icp-footer {
  flex: 0 0 auto;
  padding: 0 28px 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

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

.icp-footer a:hover {
  color: var(--green);
  text-decoration: underline;
}

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

.store-column,
.section-block,
.inventory-module,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.store-column {
  padding: 16px;
  border-top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 244, 0.88));
}

.store-column:nth-child(2) {
  background: linear-gradient(180deg, rgba(251, 254, 252, 0.94), rgba(241, 248, 244, 0.88));
}

.store-column:nth-child(3) {
  background: linear-gradient(180deg, rgba(255, 252, 244, 0.94), rgba(246, 250, 244, 0.88));
}

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

.store-heading h2 {
  margin: 0;
}

.store-tag {
  border: 1px solid rgba(213, 162, 57, 0.32);
  border-radius: 999px;
  padding: 4px 9px;
  color: #7b5b16;
  background: rgba(248, 241, 214, 0.9);
  font-size: 12px;
}

.sales-metric-stack {
  display: grid;
  gap: 10px;
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
}

.metric-card:nth-child(1) {
  background: #eef8ef;
}

.metric-card:nth-child(2) {
  background: #eef6f4;
}

.metric-card:nth-child(3) {
  background: #f8f2ec;
}

.metric-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--green-dark);
  font-weight: 800;
}

.metric-date-input {
  width: 132px;
  min-height: 32px;
  border: 1px solid rgba(23, 76, 51, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  outline: none;
  box-shadow: var(--soft-shadow);
}

.metric-date-input.weekly,
.metric-date-input.monthly {
  width: 116px;
}

.metric-date-input.weekly {
  text-transform: lowercase;
}

.metric-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}

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

.metric-item {
  min-height: 62px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(45, 125, 82, 0.1);
  padding: 10px;
}

.metric-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric-item strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.chart-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sales-chart-stack {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.sales-chart-card {
  margin-top: 0;
}

.chart-head {
  display: grid;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  text-align: center;
}

.chart-head h3 {
  margin: 0;
}

.chart-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-segment {
  display: inline-flex;
  border: 1px solid rgba(23, 76, 51, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  box-shadow: var(--soft-shadow);
}

.mini-segment button {
  min-height: 28px;
  border: 0;
  border-right: 1px solid rgba(23, 76, 51, 0.14);
  background: transparent;
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

.mini-segment button:last-child {
  border-right: 0;
}

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

.chart-box {
  width: 100%;
  height: 238px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.chart-button {
  display: block;
  padding: 0;
  cursor: zoom-in;
  color: inherit;
}

.chart-button:hover {
  border-color: rgba(0, 122, 255, 0.34);
  box-shadow: 0 10px 24px rgba(28, 42, 68, 0.12);
}

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

.chart-label {
  fill: #69776d;
  font-size: 11px;
}

.chart-axis {
  stroke: #aebbae;
  stroke-width: 1;
}

.chart-grid {
  stroke: #e1e8df;
  stroke-width: 1;
}

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

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

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

.chart-tooltip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  border: 1px solid rgba(29, 29, 31, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 14px 32px rgba(28, 42, 68, 0.16);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.notice-strip {
  border: 1px solid rgba(255, 184, 76, 0.34);
  border-radius: 22px;
  background: rgba(255, 247, 218, 0.78);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--soft-shadow);
}

.notice-title {
  color: #7b5b16;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
}

.notice-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.notice-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.notice-group {
  border: 1px solid rgba(255, 159, 10, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  padding: 8px 10px;
}

.notice-group-head {
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: #8a5b00;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  font-size: 14px;
  font-weight: 800;
}

.notice-group-head strong {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 159, 10, 0.18);
  border-radius: 999px;
  background: rgba(255, 247, 218, 0.88);
  padding: 0 8px;
  font-size: 12px;
}

.notice-group .notice-list {
  justify-content: flex-start;
  gap: 6px;
}

.notice-empty {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a5b00;
  font-size: 13px;
  font-weight: 700;
}

.notice-chip {
  border: 1px solid rgba(255, 159, 28, 0.36);
  border-radius: 999px;
  color: #765716;
  background: rgba(255, 255, 255, 0.86);
  padding: 6px 10px;
  font-size: 13px;
}

.notice-chip.more {
  border-style: dashed;
  background: rgba(255, 247, 218, 0.84);
}

.restock-detail-table {
  min-width: 720px;
}

.restock-detail-table th,
.restock-detail-table td {
  padding: 12px;
}

.inventory-module,
.section-block {
  padding: 16px;
}

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

.search-input {
  width: min(300px, 100%);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0 12px;
  outline: none;
}

.search-input:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.16);
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.approve-button,
.reject-button {
  min-height: 36px;
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.primary-button {
  background: linear-gradient(180deg, #3a9c60, #237548);
  color: #ffffff;
  border-color: rgba(23, 76, 51, 0.2);
  box-shadow: 0 8px 18px rgba(35, 117, 72, 0.2);
}

.primary-button:hover {
  background: linear-gradient(180deg, #328a55, #1d633d);
}

.secondary-button {
  background: rgba(239, 247, 245, 0.92);
  color: var(--text);
  border-color: #c7ddd7;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.92);
  color: #25654b;
  border-color: #c3ddd0;
}

.danger-button,
.reject-button {
  background: #fff0f5;
  color: var(--red);
  border-color: #ffb3c4;
}

.approve-button {
  background: #eef8ef;
  color: var(--green-dark);
  border-color: #bfdcc7;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.78);
  min-width: 860px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
}

.data-table th {
  background: rgba(226, 238, 219, 0.9);
  color: #203027;
  font-weight: 800;
}

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

.inventory-table {
  min-width: 760px;
  table-layout: fixed;
}

.inventory-table .inv-col-image {
  width: 10%;
}

.inventory-table .inv-col-name {
  width: 30%;
}

.inventory-table .inv-col-stock {
  width: 35%;
}

.inventory-table .inv-col-actions {
  width: 12%;
}

.inventory-table .inv-col-records {
  width: 13%;
}

.inventory-table td {
  height: 92px;
}

.inventory-table th,
.inventory-table td {
  padding: 8px 10px;
}

.inventory-table .vertical-actions {
  gap: 4px;
}

.inventory-table .vertical-actions button {
  min-height: 26px;
  border-radius: 11px;
  padding: 0 10px;
  font-size: 13px;
}

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

.people-table {
  min-width: 780px;
  table-layout: fixed;
}

.people-table .people-col-name {
  width: 9%;
}

.people-table .people-col-id {
  width: 21%;
}

.people-table .people-col-phone {
  width: 15%;
}

.people-table .people-col-salary {
  width: 12%;
}

.people-table .people-col-note {
  width: 25%;
}

.people-table .people-col-actions {
  width: 18%;
}

.people-table .action-row {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
}

.people-table .action-row button {
  min-height: 30px;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 13px;
}

.people-table td:nth-child(5),
.people-table th:nth-child(5) {
  text-align: left;
}

.reimburse-table {
  min-width: 720px;
  table-layout: fixed;
}

.reimburse-table .reimburse-col-date {
  width: 12%;
}

.reimburse-table .reimburse-col-employee {
  width: 16%;
}

.reimburse-table .reimburse-col-reason {
  width: 39%;
}

.reimburse-table .reimburse-col-amount {
  width: 10%;
}

.reimburse-table .reimburse-col-detail {
  width: 9%;
}

.reimburse-table .reimburse-col-status {
  width: 14%;
}

.reimburse-table th,
.reimburse-table td {
  padding: 10px 8px;
}

.reimburse-date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.reimburse-date-cell span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.reimburse-table th:nth-child(3),
.reimburse-table td:nth-child(3) {
  text-align: left;
  white-space: normal;
  line-height: 1.45;
}

.image-cell {
  width: 92px;
}

.thumb-button {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

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

.stock-cell {
  min-width: 176px;
  min-height: 76px;
  position: relative;
  display: grid;
  place-items: center;
}

.stock-summary {
  text-align: center;
}

.stock-number {
  font-size: 22px;
  font-weight: 800;
}

.stock-note {
  color: var(--muted);
  font-size: 12px;
}

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

.vertical-actions {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.stock-edit-button {
  position: absolute;
  top: 0;
  right: 0;
  min-height: 26px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 11px;
}

.record-button {
  min-height: 34px;
  border: 1px solid #bfdcc7;
  border-radius: 14px;
  background: #eef8ef;
  color: var(--green-dark);
  padding: 0 10px;
}

.record-cell {
  text-align: center;
}

.badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #f3f7f1;
  color: var(--muted);
  font-size: 12px;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.badge.pending {
  border-color: #e4c37f;
  background: #fff8e9;
  color: #80510d;
}

.badge.approved {
  border-color: #c9e3c5;
  background: #edf7ec;
  color: var(--green-dark);
}

.badge.rejected {
  border-color: #edc7c0;
  background: #fff2f0;
  color: var(--red);
}

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

.section-head h2 {
  margin: 0;
}

.segment {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
}

.segment button {
  min-height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
}

.segment button:last-child {
  border-right: 0;
}

.segment button.active {
  background: var(--green);
  color: #ffffff;
}

.left-toolbar {
  justify-content: flex-start;
}

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

.people-section {
  min-height: 190px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.vertical-store {
  background: linear-gradient(180deg, #d9ecd7, #c7dfc2);
  color: var(--green-dark);
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  padding: 12px 0;
}

.people-content {
  padding: 14px;
  min-width: 0;
}

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

.people-panel-head h3 {
  margin: 0;
}

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

.reimburse-history-head h3 {
  margin: 0;
}

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

.reimburse-filter label,
.filter-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.month-input {
  height: 36px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 0 10px;
  outline: none;
}

.month-icon-input {
  position: absolute;
  inset: 0;
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0;
  color: transparent;
  caret-color: transparent;
  font-size: 0;
  text-align: center;
  cursor: pointer;
  opacity: 0;
}

.month-icon-input::-webkit-datetime-edit,
.month-icon-input::-webkit-datetime-edit-fields-wrapper,
.month-icon-input::-webkit-datetime-edit-text,
.month-icon-input::-webkit-datetime-edit-month-field,
.month-icon-input::-webkit-datetime-edit-year-field {
  color: transparent;
  padding: 0;
}

.month-icon-input::-webkit-calendar-picker-indicator {
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.month-picker-shell {
  position: relative;
  width: 38px;
  height: 36px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.month-picker-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.16);
}

.month-picker-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 2px solid #1d1d1f;
  border-radius: 4px;
  pointer-events: none;
}

.month-picker-icon::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 3px;
  border-top: 2px solid #1d1d1f;
}

.month-picker-icon::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  left: 3px;
  top: 8px;
  border-radius: 50%;
  background: #1d1d1f;
  box-shadow: 5px 0 0 #1d1d1f;
}

.month-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.16);
}

.compact-button {
  min-height: 32px;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(24, 35, 29, 0.46);
  display: grid;
  place-items: center;
  padding: 28px;
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(86vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.modal-header,
.modal-footer {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  padding: 18px;
  overflow: auto;
}

.modal-footer {
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.close-button {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}

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

.form-field {
  display: grid;
  gap: 7px;
}

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

.form-field label {
  color: #3a493b;
  font-weight: 700;
  font-size: 13px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 9px 10px;
  outline: none;
}

.form-input,
.form-select {
  height: 40px;
}

.form-textarea {
  min-height: 86px;
  resize: vertical;
}

.form-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.current-stock {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #eef8ef;
  padding: 14px;
}

.current-stock span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

.current-stock strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.image-large {
  width: min(540px, 100%);
  max-height: 70vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

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

.voucher-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

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

.record-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
}

.record-item strong {
  display: block;
  margin-bottom: 5px;
}

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

.empty-state {
  border: 1px dashed #f7b731;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
}

.settings-table {
  max-width: none;
  width: 100%;
}

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

.compact-settings-table {
  min-width: 0;
  table-layout: fixed;
  width: 100%;
}

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

.compact-settings-table th:nth-child(1),
.compact-settings-table td:nth-child(1) {
  width: 120px;
}

.compact-settings-table th:nth-child(2),
.compact-settings-table td:nth-child(2) {
  width: 110px;
}

.compact-settings-table th:nth-child(3),
.compact-settings-table td:nth-child(3) {
  width: 140px;
}

.compact-settings-table th:nth-child(4),
.compact-settings-table td:nth-child(4) {
  width: 130px;
}

.compact-settings-table th:nth-child(5),
.compact-settings-table td:nth-child(5) {
  width: 180px;
}

.compact-settings-table th:nth-child(6),
.compact-settings-table td:nth-child(6) {
  width: 90px;
}

.self-settings-table th:nth-child(1),
.self-settings-table td:nth-child(1) {
  width: 22%;
}

.self-settings-table th:nth-child(2),
.self-settings-table td:nth-child(2) {
  width: 18%;
}

.self-settings-table th:nth-child(3),
.self-settings-table td:nth-child(3) {
  width: 28%;
}

.self-settings-table th:nth-child(4),
.self-settings-table td:nth-child(4) {
  width: 32%;
}

.money {
  font-weight: 800;
  color: #274f30;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: auto;
    flex-basis: auto;
  }

  .sidebar.collapsed {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: auto;
    overflow: visible;
  }

  .sidebar.collapsed .user-text,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .logout-button .nav-label {
    display: block;
  }

  .sidebar.collapsed .brand-row {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .sidebar.collapsed .collapse-button {
    position: static;
    transform: none;
    box-shadow: none;
  }

  .sidebar.collapsed .logo-slot {
    width: 198px;
    height: 198px;
  }

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

  .topbar {
    position: relative;
  }

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

.business-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.business-toolbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.business-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.store-tag.live {
  border-color: rgba(52, 199, 89, 0.22);
  background: rgba(52, 199, 89, 0.12);
  color: #1f7a3a;
}

.store-tag.loading {
  border-color: rgba(0, 122, 255, 0.18);
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent);
}

.store-tag.offline,
.store-tag.pending {
  border-color: rgba(255, 149, 0, 0.22);
  background: rgba(255, 159, 10, 0.12);
  color: #9a5d00;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  box-shadow: var(--soft-shadow);
}

.icon-button:hover {
  border-color: rgba(0, 122, 255, 0.22);
  color: var(--accent);
}

.store-alert {
  margin: -2px 0 12px;
  border: 1px solid rgba(255, 149, 0, 0.18);
  border-radius: 12px;
  background: rgba(255, 248, 230, 0.78);
  color: #8a5b00;
  padding: 9px 11px;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .business-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .business-toolbar .primary-button {
    width: 100%;
  }

  .store-heading {
    align-items: flex-start;
  }
}

/* iOS style refresh */
:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-soft: rgba(242, 242, 247, 0.92);
  --line: rgba(60, 60, 67, 0.14);
  --text: #1d1d1f;
  --muted: rgba(60, 60, 67, 0.68);
  --green: #34c759;
  --green-dark: #1f7a3a;
  --mint: #e6f8ec;
  --amber: #ff9f0a;
  --red: #ff3b30;
  --blue: #007aff;
  --pink: #ff2d55;
  --yellow: #ffd60a;
  --purple: #5856d6;
  --gold-soft: #fff5d6;
  --sage: #eaf8f0;
  --sidebar: rgba(255, 255, 255, 0.72);
  --sidebar-2: rgba(247, 249, 253, 0.9);
  --shadow: 0 22px 50px rgba(28, 42, 68, 0.1);
  --soft-shadow: 0 10px 28px rgba(28, 42, 68, 0.08);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.1);
  --success-soft: rgba(52, 199, 89, 0.12);
  --danger-soft: rgba(255, 59, 48, 0.1);
  --warning-soft: rgba(255, 159, 10, 0.14);
}

html {
  background: var(--bg);
}

body {
  min-width: 0;
  background:
    linear-gradient(145deg, rgba(246, 249, 255, 0.98) 0%, rgba(239, 246, 255, 0.96) 42%, rgba(250, 251, 255, 0.98) 100%),
    #f5f7fb;
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "PingFang SC",
    "Microsoft YaHei",
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

button {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

button:active {
  transform: scale(0.98);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 2px;
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 34%),
    transparent;
}

.sidebar {
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--text);
  border-right: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 18px 0 40px rgba(32, 45, 68, 0.08);
  backdrop-filter: saturate(180%) blur(26px);
}

.brand-row {
  min-height: 154px;
  margin-bottom: 14px;
}

.logo-slot {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.64);
  overflow: hidden;
}

.logo-slot img {
  object-fit: cover;
}

.collapse-button {
  top: 58px;
  right: 4px;
  border-radius: 999px;
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(28, 42, 68, 0.12);
  backdrop-filter: saturate(180%) blur(18px);
}

.user-box {
  margin-bottom: 18px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  padding: 10px 12px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-list {
  gap: 8px;
}

.nav-item,
.logout-button {
  min-height: 46px;
  border-radius: 14px;
  background: transparent;
  color: rgba(29, 29, 31, 0.72);
  grid-template-columns: 34px 1fr;
  padding: 0 11px;
}

.nav-item:hover,
.logout-button:hover {
  background: rgba(0, 122, 255, 0.08);
  border-color: rgba(0, 122, 255, 0.1);
  color: var(--text);
  box-shadow: none;
}

.nav-item.active {
  background: rgba(0, 122, 255, 0.12);
  border-color: rgba(0, 122, 255, 0.18);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.nav-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #1d1d1f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.nav-item.active .nav-mark {
  background: var(--accent);
  color: #ffffff;
}

.nav-list .nav-item:nth-child(1) .nav-mark { background: rgba(0, 122, 255, 0.16); }
.nav-list .nav-item:nth-child(2) .nav-mark { background: rgba(52, 199, 89, 0.18); }
.nav-list .nav-item:nth-child(3) .nav-mark { background: rgba(90, 200, 250, 0.18); }
.nav-list .nav-item:nth-child(4) .nav-mark { background: rgba(255, 149, 0, 0.2); }
.nav-list .nav-item:nth-child(5) .nav-mark { background: rgba(88, 86, 214, 0.16); }
.nav-list .nav-item:nth-child(6) .nav-mark { background: rgba(255, 45, 85, 0.15); }
.nav-list .nav-item:nth-child(7) .nav-mark { background: rgba(142, 142, 147, 0.15); }
.nav-item.active .nav-mark { background: var(--accent); }

.logout-button {
  color: var(--red);
}

.logout-button .nav-mark {
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
}

.main-panel {
  background: transparent;
}

.content {
  padding: 24px 30px 44px;
}

.business-grid {
  gap: 20px;
}

.store-column,
.section-block,
.inventory-module {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(26px);
}

.store-column {
  padding: 18px;
}

.store-column,
.store-column:nth-child(2),
.store-column:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 249, 253, 0.72)),
    var(--panel);
}

.store-heading {
  margin-bottom: 14px;
}

.store-heading h2,
.section-head h2,
h3 {
  color: var(--text);
  font-weight: 800;
}

.store-tag,
.notice-chip,
.badge,
.category-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.store-tag {
  border-color: rgba(0, 122, 255, 0.14);
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
}

.metric-card {
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.metric-card:nth-child(1),
.metric-card:nth-child(2),
.metric-card:nth-child(3) {
  background: rgba(255, 255, 255, 0.66);
}

.metric-title {
  color: var(--text);
}

.metric-date-input,
.search-input,
.form-input,
.form-select,
.form-textarea {
  border-color: rgba(60, 60, 67, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.metric-date-input,
.form-input,
.form-select {
  height: 42px;
}

.metric-date-input {
  width: 154px;
  padding: 0 8px 0 12px;
  font-size: 13px;
}

.metric-date-input.weekly,
.metric-date-input.monthly {
  width: 166px;
}

.metric-date-input::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  padding: 6px;
  margin-right: -4px;
  border-radius: 9px;
  cursor: pointer;
  opacity: 0.78;
}

.metric-date-input::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(0, 122, 255, 0.1);
  opacity: 1;
}

.search-input {
  width: min(360px, 100%);
  height: 44px;
}

.search-input:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus,
.metric-date-input:focus {
  border-color: rgba(0, 122, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.metric-item {
  border-radius: 14px;
  border-color: rgba(60, 60, 67, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.metric-item span,
.stock-note,
.form-help,
.record-item span {
  color: var(--muted);
}

.metric-item strong,
.stock-number,
.money {
  color: var(--text);
}

.chart-block {
  border-top-color: rgba(60, 60, 67, 0.1);
}

.chart-box {
  border-radius: 16px;
  border-color: rgba(60, 60, 67, 0.1);
  background: rgba(255, 255, 255, 0.66);
}

.chart-button {
  appearance: none;
  font: inherit;
}

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

.chart-modal-box {
  position: relative;
  width: 100%;
  height: 430px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

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

.chart-label {
  fill: rgba(60, 60, 67, 0.62);
}

.chart-axis {
  stroke: rgba(60, 60, 67, 0.32);
}

.chart-grid {
  stroke: rgba(60, 60, 67, 0.12);
}

.notice-strip {
  border-color: rgba(255, 159, 10, 0.2);
  border-radius: 18px;
  background: rgba(255, 249, 235, 0.82);
  box-shadow: var(--soft-shadow);
}

.notice-title {
  color: #8a5b00;
}

.notice-chip {
  border-color: rgba(255, 159, 10, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #8a5b00;
}

.module-toolbar {
  align-items: center;
}

.toolbar-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.category-filter button,
.mini-segment button,
.segment button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 700;
}

.category-filter button {
  border: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.category-filter .category-add-button {
  width: 34px;
  padding: 0;
  border-color: rgba(52, 199, 89, 0.26);
  background: rgba(52, 199, 89, 0.12);
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1;
}

.category-filter .category-add-button:hover {
  background: rgba(52, 199, 89, 0.2);
  border-color: rgba(52, 199, 89, 0.38);
}

.category-filter .category-edit-button {
  width: 34px;
  padding: 0;
  border-color: rgba(0, 122, 255, 0.22);
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}

.category-filter .category-edit-button:hover {
  background: rgba(0, 122, 255, 0.14);
  border-color: rgba(0, 122, 255, 0.34);
}

.category-filter button.active,
.mini-segment button.active,
.segment button.active {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.22);
}

.mini-segment,
.segment {
  gap: 4px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  background: rgba(242, 242, 247, 0.74);
  padding: 3px;
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.mini-segment button {
  min-height: 30px;
  border-right: 0;
  font-size: 12px;
}

.category-manager {
  display: grid;
  gap: 14px;
}

.category-manager-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.category-manager-list {
  display: grid;
  gap: 8px;
}

.category-manager-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 8px 10px 8px 14px;
}

.category-manager-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.category-manager-row strong {
  color: var(--text);
}

.category-manager-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.approve-button,
.reject-button,
.record-button,
.upload-button {
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
  border-color: rgba(0, 122, 255, 0.24);
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.22);
}

.primary-button:hover {
  background: #006ee6;
}

.secondary-button {
  background: rgba(242, 242, 247, 0.92);
  color: var(--text);
  border-color: rgba(60, 60, 67, 0.12);
}

.secondary-button:hover {
  background: rgba(229, 229, 234, 0.96);
}

.compact-button {
  min-height: 32px;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 13px;
}

.ghost-button,
.record-button {
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
  border-color: rgba(0, 122, 255, 0.14);
}

.ghost-button:hover,
.record-button:hover {
  background: rgba(0, 122, 255, 0.14);
}

.danger-button,
.reject-button {
  background: rgba(255, 59, 48, 0.09);
  color: var(--red);
  border-color: rgba(255, 59, 48, 0.16);
}

.danger-button:hover,
.reject-button:hover {
  background: rgba(255, 59, 48, 0.15);
}

.approve-button {
  background: rgba(52, 199, 89, 0.12);
  color: var(--green-dark);
  border-color: rgba(52, 199, 89, 0.2);
}

.approve-button:hover {
  background: rgba(52, 199, 89, 0.2);
}

.table-wrap {
  border-color: rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

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

.data-table th,
.data-table td {
  border-bottom-color: rgba(60, 60, 67, 0.1);
  padding: 12px 14px;
  text-align: center;
}

.data-table th {
  background: rgba(242, 242, 247, 0.86);
  color: rgba(29, 29, 31, 0.76);
  font-size: 13px;
}

.data-table tbody tr {
  background: rgba(255, 255, 255, 0.56);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.82);
}

.data-table .action-row,
.data-table td .action-row {
  justify-content: center;
}

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

.inventory-table .inv-col-image {
  width: 11%;
}

.inventory-table .inv-col-name {
  width: 24%;
}

.inventory-table .inv-col-category {
  width: 13%;
}

.inventory-table .inv-col-stock {
  width: 24%;
}

.inventory-table .inv-col-actions {
  width: 14%;
}

.inventory-table .inv-col-records {
  width: 14%;
}

.inventory-table td {
  height: 104px;
}

.inventory-table .vertical-actions {
  gap: 7px;
}

.inventory-table .vertical-actions button {
  min-width: 66px;
  min-height: 30px;
  border-radius: 999px;
}

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

.category-badge {
  border: 1px solid rgba(0, 122, 255, 0.12);
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
}

.thumb-button {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(28, 42, 68, 0.08);
}

.thumb-button:hover {
  box-shadow: 0 10px 24px rgba(28, 42, 68, 0.14);
}

.stock-cell {
  min-width: 176px;
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
}

.stock-number {
  font-size: 24px;
  line-height: 1;
}

.stock-edit-button {
  position: static;
  min-height: 30px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff7df;
  color: #7a5200;
  border-color: #f0cf7b;
  box-shadow: none;
}

.stock-edit-button:hover {
  background: #ffefbd;
  border-color: #dcae3a;
}

.action-row {
  justify-content: center;
}

.record-cell {
  text-align: center;
}

.badge {
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(242, 242, 247, 0.88);
  color: var(--muted);
}

.badge.pending {
  border-color: rgba(255, 159, 10, 0.22);
  background: rgba(255, 159, 10, 0.12);
  color: #8a5b00;
}

.badge.approved {
  border-color: rgba(52, 199, 89, 0.2);
  background: rgba(52, 199, 89, 0.12);
  color: var(--green-dark);
}

.badge.rejected {
  border-color: rgba(255, 59, 48, 0.18);
  background: rgba(255, 59, 48, 0.1);
  color: var(--red);
}

.people-section {
  grid-template-columns: 64px minmax(0, 1fr);
  border-color: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(180%) blur(26px);
}

.vertical-store {
  background: rgba(0, 122, 255, 0.08);
  color: var(--accent);
}

.modal-backdrop {
  background: rgba(12, 18, 28, 0.34);
  backdrop-filter: saturate(180%) blur(12px);
}

.modal-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 26px 70px rgba(20, 30, 48, 0.26);
  backdrop-filter: saturate(180%) blur(30px);
  max-height: min(92vh, 800px);
}

.modal-header {
  position: relative;
  justify-content: center;
  min-height: 62px;
  border-bottom-color: rgba(60, 60, 67, 0.1);
}

.modal-header h2 {
  width: 100%;
  margin: 0;
  padding: 0 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  border-top-color: rgba(60, 60, 67, 0.1);
  background: rgba(248, 249, 252, 0.72);
}

.close-button {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(242, 242, 247, 0.9);
  color: rgba(60, 60, 67, 0.72);
  font-size: 20px;
}

.close-button:active {
  transform: translateY(-50%) scale(0.98);
}

.form-grid {
  gap: 16px;
}

.form-field {
  gap: 8px;
}

.form-field label {
  color: rgba(29, 29, 31, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.form-textarea {
  min-height: 98px;
}

.upload-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background: rgba(242, 242, 247, 0.56);
  padding: 12px;
}

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

.upload-preview {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

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

.upload-control {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 122, 255, 0.2);
}

.upload-file-name {
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.upload-preview-grid img {
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

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

.product-modal .form-grid {
  gap: 12px 16px;
}

.product-modal .upload-card {
  padding: 10px;
}

.product-modal .product-image-field {
  max-width: 520px;
}

.product-image-card {
  align-items: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
}

.product-modal .upload-preview {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
}

.product-modal .upload-control {
  flex: 1;
}

.product-modal .upload-file-name {
  max-width: 220px;
}

.product-modal .form-input,
.product-modal .form-select {
  height: 40px;
}

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

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

.stock-adjust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: stretch;
  gap: 12px;
}

.current-stock {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-color: rgba(0, 122, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.1), rgba(255, 255, 255, 0.62));
  text-align: center;
}

.current-stock span,
.current-stock small {
  color: var(--muted);
  font-size: 13px;
}

.current-stock strong {
  margin-top: 6px;
  color: var(--text);
  font-size: 36px;
  line-height: 1;
}

.current-stock small {
  margin-top: 8px;
}

.stock-action-stack {
  min-height: 116px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.stock-action-stack button {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background: rgba(242, 242, 247, 0.82);
  color: var(--muted);
  font-weight: 800;
}

.stock-action-stack button.active[data-mode="increase"] {
  background: var(--green);
  color: #ffffff;
  border-color: rgba(52, 199, 89, 0.28);
  box-shadow: 0 10px 20px rgba(52, 199, 89, 0.2);
}

.stock-action-stack button.active[data-mode="decrease"] {
  background: var(--red);
  color: #ffffff;
  border-color: rgba(255, 59, 48, 0.28);
  box-shadow: 0 10px 20px rgba(255, 59, 48, 0.18);
}

.image-large {
  border-radius: 18px;
  border-color: rgba(60, 60, 67, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.voucher-grid {
  gap: 12px;
}

.voucher-button {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(28, 42, 68, 0.08);
}

.voucher-button:hover {
  border-color: rgba(0, 122, 255, 0.34);
  box-shadow: 0 14px 30px rgba(28, 42, 68, 0.14);
}

.voucher-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 16px;
  border-color: rgba(60, 60, 67, 0.12);
}

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

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

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

.confirm-delete {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 8px 4px 2px;
  text-align: center;
}

.confirm-delete p {
  max-width: 320px;
  margin: 0;
  color: rgba(29, 29, 31, 0.78);
  font-size: 15px;
  line-height: 1.7;
}

.confirm-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 59, 48, 0.12);
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
}

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

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

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(52, 199, 89, 0.14), transparent 32%),
    linear-gradient(135deg, #f7fbff, #f6fbf3 52%, #fffaf0);
}

.login-screen .icp-footer {
  width: 100%;
  padding: 18px 0 0;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 70px rgba(28, 42, 68, 0.14);
  padding: 28px;
  backdrop-filter: saturate(180%) blur(24px);
}

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

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

.login-brand h1 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.login-brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.login-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.login-error {
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

.record-item,
.empty-state {
  border-color: rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.empty-state {
  border-style: dashed;
}

.modal-error {
  margin: 0 18px 12px;
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 12px;
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}

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

.success-badge {
  background: rgba(52, 199, 89, 0.12);
  color: #1f7a3a;
  border-color: rgba(52, 199, 89, 0.2);
}

.warning-badge {
  background: rgba(255, 159, 10, 0.14);
  color: #8a5b00;
  border-color: rgba(255, 159, 10, 0.22);
}

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

.table-wrap {
  position: relative;
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
  }

  .sidebar,
  .sidebar.collapsed {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: auto;
    flex-basis: auto;
    padding: 12px;
  }

  .brand-row,
  .sidebar.collapsed .brand-row {
    min-height: auto;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
  }

  .logo-slot,
  .sidebar.collapsed .logo-slot {
    width: 56px;
    height: 56px;
    justify-self: start;
    border-radius: 14px;
  }

  .collapse-button,
  .sidebar.collapsed .collapse-button {
    position: static;
    justify-self: end;
    width: 36px;
    height: 36px;
  }

  .user-box {
    margin-bottom: 10px;
    padding: 8px 10px;
    text-align: left;
  }

  .nav-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .nav-item,
  .logout-button {
    min-width: max-content;
    grid-template-columns: 30px auto;
  }

  .sidebar.collapsed .user-text,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .logout-button .nav-label {
    display: block;
  }

  .sidebar.collapsed .brand-row {
    min-height: 154px;
  }

  .sidebar.collapsed .collapse-button {
    position: absolute;
    right: 4px;
    top: 58px;
    transform: none;
  }

  .sidebar.collapsed .logo-slot {
    width: 132px;
    height: 132px;
  }

  .content {
    padding: 16px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap::after {
    content: "左右滑动查看更多";
    position: sticky;
    left: 0;
    display: block;
    padding: 8px 10px 10px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.78));
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    white-space: nowrap;
  }

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

  .toolbar-left,
  .search-input {
    width: 100%;
  }

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

  .store-column {
    min-width: 0;
  }

  .store-heading,
  .metric-title,
  .chart-head {
    align-items: stretch;
    flex-direction: column;
  }

  .store-heading-actions {
    width: 100%;
    justify-content: space-between;
  }

  .store-tag {
    max-width: calc(100% - 42px);
    min-width: 0;
  }

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

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

  .mini-segment {
    width: 100%;
  }

  .mini-segment button {
    flex: 1 1 0;
  }

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

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

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

  .stock-action-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    min-height: 54px;
  }
}
