:root {
  --ink: #1e2923;
  --ink-2: #415049;
  --muted: #7d8780;
  --line: #e3e2dc;
  --paper: #f5f4ef;
  --white: #fffefa;
  --green: #2c4437;
  --green-2: #496354;
  --sage: #e9eee7;
  --sage-2: #c9d5c9;
  --blush: #eeddd8;
  --gold: #a8895f;
  --danger: #a64f47;
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow: 0 20px 60px rgba(34, 50, 40, 0.11);
  --sidebar-w: 250px;
  --ease: cubic-bezier(0.2, 0.72, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

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

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

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.brand-flower {
  color: var(--green);
  font-family: var(--serif);
  font-size: 32px;
}

.auth-loading {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.auth-loading p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(450px, 0.9fr);
  min-height: 100dvh;
  background: var(--white);
}

.login-visual {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  color: #f2f3eb;
  background:
    radial-gradient(circle at 25% 30%, rgba(158, 177, 154, 0.19), transparent 30%),
    #263c30;
}

.login-visual::before {
  position: absolute;
  top: 10%;
  left: 33%;
  width: 570px;
  height: 570px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.login-visual::after {
  position: absolute;
  top: 16%;
  left: 38%;
  width: 460px;
  height: 660px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50% 50% 0 0;
  content: "";
  transform: rotate(-13deg);
}

.login-brand {
  position: absolute;
  z-index: 5;
  top: 38px;
  left: 44px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 18px;
}

.login-brand div:last-child,
.sidebar-brand div:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.login-brand b,
.sidebar-brand b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.login-brand small,
.sidebar-brand small {
  font-size: 7px;
  letter-spacing: 0.2em;
  opacity: 0.58;
}

.login-quote {
  position: absolute;
  z-index: 5;
  top: 22%;
  left: 9%;
  max-width: 550px;
}

.login-quote > span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: rgba(240, 241, 233, 0.58);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.login-quote > span::before {
  width: 27px;
  height: 1px;
  background: currentColor;
  content: "";
}

.login-quote h1 {
  margin: 30px 0 22px;
  font-family: var(--serif);
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.login-quote p {
  color: rgba(240, 241, 233, 0.55);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.login-image-stack {
  position: absolute;
  right: -3%;
  bottom: 2%;
  display: flex;
  height: 66%;
  align-items: flex-end;
  transform: rotate(-4deg);
}

.login-image-stack img {
  width: 250px;
  height: 500px;
  object-fit: cover;
  border-radius: 46% 46% 0 0;
  box-shadow: 0 25px 80px rgba(5, 13, 8, 0.3);
}

.login-image-stack img:first-child {
  z-index: 2;
  width: 300px;
  height: 590px;
  margin-right: -100px;
  transform: rotate(-4deg);
}

.login-image-stack img:last-child {
  opacity: 0.74;
  transform: translateY(30px) rotate(8deg);
}

.login-botanical {
  position: absolute;
  right: 6%;
  bottom: 12%;
  color: rgba(255, 255, 255, 0.05);
  font-family: var(--serif);
  font-size: 310px;
}

.login-footer {
  position: absolute;
  z-index: 5;
  right: 35px;
  bottom: 25px;
  left: 35px;
  display: flex;
  justify-content: space-between;
  color: rgba(240, 241, 233, 0.32);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.login-panel {
  display: grid;
  padding: 60px clamp(40px, 7vw, 120px);
  place-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(225, 214, 197, 0.25), transparent 35%),
    var(--white);
}

.login-form {
  width: min(400px, 100%);
}

.login-eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.login-eyebrow span {
  width: 25px;
  height: 1px;
  background: currentColor;
}

.login-form h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.login-intro {
  margin: 14px 0 42px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.login-form > label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.password-field {
  position: relative;
  margin-top: 18px;
}

.merchant-code-input {
  width: 100%;
  height: 51px;
  padding: 0 15px;
  color: var(--ink);
  border: 1px solid #d9dad4;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  transition: border-color 0.2s;
}

.merchant-code-input:focus {
  border-color: var(--green);
}

.admin-login-method {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 14px;
  padding: 3px;
  border: 1px solid #d9dad4;
  background: #f4f5ef;
}

.admin-login-method button {
  min-width: 84px;
  padding: 8px 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 9px;
  cursor: pointer;
}

.admin-login-method button.active {
  color: white;
  background: var(--green);
}

.admin-login-identifier-row {
  display: flex;
  gap: 8px;
}

.admin-login-identifier-row select {
  width: 150px;
  min-width: 0;
  height: 51px;
  padding: 0 9px;
  color: var(--ink-2);
  border: 1px solid #d9dad4;
  outline: none;
  background: white;
  font-family: inherit;
  font-size: 9px;
}

.admin-login-identifier-row select:focus {
  border-color: var(--green);
}

.admin-login-identifier-row .merchant-code-input {
  min-width: 0;
  flex: 1;
}

.admin-login-identifier-row select[hidden] {
  display: none;
}

.password-field input {
  width: 100%;
  height: 51px;
  padding: 0 55px 0 15px;
  border: 1px solid #d9dad4;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  transition: border-color 0.2s;
}

.password-field input:focus {
  border-color: var(--green);
}

.password-field button {
  position: absolute;
  top: 0;
  right: 6px;
  height: 51px;
  padding: 0 9px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.login-error {
  display: none;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 9px;
}

.login-error.show {
  display: block;
}

.admin-button {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-size: 11px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: 0.22s var(--ease);
}

.admin-button.primary {
  color: #f5f6ef;
  background: var(--green);
}

.admin-button.primary:hover {
  background: #1b3125;
  transform: translateY(-1px);
}

.admin-button.secondary {
  border-color: var(--line);
  background: transparent;
}

.admin-button.secondary:hover {
  background: #efeee8;
}

.admin-button.danger {
  color: var(--danger);
  border-color: #ead7d4;
  background: #fbf4f2;
}

.admin-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.login-submit {
  width: 100%;
  height: 51px;
  margin-top: 19px;
  justify-content: space-between;
  padding: 0 18px;
}

.demo-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 12px 14px;
  color: #7a817b;
  background: #f2f1eb;
  font-size: 9px;
}

.demo-hint code {
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.back-store {
  display: inline-block;
  margin-top: 35px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.merchant-apply-link {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 16px;
  align-items: center;
  justify-content: center;
  color: var(--green);
  border: 1px solid var(--green);
  background: #edf2ec;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: 0.2s;
}

.merchant-apply-link:hover {
  color: white;
  background: var(--green);
}

.admin-app {
  display: flex;
  min-height: 100dvh;
}

.sidebar {
  position: fixed;
  z-index: 40;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-w);
  flex-direction: column;
  padding: 26px 18px 18px;
  color: #e9ece4;
  background: #203329;
}

.sidebar-brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 8px;
}

.sidebar-brand .admin-brand-mark {
  width: 37px;
  height: 37px;
  font-size: 16px;
}

.sidebar-brand b {
  font-size: 17px;
}

.sidebar-shop {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 27px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}

.shop-avatar {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--green);
  border-radius: 8px;
  background: #e9e6dc;
  font-family: var(--serif);
  font-size: 15px;
}

.sidebar-shop div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.sidebar-shop b {
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-shop small {
  display: flex;
  gap: 5px;
  align-items: center;
  color: rgba(233, 236, 228, 0.45);
  font-size: 7px;
}

.sidebar-shop small i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8eaf8f;
}

.chevron {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.sidebar-nav {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 3px;
  margin-top: 29px;
}

.nav-label {
  margin: 0 11px 9px;
  color: rgba(233, 236, 228, 0.34);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.nav-label.second {
  margin-top: 25px;
}

.nav-item {
  display: grid;
  grid-template-columns: 19px 1fr auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  color: rgba(233, 236, 228, 0.62);
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

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

.nav-item.active {
  color: #fff;
  background: rgba(238, 239, 230, 0.1);
}

.nav-item.active::before {
  position: absolute;
  left: 0;
  width: 2px;
  height: 23px;
  background: #c8d5c7;
  content: "";
}

.nav-item svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.nav-item span {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.nav-item em {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 7px;
  font-style: normal;
}

.nav-item em.attention {
  color: var(--green);
  background: #d8dfd4;
}

.sidebar-privacy {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 24px 7px 14px;
  padding: 14px 12px;
  color: var(--green);
  background: #e7ece4;
}

.sidebar-privacy svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.sidebar-privacy div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-privacy b {
  font-size: 8px;
  font-weight: 600;
}

.sidebar-privacy span {
  color: #627267;
  font-size: 7px;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-bottom a,
.sidebar-bottom button {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  color: rgba(233, 236, 228, 0.48);
  border: 0;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.sidebar-bottom a:hover,
.sidebar-bottom button:hover {
  color: #fff;
}

.sidebar-bottom svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.admin-main {
  width: calc(100% - var(--sidebar-w));
  min-height: 100dvh;
  margin-left: var(--sidebar-w);
}

.topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: flex;
  height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 244, 239, 0.91);
  backdrop-filter: blur(15px);
}

.topbar-left {
  display: flex;
  gap: 15px;
  align-items: center;
}

.breadcrumb {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}

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

.breadcrumb i {
  color: #b0b5b0;
  font-style: normal;
}

.breadcrumb b {
  font-weight: 500;
}

.topbar-left p {
  margin: 5px 0 0;
  color: #8d958e;
  font-size: 8px;
}

.topbar-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

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

.topbar-icon {
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.topbar-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.topbar-icon.loading svg {
  animation: spin 0.7s linear infinite;
}

.topbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.topbar-action {
  display: inline-flex;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  align-items: center;
  justify-content: center;
  color: #69736c;
  border: 1px solid #dde0db;
  background: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s;
}

.topbar-action:hover {
  color: var(--green);
  border-color: #c8d2c9;
  background: #fff;
}

.topbar-action.storefront-action {
  color: var(--green);
}

.topbar-action svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.admin-user {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-left: 4px;
}

.admin-user > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #f1f2e9;
  border-radius: 50%;
  background: var(--green);
  font-family: var(--serif);
  font-size: 13px;
}

.admin-user div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-user b {
  font-size: 9px;
  font-weight: 500;
}

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

.mobile-sidebar-button {
  display: none;
}

.page-content {
  width: min(1450px, 100%);
  min-height: calc(100dvh - 82px);
  margin: 0 auto;
  padding: 31px 35px 55px;
}

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

.page-heading-row h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.page-heading-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

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

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

.metric-card {
  position: relative;
  min-height: 134px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

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

.metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-card-head span {
  color: var(--muted);
  font-size: 9px;
}

.metric-card.featured .metric-card-head span {
  color: rgba(238, 240, 232, 0.62);
}

.metric-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--green-2);
  border-radius: 50%;
  background: var(--sage);
  font-size: 11px;
}

.metric-card.featured .metric-icon {
  color: var(--green);
  background: #dce4da;
}

.metric-value {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 18px;
}

.metric-value strong {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.metric-value small {
  color: #8c958e;
  font-size: 8px;
}

.metric-card.featured .metric-value small {
  color: rgba(238, 240, 232, 0.4);
}

.metric-foot {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  color: #7d887f;
  font-size: 8px;
}

.metric-card.featured .metric-foot {
  color: rgba(238, 240, 232, 0.52);
}

.metric-up {
  color: #52765b;
  font-weight: 600;
}

.metric-card.featured .metric-up {
  color: #cddcc8;
}

.metric-decoration {
  position: absolute;
  right: -9px;
  bottom: -30px;
  color: rgba(61, 83, 68, 0.055);
  font-family: var(--serif);
  font-size: 100px;
}

.metric-card.featured .metric-decoration {
  color: rgba(255, 255, 255, 0.04);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.dashboard-card {
  border: 1px solid var(--line);
  background: var(--white);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 15px;
}

.card-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.card-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.card-link {
  padding: 4px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.card-link:hover {
  color: var(--green);
}

.chart-wrap {
  padding: 8px 22px 18px;
}

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

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

.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green);
}

.chart-legend span + span i {
  background: #d9ddd5;
}

.chart {
  display: flex;
  height: 170px;
  gap: 15px;
  align-items: flex-end;
  margin-top: 15px;
  padding: 10px 6px 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(to bottom, transparent calc(33.33% - 1px), #f0efe9 33.33%, transparent calc(33.33% + 1px)) 0 0 / 100% 33.33%;
}

.chart-column {
  display: flex;
  height: 100%;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.chart-bars {
  display: flex;
  width: min(34px, 72%);
  height: calc(100% - 24px);
  gap: 3px;
  align-items: flex-end;
}

.chart-bars i {
  display: block;
  width: 50%;
  min-height: 2px;
  background: var(--green);
  transform-origin: bottom;
  animation: barRise 0.65s var(--ease) both;
}

.chart-bars i + i {
  background: #dfe2dc;
}

@keyframes barRise {
  from { transform: scaleY(0); }
}

.chart-column small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 7px;
}

.quick-panel {
  display: flex;
  flex-direction: column;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 22px 20px;
}

.quick-action {
  display: flex;
  min-height: 91px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8f7f2;
  text-align: left;
  cursor: pointer;
  transition: 0.2s;
}

.quick-action:hover {
  border-color: #a7b5a9;
  background: #f2f5ef;
  transform: translateY(-1px);
}

.quick-action span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: var(--green);
  border-radius: 50%;
  background: var(--sage);
  font-size: 15px;
}

.quick-action b {
  font-size: 9px;
  font-weight: 500;
}

.privacy-mini {
  margin: auto 22px 20px;
  padding: 15px;
  color: #5f6e63;
  background: #eef1eb;
}

.privacy-mini-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.privacy-mini-head svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.privacy-mini-head b {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.privacy-mini p {
  margin: 8px 0 0;
  color: #7d897f;
  font-size: 8px;
  line-height: 1.7;
}

.recent-orders-card {
  grid-column: 1;
}

.top-products-card {
  grid-column: 2;
}

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

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

.admin-table th {
  padding: 11px 20px;
  color: #8d958f;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8f7f3;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 20px;
  border-bottom: 1px solid #edede8;
  font-size: 9px;
  vertical-align: middle;
}

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

.admin-table tbody tr {
  transition: background 0.2s;
}

.admin-table tbody tr:hover {
  background: #faf9f4;
}

.order-code {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-code b {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
}

.order-code span {
  color: #969d97;
  font-size: 7px;
}

.table-product {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-product img {
  width: 34px;
  height: 34px;
  object-fit: cover;
}

.table-product span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.table-product b {
  font-size: 9px;
  font-weight: 400;
}

.table-product small {
  color: #949b94;
  font-size: 7px;
}

.buyer-code {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 7px;
  color: #6e7a71;
  background: #f0f2ed;
  font-size: 8px;
}

.buyer-code svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.status-pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 20px;
  font-size: 8px;
  white-space: nowrap;
}

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

.status-pending {
  color: #9b6f30;
  background: #f7eedf;
}

.status-packing {
  color: #4b6e88;
  background: #e8f0f4;
}

.status-shipped {
  color: #5f6979;
  background: #ebedf2;
}

.status-completed {
  color: #4d7158;
  background: #e8f0e8;
}

.status-cancelled {
  color: #8b6f6c;
  background: #f1e9e7;
}

.table-action {
  padding: 4px;
  color: #68756c;
  border: 0;
  background: transparent;
  font-size: 8px;
  text-decoration: underline;
  text-decoration-color: #c1c6c1;
  text-underline-offset: 3px;
  cursor: pointer;
}

.top-product-list {
  display: grid;
  gap: 0;
  padding: 0 22px 15px;
}

.top-product-item {
  display: grid;
  grid-template-columns: 23px 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edede7;
}

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

.top-product-rank {
  color: #9ba19b;
  font-family: var(--serif);
  font-size: 10px;
}

.top-product-item img {
  width: 38px;
  height: 45px;
  object-fit: cover;
}

.top-product-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.top-product-info b {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-product-info span {
  color: #939a94;
  font-size: 7px;
}

.top-product-item > strong {
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 500;
}

.catalog-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--white);
}

.catalog-filters {
  display: flex;
  gap: 5px;
  align-items: center;
}

.catalog-search {
  position: relative;
  width: min(240px, 100%);
}

.catalog-search svg {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #8c948d;
  stroke-width: 1.4;
}

.catalog-search input {
  width: 100%;
  height: 35px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--line);
  outline: none;
  background: #fbfaf6;
  font-size: 9px;
}

.catalog-filter {
  padding: 8px 13px;
  color: #757f77;
  border: 1px solid transparent;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.catalog-filter.active {
  color: var(--green);
  border-color: #ccd5cc;
  background: #f0f3ee;
}

.catalog-meta {
  color: var(--muted);
  font-size: 8px;
}

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

.admin-product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
  transition: 0.2s var(--ease);
}

.admin-product-card:hover {
  box-shadow: 0 10px 35px rgba(44, 68, 55, 0.07);
  transform: translateY(-2px);
}

.admin-product-image {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  background: #e7e3da;
  cursor: pointer;
}

.admin-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.admin-product-card:hover .admin-product-image img {
  transform: scale(1.03);
}

.admin-product-open-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: white;
  background: rgba(30, 47, 37, 0.76);
  font-size: 7px;
  opacity: 0;
  transform: translateY(4px);
  backdrop-filter: blur(5px);
  transition: 0.2s var(--ease);
}

.admin-product-card:hover .admin-product-open-hint {
  opacity: 1;
  transform: none;
}

.admin-product-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  color: var(--green);
  background: rgba(250, 249, 244, 0.9);
  font-size: 7px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(7px);
}

.admin-product-visibility {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 5px 8px;
  color: #fff;
  background: rgba(31, 49, 39, 0.76);
  font-size: 7px;
  backdrop-filter: blur(6px);
}

.admin-product-visibility i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b9d5b9;
}

.admin-product-visibility.off i {
  background: #d9b1b1;
}

.admin-product-body {
  padding: 15px 16px 13px;
}

.admin-product-title-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-product-title-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.admin-product-title-row h3 a {
  color: inherit;
}

.admin-product-title-row h3 a:hover {
  color: var(--green-2);
}

.admin-product-category {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.admin-product-price {
  font-family: var(--serif);
  font-size: 16px;
  white-space: nowrap;
}

.admin-product-stats {
  display: flex;
  gap: 16px;
  margin: 13px 0 14px;
  padding: 10px 0;
  border-top: 1px solid #eeeee9;
  border-bottom: 1px solid #eeeee9;
  color: #838c84;
  font-size: 8px;
}

.admin-product-stats b {
  color: var(--ink-2);
  font-weight: 500;
}

.admin-product-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.admin-product-actions button,
.admin-product-actions .admin-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 8px;
}

.admin-product-actions .more-button {
  margin-left: auto;
  padding: 0 7px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 16px;
}

.empty-admin-state {
  grid-column: 1 / -1;
  padding: 75px 20px;
  color: var(--muted);
  border: 1px dashed #d7d9d3;
  background: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.empty-admin-state span {
  color: #aab3aa;
  font-family: var(--serif);
  font-size: 40px;
}

.empty-admin-state h3 {
  margin: 14px 0 7px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
}

.empty-admin-state p {
  margin: 0 0 20px;
  font-size: 9px;
}

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

.category-admin-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}

.category-admin-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 19px 14px;
  border-bottom: 1px solid #eeeeea;
}

.category-admin-title {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
}

.category-admin-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: var(--green);
  font-family: var(--serif);
  font-size: 13px;
}

.category-admin-title div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.category-admin-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.category-admin-title span {
  overflow: hidden;
  color: #879088;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-visible-pill {
  display: inline-flex;
  flex: none;
  gap: 5px;
  align-items: center;
  padding: 5px 8px;
  color: #4f7058;
  border-radius: 20px;
  background: #e9f0e8;
  font-size: 7px;
}

.category-admin-pills {
  display: flex;
  flex: none;
  gap: 6px;
  align-items: center;
}

.category-owner-pill {
  display: inline-flex;
  padding: 5px 8px;
  color: #5b6860;
  border: 1px solid #dfe4de;
  border-radius: 20px;
  background: #f7f8f5;
  font-size: 7px;
  white-space: nowrap;
}

.category-visible-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.category-visible-pill.off {
  color: #8f6e6a;
  background: #f2e9e7;
}

.category-admin-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 13px 19px 16px;
}

.category-admin-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-admin-stat span {
  color: #919892;
  font-size: 7px;
}

.category-admin-stat b {
  color: #4d5850;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.category-admin-actions {
  display: flex;
  gap: 7px;
  padding: 0 19px 17px;
  align-items: center;
}

.category-admin-actions .admin-button {
  min-height: 31px;
  padding: 0 11px;
  font-size: 8px;
}

.category-admin-actions .delete-category {
  margin-left: auto;
  padding: 5px;
  color: #a0716c;
  border: 0;
  background: transparent;
  font-size: 8px;
  cursor: pointer;
}

.category-platform-note {
  color: #8b948d;
  font-size: 9px;
}

.category-form-body {
  display: grid;
  gap: 14px;
  padding: 23px;
}

.category-editor {
  width: min(590px, 100%);
}

.category-editor .toggle-line {
  border-top: 1px solid #efeee9;
}

.order-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 17px;
  border: 1px solid var(--line);
  background: var(--white);
}

.order-stat-strip div {
  padding: 15px 20px;
}

.order-stat-strip div + div {
  border-left: 1px solid var(--line);
}

.order-stat-strip span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
}

.order-stat-strip b {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}

.order-tabs {
  display: flex;
  gap: 3px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
}

.order-tab {
  position: relative;
  min-height: 47px;
  padding: 0 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.order-tab.active {
  color: var(--green);
}

.order-tab.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  background: var(--green);
  content: "";
}

.order-tab em {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0 4px;
  place-items: center;
  border-radius: 10px;
  background: #edf0eb;
  font-size: 7px;
  font-style: normal;
}

.orders-table-card {
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--white);
}

