:root {
  --canvas: #f3f5f2;
  --surface: #ffffff;
  --surface-soft: #f8f9f6;
  --ink: #1d2822;
  --ink-2: #435048;
  --muted: #758078;
  --line: #dee3dd;
  --line-strong: #cdd4ce;
  --green-950: #14281f;
  --green-900: #193529;
  --green-800: #214b39;
  --green-700: #2d624c;
  --green-100: #e6efe9;
  --green-50: #f1f7f3;
  --gold: #a47833;
  --gold-soft: #f7efdf;
  --coral: #bd5f3b;
  --coral-soft: #faece6;
  --blue: #3e6e83;
  --blue-soft: #e9f1f4;
  --red: #b94d4d;
  --red-soft: #fbecec;
  --shadow: 0 10px 30px rgba(20, 40, 31, .06);
  --radius: 8px;
  --radius-sm: 6px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
  --font-serif: "STSong", "Songti SC", Georgia, serif;
  --sidebar-width: 232px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #6c9b83;
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

svg {
  display: block;
}

.icon {
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, .92fr) minmax(540px, 1.08fr);
  background: #f7f8f5;
}

.login-brand-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 34px clamp(34px, 5vw, 72px) 28px;
  color: #eef3ef;
  background-color: var(--green-950);
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 34px 34px;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(8, 22, 15, .28));
}

.login-brand,
.login-intro,
.login-access-list,
.login-brand-foot {
  position: relative;
  z-index: 1;
}

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

.login-brand img {
  width: 48px;
  height: 48px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

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

.login-brand strong {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.2;
}

.login-brand span {
  margin-top: 3px;
  color: #8fa298;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
}

.login-intro {
  max-width: 520px;
  margin: clamp(56px, 11vh, 112px) 0 36px;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(216, 193, 146, .26);
  border-radius: 999px;
  color: #d8c192;
  background: rgba(216, 193, 146, .07);
  font-size: 10px;
  font-weight: 700;
}

.login-intro h1 {
  margin-top: 18px;
  color: #f8faf7;
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 700;
  line-height: 1.14;
}

.login-intro p {
  max-width: 460px;
  margin-top: 14px;
  color: #a8b8ae;
  font-size: 12px;
  line-height: 1.85;
}

.login-access-list {
  display: grid;
  gap: 1px;
  max-width: 520px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.login-access-list > div {
  display: grid;
  grid-template-columns: 30px minmax(100px, .45fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.login-access-list > div > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
  color: #d8c192;
  background: rgba(255, 255, 255, .035);
}

.login-access-list strong {
  color: #e4ece6;
  font-size: 11px;
}

.login-access-list small {
  color: #92a59a;
  font-size: 10px;
}

.login-brand-foot {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 9px;
  margin-top: auto;
  padding-top: 28px;
}

.login-brand-foot span,
.login-brand-foot small {
  color: #80968a;
  font-size: 9px;
}

.login-brand-foot strong {
  color: #d9e2dc;
  font-size: 11px;
}

.login-brand-foot small {
  justify-self: end;
  text-align: right;
}

.login-form-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px clamp(28px, 6vw, 90px);
  background:
    linear-gradient(135deg, rgba(45, 98, 76, .035), transparent 42%),
    #f7f8f5;
}

.login-card {
  width: min(100%, 458px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(20, 40, 31, .09);
}

.login-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 23px;
}

.login-lock {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--green-700);
  background: var(--green-50);
}

.login-card-head h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.25;
}

.login-card-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.login-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 15px;
  padding: 9px 10px;
  border: 1px solid #edcccc;
  border-radius: var(--radius-sm);
  color: var(--red);
  background: var(--red-soft);
  font-size: 10px;
  line-height: 1.55;
}

.login-fields {
  display: grid;
  gap: 13px;
}

.login-fields .form-group > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
}

.login-input {
  position: relative;
  display: block;
}

.login-input > .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: #8a958e;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-input .form-control {
  min-height: 45px;
  padding-left: 39px;
  font-size: 12px;
}

.login-input:focus-within > .icon {
  color: var(--green-700);
}

.login-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  font-size: 12px;
}

