/* 柒柒甄选馆 · 管理后台
 * 设计令牌对齐小程序 uni.scss；主题色 #19a34a（theme-color）
 * 响应式：<600 手机 · 600–900 平板 · ≥900 左侧栏 · ≥1100 列表双列
 */

:root {
  --green: #19a34a;
  --green-d: #16853e;
  --green-2: #2d9d50;
  --green-soft: #eef9f1;
  --orange: #ff5d39;
  --amber: #ef7d38;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --gold: #eab308;
  --danger: #e34d4d;
  --warn: #ef7d38;
  --text: #17231b;
  --text-sub: #4b544f;
  --muted: #8b9490;
  --line: #eef1ef;
  --border: #edf0ee;
  --bg: #f8faf9;
  --white: #ffffff;
  --shadow: 0 6px 20px rgba(30, 55, 42, .07);
  --shadow-up: 0 -4px 16px rgba(30, 55, 42, .06);
  --radius: 14px;
  --radius-lg: 18px;
  --side-w: 220px;
  --topbar-h: 52px;
  --tabbar-h: 58px;
  --nav-h: 46px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
h1, h2, h3, p { margin: 0; }

/* ========== utilities ========== */
.grow { flex: 1; min-width: 0; }
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.small { font-size: 12px; }
.muted { color: var(--muted); }
.sub {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.sub a { color: var(--green-d); }
.price { color: var(--orange); font-weight: 700; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mb0 { margin-bottom: 0 !important; }
.divider {
  height: 1px;
  background: var(--line);
  margin: 12px 0;
  border: 0;
}

/* ========== tags ========== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
  background: #f0f2f1;
  color: var(--text-sub);
}
.tag.green { background: var(--green-soft); color: var(--green-d); }
.tag.gray { background: #f0f2f1; color: #6b736e; }
.tag.orange { background: #fff1ec; color: var(--orange); }
.tag.amber { background: #fff4eb; color: var(--amber); }
.tag.blue { background: #eef4ff; color: #2563eb; }
.tag.red { background: #fdecec; color: var(--danger); }

/* ========== flash ========== */
.flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.flash.ok,
.flash.success { background: var(--green-soft); color: var(--green-d); }
.flash.err,
.flash.error { background: #fdecec; color: #a83232; }
.flash.warn,
.flash.warning { background: #fff4eb; color: #a85a1a; }

/* ========== buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  border: 1px solid transparent;
  transition: background .15s, opacity .15s, transform .1s;
  text-align: center;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { display: flex; width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost {
  background: #fff;
  color: var(--green-d);
  border-color: #cfe8d6;
}
.btn.ghost:active { background: var(--green-soft); }
.btn.danger { background: var(--danger); }
.btn.warn { background: var(--amber); }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.btn-row > form { flex: 1; min-width: 0; }
.btn-row .btn { width: 100%; }

/* ========== forms ========== */
.field { margin-bottom: 12px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}
.field input[type="text"],
.field input[type="password"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(25, 163, 74, .15);
}
.field .hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}
.checkbox-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.checkbox-line .desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ========== cards / lists ========== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.card > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}
.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
}
.empty .ico { font-size: 36px; margin-bottom: 8px; line-height: 1; }
.empty p { font-size: 14px; }

.list { display: flex; flex-direction: column; }
.row-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.row-item:last-child { border-bottom: 0; padding-bottom: 0; }
.row-item:first-child { padding-top: 0; }
.row-item .t { font-size: 14px; font-weight: 600; }
.row-item .s { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.row-item .s.muted { color: var(--muted); }
.row-item .r { text-align: right; flex-shrink: 0; }
.row-item .thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #f4f6f5;
  flex-shrink: 0;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex-shrink: 0; }
.kv .v { text-align: right; word-break: break-all; }

.money-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-sub);
}
.money-row b { color: var(--text); font-weight: 600; }
.money-row.total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}
.money-row.total b { color: var(--orange); font-size: 16px; }