.orders-table-card .admin-table th:first-child,
.orders-table-card .admin-table td:first-child {
  padding-left: 22px;
}

.orders-table-card .admin-table th:last-child,
.orders-table-card .admin-table td:last-child {
  padding-right: 22px;
  text-align: right;
}

.order-items-stack {
  display: flex;
}

.order-items-stack img {
  width: 28px;
  height: 28px;
  margin-left: -7px;
  border: 2px solid var(--white);
  object-fit: cover;
}

.order-items-stack img:first-child {
  margin-left: 0;
}

.order-items-stack span {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: -7px;
  place-items: center;
  color: var(--muted);
  border: 2px solid var(--white);
  background: #f0f0ea;
  font-size: 7px;
}

.privacy-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 18px;
  padding: 34px 37px;
  overflow: hidden;
  color: #ecf0e9;
  background: var(--green);
}

.privacy-hero::after {
  position: absolute;
  right: 22%;
  bottom: -100px;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--serif);
  font-size: 270px;
  content: "密";
}

.privacy-hero-copy {
  position: relative;
  z-index: 2;
}

.privacy-hero-copy span {
  color: rgba(236, 240, 233, 0.55);
  font-size: 8px;
  letter-spacing: 0.18em;
}

.privacy-hero h1 {
  margin: 13px 0 10px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 400;
}