.login-demo {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.login-demo-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.login-demo-title strong {
  font-size: 10px;
}

.login-demo-title span {
  color: var(--muted);
  font-size: 9px;
}

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

.login-demo-grid > div {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.login-demo-grid .avatar {
  width: 27px;
  height: 27px;
  font-size: 11px;
}

.login-demo-grid p {
  min-width: 0;
}

.login-demo-grid strong,
.login-demo-grid code {
  display: block;
}

.login-demo-grid strong {
  font-size: 9px;
}

.login-demo-grid code {
  margin-top: 2px;
  color: var(--green-700);
  font-size: 8px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.login-security {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  color: #dbe5df;
  background: var(--green-950);
  border-right: 1px solid #294338;
}

.sidebar-brand {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  color: #f5f7f4;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  margin-top: 1px;
  color: #8fa298;
  font-size: 10px;
}

.store-switch {
  width: calc(100% - 24px);
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-sm);
  color: #e8eee9;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
  text-align: left;
}

.store-switch:hover {
  background: rgba(255, 255, 255, .075);
}

.store-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 6px;
  color: var(--green-900);
  background: #d8c294;
}

.store-switch span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.store-switch strong,
.store-switch small {
  display: block;
}

.store-switch strong {
  overflow: hidden;
  color: #f0f4f1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-switch small {
  color: #91a298;
  font-size: 10px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 11px 16px;
  scrollbar-width: thin;
  scrollbar-color: #496256 transparent;
}

.nav-label {
  margin: 16px 10px 6px;
  color: #73877c;
  font-size: 10px;
  font-weight: 700;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0;
  padding: 0 11px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #b6c4bc;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .16s ease, background .16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.nav-item.active {
  color: #fff;
  background: #2a4a3c;
}

.nav-item.active .icon {
  color: #e0c58e;
}

.nav-item .icon {
  color: #81978b;
}

.nav-item-label {
  flex: 1;
  font-size: 13px;
}

.nav-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 6px;
  color: #3a2d1b;
  background: #ddc38f;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-help {
  padding: 11px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .045);
}

.sidebar-help strong {
  display: block;
  color: #e6ece8;
  font-size: 11px;
}

.sidebar-help p {
  margin-top: 3px;
  color: #85988d;
  font-size: 10px;
  line-height: 1.55;
}

.main-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
}

.breadcrumb {
  min-width: 150px;
}

.breadcrumb small,
.breadcrumb strong {
  display: block;
}

.breadcrumb small {
  color: var(--muted);
  font-size: 10px;
}

.breadcrumb strong {
  margin-top: 1px;
  font-size: 13px;
}

.global-search {
  width: min(330px, 28vw);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-soft);
  cursor: text;
}

.global-search:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.global-search span {
  flex: 1;
  font-size: 12px;
}

.kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #7f8882;
  background: #fff;
  font-size: 9px;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #cfe0d5;
  border-radius: var(--radius-sm);
  color: var(--green-700);
  background: var(--green-50);
  font-size: 10px;
  white-space: nowrap;
}

.online-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4f906d;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 3px;
  padding: 5px 7px 5px 12px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: inherit;
  background: transparent;
  text-align: left;
  user-select: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.topbar-user:hover {
  background: var(--surface-soft);
  border-left-color: transparent;
}

.topbar-user:active {
  background: var(--green-50);
}

.avatar {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #fff;
  background: var(--green-700);
  font-family: var(--font-serif);
  font-size: 13px;
}

.avatar.gold {
  color: #5d431b;
  background: #e0c58e;
}

.avatar.blue {
  background: var(--blue);
}

.topbar-user strong,
.topbar-user small {
  display: block;
}

.topbar-user strong {
  font-size: 11px;
}

.topbar-user small {
  color: var(--muted);
  font-size: 9px;
}

.topbar-logout {
  margin-left: 2px;
  color: var(--muted);
}

.content {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
}

.page {
  animation: page-in .18s ease-out;
}

