/* ============================================================
   商家端 / 平台后台
   ============================================================ */
body.dash-body {
  background: #f5f1ea;
  color: var(--ink);
  min-height: 100vh;
}
body.role-merchant { --accent: #ff6b35; --accent-deep: #e8501c; --accent-soft: #fff0e8; }
body.role-admin { --accent: #0f9f8a; --accent-deep: #0a7c6b; --accent-soft: #e6f8f3; }

.dash-body .btn-primary { background: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 26%, transparent); }
.dash-body .btn-primary:hover { background: var(--accent-deep); }
.dash-body .btn-soft { background: var(--accent-soft); color: var(--accent-deep); }
.dash-body .badge.orange { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------------- 登录 / 入驻 ---------------- */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: var(--cream);
}
.auth-art {
  position: relative;
  overflow: hidden;
  padding: 46px 54px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #1e1712;
}
.auth-art::before {
  content: "";
  position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,.5), transparent 62%);
  right: -200px; top: -220px;
}
.auth-art::after {
  content: "";
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,183,3,.2), transparent 64%);
  left: -170px; bottom: -210px;
}
.role-admin .auth-art { background: #101d1b; }
.role-admin .auth-art::before { background: radial-gradient(circle, rgba(15,159,138,.42), transparent 62%); }
.role-admin .auth-art::after { background: radial-gradient(circle, rgba(110,231,183,.14), transparent 64%); }
.auth-art .art-inner { position: relative; z-index: 2; display: flex; flex-direction: column; height: 100%; }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: auto; }
.auth-brand .brand-mark { width: 42px; height: 42px; font-size: 23px; }
.auth-brand b { font-size: 16px; letter-spacing: -.2px; }
.auth-brand small { display: block; color: #a89583; font-size: 9px; letter-spacing: 2px; }
.auth-copy { margin: 50px 0 0; max-width: 480px; }
.auth-copy .eyebrow-dark { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #ffcf9e; border: 1px solid rgba(255,207,158,.25); padding: 4px 10px; border-radius: 99px; }
.role-admin .auth-copy .eyebrow-dark { color: #8be9d8; border-color: rgba(139,233,216,.22); }
.auth-copy h1 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -1.5px; margin: 16px 0 12px; font-weight: 900; }
.auth-copy h1 span { color: #ffb703; }
.role-admin .auth-copy h1 span { color: #5eead4; }
.auth-copy p { color: #b8a695; font-size: 13px; line-height: 1.8; max-width: 390px; }
.auth-features { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.auth-feature { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #d7c6b6; }
.auth-feature .af-ico { width: 29px; height: 29px; border-radius: 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); display: flex; align-items: center; justify-content: center; color: #ffb703; flex: none; }
.role-admin .auth-feature .af-ico { color: #5eead4; }
.auth-quote { margin-top: auto; padding-top: 32px; color: #8f7d6c; font-size: 10.5px; display: flex; align-items: center; gap: 8px; }
.auth-quote .dotline { width: 30px; height: 1px; background: #4a3a2c; }
.auth-art .float-card {
  position: absolute; z-index: 3; background: rgba(255,255,255,.96); color: var(--ink);
  border-radius: 14px; padding: 11px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.28);
  display: flex; align-items: center; gap: 9px; font-size: 11px;
}
.auth-art .float-card b { display: block; font-size: 13px; }
.auth-art .float-card span { color: var(--muted); font-size: 9.5px; }
.auth-art .float-card .fc-ico { font-size: 21px; }
.auth-art .fc1 { right: 46px; top: 25%; animation: bob 6s ease-in-out infinite; }
.auth-art .fc2 { right: 90px; bottom: 23%; animation: bob 7s ease-in-out infinite -2s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.auth-form-side {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 34px;
  background:
    radial-gradient(700px 400px at 80% 0%, #fff4e4, transparent 60%),
    var(--cream);
  overflow-y: auto;
}
.auth-card { width: min(440px, 100%); }
.auth-card.wide { width: min(600px, 100%); }
.auth-mobile-brand { display: none; align-items: center; gap: 9px; margin-bottom: 22px; }
.auth-tabs { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { height: 34px; padding: 0 20px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-tabs button.active { background: var(--ink); color: #fff; }
.auth-title { font-size: 26px; font-weight: 900; letter-spacing: -.8px; }
.auth-sub { color: var(--muted); font-size: 12px; margin: 6px 0 22px; line-height: 1.6; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .input, .auth-card .select { height: 46px; }
.auth-card .btn-lg { height: 48px; margin-top: 4px; }
.auth-hint { display: flex; align-items: flex-start; gap: 8px; background: #fff8ea; border: 1px solid #ffe7bd; border-radius: 11px; padding: 10px 12px; font-size: 10.5px; color: #8c6400; line-height: 1.6; margin-top: 16px; }
.auth-hint code { font-family: var(--font-num); background: rgba(255,255,255,.7); padding: 1px 4px; border-radius: 3px; color: #7a5300; }
.auth-switch { text-align: center; font-size: 12px; color: var(--muted); margin-top: 16px; }
.auth-switch button { color: var(--accent-deep); font-weight: 700; margin-left: 3px; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted-2); font-size: 10px; margin-top: 20px; }
.form-section-title { font-size: 12px; font-weight: 800; color: var(--ink-2); margin: 20px 0 10px; display: flex; align-items: center; gap: 7px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------- App shell ---------------- */
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: #1d1712;
  color: #fff;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 90;
  overflow-y: auto;
}
.role-admin .sidebar { background: #101c1a; }
.side-brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 18px; }
.side-brand .brand-mark { width: 37px; height: 37px; font-size: 20px; border-radius: 11px; }
.side-brand b { font-size: 14.5px; letter-spacing: -.2px; display: block; line-height: 1.2; }
.side-brand small { font-size: 8.5px; color: #8e7d6e; letter-spacing: 1.5px; }
.side-role-badge { margin-left: auto; font-size: 8.5px; border: 1px solid rgba(255,255,255,.14); color: #cdbba9; padding: 2px 6px; border-radius: 5px; }
.side-store {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  padding: 11px 12px;
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 16px;
}
.side-store .ss-logo { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: none; }
.side-store b { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 128px; }
.side-store span { font-size: 9px; color: #a99786; display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.side-store .st-dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; }
.side-store .st-dot.pending { background: #fbbf24; }
.side-store .st-dot.rejected, .side-store .st-dot.suspended { background: #f87171; }
.nav-group { margin-bottom: 8px; }
.nav-label { font-size: 8.5px; letter-spacing: 1.4px; color: #6f6053; padding: 10px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 39px; padding: 0 12px; border-radius: 10px;
  color: #b3a294; font-size: 12.5px; font-weight: 500;
  width: 100%; text-align: left;
  transition: background .15s, color .15s;
  position: relative;
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 7px 16px rgba(0,0,0,.18); }
.nav-item .nav-count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: rgba(255,255,255,.14); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.nav-item.active .nav-count { background: rgba(255,255,255,.24); }
.nav-item .nav-count.alert { background: #ef4444; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.side-user { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; }
.side-user .su-avatar { width: 31px; height: 31px; border-radius: 9px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #ffcf9e; flex: none; }
.side-user b { font-size: 11.5px; display: block; }
.side-user span { font-size: 8.5px; color: #8e7d6e; }
.side-user .su-actions { margin-left: auto; display: flex; gap: 2px; }
.side-user .su-actions button { width: 26px; height: 26px; border-radius: 7px; color: #9c8a7a; display: flex; align-items: center; justify-content: center; }
.side-user .su-actions button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-version { font-size: 8px; color: #5c4d41; padding: 9px 8px 0; }

.main-area { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; flex: none;
  background: rgba(255,253,249,.88);
  border-bottom: 1px solid #ebe0d2;
  backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 12px;
  padding: 0 26px;
  position: sticky; top: 0; z-index: 60;
}
.topbar .mobile-menu { display: none; }
.topbar-title { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.topbar-sub { font-size: 10.5px; color: var(--muted); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; height: 27px; padding: 0 9px; }
.top-status .live { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.15); }
.topbar .icon-btn { width: 36px; height: 36px; border-radius: 10px; background: #fff; border-color: var(--line); }
.notify-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; background: #ef4444; border-radius: 50%; border: 1.5px solid #fff; }
.page-body { padding: 24px 26px 44px; max-width: 1500px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 24px; font-weight: 900; letter-spacing: -.8px; line-height: 1.2; }
.page-sub { color: var(--muted); font-size: 11.5px; margin-top: 5px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head .btn { height: 37px; font-size: 12px; border-radius: 9px; }

/* ---------------- Stats ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 17px 18px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 500; }
.stat-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.amber { background: var(--amber-soft); color: #9a6500; }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-value { font-family: var(--font-num); font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin: 11px 0 3px; }
.stat-value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 2px; }
.stat-foot { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); }
.stat-trend { color: var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.stat-trend.down { color: var(--red); }
.stat-card.featured { background: var(--ink); color: #fff; border-color: transparent; }
.stat-card.featured .stat-label { color: #bba896; }
.stat-card.featured .stat-icon { background: rgba(255,255,255,.1); color: #ffcf9e; }
.stat-card.featured .stat-value small { color: #bba896; }
.stat-card.featured .stat-foot { color: #a89583; }
.stat-card.featured::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,107,53,.36), transparent 65%); right: -50px; top: -60px; }
.role-admin .stat-card.featured::after { background: radial-gradient(circle, rgba(15,159,138,.4), transparent 65%); }

/* ---------------- Grid / cards ---------------- */
.dash-grid { display: grid; grid-template-columns: 1.42fr 1fr; gap: 16px; margin-bottom: 18px; }
.dash-grid.equal { grid-template-columns: 1fr 1fr; }
.dash-grid.three { grid-template-columns: repeat(3, 1fr); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 17px 18px 13px; }
.panel-head h3 { font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.panel-head .sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.panel-head .link { font-size: 10.5px; color: var(--accent-deep); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.panel-body { padding: 0 18px 18px; }

/* chart */
.chart-wrap { padding: 4px 18px 16px; }
.chart-legend { display: flex; align-items: center; gap: 13px; font-size: 9.5px; color: var(--muted); margin-bottom: 12px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.bar-chart { display: flex; align-items: flex-end; gap: 9px; height: 178px; padding-top: 8px; position: relative; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; position: relative; }
.bar-stack { width: 100%; max-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; height: calc(100% - 22px); gap: 3px; }
.bar-main { width: 100%; background: var(--accent); border-radius: 5px 5px 3px 3px; min-height: 3px; transition: height .4s; opacity: .88; }
.bar-sub { width: 100%; background: color-mix(in srgb, var(--accent) 30%, #fff); border-radius: 3px; min-height: 2px; }
.bar-col:hover .bar-main { opacity: 1; }
.bar-label { font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.bar-val { position: absolute; top: -2px; font-family: var(--font-num); font-size: 8.5px; font-weight: 700; color: var(--ink-2); opacity: 0; transition: opacity .15s; }
.bar-col:hover .bar-val { opacity: 1; }
.chart-empty { height: 178px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.sparkline { width: 100%; height: 54px; }
.sparkline svg { width: 100%; height: 100%; overflow: visible; }

/* mini lists */
.mini-order { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #f0e5d7; }
.mini-order:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-order .mo-icon { width: 33px; height: 33px; border-radius: 9px; background: var(--cream); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.mini-order .mo-info { flex: 1; min-width: 0; }
.mini-order .mo-info b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-order .mo-info span { font-size: 9.5px; color: var(--muted); }
.mini-order .mo-amount { font-family: var(--font-num); font-weight: 700; font-size: 12px; flex: none; }
.mini-order .mo-action { font-size: 10px; color: var(--accent-deep); font-weight: 700; flex: none; }
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; background: #fffaf3; border: 1px solid #f3e7d8; border-radius: 10px; }
.notice-item .ni-icon { color: var(--accent-deep); flex: none; margin-top: 1px; }
.notice-item b { font-size: 11px; display: block; }
.notice-item p { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.low-stock-item { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px dashed #f0e5d7; }
.low-stock-item:last-child { border-bottom: 0; }
.low-stock-item .ls-name { flex: 1; font-size: 11px; }
.low-stock-item .ls-stock { font-size: 10px; color: var(--red); font-weight: 700; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 11px; font-weight: 600; text-align: left; transition: all .15s; }
.quick-action:hover { border-color: #e3c9ae; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.quick-action .qa-ico { width: 27px; height: 27px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; flex: none; }

/* ---------------- Tables ---------------- */
.table-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.table-toolbar { padding: 14px 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.search-box { display: flex; align-items: center; gap: 7px; height: 35px; padding: 0 11px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; min-width: 210px; }
.search-box svg { color: var(--muted); flex: none; }
.search-box input { border: 0; outline: 0; background: transparent; font-size: 11.5px; width: 100%; min-width: 0; }
.table-toolbar .select { height: 35px; font-size: 11.5px; width: auto; min-width: 110px; border-radius: 9px; padding-left: 10px; }
.table-toolbar .spacer { flex: 1; }
.table-toolbar .btn { height: 35px; font-size: 11.5px; border-radius: 9px; }
.table-panel .table-wrap { padding: 0 6px; }
.table-panel .data-table th { background: #fffaf2; padding: 9px 10px; font-size: 10px; }
.table-panel .data-table td { padding: 12px 10px; font-size: 11.5px; }
.table-foot { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.pager { display: flex; gap: 5px; align-items: center; }
.pager button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 10px; }
.pager button:disabled { opacity: .4; }
.pager span { font-size: 10px; padding: 0 4px; }
.product-cell { display: flex; align-items: center; gap: 9px; }
.product-cell .pc-info b { display: block; font-size: 11.5px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-cell .pc-info span { font-size: 9px; color: var(--muted); }
.order-no-cell { font-family: var(--font-num); font-size: 10.5px; }
.order-no-cell span { display: block; color: var(--muted); font-family: var(--font); font-size: 9px; margin-top: 1px; }
.customer-cell b { display: block; font-size: 11.5px; }
.customer-cell span { font-size: 9.5px; color: var(--muted); }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.row-actions button { font-size: 10px; color: var(--accent-deep); font-weight: 600; padding: 2px 3px; }
.row-actions button.danger { color: var(--red); }
.row-actions button:hover { text-decoration: underline; }
.amount-cell { font-family: var(--font-num); font-weight: 700; }
.fee-cell { font-size: 9.5px; color: var(--muted); display: block; }
.table-empty { padding: 42px 10px; }

/* ---------------- Tabs / filters ---------------- */
.tab-bar { display: flex; gap: 3px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 0 16px; scrollbar-width: none; }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar button { height: 42px; padding: 0 11px; font-size: 11.5px; color: var(--muted); position: relative; white-space: nowrap; }
.tab-bar button.active { color: var(--ink); font-weight: 700; }
.tab-bar button.active::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab-bar .tab-count { font-size: 8.5px; background: var(--cream-2); border-radius: 99px; padding: 1px 5px; margin-left: 3px; }
.tab-bar button.active .tab-count { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------------- Status dots / badges ---------------- */
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.status-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.status-pill.amber { background: var(--amber-soft); color: #946000; }
.status-pill.orange { background: var(--orange-soft); color: var(--orange-deep); }
.status-pill.blue { background: var(--blue-soft); color: var(--blue); }
.status-pill.purple { background: var(--purple-soft); color: var(--purple); }
.status-pill.cyan { background: var(--cyan-soft); color: var(--cyan); }
.status-pill.green { background: var(--green-soft); color: var(--green); }
.status-pill.red { background: var(--red-soft); color: var(--red); }
.status-pill.gray { background: #f3efe9; color: #8b7b6c; }
.open-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.open-toggle .dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }

/* ---------------- Products ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px; position: relative; transition: box-shadow .15s, border-color .15s; }
.product-card:hover { box-shadow: var(--shadow); border-color: #e6cfb5; }
.product-card .p-top { display: flex; gap: 10px; align-items: flex-start; }
.product-card .p-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.product-card .p-desc { font-size: 9.5px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; min-height: 28px; }
.product-card .p-meta { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 10px; }
.product-card .p-price { font-family: var(--font-num); font-size: 19px; font-weight: 800; color: var(--accent-deep); line-height: 1; }
.product-card .p-price small { font-size: 10px; }
.product-card .p-stock { font-size: 9.5px; color: var(--muted); }
.product-card .p-stock.low { color: var(--red); font-weight: 700; }
.product-card .p-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.product-card .p-foot .spacer { flex: 1; }
.product-card .p-cat { font-size: 8.5px; background: var(--cream); border-radius: 4px; padding: 2px 6px; color: var(--muted); }
.product-card .p-flag { position: absolute; top: -1px; right: 12px; font-size: 8px; background: var(--ink); color: #fff; padding: 2px 6px; border-radius: 0 0 5px 5px; }
.icon-action { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.icon-action:hover { background: var(--cream); color: var(--ink); }
.icon-action.danger:hover { background: var(--red-soft); color: var(--red); }
.icon-action.on { color: var(--green); }
.p-status-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* ---------------- Payment config ---------------- */
.pay-config-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.field-note { display: flex; gap: 7px; background: #fff8ea; border: 1px solid #ffe6bb; border-radius: 9px; padding: 9px 10px; font-size: 9.5px; color: #8b6100; line-height: 1.6; }
.field-note svg { flex: none; margin-top: 1px; }
.pay-mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }
.pay-mode-card { border: 1.5px solid var(--line); border-radius: 11px; padding: 12px; cursor: pointer; transition: all .15s; position: relative; }
.pay-mode-card.active { border-color: var(--accent); background: var(--accent-soft); }
.pay-mode-card b { display: block; font-size: 11.5px; }
.pay-mode-card span { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.pay-mode-card .pm-check { position: absolute; right: 9px; top: 9px; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.pay-mode-card.active .pm-check { background: var(--accent); border-color: var(--accent); }
.pay-mode-card.active .pm-check::after { content: ""; position: absolute; inset: 4px; background: #fff; border-radius: 50%; }
.check-list { display: flex; flex-direction: column; gap: 6px; }
.check-item { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; color: var(--muted); line-height: 1.5; }
.check-item .ci { flex: none; margin-top: 1px; }
.check-item.ok { color: var(--green); }
.check-item.bad { color: var(--red); }
.check-item b { color: var(--ink-2); font-weight: 600; }
.config-status { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; padding: 3px 8px; border-radius: 6px; background: #f3efe9; color: var(--muted); }
.config-status.ready { background: var(--green-soft); color: var(--green); }
.pay-hero { background: var(--ink); border-radius: 16px; padding: 20px; color: #fff; position: relative; overflow: hidden; }
.pay-hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(7,193,96,.3), transparent 65%); right: -40px; top: -60px; }
.pay-hero .ph-icon { width: 42px; height: 42px; border-radius: 12px; background: #07c160; display: flex; align-items: center; justify-content: center; font-size: 23px; margin-bottom: 14px; }
.pay-hero h3 { font-size: 17px; font-weight: 800; }
.pay-hero p { font-size: 10.5px; color: #b3a294; line-height: 1.7; margin-top: 5px; max-width: 340px; }
.pay-hero .fee-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; border: 1px solid rgba(255,255,255,.15); border-radius: 99px; padding: 3px 8px; margin-top: 12px; color: #ffcf9e; }
.pay-hero .ph-badge { position: absolute; right: 18px; bottom: 18px; z-index: 2; font-size: 9px; color: #bba896; }
.help-steps { display: flex; flex-direction: column; gap: 9px; }
.help-step { display: flex; gap: 9px; font-size: 10px; color: var(--muted); line-height: 1.6; }
.help-step .hs-num { width: 17px; height: 17px; border-radius: 50%; background: var(--cream-2); color: var(--ink-2); font-size: 9px; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; }
.help-step b { color: var(--ink-2); }

/* ---------------- Settlement ---------------- */
.balance-card { background: var(--ink); border-radius: 18px; padding: 22px; color: #fff; position: relative; overflow: hidden; }
.balance-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,107,53,.35), transparent 65%); right: -60px; bottom: -100px; }
.role-admin .balance-card::after { background: radial-gradient(circle, rgba(15,159,138,.4), transparent 65%); }
.balance-card .bl { font-size: 10.5px; color: #bba896; }
.balance-card .bv { font-family: var(--font-num); font-size: 38px; font-weight: 800; letter-spacing: -1.2px; margin: 6px 0 3px; }
.balance-card .bv small { font-size: 16px; }
.balance-card .bf { font-size: 9.5px; color: #a89583; display: flex; gap: 10px; flex-wrap: wrap; }
.balance-card .b-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 2; }
.balance-card .btn { height: 34px; font-size: 11px; }
.balance-card .btn-light { background: #fff; color: var(--ink); border: 0; }
.ledger-amount.pos { color: var(--green); font-weight: 700; }
.ledger-amount.neg { color: var(--red); font-weight: 700; }

/* ---------------- Reviews ---------------- */
.review-admin-item { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.review-admin-item:last-child { border-bottom: 0; }
.review-admin-head { display: flex; align-items: center; gap: 8px; }
.review-admin-head b { font-size: 11px; }
.review-admin-head .time { margin-left: auto; font-size: 9px; color: var(--muted); }
.review-admin-text { font-size: 11px; color: var(--ink-2); margin-top: 6px; line-height: 1.6; }
.review-reply-box { display: flex; gap: 6px; margin-top: 8px; }
.review-reply-box .input { height: 34px; font-size: 10.5px; }
.review-reply-box .btn { height: 34px; font-size: 10.5px; }
.merchant-reply { background: #fff7ee; border-radius: 8px; padding: 7px 9px; font-size: 10px; color: var(--ink-2); margin-top: 7px; }

/* ---------------- Notifications ---------------- */
.notify-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.notify-item:last-child { border-bottom: 0; }
.notify-item.unread .ni-title::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; margin-right: 5px; vertical-align: 1px; }
.notify-item .ni-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; flex: none; }
.notify-item .ni-title { font-size: 11px; font-weight: 600; }
.notify-item p { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.55; }
.notify-item .ni-time { font-size: 8.5px; color: var(--muted-2); margin-top: 3px; }

/* ---------------- Settings ---------------- */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-section { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section h4 { font-size: 12px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.emoji-pick:hover { border-color: var(--accent); }
.cover-picker { display: flex; gap: 7px; }
.cover-swatch { width: 44px; height: 30px; border-radius: 7px; border: 2px solid transparent; }
.cover-swatch.active { border-color: var(--ink); }
.tag-editor { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; background: var(--cream); border-radius: 6px; padding: 3px 7px; }
.tag-chip button { color: var(--muted); display: flex; }
.danger-zone { border: 1px solid #f3caca; background: #fffafa; border-radius: 12px; padding: 14px; }
.danger-zone b { font-size: 11px; color: var(--red); }
.danger-zone p { font-size: 9.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }

/* ---------------- Mobile ---------------- */
.sidebar-mask { display: none; }
@media (max-width: 1180px) {
  .stat-grid, .stat-grid.cols-5 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dash-grid.equal, .dash-grid.three { grid-template-columns: 1fr; }
  .pay-config-grid, .settings-grid { grid-template-columns: 1fr; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form-side { min-height: 100vh; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 250px; transform: translateX(-102%);
    transition: transform .25s cubic-bezier(.2,.8,.25,1);
    z-index: 200;
  }
  .sidebar.open { transform: none; }
  .sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(20,14,10,.45); backdrop-filter: blur(2px); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-mask.show { opacity: 1; pointer-events: auto; }
  .topbar .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 14px; height: 58px; }
  .page-body { padding: 16px 14px 40px; }
  .page-title { font-size: 20px; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 13px 14px; border-radius: 13px; }
  .stat-value { font-size: 24px; }
  .stat-icon { width: 26px; height: 26px; border-radius: 8px; }
  .stat-label { font-size: 10px; }
  .stat-foot { font-size: 9px; }
  .top-status { display: none; }
  .table-toolbar { padding: 11px 12px; }
  .search-box { min-width: 150px; flex: 1; }
  .table-toolbar .select { min-width: 92px; }
  .table-panel .data-table th, .table-panel .data-table td { padding: 9px 8px; }
  .pay-mode-cards { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card { padding: 10px; }
  .product-card .p-price { font-size: 16px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .auth-form-side { padding: 26px 20px; align-items: flex-start; }
  .auth-title { font-size: 23px; }
  .stat-grid, .stat-grid.cols-5 { grid-template-columns: 1fr 1fr; }
  .stat-grid.cols-5 .stat-card:last-child { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .page-head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .table-toolbar .spacer { display: none; }
  .table-panel { border-radius: 13px; }
  .bar-chart { height: 150px; gap: 5px; }
  .bar-label { font-size: 7.5px; }
  .topbar-title { font-size: 14px; }
  .topbar-sub { display: none; }
  .auth-card.wide { width: 100%; }
}