.privacy-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(236, 240, 233, 0.6);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.85;
}

.privacy-seal {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  color: var(--green);
  background: #e5ebe2;
}

.privacy-seal svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.privacy-seal div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.privacy-seal b {
  font-size: 9px;
  font-weight: 600;
}

.privacy-seal span {
  color: #68776c;
  font-size: 7px;
}

.privacy-diagram-card {
  margin-bottom: 18px;
  padding: 25px;
  border: 1px solid var(--line);
  background: var(--white);
}

.privacy-diagram-card > h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.privacy-diagram-card > p {
  margin: 6px 0 24px;
  color: var(--muted);
  font-size: 8px;
}

.privacy-flow {
  display: grid;
  grid-template-columns: 1fr 45px 1fr 45px 1fr;
  align-items: stretch;
}

.privacy-node {
  padding: 19px;
  border: 1px solid var(--line);
  background: #faf9f5;
}

.privacy-node.highlight {
  border-color: #d1d9d0;
  background: #eef2ec;
}

.privacy-node.private {
  border-color: #e1d5d1;
  background: #f6efec;
}

.privacy-node > svg {
  width: 23px;
  height: 23px;
  margin-bottom: 14px;
  fill: none;
  stroke: var(--green);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.privacy-node.private > svg {
  stroke: #8d6863;
}

.privacy-node b {
  display: block;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
}

.privacy-node p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

.privacy-node small {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 7px;
  color: #607166;
  background: #e4eae2;
  font-size: 7px;
}

.privacy-node.private small {
  color: #886862;
  background: #eee1dd;
}

.privacy-arrow {
  display: grid;
  place-items: center;
  color: #b5bbb5;
  font-size: 18px;
}

.privacy-rule-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.privacy-rules {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--white);
}