@keyframes page-in {
  from { opacity: .4; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.page-eyebrow {
  margin-bottom: 3px;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-heading h1 {
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.25;
}

.page-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  border-color: var(--green-800);
  background: var(--green-800);
}

.btn-primary:hover {
  border-color: var(--green-700);
  background: var(--green-700);
}

.btn-light {
  color: var(--ink-2);
  border-color: var(--line);
  background: #fff;
}

.btn-light:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.btn-danger {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.btn-danger:hover {
  background: #a74141;
}

.btn-danger-light {
  color: var(--red);
  border-color: #eccaca;
  background: var(--red-soft);
}

.btn-sm {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: #fff;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.icon-btn.plain {
  border-color: transparent;
  background: transparent;
}

.icon-btn.plain:hover {
  background: var(--surface-soft);
}

.text-btn {
  padding: 0;
  border: 0;
  color: var(--green-700);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.text-btn:hover {
  text-decoration: underline;
}

.text-btn.danger {
  color: var(--red);
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 15px;
}

.panel-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.panel-body {
  padding: 17px;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfa;
  font-size: 10px;
}

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

.metric-card {
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card.featured {
  color: #f6f8f5;
  border-color: var(--green-800);
  background: var(--green-800);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.metric-card.featured .metric-head {
  color: #c1d2c8;
}

.metric-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--green-700);
  background: var(--green-50);
}

.metric-card.featured .metric-icon {
  color: #f1d9a8;
  background: rgba(255, 255, 255, .1);
}

.metric-value {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.metric-value small {
  margin-right: 2px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
}

.metric-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.metric-card.featured .metric-foot {
  color: #a9beb2;
}

.metric-trend {
  color: var(--green-700);
  font-weight: 700;
}

.metric-card.featured .metric-trend {
  color: #efd59f;
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr);
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr);
  gap: 12px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-700);
}

.legend-dot.gold {
  background: var(--gold);
}

.chart-wrap {
  width: 100%;
  min-height: 252px;
}

.trend-chart {
  width: 100%;
  height: 252px;
  overflow: visible;
}

.chart-gridline {
  stroke: #e7ebe7;
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-axis-label {
  fill: #89928c;
  font-family: var(--font);
  font-size: 9px;
}

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

.chart-line.primary {
  stroke: var(--green-700);
}

.chart-line.secondary {
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-dasharray: 4 4;
}

.chart-area {
  fill: rgba(45, 98, 76, .08);
}

.chart-dot {
  fill: #fff;
  stroke: var(--green-700);
  stroke-width: 1.5;
}

.status-breakdown {
  display: grid;
  gap: 14px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.breakdown-item span:first-child {
  color: var(--ink-2);
}

.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 4px;
  background: #e9ede9;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--green-700);
}

.progress i.gold {
  background: var(--gold);
}

.progress i.blue {
  background: var(--blue);
}

.progress i.coral {
  background: var(--coral);
}

.breakdown-item strong {
  text-align: right;
  font-size: 11px;
}

.overview-stack {
  display: grid;
  gap: 9px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.overview-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.overview-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: var(--radius-sm);
  color: var(--green-700);
  background: var(--green-50);
}

.overview-row > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.overview-row strong,
.overview-row small {
  display: block;
}

.overview-row strong {
  font-size: 11px;
}

.overview-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.overview-value {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
}

.activity-list {
  display: grid;
  gap: 14px;
}

.activity-item {
  display: flex;
  gap: 10px;
}

.activity-dot {
  width: 7px;
  height: 7px;
  flex: none;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green-700);
  box-shadow: 0 0 0 4px var(--green-50);
}

.activity-dot.gold {
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

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

.activity-item strong {
  font-size: 11px;
  font-weight: 500;
}

.activity-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: none;
}

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

.tab {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.tab:hover {
  color: var(--ink);
}

.tab.active {
  color: var(--green-700);
  border-bottom-color: var(--green-700);
}

.tab-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
  background: #eef1ed;
  font-size: 9px;
  text-align: center;
}

.tab.active .tab-count {
  color: var(--green-700);
  background: var(--green-100);
}

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

.search-box {
  width: min(280px, 36vw);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-soft);
}

.search-box:focus-within {
  border-color: #8eac9d;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(45, 98, 76, .08);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.filter-select {
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-note {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #fafbf9;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  height: 58px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf0ed;
  color: var(--ink-2);
  vertical-align: middle;
}

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

.data-table tbody tr:hover {
  background: #fbfcfa;
}

.data-table strong {
  color: var(--ink);
  font-weight: 600;
}

.data-table small {
  color: var(--muted);
  font-size: 9px;
}

.data-table .num {
  font-variant-numeric: tabular-nums;
}

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

.member-cell,
.product-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
}

.member-cell > div:last-child,
.product-cell > div:last-child {
  min-width: 0;
}

.member-cell strong,
.member-cell small,
.product-cell strong,
.product-cell small {
  display: block;
}

.member-cell strong,
.product-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-thumb {
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid #e6e9e5;
  border-radius: 6px;
  object-fit: cover;
  background: #eef1ed;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.table-actions button {
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--ink-2);
  background: #eef1ed;
  font-size: 9px;
  white-space: nowrap;
}

.tag.green {
  color: var(--green-700);
  background: var(--green-50);
}

.tag.gold {
  color: #856021;
  background: var(--gold-soft);
}

.tag.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag.coral {
  color: var(--coral);
  background: var(--coral-soft);
}