/* ========== filters / search / pager ========== */
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 10px;
  margin-bottom: 2px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: #fff;
  color: var(--text-sub);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.filters a.on {
  background: var(--green-soft);
  color: var(--green-d);
  border-color: #cfe8d6;
  font-weight: 600;
}

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 8px 10px;
  background: transparent;
}
.search-bar button,
.search-bar .btn {
  flex-shrink: 0;
  padding: 8px 14px;
}

.add-bar { margin-bottom: 12px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.pager a {
  color: var(--green-d);
  font-weight: 600;
  padding: 6px 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ========== goods / order cards ========== */
.goods-card-wrap {
  position: relative;
  margin-bottom: 10px;
}
.goods-card-wrap .goods-card {
  margin-bottom: 0;
}
.goods-card-del {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.goods-card,
.stock-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  margin-bottom: 10px;
  color: inherit;
}
a.goods-card:active { background: #fafcfb; }
.g-pic {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: #f4f6f5;
  flex-shrink: 0;
}
.g-pic.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.g-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.g-top b { font-size: 14px; max-width: 100%; }
.g-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.stock-card .field { margin-bottom: 8px; }
.stock-card form .field input,
.stock-card form .field select { padding: 7px 10px; font-size: 13px; }

.order-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.order-row:last-child { border-bottom: 0; padding-bottom: 0; }
.order-row:first-child { padding-top: 0; }
.order-row .t { font-size: 14px; font-weight: 600; }
.order-row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.order-row .r { text-align: right; flex-shrink: 0; }
.order-row .price { margin-top: 4px; font-size: 14px; }

/* ========== image pick ========== */
.img-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #f4f6f5;
  border: 1.5px dashed #d5ddd8;
  overflow: hidden;
  cursor: pointer;
}
.img-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-pick .plus {
  position: absolute;
  font-size: 28px;
  color: var(--muted);
  pointer-events: none;
}
.img-pick img[src]:not([src=""]) + .plus { display: none; }
.img-pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ========== shell: topbar ========== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: calc(var(--topbar-h) + var(--safe-t));
  padding-top: var(--safe-t);
  background: linear-gradient(135deg, var(--green) 0%, var(--green-d) 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(22, 133, 62, .25);
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 14px;
  gap: 10px;
}
.topbar h1 {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.topbar .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: -6px;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  border-radius: 8px;
}
.topbar .back:active { background: rgba(255,255,255,.15); }

.brand-head { flex: 1; min-width: 0; }
.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
}
.brand-sub {
  font-size: 11px;
  opacity: .85;
  margin-top: 2px;
}
.top-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}
.top-bell:active { background: rgba(255,255,255,.28); }

/* ========== shell: side-nav (mobile = horizontal scroll) ========== */
.side-nav {
  position: sticky;
  top: calc(var(--topbar-h) + var(--safe-t));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.side-nav::-webkit-scrollbar { display: none; }
.side-nav .side-brand { display: none; }
.side-nav a {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sub);
  background: #f4f6f5;
  white-space: nowrap;
  line-height: 1.3;
}
.side-nav a.on {
  background: var(--green-soft);
  color: var(--green-d);
  font-weight: 700;
}
.side-nav a.side-out {
  color: var(--danger);
  background: #fdecec;
}

/* ========== shell: content wrap ========== */
.wrap {
  padding: 12px 12px calc(16px + var(--safe-b));
  max-width: 720px;
  margin: 0 auto;
}
body.has-tabbar .wrap {
  padding-bottom: calc(16px + var(--tabbar-h) + var(--safe-b));
}

/* ========== shell: tabbar ========== */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}
.tabbar a svg { display: block; }
.tabbar a.on { color: var(--green); font-weight: 600; }

/* ========== dashboard ========== */
.store-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.store-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: var(--green-soft);
  flex-shrink: 0;
}
.store-name { font-size: 16px; font-weight: 700; }
.store-id { font-size: 12px; color: var(--muted); margin-top: 2px; }