.privacy-rules h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 19px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.privacy-rules h3 span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #e8eee7;
  font-family: var(--sans);
  font-size: 9px;
}

.privacy-rules.blocked h3 span {
  color: #8f5d55;
  background: #f1e4e1;
}

.privacy-rule-list {
  display: grid;
  gap: 0;
}

.privacy-rule-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #efeee9;
}

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

.privacy-rule-item > i {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #51705b;
  border-radius: 50%;
  background: #e5ece4;
  font-size: 8px;
  font-style: normal;
}

.privacy-rule-item.blocked > i {
  color: #9a5f57;
  background: #f2e6e3;
}

.privacy-rule-item b {
  font-size: 9px;
  font-weight: 400;
}

.privacy-rule-item span {
  color: #909890;
  font-size: 7px;
}

.admin-modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  visibility: hidden;
  padding: 25px;
  overflow-y: auto;
  place-items: center;
  background: rgba(23, 34, 27, 0.46);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: 0.25s;
}

.admin-modal-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.admin-modal {
  width: min(1010px, 100%);
  max-height: calc(100dvh - 50px);
  overflow-y: auto;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.985);
  transition: transform 0.25s var(--ease);
}

.admin-modal-backdrop.open .admin-modal {
  transform: none;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 25px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header p {
  margin: 0 0 6px;
  color: #8b948c;
  font-size: 7px;
  letter-spacing: 0.17em;
}

.modal-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 400;
}