.tag.red {
  color: var(--red);
  background: var(--red-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status.green { color: var(--green-700); }
.status.gold { color: var(--gold); }
.status.blue { color: var(--blue); }
.status.red { color: var(--red); }
.status.muted { color: var(--muted); }

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

.stock.low {
  color: var(--coral);
  font-weight: 600;
}

.stock.out {
  color: var(--red);
  font-weight: 600;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 0 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.pager {
  display: flex;
  gap: 4px;
}

.pager button {
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-2);
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}

.pager button.active {
  color: #fff;
  border-color: var(--green-700);
  background: var(--green-700);
}

.switch {
  position: relative;
  width: 36px;
  height: 20px;
  display: inline-block;
  flex: none;
}

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

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #cbd2cc;
  cursor: pointer;
  transition: background .16s ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .16s ease;
}

.switch input:checked + .switch-track {
  background: var(--green-700);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.summary-item {
  min-height: 88px;
  padding: 14px 17px;
  border-right: 1px solid var(--line);
}

.summary-item:last-child {
  border-right: 0;
}

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

.summary-item small {
  color: var(--muted);
  font-size: 10px;
}

.summary-item strong {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}

.summary-item strong span {
  margin-left: 3px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1ed;
}

.empty-state strong {
  display: block;
  font-size: 13px;
}

.empty-state p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

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

.coupon-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.coupon-band {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  color: #fff;
  background: var(--green-800);
}

.coupon-band.coral {
  background: #a95f43;
}

.coupon-band.gold {
  background: #8a6a32;
}

.coupon-kind {
  font-size: 10px;
  opacity: .76;
}

.coupon-title {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.coupon-value {
  flex: none;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
}

.coupon-value small {
  margin-right: 2px;
  font-family: var(--font);
  font-size: 12px;
}

.coupon-body {
  padding: 13px 15px;
}

.coupon-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.coupon-progress {
  height: 5px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 3px;
  background: #edf0ec;
}

.coupon-progress i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--green-700);
}

.coupon-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
}

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

.plan-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.plan-card.inactive {
  opacity: .63;
}

.plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
}

.plan-price {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
}

.plan-price small {
  margin-right: 2px;
  font-family: var(--font);
  font-size: 13px;
}

.plan-gift {
  display: inline-flex;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--coral);
  background: var(--coral-soft);
  font-size: 9px;
  font-weight: 600;
}

.plan-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.plan-sales {
  color: var(--muted);
  font-size: 9px;
}

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

.settings-panel-wide {
  grid-column: 1 / -1;
}

.account-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.account-security-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-security-user > div {
  min-width: 0;
}

.account-security-user strong,
.account-security-user small {
  display: block;
}

.account-security-user strong {
  font-size: 11px;
}

.account-security-user small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.password-modal {
  width: min(540px, 100%);
}

.password-account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--green-50);
}

.password-account-chip > div {
  min-width: 0;
}

.password-account-chip strong,
.password-account-chip small {
  display: block;
}

.password-account-chip strong {
  font-size: 11px;
}

.password-account-chip small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.password-form-grid {
  gap: 12px;
}

.theme-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.theme-color-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.theme-color-item.readonly {
  opacity: .72;
}

.theme-color-copy strong,
.theme-color-copy small {
  display: block;
}

.theme-color-copy strong {
  font-size: 11px;
}

.theme-color-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.theme-color-copy code {
  color: var(--green-700);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
}