.hero-rev {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.hero-col {
  background: linear-gradient(145deg, #1fb356 0%, var(--green-d) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: 0 8px 20px rgba(22, 133, 62, .22);
}
.hero-col .k { font-size: 12px; opacity: .88; }
.hero-col .v {
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 6px;
  letter-spacing: -.02em;
}
.hero-col .delta { font-size: 11px; opacity: .9; }
.hero-col .delta.up::before { content: "↑ "; }
.hero-col .delta.down::before { content: "↓ "; }
.hero-col .delta.down { opacity: .75; }

.shortcut {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.shortcut a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.shortcut a:active { background: #fafcfb; }
.sc-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.sc-ico.orange { background: #fff1ec; color: var(--orange); }
.sc-ico.green { background: var(--green-soft); color: var(--green-d); }
.sc-ico.teal { background: #e6faf7; color: #0d9488; }
.sc-ico.gold { background: #fef9c3; color: #ca8a04; }

.todo-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}
.todo-3 a {
  padding: 10px 6px;
  border-radius: 10px;
  background: #f7f9f8;
}
.todo-3 b {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.todo-3 b.warn { color: var(--amber); }
.todo-3 span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.spark-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.spark-meta .now {
  font-size: 22px;
  font-weight: 800;
  color: var(--green-d);
}
.spark-meta .chg { font-size: 12px; color: var(--muted); }
.card svg { max-width: 100%; height: auto; }

/* ========== me ========== */
.me-head {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(145deg, #1fb356, var(--green-d));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(22, 133, 62, .22);
}
.me-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
}
.me-name { font-size: 18px; font-weight: 800; }
.me-head .s { color: rgba(255,255,255,.85); margin-top: 4px; font-size: 13px; }

.me-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.me-menu a:last-child { border-bottom: 0; }
.me-menu .mi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-d);
  flex-shrink: 0;
}
.me-menu i {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 16px;
}
.me-logout { margin-top: 8px; background: #fff; color: var(--danger); border: 1px solid #f5c8c8; }

/* ========== report / settle ========== */
.settle-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.settle-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.settle-card .k { font-size: 12px; color: var(--muted); }
.settle-card .v {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--green-d);
}
.settle-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 4px;
  vertical-align: middle;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat {
  background: #f7f9f8;
  border-radius: 10px;
  padding: 12px;
}
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { margin-top: 4px; font-size: 18px; font-weight: 800; }
.stat.green { background: var(--green-soft); }
.stat.green .v { color: var(--green-d); }

/* ========== setting extras ========== */
.shop-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.shop-photos img {
  width: 88px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #f4f6f5;
}
.banner-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  background: #f7f9f8;
  border-radius: 10px;
}
.banner-item img {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}
.slot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.slot-row select {
  flex: 1;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.slot-sep { color: var(--muted); font-size: 13px; }

.card-grid { display: block; }

.receipt {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
  background: #f7f9f8;
  border-radius: 10px;
  padding: 12px;
  color: var(--text-sub);
}

/* ========== login ========== */
body.login-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  padding: 0;
}
.login-art {
  position: relative;
  flex: 0 0 auto;
  min-height: 240px;
  height: 38vh;
  max-height: 340px;
  background: linear-gradient(160deg, #2d9d50 0%, #19a34a 45%, #0f7a38 100%);
  overflow: hidden;
}
.login-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(255,255,255,.18), transparent 70%),
    linear-gradient(to bottom, transparent 50%, rgba(8, 40, 20, .28));
  pointer-events: none;
}
.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 32px 20px 48px;
  text-align: center;
  color: #fff;
}
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255,255,255,.2);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  margin-bottom: 12px;
}
.login-brand h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: .04em;
  text-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.login-brand p {
  margin-top: 6px;
  font-size: 13px;
  opacity: .9;
}
.login-sheet {
  position: relative;
  z-index: 3;
  flex: 1;
  margin-top: -28px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 28px 22px calc(28px + var(--safe-b));
  box-shadow: 0 -8px 28px rgba(30, 55, 42, .08);
}
.login-sheet .field { margin-bottom: 14px; }
.login-sheet .field input {
  padding: 13px 14px;
  font-size: 15px;
  background: #f7f9f8;
  border-color: transparent;
}
.login-sheet .field input:focus {
  background: #fff;
  border-color: var(--green-2);
}
.login-btn {
  margin-top: 8px;
  padding: 13px;
  font-size: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-2), var(--green-d));
  box-shadow: 0 8px 20px rgba(22, 133, 62, .28);
}
.login-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ========== tablet 600–900 ========== */
@media (min-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }

  .shortcut {
    grid-template-columns: repeat(4, 1fr);
  }
  .todo-3 { gap: 12px; }
  .stats { grid-template-columns: repeat(4, 1fr); }

  .hero-rev { gap: 12px; }
  .hero-col .v { font-size: 26px; }

  .settle-2 { gap: 12px; }
  .g-pic { width: 72px; height: 72px; }
}