.admin-close {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-family: Arial, sans-serif;
  font-size: 21px;
  cursor: pointer;
}

.admin-close:hover {
  color: #fff;
  background: var(--green);
}

.product-form-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 28px;
  padding: 25px;
}

.image-upload-column {
  min-width: 0;
}

.image-upload {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed #bfc6be;
  background:
    linear-gradient(45deg, #f6f6f1 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #f6f6f1 25%, transparent 25%) 0 0 / 16px 16px,
    #fbfaf6;
  cursor: pointer;
}

.image-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  text-align: center;
}

.upload-placeholder > span {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  place-items: center;
  color: var(--green);
  border: 1px solid #bac6b9;
  border-radius: 50%;
  font-size: 19px;
  font-weight: 300;
}

.upload-placeholder b {
  font-size: 10px;
  font-weight: 500;
}

.upload-placeholder small {
  max-width: 155px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.65;
}

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

.change-image {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  color: white;
  background: rgba(32, 51, 41, 0.8);
  font-size: 7px;
  backdrop-filter: blur(6px);
}

.image-tip {
  margin-top: 14px;
  padding: 12px;
  background: #f1f2ed;
}

.image-tip b {
  font-size: 8px;
  font-weight: 500;
}

.image-tip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.65;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.admin-field.full,
.toggle-line.full {
  grid-column: 1 / -1;
}