.theme-color-controls {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.theme-color-swatch {
  width: 42px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.theme-color-swatch:disabled {
  cursor: not-allowed;
}

.theme-color-swatch::-webkit-color-swatch-wrapper {
  padding: 0;
}

.theme-color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: 3px;
}

.theme-color-input {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.theme-color-input[aria-invalid="true"] {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(185, 77, 77, .08);
}

.theme-color-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}

.theme-color-hint[data-tone="error"] {
  color: var(--red);
}

.theme-color-hint[data-tone="success"] {
  color: var(--green-700);
}

.setting-row {
  min-height: 57px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
}

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

.setting-row > div:first-child {
  min-width: 0;
  flex: 1;
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row strong {
  font-size: 11px;
}

.setting-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

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

.role-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(148px, .8fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.role-option.active {
  border-color: #9cbcaa;
  background: var(--green-50);
  box-shadow: inset 3px 0 0 var(--green-700);
}

.role-option-copy {
  min-width: 0;
}

.role-option-copy strong,
.role-option-copy small {
  display: block;
}

.role-option-copy strong {
  font-size: 11px;
}

.role-option-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.role-option-copy .account-credential {
  color: var(--green-700);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.btn-sm {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 10px;
}

.permission-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.permission-matrix th,
.permission-matrix td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.permission-matrix th {
  color: var(--muted);
  background: #f8faf8;
  font-size: 9px;
  font-weight: 600;
}

.permission-yes {
  color: var(--green-700);
  font-weight: 700;
}

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

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

.form-group {
  min-width: 0;
}

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

.form-group label,
.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

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

.form-control:focus {
  border-color: #87a596;
  box-shadow: 0 0 0 2px rgba(45, 98, 76, .08);
}

.form-hint {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.input-row {
  display: flex;
  gap: 8px;
}

.input-row .form-control {
  flex: 1;
}

.points-image-editor {
  display: grid;
  grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.points-image-preview {
  min-height: 136px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.points-image-preview img {
  width: 100%;
  height: 136px;
  display: block;
  object-fit: cover;
}

.points-image-placeholder,
.points-card-placeholder {
  display: grid;
  place-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.points-image-controls {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.points-image-controls > label {
  margin: 0;
}

.points-image-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.points-image-url-row .btn {
  white-space: nowrap;
}

.points-image-hint {
  min-height: 15px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.points-image-hint[data-tone="error"] {
  color: var(--red);
}

.points-image-preset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.points-image-preset-row .form-control {
  min-width: 0;
  flex: 1;
}

.form-section {
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.form-section-title {
  margin-bottom: 11px;
  font-size: 12px;
  font-weight: 700;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.segmented button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.segmented button.active {
  color: var(--green-700);
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 40, 31, .08);
  font-weight: 600;
}

.period-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.period-tabs button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.period-tabs button.active {
  color: var(--green-700);
  background: var(--green-50);
  font-weight: 600;
}

.modal-root:empty {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(12, 24, 18, .56);
  animation: fade-in .15s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d7ded8;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 20, 13, .22);
  animation: modal-in .18s ease-out;
}

.modal.small {
  width: min(470px, 100%);
}

.modal.large {
  width: min(860px, 100%);
}

@keyframes modal-in {
  from { opacity: .5; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 19px;
}

.modal-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

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

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.modal-foot.split {
  justify-content: space-between;
}

.order-detail-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--green-800);
}

.order-detail-hero.pickup {
  background: #345d70;
}

.order-detail-hero .avatar {
  color: #fff;
  background: rgba(255, 255, 255, .13);
}

.order-detail-hero > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.order-detail-hero h3 {
  font-size: 13px;
}

.order-detail-hero p {
  margin-top: 2px;
  color: rgba(255, 255, 255, .66);
  font-size: 9px;
}

.order-detail-hero > strong {
  font-family: var(--font-serif);
  font-size: 23px;
}

.order-products {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.order-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf0ed;
}

.order-product:last-child {
  border-bottom: 0;
}

.order-product .product-thumb {
  width: 38px;
  height: 38px;
}

.order-product > div {
  min-width: 0;
  flex: 1;
}

.order-product strong,
.order-product small {
  display: block;
}

.order-product small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.order-product > span {
  color: var(--muted);
  font-size: 10px;
}

.order-product > b {
  min-width: 55px;
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.detail-list {
  margin-top: 14px;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid #edf0ed;
  color: var(--ink-2);
  font-size: 10px;
}

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

.detail-row > span:first-child {
  color: var(--muted);
}

.detail-row > span:last-child,
.detail-row > strong:last-child {
  text-align: right;
}

.detail-note {
  margin-top: 13px;
  padding: 11px 12px;
  border: 1px solid #eadfca;
  border-radius: var(--radius-sm);
  color: #735a2e;
  background: #fcf8ef;
  font-size: 10px;
  line-height: 1.65;
}

.scan-panel {
  min-height: 148px;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px dashed #b9c9be;
  border-radius: var(--radius-sm);
  color: var(--green-700);
  background: var(--green-50);
  text-align: center;
}

.scan-panel strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 12px;
}

.scan-panel p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.profile-head .avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.profile-head > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.profile-head h3 {
  font-size: 14px;
}

.profile-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

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

.profile-metric {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.profile-metric small,
.profile-metric strong {
  display: block;
}

.profile-metric small {
  color: var(--muted);
  font-size: 9px;
}

.profile-metric strong {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: 17px;
}

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

.notice-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

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

.notice-item strong {
  font-size: 11px;
}

.notice-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.search-results {
  display: grid;
  gap: 12px;
}

.result-group-title {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.result-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.result-item:hover {
  border-color: #b8c9be;
  background: var(--green-50);
}

.result-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

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

.result-item strong {
  font-size: 11px;
}

.result-item small {
  color: var(--muted);
  font-size: 9px;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 210px;
  max-width: min(360px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid #d6dfd8;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in .2s ease-out;
}

.toast.error {
  border-color: #e8c7c7;
  color: #853d3d;
  background: #fffafa;
}

.toast.success .icon {
  color: var(--green-700);
}

.toast.error .icon {
  color: var(--red);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-overlay {
  display: none;
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  gap: 12px;
  margin-top: 12px;
}

.ranking-list {
  display: grid;
  gap: 13px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 22px 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.rank-number {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 14px;
  text-align: center;
}

.rank-number.top {
  color: var(--gold);
  font-weight: 700;
}

.ranking-item .product-thumb {
  width: 36px;
  height: 36px;
}

.ranking-item > div:nth-child(3) {
  min-width: 0;
}

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

.ranking-item strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.ranking-item > strong {
  font-family: var(--font-serif);
  font-size: 13px;
  text-align: right;
}

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

.report-mini {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.report-mini small,
.report-mini strong {
  display: block;
}

.report-mini small {
  color: var(--muted);
  font-size: 9px;
}

.report-mini strong {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 19px;
}

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

.rule-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

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

.rule-card small {
  color: var(--muted);
  font-size: 9px;
}

.rule-card strong {
  margin-top: 5px;
  font-size: 12px;
}

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

.points-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.points-card-media {
  height: 132px;
  overflow: hidden;
  background: #edf0ed;
}

.points-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.points-card-placeholder {
  height: 100%;
  background: var(--surface-soft);
}

.points-card-body {
  padding: 12px;
}

.points-card-body h3 {
  font-size: 12px;
}

.points-card-body p {
  min-height: 30px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.points-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.points-cost {
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
}

.points-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.inventory-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid #ead9d2;
  border-radius: var(--radius-sm);
  color: #7d4a38;
  background: #fcf5f2;
  font-size: 10px;
}

.store-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.store-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 6px;
  color: var(--green-700);
  background: var(--green-100);
}

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

.store-card strong {
  font-size: 12px;
}

.store-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.danger-zone {
  border-color: #ebcece;
}

.danger-zone .panel-head {
  border-bottom-color: #eed8d8;
  background: #fffafa;
}

.danger-zone .panel-head h2 {
  color: var(--red);
}

.danger-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.danger-row > div {
  flex: 1;
}

.danger-row strong,
.danger-row small {
  display: block;
}

.danger-row strong {
  font-size: 11px;
}

.danger-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

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

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

.inline-check {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 10px;
  white-space: nowrap;
}

.inline-check input,
.shift-todo input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green-700);
}

.spec-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.spec-editor-head > div:first-child {
  min-width: 180px;
}

.spec-editor-head .form-hint {
  max-width: 430px;
}

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

.spec-group-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.spec-group-card + .spec-group-card {
  margin-top: 8px;
}

.spec-group-head {
  display: grid;
  grid-template-columns: minmax(150px, 230px) auto auto;
  align-items: center;
  gap: 8px;
}

.spec-group-name {
  font-weight: 600;
}

.spec-option-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin-top: 10px;
}

.spec-option-chip {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 8px;
  border: 1px solid #cfdad2;
  border-radius: 4px;
  color: var(--green-800);
  background: #fff;
  font-size: 10px;
}

.spec-option-chip button {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.spec-option-chip button:hover {
  color: var(--red);
  background: var(--red-soft);
}

.spec-option-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 8px;
}

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

.staff-identity {
  min-width: 145px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.staff-identity .avatar {
  width: 32px;
  height: 32px;
  flex: none;
  font-size: 12px;
}

.staff-identity > div {
  min-width: 0;
}

.staff-identity strong,
.staff-identity small {
  display: block;
}

.staff-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-code {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--green-800);
  background: var(--surface-soft);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 10px;
  white-space: nowrap;
}

.log-toolbar .search-box {
  width: min(340px, 42vw);
}

.log-table {
  min-width: 1000px;
}

.log-table th:nth-child(1) {
  width: 148px;
}

.log-table th:nth-child(2) {
  width: 135px;
}

.log-table th:nth-child(3),
.log-table th:nth-child(4) {
  width: 82px;
}

.log-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.log-detail {
  min-width: 210px;
  display: block;
  max-width: 380px;
  color: var(--ink-2);
  line-height: 1.55;
}

.shift-page {
  min-width: 0;
}

.shift-hero {
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) minmax(190px, 1fr) minmax(190px, 1fr);
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--green-800);
  border-radius: var(--radius);
  color: #f5f8f6;
  background:
    linear-gradient(120deg, rgba(164, 120, 51, .14), transparent 45%),
    var(--green-900);
}

.shift-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 18px;
}

.shift-person .avatar {
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--green-900);
  background: #f1dfb8;
  font-size: 16px;
}

.shift-person > div {
  min-width: 0;
}

.shift-person small,
.shift-person strong,
.shift-person span,
.shift-clock small,
.shift-clock strong,
.shift-clock span {
  display: block;
}

.shift-person small,
.shift-clock small {
  color: #9fb5a9;
  font-size: 9px;
}

.shift-person strong {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.25;
}

.shift-person span {
  margin-top: 3px;
  overflow: hidden;
  color: #bdcbc3;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-clock {
  min-width: 0;
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}

.shift-clock strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-clock span {
  color: #aabbb1;
  font-size: 9px;
}

.shift-clock .shift-live {
  color: #f0d7a5;
}

.shift-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 12px;
  margin-bottom: 12px;
}

.shift-card {
  min-width: 0;
}

.shift-todo-list {
  display: grid;
  gap: 7px;
}

.shift-todo {
  min-height: 40px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 10px;
  cursor: pointer;
}

.shift-todo:hover {
  border-color: #c8d4cb;
  background: #fcfdfb;
}

.shift-todo.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.shift-todo-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.shift-note {
  min-height: 170px;
  line-height: 1.7;
}

.shift-save-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.signature-panel {
  margin-bottom: 12px;
}

.signature-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: stretch;
  gap: 16px;
}

.signature-canvas-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px dashed #b9c8bd;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(rgba(45, 98, 76, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 98, 76, .035) 1px, transparent 1px),
    #fff;
  background-size: 22px 22px;
}

#shiftSignatureCanvas {
  width: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.signature-line {
  position: absolute;
  right: 12px;
  bottom: 8px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid #e3e8e4;
  color: var(--muted);
  font-size: 8px;
  pointer-events: none;
}

.signature-line small {
  font-size: 8px;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.signature-actions p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.signature-actions .btn {
  align-self: flex-start;
}

.shift-signature-thumb {
  width: 82px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}

.signature-empty {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.shift-idle {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 42px 20px;
  border: 1px dashed #b9c8bd;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.shift-idle-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-700);
  background: var(--green-100);
}

.shift-idle h2 {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.shift-idle p {
  max-width: 520px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.shift-idle .btn {
  margin-top: 5px;
}

.shift-history-table {
  min-width: 900px;
}

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

.table-select-all {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.table-select-all input {
  width: 14px;
  height: 14px;
  accent-color: var(--green-700);
}

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

.table-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.table-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 7px 18px rgba(27, 54, 40, .06);
}

.table-card.is-selected {
  border-color: var(--green-700);
  box-shadow: 0 0 0 2px rgba(45, 98, 76, .1);
}

.table-card.is-disabled {
  opacity: .68;
}

.table-card-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-card-head > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-checkbox {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.table-checkbox input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--green-700);
}

.table-checkbox span {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-qr-preview {
  min-height: 124px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(45, 98, 76, .045) 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(315deg, rgba(45, 98, 76, .045) 25%, transparent 25%) 0 0 / 12px 12px,
    var(--green-50);
  cursor: zoom-in;
}

.table-qr-preview:hover {
  border-color: var(--green-700);
  background-color: var(--green-100);
}

.table-qr-preview strong {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-qr-preview small {
  color: var(--muted);
  font-size: 9px;
}

.table-qr-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green-700);
  background: var(--green-100);
}

.table-card-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 8px;
  color: var(--muted);
  font-size: 9px;
}

.table-card-meta span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.table-card-actions {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.table-card-actions > div {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.table-card-actions .toolbar-note {
  margin-left: auto;
}

.table-code-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--green-50);
}

.table-code-preview img {
  width: min(100%, 300px);
  height: auto;
  display: block;
  object-fit: contain;
}

.delete-copy {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: minmax(330px, .8fr) minmax(500px, 1.2fr);
  }

  .login-brand-panel {
    padding-inline: 34px;
  }

  .login-form-panel {
    padding-inline: 28px;
  }

  .login-intro h1 {
    font-size: 37px;
  }
}

@media (max-width: 900px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 290px;
    padding: 24px 28px 22px;
  }

  .login-intro {
    margin: 34px 0 0;
  }

  .login-intro h1 {
    margin-top: 12px;
    font-size: 34px;
  }

  .login-intro p {
    max-width: 620px;
    margin-top: 9px;
    line-height: 1.7;
  }

  .login-access-list {
    display: none;
  }

  .login-brand-foot {
    margin-top: 25px;
    padding-top: 12px;
  }

  .login-form-panel {
    min-height: auto;
    padding: 30px 20px 44px;
  }
}

@media (max-width: 600px) {
  .login-brand-panel {
    min-height: 250px;
    padding: 20px 18px 18px;
  }

  .login-brand img {
    width: 42px;
    height: 42px;
  }

  .login-brand strong {
    font-size: 20px;
  }

  .login-intro {
    margin-top: 26px;
  }

  .login-intro h1 {
    font-size: 30px;
  }

  .login-intro p {
    font-size: 10px;
  }

  .login-brand-foot {
    grid-template-columns: auto auto;
  }

  .login-brand-foot small {
    display: none;
  }

  .login-form-panel {
    padding: 18px 12px 34px;
  }

  .login-card {
    padding: 23px 18px;
  }

  .login-card-head {
    margin-bottom: 19px;
  }

  .login-card-head h2 {
    font-size: 22px;
  }

  .login-demo-grid {
    grid-template-columns: 1fr;
  }

  .login-demo-grid > div {
    padding: 7px 9px;
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 218px;
  }

  .content {
    padding: 20px;
  }

  .topbar {
    padding: 0 20px;
  }

  .global-search {
    width: min(260px, 23vw);
  }

  .metric-card {
    padding: 14px;
  }

  .metric-value {
    font-size: 23px;
  }

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

@media (max-width: 1080px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
  }

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

  .app-shell.sidebar-open .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(13, 25, 19, .48);
  }

  .main-shell {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .global-search {
    width: min(340px, 36vw);
  }

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

  .summary-item:nth-child(2) {
    border-right: 0;
  }

  .summary-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-main,
  .dashboard-lower,
  .report-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 760px) {
  .topbar {
    height: 60px;
    padding: 0 12px;
  }

  .breadcrumb {
    min-width: 0;
    flex: 1;
  }

  .breadcrumb small {
    display: none;
  }

  .global-search,
  .online-pill,
  .topbar-user > div:last-child {
    display: none;
  }

  .topbar-user {
    padding-left: 0;
    border-left: 0;
  }

  .content {
    padding: 14px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .page-heading h1 {
    font-size: 23px;
  }

  .heading-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .account-security-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-security-row > .btn {
    width: 100%;
  }

  .password-account-chip {
    align-items: flex-start;
  }

  .stats-grid,
  .summary-strip,
  .coupon-grid,
  .plan-grid,
  .points-product-grid,
  .tables-grid,
  .settings-stack,
  .form-grid,
  .profile-metrics,
  .rule-box,
  .report-mini-grid {
    grid-template-columns: 1fr;
  }

  .summary-item,
  .summary-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .points-image-editor {
    grid-template-columns: 1fr;
  }

  .points-image-preview {
    min-height: 160px;
  }

  .points-image-preview img {
    height: 160px;
  }

  .summary-item:last-child {
    border-bottom: 0;
  }

  .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
  }

  .tables-toolbar .filter-select,
  .table-select-all {
    width: 100%;
  }

  .toolbar-spacer {
    display: none;
  }

  .toolbar-note {
    align-self: center;
    margin-left: auto;
  }

  .tabs {
    padding: 0 7px;
  }

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

  .panel-head {
    align-items: flex-start;
  }

  .panel-head .heading-actions {
    width: auto;
  }

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

  .modal,
  .modal.small,
  .modal.large {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .order-detail-hero {
    flex-wrap: wrap;
  }

  .order-detail-hero > strong {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .16);
  }

  .toast-root {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }

  .toast {
    width: 100%;
    max-width: none;
  }

  .danger-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .spec-editor-head {
    flex-direction: column;
    gap: 8px;
  }

  .spec-preset-actions {
    justify-content: flex-start;
  }

  .spec-group-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .spec-group-head .spec-group-name {
    grid-column: 1 / -1;
  }

  .spec-option-add {
    grid-template-columns: 1fr;
  }

  .spec-option-add .btn {
    justify-self: start;
  }

  .shift-hero {
    grid-template-columns: 1fr;
  }

  .shift-clock {
    border-top: 1px solid rgba(255, 255, 255, .12);
    border-left: 0;
  }

  .shift-workspace,
  .signature-workspace {
    grid-template-columns: 1fr;
  }

  .shift-todo-add {
    grid-template-columns: 1fr;
  }

  .shift-todo-add .btn {
    justify-self: start;
  }

  .signature-actions {
    min-height: 118px;
  }

  .log-toolbar .search-box,
  .log-toolbar .filter-select {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .content {
    padding: 10px;
  }

  .spec-preset-actions {
    gap: 5px;
  }

  .spec-preset-actions .btn {
    padding-inline: 8px;
  }

  .shift-person,
  .shift-clock {
    padding: 14px;
  }

  .shift-todo {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .shift-todo .text-btn {
    grid-column: 2;
    justify-self: start;
  }

  .signature-actions {
    padding: 11px;
  }
}

@media print {
  .sidebar,
  .topbar,
  .heading-actions,
  .toast-root,
  .modal-backdrop {
    display: none !important;
  }

  .main-shell {
    margin-left: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }
}

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