/* ========== desktop ≥900: left sidebar ========== */
@media (min-width: 900px) {
  body:not(.login-page) {
    padding-left: var(--side-w);
  }

  .side-nav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 70;
    width: var(--side-w);
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 12px 20px;
    background: #123526;
    border-bottom: 0;
    color: #fff;
  }
  .side-nav .side-brand {
    display: block;
    padding: 22px 12px 18px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 12px;
  }
  .side-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    color: rgba(255,255,255,.78);
    background: transparent;
    white-space: normal;
  }
  .side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .side-nav a.on {
    background: rgba(25, 163, 74, .35);
    color: #fff;
    font-weight: 700;
  }
  .side-nav a.side-out {
    margin-top: auto;
    color: #fca5a5;
    background: rgba(227, 77, 77, .15);
  }
  .side-nav a.side-out:hover { background: rgba(227, 77, 77, .28); }

  .tabbar { display: none !important; }
  body.has-tabbar .wrap {
    padding-bottom: calc(16px + var(--safe-b));
  }

  .wrap {
    max-width: 960px;
    padding: 20px 24px 32px;
  }

  /* forms don't stretch endlessly */
  .wrap > .card form,
  .wrap > form .card {
    max-width: 640px;
  }
  .wrap > .card:has(form) {
    max-width: 640px;
  }
}

/* ========== wide ≥1100: dual-column lists ========== */
@media (min-width: 1100px) {
  .wrap {
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
    align-items: start;
  }

  /* full-width chrome / non-list blocks */
  .wrap > .filters,
  .wrap > .search-bar,
  .wrap > .add-bar,
  .wrap > .pager,
  .wrap > .flash,
  .wrap > .store-chip,
  .wrap > .hero-rev,
  .wrap > .shortcut,
  .wrap > .settle-2,
  .wrap > .me-head,
  .wrap > .me-logout,
  .wrap > .me-menu,
  .wrap > .card,
  .wrap > .card-grid,
  .wrap > p,
  .wrap > form {
    grid-column: 1 / -1;
  }

  /* list items sit two-up */
  .wrap > .goods-card-wrap,
  .wrap > .goods-card,
  .wrap > .stock-card {
    grid-column: auto;
    margin-bottom: 0;
  }

  .card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
  }
  .card-grid > .card { margin-bottom: 0; }
}

/* ========== login desktop polish ========== */
@media (min-width: 720px) {
  body.login-page {
    flex-direction: row;
    align-items: stretch;
    background:
      radial-gradient(ellipse 50% 60% at 10% 20%, rgba(45, 157, 80, .18), transparent),
      var(--bg);
  }
  .login-art {
    flex: 1;
    height: auto;
    max-height: none;
    min-height: 100vh;
  }
  .login-sheet {
    flex: 0 0 420px;
    margin-top: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    box-shadow: -8px 0 32px rgba(30, 55, 42, .08);
  }
}

@media (min-width: 1100px) {
  .login-sheet { flex-basis: 460px; padding: 56px 48px; }
}