.admin-field label {
  color: #647068;
  font-size: 8px;
  letter-spacing: 0.03em;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid #dcddd7;
  border-radius: 0;
  outline: none;
  background: #fdfcf8;
  font-size: 9px;
  transition: border-color 0.2s;
}

.admin-field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.65;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: #9cad9e;
  background: #fff;
}

.price-input {
  position: relative;
}

.price-input span {
  position: absolute;
  top: 12px;
  left: 11px;
  color: #8a928b;
  font-size: 9px;
}

.price-input input {
  padding-left: 26px;
}

.auto-volume-result {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px 12px;
  min-height: 46px;
  padding: 10px 12px;
  align-items: center;
  border: 1px solid #dbe2db;
  background: #f1f5ef;
}

.auto-volume-result span {
  color: #68736b;
  font-size: 8px;
}

.auto-volume-result b {
  color: var(--green);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.auto-volume-result small {
  color: #8c958e;
  font-size: 7px;
  text-align: right;
}

.toggle-line {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #efeee9;
  cursor: pointer;
}

.toggle-line > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.toggle-line b {
  font-size: 9px;
  font-weight: 500;
}

.toggle-line span {
  color: var(--muted);
  font-size: 7px;
}

.toggle-line input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-line > i {
  position: relative;
  width: 34px;
  height: 19px;
  flex: none;
  border-radius: 20px;
  background: #d8dad5;
  transition: 0.2s;
}

.toggle-line > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: 0.2s var(--ease);
}

.toggle-line input:checked + i {
  background: var(--green-2);
}

.toggle-line input:checked + i::after {
  transform: translateX(15px);
}

.admin-form-error {
  display: none;
  margin: 12px 0 0;
  padding: 9px 11px;
  color: var(--danger);
  background: #f8e9e6;
  font-size: 8px;
}

.admin-form-error.show {
  display: block;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.order-detail-modal {
  width: min(660px, 100%);
}

.order-detail-body {
  padding: 24px;
}

.order-detail-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.order-detail-meta h3 {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.order-detail-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.order-detail-meta > span {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.privacy-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 13px;
  color: #5d6d62;
  background: #edf1eb;
}

.privacy-banner svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.privacy-banner b {
  display: block;
  margin-bottom: 4px;
  font-size: 8px;
  font-weight: 500;
}

.privacy-banner p {
  margin: 0;
  color: #7b877d;
  font-size: 7px;
  line-height: 1.65;
}

.order-detail-items {
  margin-bottom: 19px;
  border-top: 1px solid var(--line);
}

.order-detail-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.order-detail-item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.order-detail-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.order-detail-item b {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.order-detail-item span {
  color: var(--muted);
  font-size: 8px;
}

.order-detail-item strong {
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.order-detail-totals {
  display: grid;
  gap: 8px;
  margin-left: auto;
  width: 230px;
}

.order-detail-totals div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.order-detail-totals div:last-child {
  margin-top: 4px;
  padding-top: 10px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 14px;
}

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

.order-status-control label {
  font-size: 9px;
}

.order-status-control select {
  min-width: 160px;
  height: 37px;
  padding: 0 10px;
  border: 1px solid #d9dbd5;
  background: #fbfaf6;
  font-size: 9px;
}

.admin-toast {
  position: fixed;
  z-index: 150;
  right: 25px;
  bottom: 25px;
  max-width: 330px;
  padding: 13px 17px;
  visibility: hidden;
  color: #f2f4ed;
  background: rgba(32, 51, 41, 0.96);
  box-shadow: 0 12px 35px rgba(20, 30, 24, 0.2);
  font-size: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s var(--ease);
}

.admin-toast.show {
  visibility: visible;
  opacity: 1;
  transform: none;
}

.admin-toast.error {
  background: #864a43;
}

@media (max-width: 1200px) {
  :root {
    --sidebar-w: 220px;
  }

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

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

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

  .recent-orders-card,
  .top-products-card {
    grid-column: auto;
  }

  .top-product-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

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

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100dvh;
  }

  .sidebar {
    width: 230px;
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease);
  }

  .sidebar.open {
    transform: none;
  }

  .admin-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-sidebar-button {
    display: flex;
    width: 35px;
    height: 35px;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
  }

  .mobile-sidebar-button span {
    width: 15px;
    height: 1px;
    background: var(--ink);
  }

  .topbar {
    padding: 0 22px;
  }

  .topbar-left p,
  .today {
    display: none;
  }

  .topbar-action {
    width: 34px;
    padding: 0;
  }

  .topbar-action span {
    display: none;
  }

  .page-content {
    padding: 26px 22px 45px;
  }

  .privacy-flow {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .privacy-arrow {
    height: 20px;
    transform: rotate(90deg);
  }
}

@media (max-width: 680px) {
  .category-admin-grid {
    grid-template-columns: 1fr;
  }

  .topbar-right .admin-user div {
    display: none;
  }

  .page-heading-row {
    display: block;
  }

  .heading-actions {
    margin-top: 18px;
  }

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

  .metric-card {
    min-height: 122px;
    padding: 16px;
  }

  .metric-value strong {
    font-size: 25px;
  }

  .admin-product-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-image {
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .catalog-toolbar {
    display: block;
    padding: 11px;
  }

  .catalog-filters {
    margin-top: 10px;
    overflow-x: auto;
  }

  .catalog-filter {
    min-width: max-content;
  }

  .order-stat-strip {
    grid-template-columns: 1fr 1fr;
  }

  .order-stat-strip div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .order-stat-strip div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .order-tabs {
    overflow-x: auto;
  }

  .order-tab {
    min-width: max-content;
  }

  .privacy-hero {
    display: block;
    padding: 27px 23px;
  }

  .privacy-seal {
    width: fit-content;
    margin-top: 20px;
  }

  .privacy-rule-grid {
    grid-template-columns: 1fr;
  }

  .product-form-layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .image-upload-column {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
  }

  .image-upload {
    aspect-ratio: 1 / 1;
  }

  .image-tip {
    margin-top: 0;
  }

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

  .admin-field.full,
  .toggle-line.full {
    grid-column: auto;
  }

  .admin-modal-backdrop {
    padding: 0;
  }

  .admin-modal {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
  }

  .top-product-list {
    display: block;
  }

  .quick-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .login-panel {
    padding: 40px 24px;
  }

  .login-form h2 {
    font-size: 40px;
  }

  .topbar {
    padding: 0 15px;
  }

  .topbar-icon {
    display: none;
  }

  .page-content {
    padding: 22px 15px 40px;
  }

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

  .metric-card {
    min-height: 115px;
  }

  .card-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .chart-wrap,
  .quick-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .top-product-list {
    padding-right: 16px;
    padding-left: 16px;
  }

  .privacy-mini {
    margin-right: 16px;
    margin-left: 16px;
  }

  .image-upload-column {
    grid-template-columns: 110px 1fr;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

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

.review-privacy-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: var(--green);
  border: 1px solid rgba(46, 70, 56, 0.16);
  background: rgba(46, 70, 56, 0.06);
  font-size: 9px;
  letter-spacing: 0.06em;
}

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

.review-admin-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 40px rgba(36, 42, 35, 0.035);
}

.review-admin-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.review-admin-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-admin-product > span {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--green);
  border: 1px solid rgba(46, 70, 56, 0.15);
  background: #f3f4ed;
  font-family: var(--serif);
  font-size: 17px;
  place-items: center;
}

.review-admin-product div,
.review-admin-rating {
  display: grid;
  gap: 5px;
}

.review-admin-product b {
  font-size: 12px;
  font-weight: 500;
}

.review-admin-product small {
  color: var(--muted);
  font-size: 9px;
}

.review-admin-rating {
  text-align: right;
}

.review-admin-rating strong {
  color: #a4763a;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.review-admin-rating span {
  color: var(--muted);
  font-size: 9px;
}

.review-admin-content {
  margin: 18px 0;
  padding: 18px 20px;
  color: var(--ink-2);
  background: #f7f7f2;
  font-size: 11px;
  line-height: 1.85;
}

.review-admin-reply {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--green);
  background: rgba(46, 70, 56, 0.045);
}

.review-admin-reply b {
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.review-admin-reply p {
  margin: 7px 0 4px;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.7;
}

.review-admin-reply small {
  color: var(--muted);
  font-size: 8px;
}

.review-reply-form {
  display: grid;
  gap: 8px;
}

.review-reply-form > label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.review-reply-form > div {
  display: flex;
  gap: 10px;
}

.review-reply-form input {
  min-width: 0;
  height: 40px;
  flex: 1;
  padding: 0 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  outline: none;
  background: #fff;
  font-size: 10px;
}

.review-reply-form input:focus {
  border-color: var(--green);
}

.review-reply-form .admin-button {
  min-width: 98px;
  height: 40px;
}

@media (max-width: 720px) {
  .review-admin-card {
    padding: 18px;
  }

  .review-admin-card > header,
  .review-reply-form > div {
    display: grid;
  }

  .review-admin-rating {
    text-align: left;
  }

  .review-reply-form .admin-button {
    width: 100%;
  }
}
