:root {
  --green: #2f6b4f;
  --green-dark: #173f2e;
  --green-deep: #102e22;
  --green-soft: #e5efe7;
  --mint: #dceadf;
  --cream: #f7f8f3;
  --orange: #628a63;
  --ink: #202c25;
  --muted: #6b776f;
  --line: #d8e1d9;
  --surface: #ffffff;
  --bg: #f3f6f1;
  --shadow: 0 12px 32px rgba(26, 69, 48, .08);
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); }
h1, h2, h3, .brand-lockup strong { font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: -.035em; }
button { background: var(--green); border-radius: 12px; box-shadow: none; }
button:hover { background: #285e45; transform: translateY(-1px); }
button.secondary { color: var(--green-dark); border-color: #bfd0c2; background: #fff; }
button.danger { background: #fff4f1; color: #a23f34; border-color: #eccac4; }
.shell { max-width: none; }
.muted { color: var(--muted); }
.ui-icon { stroke-width: 1.7; }
.eyebrow { color: #6c8e75; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

/* restrained hand-drawn identity */
.doodle-logo { width: 100%; height: 100%; fill: none; stroke: #214d38; stroke-width: 2.15; stroke-linecap: round; stroke-linejoin: round; }
.doodle-logo .logo-fill { fill: #a8caa9; stroke: none; }
.doodle-house, .doodle-basket { width: 100%; height: 100%; fill: none; stroke: #315b45; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.doodle-wash { fill: #cfe1d1; stroke: none; }
.doodle-accent { stroke: #6f9a72; stroke-width: 6; }
.brand-mark { width: 50px; height: 50px; background: transparent; box-shadow: none; border-radius: 0; }
.brand-mark .doodle-logo { width: 50px; height: 50px; }
.brand-lockup strong { color: var(--green-dark); font-size: 23px; font-weight: 750; }
.brand-lockup small { color: #7c9283; letter-spacing: .13em; }

/* user storefront */
.editorial-header { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.editorial-header .header-inner { height: 78px; max-width: 1220px; }
.location-pill { color: #53655a; background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding-left: 18px; }
.location-pill:hover { color: var(--green-dark); background: transparent; transform: none; }
.desktop-life-nav { gap: 3px; }
.desktop-life-nav :is(button, a) { color: #536159; border-radius: 10px; padding: 9px 12px; }
.desktop-life-nav :is(button, a):hover { color: var(--green-dark); background: var(--green-soft); }
.catalog-page { max-width: 1220px; margin: auto; padding: 34px 24px 120px; }
.catalog-toolbar { display: flex; justify-content: flex-start; margin-bottom: 24px; }
.catalog-title { display: none; }
.catalog-search { position: relative; display: flex; width: min(720px,100%); height: 54px; }
.catalog-search > .ui-icon { position: absolute; left: 18px; top: 16px; color: #6f7d74; }
.catalog-search input { width: 100%; border: 1px solid #cad6cc; background: #fff; border-radius: 14px; padding: 0 112px 0 50px; font-size: 16px; outline: none; box-shadow: 0 5px 18px rgba(33,78,54,.05); }
.catalog-search input:focus { border-color: #76a082; box-shadow: 0 0 0 4px rgba(70,124,87,.1); }
.catalog-search button { position: absolute; right: 5px; top: 5px; min-height: 44px; padding: 7px 22px; border-radius: 10px; }
.catalog-categories { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 34px; }
.catalog-category { min-height: 96px; padding: 16px 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; position: relative; overflow: hidden; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.catalog-category::after { content: ""; position: absolute; width: 72px; height: 72px; right: -31px; bottom: -34px; border: 1px dashed #b9cebd; border-radius: 48% 52% 45% 55%; transform: rotate(-12deg); }
.catalog-category:hover { background: #fbfdf9; border-color: #9eb8a4; box-shadow: var(--shadow); }
.catalog-category.active { color: #fff; background: var(--green-dark); border-color: var(--green-dark); }
.catalog-category strong { font-size: 17px; letter-spacing: -.02em; }
.category-number { color: #668e6e; font-family: ui-monospace, Consolas, monospace; font-size: 19px; font-weight: 700; }
.catalog-category.active .category-number { color: #bcd5bf; }
.category-doodle { width: 34px; height: 34px; }
.catalog-category.active .doodle-logo { stroke: #fff; }
.catalog-category.active .logo-fill { fill: #78a27f; }
.catalog-products { padding-top: 24px; border-top: 1px solid var(--line); }
.catalog-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.catalog-section-title h2 { margin: 0; font-size: 25px; font-weight: 760; }
.catalog-section-title span { color: var(--muted); font-size: 13px; }
.product-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.product-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: none; }
.product-card:hover { transform: translateY(-3px); border-color: #b4c8b8; box-shadow: var(--shadow); }
.product-image { aspect-ratio: 1.25/1; background: #edf3ec; border-bottom: 1px solid var(--line); }
.image-empty .doodle-basket { width: 92px; height: 75px; }
.product-body { padding: 15px; }
.product-name { color: var(--ink); font-size: 18px; font-weight: 720; }
.price { color: var(--green); }
.stock { color: #52685a; background: #edf3ed; }
.product-body button { border-radius: 10px; }
.empty-state { min-height: 260px; background: rgba(255,255,255,.6); border-color: #c9d7cb; border-radius: 16px; }
.empty-visual { width: 100px; height: 82px; margin-bottom: 7px; }
.empty-state strong { color: #607066; }
.admin-return { background: var(--green-dark); }

/* shared user pages */
.topbar { min-height: 68px; padding: 10px max(20px,calc((100% - 1160px)/2)); background: #fff; border-color: var(--line); }
.topbar .brand { color: var(--green-dark); font-weight: 760; }
.content { width: min(100%,1160px); margin: auto; padding: 34px 20px 110px; }
.content > h1, .toolbar h1 { font-size: 30px; }
.card { border-color: var(--line); border-radius: 16px; box-shadow: 0 6px 20px rgba(26,69,48,.045); }
.tabs { padding-bottom: 5px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
.tabs::-webkit-scrollbar { display: none; width: 0; height: 0; }
.chip { white-space: nowrap; color: #617067; border-color: #c8d5ca; background: #fff; }
.chip.active { color: #fff; background: var(--green); }
.order-row { transition: border-color .2s,transform .2s; }
.order-row:hover { border-color: #a9bfad; transform: translateY(-1px); }
.cart-row { align-items: center; }
.total { color: var(--green-dark); font-size: 20px; }
.field input, .field select, .field textarea, .search input, .toolbar input { background: #fff; border-color: #cbd7cd; border-radius: 10px; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus, .toolbar input:focus { border-color: #77a083; box-shadow: 0 0 0 4px rgba(65,119,81,.09); }
.profile-page { max-width: 960px; }
.profile-head { display: flex; align-items: center; gap: 16px; margin: 10px 0 24px; }
.profile-avatar { width: 76px; height: 76px; }
.profile-head h1 { margin: 0; font-size: 32px; }
.profile-head span { color: var(--muted); }
.profile-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 18px; }
.profile-actions button { min-height: 96px; padding: 16px; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.profile-actions button:hover { border-color: #9cb5a1; background: #fbfdf9; }
.profile-actions button > .ui-icon { width: 28px; height: 28px; color: var(--green); }
.profile-actions span { display: flex; flex-direction: column; }
.profile-actions strong { font-size: 19px; }
.profile-actions small { color: var(--muted); font-size: 12px; }
.profile-form { margin: 0; background: #fff; }
.profile-form-actions { display: flex; gap: 10px; }

/* login */
.auth-page { grid-template-columns: 1.05fr minmax(420px,600px); background: var(--bg); }
.auth-intro { background: #dfeade; }
.auth-intro::before, .auth-intro::after { background: transparent; border: 1px dashed #95b09b; }
.auth-life-art { height: 290px; background: transparent; border: 0; box-shadow: none; }
.auth-life-art::after { display: none; }
.auth-life-art .doodle-house { height: 100%; }
.auth-intro h2 { color: var(--green-dark); font-size: 40px; font-weight: 750; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(24,68,45,.11); }
.auth-card h1 { font-size: 36px; }
.primary-wide { background: var(--green-dark); }
.text-button { color: var(--green); }
.text-button:hover { color: var(--green-dark); background: var(--green-soft); }

/* admin and merchant workspaces */
.admin-layout { display: grid; grid-template-columns: 244px minmax(0,1fr); min-height: 100vh; background: #f3f6f1; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 14px; overflow-y: auto; color: #fff; background: var(--green-deep); box-shadow: none; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 9px 20px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.11); }
.admin-brand > .doodle-logo { flex: 0 0 auto; width: 42px; height: 42px; stroke: #fff; }
.admin-brand .logo-fill { fill: #739a79; }
.admin-brand span { display: flex; min-width: 0; flex-direction: column; }
.admin-brand strong { font-size: 17px; }
.admin-brand small { margin-top: 2px; overflow: hidden; color: #abc2b1; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-nav { display: grid; gap: 3px; }
.sidebar button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; margin: 0; padding: 9px 12px; color: #bfd1c3; background: transparent; border-radius: 10px; font-size: 14px; }
.sidebar button .ui-icon { flex: 0 0 auto; width: 19px; height: 19px; }
.sidebar button:hover { color: #fff; background: rgba(255,255,255,.07); transform: none; }
.sidebar button.active { color: var(--green-dark); background: #e8f1e8; box-shadow: none; }
.workspace { min-width: 0; padding: 30px clamp(22px,3vw,44px) 60px; }
.workspace > h1, .workspace .toolbar h1 { margin: 0; color: var(--ink); font-size: 28px; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.workspace-head h1 { margin: 5px 0 7px; font-size: 31px; }
.workspace-head p { margin: 0; color: var(--muted); }
.workspace-head button { display: flex; align-items: center; gap: 7px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.stat { position: relative; min-height: 116px; padding: 19px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: none; }
.stat::after { display: none; }
.stat-label { color: #5d6c62; font-size: 14px; }
.stat strong { display: block; margin-top: 13px; color: var(--green-dark); font-size: 30px; line-height: 1; }
.stat-mark { position: absolute; right: 14px; top: 14px; display: grid; width: 36px; height: 36px; place-items: center; color: #64876c; background: #edf4ed; border-radius: 11px 9px 12px 8px; transform: rotate(2deg); }
.stat-mark .ui-icon { width: 19px; height: 19px; }
.dashboard-actions { margin-top: 28px; }
.dashboard-actions h2 { margin-bottom: 13px; font-size: 20px; }
.dashboard-actions > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dashboard-actions button { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 13px; min-height: 84px; padding: 14px 16px; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.dashboard-actions button:hover { border-color: #99b49f; background: #fbfdf9; }
.dashboard-actions .action-icon { display: grid; width: 40px; height: 40px; place-items: center; color: var(--green); background: var(--green-soft); border-radius: 12px 9px 12px 10px; transform: rotate(-1.5deg); }
.dashboard-actions .action-icon .ui-icon { width: 21px; }
.dashboard-actions button > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.dashboard-actions strong { font-size: 16px; }
.dashboard-actions small { color: var(--muted); font-size: 12px; }
.dashboard-actions b { color: #7a9a81; font-size: 19px; }
.workspace .toolbar { align-items: center; margin-bottom: 17px; }
.workspace .toolbar.card { padding: 14px; }
.table-wrap { margin-top: 17px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
table { min-width: 760px; }
th, td { padding: 13px 14px; font-size: 14px; }
th { position: sticky; top: 0; z-index: 1; color: #607067; background: #edf3ed; font-size: 12px; font-weight: 760; letter-spacing: .02em; }
tbody tr:hover { background: #f8fbf7; }
td button { min-height: 34px; padding: 5px 10px; border-radius: 8px; font-size: 13px; }
.table-empty td { height: 230px; text-align: center; color: var(--muted); }
.table-empty td > .doodle-basket { display: block; width: 82px; height: 68px; margin: 0 auto 8px; }
.modal-bg { background: rgba(13,40,27,.62); backdrop-filter: blur(5px); }
.modal { padding: 24px; background: #fff; border: 1px solid #d4dfd6; border-radius: 18px; box-shadow: 0 24px 75px rgba(12,42,25,.25); }
.modal h2 { margin-top: 0; }
.form-card, .account-panel { max-width: 680px; margin: 0; background: #fff; border-radius: 16px; }
.account-panel { padding: 28px; border: 1px solid var(--line); }
.account-panel h1 { margin: 6px 0; }

@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-layout { grid-template-columns: 210px minmax(0,1fr); }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .editorial-header { padding: 0; }
  .mobile-home-row { height: 68px; padding: 8px 14px; background: #fff; }
  .brand-mark, .brand-mark .doodle-logo { width: 44px; height: 44px; }
  .brand-lockup strong { font-size: 20px; }
  .catalog-page { padding: 20px 12px 96px; }
  .catalog-toolbar { display: block; margin-bottom: 18px; }
  .catalog-search { height: 52px; }
  .catalog-search button { min-height: 42px; }
  .catalog-categories { display: flex; gap: 9px; margin: 0 -12px 26px; padding: 0 12px 4px; overflow-x: auto; scrollbar-width: none; }
  .catalog-category { flex: 0 0 104px; min-height: 84px; padding: 12px; border-radius: 12px; }
  .catalog-category strong { font-size: 15px; }
  .category-number { font-size: 16px; }
  .category-doodle { width: 28px; height: 28px; }
  .catalog-section-title h2 { font-size: 22px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .product-body { padding: 11px; }
  .product-name { font-size: 16px; }
  .image-empty .doodle-basket { width: 72px; height: 60px; }
  .topbar { min-height: 62px; padding: 8px 13px; }
  .topbar > .secondary { display: none; }
  .content { padding: 22px 12px 92px; }
  .content > h1, .toolbar h1 { font-size: 25px; }
  .profile-actions { grid-template-columns: 1fr; gap: 9px; }
  .profile-actions button { min-height: 76px; }
  .profile-head h1 { font-size: 27px; }
  .bottom-nav { border-color: #d9e3da; box-shadow: 0 -8px 24px rgba(28,68,45,.07); }
  .bottom-nav :is(button, a) { border-radius: 11px; }
  .bottom-nav :is(button, a).active { color: var(--green-dark); background: var(--green-soft); }
  .admin-return { bottom: 80px; background: var(--green-dark); }
  .auth-card { border-radius: 16px; }
  .admin-layout { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 8; display: block; width: 100%; height: auto; padding: 8px; overflow: hidden; background: var(--green-deep); }
  .admin-brand { display: none; }
  .sidebar-nav { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .sidebar button { flex: 0 0 auto; width: auto; min-height: 40px; padding: 7px 10px; white-space: nowrap; }
  .sidebar button .ui-icon { width: 17px; height: 17px; }
  .workspace { padding: 20px 12px 40px; }
  .workspace-head { align-items: flex-start; }
  .workspace-head h1 { font-size: 27px; }
  .workspace-head p { font-size: 13px; }
  .workspace-head button { padding: 7px 10px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .stat { min-height: 96px; padding: 14px; }
  .stat strong { font-size: 25px; }
  .stat-mark { width: 31px; height: 31px; }
  .dashboard-actions > div { grid-template-columns: 1fr; }
  .dashboard-actions button { min-height: 76px; }
  .table-wrap { margin-top: 12px; border-radius: 12px; }
}

/* light green handwritten doodle edition */
:root {
  --green: #78a982;
  --green-dark: #416b4d;
  --green-deep: #dcebd9;
  --green-soft: #edf5e9;
  --mint: #e3f0df;
  --cream: #f7fbf4;
  --orange: #78a982;
  --ink: #32483a;
  --muted: #718076;
  --line: #cdddc9;
  --surface: #fbfdf9;
  --bg: #f1f7ee;
  --shadow: 0 12px 30px rgba(69, 107, 77, .08);
}

body,
button,
input,
select,
textarea,
table {
  font-family: "KaiTi", "STKaiti", "FangSong", "Noto Serif SC", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 16px 16px, rgba(102, 151, 111, .08) 1px, transparent 1.5px),
    linear-gradient(112deg, transparent 49.7%, rgba(104, 150, 111, .035) 50%, transparent 50.3%);
  background-size: 32px 32px, 170px 170px;
}

h1, h2, h3, .brand-lockup strong, .admin-brand strong, .product-name, .profile-actions strong {
  font-family: "KaiTi", "STKaiti", "FangSong", serif;
  font-weight: 700;
  letter-spacing: .015em;
}

.doodle-logo { stroke: #4e7959; }
.doodle-logo .logo-fill { fill: #c4dfbd; }
.doodle-house, .doodle-basket { stroke: #587d60; }
.doodle-wash { fill: #d9ead4; }
.doodle-accent { stroke: #83ae86; }

button {
  background: #78a982;
  border-radius: 13px 10px 14px 11px;
}
button:hover { background: #699873; }
button.secondary { color: #446a4d; background: #f9fcf7; border-color: #b9d0b7; }
.card,
.product-card,
.profile-actions button,
.table-wrap,
.modal,
.auth-card,
.stat,
.dashboard-actions button,
.account-panel {
  background: rgba(253,255,251,.94);
  border-color: #cbdcc8;
  border-style: dashed;
  border-radius: 17px 13px 18px 14px;
}

.editorial-header,
.topbar {
  background: rgba(244,250,241,.94);
  border-bottom-style: dashed;
}
.location-pill { border-left-style: dashed; }
.brand-lockup strong, .topbar .brand { color: #41694b; }
.brand-lockup small { color: #7f9a83; }
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.topbar-brand > .doodle-logo { width: 38px; height: 38px; }

.catalog-search input,
.field input,
.field select,
.field textarea,
.search input,
.toolbar input {
  background: #fbfef9;
  border-color: #bfd3bc;
  border-style: dashed;
  border-radius: 14px 11px 15px 12px;
}
.catalog-category {
  color: #3f5946;
  background: rgba(250,253,247,.94);
  border-color: #c3d8bf;
  border-style: dashed;
  border-radius: 16px 12px 17px 13px;
  transform: rotate(-.12deg);
}
.catalog-category:nth-child(even) { transform: rotate(.12deg); }
.catalog-category::after { border-color: #aecaab; }
.catalog-category.active {
  color: #365840;
  background: #dcebd7;
  border-color: #7fa586;
}
.catalog-category.active .category-number { color: #547e5e; }
.catalog-category.active .doodle-logo { stroke: #426b4d; }
.catalog-category.active .logo-fill { fill: #a9cea6; }
.catalog-products { border-top-style: dashed; }
.product-image { background: #eaf4e6; border-bottom-style: dashed; }
.empty-state { background: rgba(248,252,245,.72); border-style: dashed; }
.bottom-nav { background: #f8fcf6; border-top-style: dashed; }
.bottom-nav :is(button, a).active { color: #3f6a49; background: #dfeeda; }

.auth-page { background: #f1f7ee; }
.auth-intro { background: #e2efdd; }
.auth-intro::before, .auth-intro::after { border-color: #9fbe9d; border-style: dashed; }
.auth-card { box-shadow: 0 24px 65px rgba(75,111,78,.12); }
.primary-wide { background: #648f6e; }

.admin-layout { background: rgba(241,247,238,.96); }
.sidebar {
  color: #37533e;
  background-color: #dcebd9;
  background-image: radial-gradient(circle at 11px 11px, rgba(72,112,79,.1) 1px, transparent 1.4px);
  background-size: 22px 22px;
  border-right: 1px dashed #a9c3a7;
}
.admin-brand { border-bottom-style: dashed; border-bottom-color: #aec6ab; }
.admin-brand > .doodle-logo { stroke: #4b7555; }
.admin-brand .logo-fill { fill: #b3d2ae; }
.admin-brand strong { color: #355b40; }
.admin-brand small { color: #6f8d74; }
.sidebar button { color: #536d59; }
.sidebar button:hover { color: #35583f; background: rgba(255,255,255,.55); }
.sidebar button.active {
  color: #355d41;
  background: #f9fcf7;
  border: 1px dashed #8eaf8e;
  transform: rotate(-.2deg);
}
.workspace-head {
  position: relative;
  padding-bottom: 15px;
  border-bottom: 1px dashed #b9cfb6;
}
.workspace-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 88px;
  height: 7px;
  border-bottom: 2px solid #8caf8d;
  border-radius: 50%;
  transform: rotate(-1.2deg);
}
.stat-mark,
.dashboard-actions .action-icon {
  color: #567e5e;
  background: #e1efdd;
  border: 1px dashed #abc6aa;
}
.stat strong { color: #466d50; }
.dashboard-actions button:hover { background: #f7fcf5; }
.table-wrap { border-style: dashed; }
th {
  color: #58705e;
  background: #e5f0e1;
  border-bottom-style: dashed;
}
td { border-bottom-style: dashed; }
.modal-bg { background: rgba(55,84,60,.48); }

@media (max-width: 760px) {
  .mobile-home-row { background: #f5faf2; }
  .sidebar {
    background-color: #dcebd9;
    border-right: 0;
    border-bottom: 1px dashed #a8c3a6;
  }
  .sidebar button { color: #4b6852; }
  .sidebar button.active { background: #f9fcf7; }
  .topbar-brand > .doodle-logo { width: 34px; height: 34px; }
}

/* soft contrast accents */
:root {
  --accent-cream: #f5eac6;
  --accent-peach: #efd9cb;
  --accent-blue: #dce9eb;
  --accent-lilac: #e8e0ed;
  --accent-coral: #bd765f;
}

.doodle-logo .logo-fill { fill: #f0d7b8; }
.doodle-wash { fill: #efd9cb; }
.doodle-accent { stroke: #bd765f; }

.catalog-category:nth-child(2):not(.active) { background: #faf3da; border-color: #dfcc91; }
.catalog-category:nth-child(3):not(.active) { background: #f8e9e0; border-color: #dbbbaa; }
.catalog-category:nth-child(4):not(.active) { background: #eaf3f3; border-color: #b9d0d2; }
.catalog-category:nth-child(2):not(.active) .category-number { color: #9a7a2f; }
.catalog-category:nth-child(3):not(.active) .category-number { color: #a96651; }
.catalog-category:nth-child(4):not(.active) .category-number { color: #527f83; }
.catalog-category.active {
  color: #fff;
  background: #527e5e;
  border-color: #3f684b;
}
.catalog-category.active .category-number { color: #dcebd9; }
.catalog-category.active .doodle-logo { stroke: #fff; }
.catalog-category.active .logo-fill { fill: #d9b58f; }

.product-card:nth-child(4n+1) .product-image { background: #e8f2e5; }
.product-card:nth-child(4n+2) .product-image { background: #faf0d2; }
.product-card:nth-child(4n+3) .product-image { background: #f7e6dc; }
.product-card:nth-child(4n+4) .product-image { background: #e7f0f1; }
.price { color: #a85f49; }
.stock { color: #516c58; background: #e5f0e2; }

.stat-0 { border-top: 3px solid #82ad89; }
.stat-1 { border-top: 3px solid #d8b65f; }
.stat-2 { border-top: 3px solid #74a4a7; }
.stat-3 { border-top: 3px solid #c98b73; }
.stat-4 { border-top: 3px solid #9585a7; }
.stat-5 { border-top: 3px solid #7fa17c; }
.stat-0 .stat-mark { color: #557d5e; background: #e1efdd; }
.stat-1 .stat-mark { color: #8e7027; background: #f7edcc; border-color: #ddc983; }
.stat-2 .stat-mark { color: #537d81; background: #e3eff0; border-color: #b6d0d2; }
.stat-3 .stat-mark { color: #9d614d; background: #f5e3d9; border-color: #dcbaa9; }
.stat-4 .stat-mark { color: #786887; background: #ece6f0; border-color: #cfc1d7; }

.dashboard-actions button:nth-child(2) .action-icon { color: #9a644f; background: #f4e1d7; border-color: #dbb5a3; }
.dashboard-actions button:nth-child(3) .action-icon { color: #587f83; background: #e2eef0; border-color: #b6cfd1; }
.dashboard-actions button:nth-child(4) .action-icon { color: #8e712d; background: #f6eccb; border-color: #ddc989; }

.profile-actions button:nth-child(1) { background: #faf3da; border-color: #dfcc91; }
.profile-actions button:nth-child(2) { background: #eaf3f3; border-color: #b9d0d2; }
.profile-actions button:nth-child(3) { background: #f8e9e0; border-color: #dbbbaa; }
.profile-actions button:nth-child(1) > .ui-icon { color: #96752b; }
.profile-actions button:nth-child(2) > .ui-icon { color: #527f83; }
.profile-actions button:nth-child(3) > .ui-icon { color: #a96651; }

.auth-intro { background: #e3efdf; }
.auth-intro .doodle-wash { fill: #efd7c7; }
.auth-card { border-top: 4px solid #d6b25e; }
.sidebar button.active { border-color: #d3b76e; box-shadow: inset 4px 0 0 #d3b76e; }
.workspace-head::after { border-bottom-color: #bd765f; }
.admin-return { background: #527e5e; border: 1px solid #385f45; }
.bottom-nav { grid-template-columns: repeat(5,1fr); }

/* unified logo and title scale */
:root {
  --logo-size: 44px;
  --brand-title-size: 22px;
  --page-title-size: 28px;
  --section-title-size: 20px;
}

.brand-mark,
.brand-mark .doodle-logo,
.admin-brand > .doodle-logo,
.topbar-brand > .doodle-logo,
.profile-avatar {
  width: var(--logo-size);
  height: var(--logo-size);
  flex: 0 0 var(--logo-size);
}

.brand-lockup strong,
.admin-brand strong,
.topbar .brand,
.topbar-brand span {
  font-family: "KaiTi", "STKaiti", "FangSong", serif;
  font-size: var(--brand-title-size);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .015em;
}

.workspace > h1,
.workspace .toolbar h1,
.workspace-head h1,
.content > h1,
.toolbar h1,
.profile-head h1,
.auth-card h1 {
  font-family: "KaiTi", "STKaiti", "FangSong", serif;
  font-size: var(--page-title-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .015em;
}

.catalog-section-title h2,
.dashboard-actions h2,
.profile-form h2,
.workspace > h2,
.content > h2,
.modal h2 {
  font-family: "KaiTi", "STKaiti", "FangSong", serif;
  font-size: var(--section-title-size);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .015em;
}

/* 商城总览 */
.overview-head { margin-bottom: 18px; }
.overview-filters { display: grid; grid-template-columns: repeat(6,minmax(120px,1fr)); gap: 12px; padding: 16px; margin-bottom: 18px; background: #f8fbf5; border: 1px dashed #abc2ae; border-radius: 18px 15px 19px 16px; box-shadow: 0 8px 24px rgba(34,78,47,.045); }
.overview-filter { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.overview-filter > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.overview-filter input, .overview-filter select { width: 100%; min-height: 43px; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid #c8d8ca; border-radius: 11px 9px 12px 10px; }
.overview-filter input:focus, .overview-filter select:focus { outline: 0; border-color: #6f9a79; box-shadow: 0 0 0 4px rgba(82,139,96,.1); }
.overview-filter-actions { display: flex; grid-column: 1/-1; justify-content: flex-end; gap: 9px; padding-top: 2px; }
.overview-stats { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.overview-stat { position: relative; min-height: 112px; padding: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px 13px 17px 14px; box-shadow: 0 7px 20px rgba(36,78,49,.045); }
.overview-stat:nth-child(2), .overview-stat:nth-child(6) { background: #fff8f1; border-color: #ecd5c8; }
.overview-stat:nth-child(3) { background: #f2f8f9; border-color: #cddfe1; }
.overview-stat:nth-child(4) { background: #fffbed; border-color: #eadcae; }
.overview-stat span { display: block; color: var(--muted); font-size: 13px; }
.overview-stat strong { display: block; margin-top: 12px; color: var(--ink); font-size: clamp(23px,2.2vw,31px); line-height: 1; }
.overview-stat > .ui-icon { position: absolute; right: 12px; bottom: 9px; width: 32px; height: 32px; color: #8bae92; opacity: .38; transform: rotate(-7deg); }
.analysis-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.analysis-card { min-width: 0; min-height: 310px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px 15px 19px 16px; box-shadow: 0 8px 25px rgba(32,75,45,.045); }
.trend-card { grid-column: 1/-1; min-height: 355px; }
.analysis-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.analysis-title h2 { margin: 0 0 4px; color: var(--ink); font-size: 19px; }
.analysis-title p { margin: 0; color: var(--muted); font-size: 13px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: 12px; }
.chart-legend span::before { content: ''; display: inline-block; width: 13px; height: 4px; margin-right: 6px; vertical-align: 2px; border-radius: 3px; }
.chart-legend .sales-key::before { height: 8px; background: #b9d5bd; }
.chart-legend .orders-key::before { background: #3f7550; }
.trend-chart { position: relative; height: 255px; padding-bottom: 27px; }
.trend-chart svg { display: block; width: 100%; height: 220px; overflow: visible; }
.grid-line { stroke: #e4ece4; stroke-width: 1; stroke-dasharray: 4 5; }
.sales-bar { fill: #bfd9c2; opacity: .85; }
.orders-line { fill: none; stroke: #3f7550; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.orders-dot { fill: #fff; stroke: #3f7550; stroke-width: 2; vector-effect: non-scaling-stroke; }
.trend-labels { position: absolute; right: 3.7%; bottom: 2px; left: 3.7%; height: 20px; }
.trend-labels span { position: absolute; color: #718077; font-size: 11px; white-space: nowrap; transform: translateX(-50%); }
.trend-max { position: absolute; top: 3px; left: 34px; display: flex; gap: 13px; color: #78877d; font-size: 11px; }
.ranking-chart { display: flex; flex-direction: column; gap: 14px; }
.ranking-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.ranking-label span { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ranking-label small { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.ranking-track { height: 9px; overflow: hidden; background: #edf2ec; border-radius: 8px; }
.ranking-track i { display: block; min-width: 3px; height: 100%; border-radius: 8px 6px 9px 7px; }
.chart-empty { display: flex; min-height: 205px; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); font-size: 13px; }
.chart-empty .doodle-basket { width: 88px; height: 72px; opacity: .45; }

@media (max-width: 1180px) {
  .overview-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .overview-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .overview-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 13px; }
  .overview-filter-actions { justify-content: stretch; }
  .overview-filter-actions button { flex: 1; }
  .overview-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .analysis-grid { grid-template-columns: 1fr; }
  .trend-card { grid-column: auto; }
  .analysis-card { min-height: 280px; padding: 15px; }
  .ranking-label { align-items: flex-start; flex-direction: column; gap: 2px; }
}

@media (max-width: 760px) {
  :root {
    --logo-size: 40px;
    --brand-title-size: 20px;
    --page-title-size: 25px;
    --section-title-size: 19px;
  }
}

/* multi-select data management */
.batch-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-top: 16px;
  padding: 8px 12px;
  color: #64736a;
  background: rgba(250,253,247,.9);
  border: 1px dashed #bfd2bc;
  border-radius: 14px 11px 14px 12px;
}
.batch-toolbar button { min-height: 34px; padding: 5px 13px; }
.batch-toolbar button:disabled { color: #9aa69d; background: #edf1eb; border-color: #d9e1d7; }
.select-cell { width: 46px; min-width: 46px; text-align: center; }
.select-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #668f70;
  cursor: pointer;
}
.batch-toolbar + .table-wrap { margin-top: 8px; }

@media (max-width: 760px) {
  .batch-toolbar { position: sticky; left: 0; min-width: 100%; font-size: 13px; }
}

/* 统一分页与无横向滚动表格 */
html, body { max-width: 100%; overflow-x: clip; }
.workspace { max-width: 100%; overflow-x: hidden; }
.table-wrap { width: 100%; overflow: hidden; }
.table-wrap table { width: 100%; min-width: 0; table-layout: fixed; }
.table-wrap th, .table-wrap td { padding: 11px 9px; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.table-wrap td:last-child { white-space: normal; }
.table-wrap td button { max-width: 100%; margin: 2px; white-space: normal; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; margin-top: 10px; padding: 8px 12px; color: var(--muted); background: rgba(250,253,247,.92); border: 1px dashed #bfd2bc; border-radius: 14px 11px 14px 12px; font-size: 13px; }
.pagination > div { display: flex; align-items: center; gap: 10px; }
.pagination strong { color: var(--ink); font-size: 13px; white-space: nowrap; }
.pagination button { min-height: 34px; padding: 5px 12px; }
.pagination button:disabled { color: #9aa69d; background: #edf1eb; border-color: #d9e1d7; }
.sidebar-nav, .catalog-categories, .category-strip, .tabs, .timeline { scrollbar-width: none; -ms-overflow-style: none; }
.sidebar-nav::-webkit-scrollbar, .catalog-categories::-webkit-scrollbar, .category-strip::-webkit-scrollbar, .tabs::-webkit-scrollbar, .timeline::-webkit-scrollbar { display: none; width: 0; height: 0; }

@media (max-width: 760px) {
  .table-wrap th, .table-wrap td { padding: 8px 4px; font-size: 11px; }
  .table-wrap td button { min-height: 31px; padding: 4px 5px; font-size: 10px; }
  .select-cell { width: 32px; min-width: 32px; }
  .select-cell input[type="checkbox"] { width: 15px; height: 15px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination > div { justify-content: space-between; }
  .pagination button { flex: 1; }
}

/* warm, formal community palette */
:root {
  --green: #477a59;
  --green-dark: #2c5940;
  --green-deep: #244a35;
  --green-soft: #dce8d9;
  --mint: #cbdcc7;
  --cream: #f3eadc;
  --orange: #b97555;
  --ink: #263a2d;
  --muted: #667268;
  --line: #b9c7b7;
  --surface: #fffdf8;
  --bg: #e6ecdf;
  --shadow: 0 10px 26px rgba(43,72,50,.13);
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(207,220,199,.72), rgba(241,234,220,.56) 48%, rgba(220,230,213,.76)),
    radial-gradient(circle at 82% 12%, rgba(183,119,84,.09), transparent 28%);
  background-attachment: fixed;
  background-size: cover, cover;
  background-repeat: no-repeat;
}

button { background: var(--green); border-color: #3b694c; color: #fff; box-shadow: 0 4px 10px rgba(39,79,53,.13); }
button:hover { background: #37694a; box-shadow: 0 6px 14px rgba(39,79,53,.18); }
button.secondary { color: var(--green-dark); background: #fffaf1; border-color: #aebfae; }
button.danger { color: #8d4035; background: #f8e7df; border-color: #d6aaa0; }

.card,
.product-card,
.profile-actions button,
.table-wrap,
.modal,
.auth-card,
.stat,
.account-panel,
.analysis-card,
.overview-stat {
  background: var(--surface);
  border-color: var(--line);
  border-style: solid;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.editorial-header,
.topbar,
.bottom-nav {
  background: rgba(250,247,238,.96);
  border-color: #b8c5b5;
  border-style: solid;
  box-shadow: 0 5px 18px rgba(45,74,52,.09);
}
.location-pill { border-left-style: solid; border-left-color: #aebcac; }
.brand-lockup strong, .topbar .brand { color: #254e37; }
.brand-lockup small { color: #667c6b; }
.doodle-logo { stroke: #315f43; }
.doodle-logo .logo-fill { fill: #dfb98d; }
.doodle-house, .doodle-basket { stroke: #486b50; }
.doodle-wash { fill: #e0bba1; }
.doodle-accent { stroke: #ad6c50; }

.catalog-search input,
.field input,
.field select,
.field textarea,
.search input,
.toolbar input,
.overview-filter input,
.overview-filter select {
  color: var(--ink);
  background: #fffdf8;
  border-color: #aebdac;
  border-style: solid;
  border-radius: 11px;
  box-shadow: inset 0 1px 2px rgba(42,70,48,.05);
}
.catalog-search input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.overview-filter input:focus,
.overview-filter select:focus {
  border-color: #527f61;
  box-shadow: 0 0 0 3px rgba(69,121,87,.15);
}

.catalog-category {
  color: #314d39;
  background: #fffaf0;
  border-color: #b5c4b2;
  border-style: solid;
  border-radius: 15px;
  box-shadow: 0 5px 14px rgba(45,75,52,.08);
  transform: none;
}
.catalog-category:nth-child(even) { transform: none; }
.catalog-category::after { border: 0; background: rgba(193,151,103,.16); }
.catalog-category:nth-child(2):not(.active) { background: #f2e5bd; border-color: #c9ad63; }
.catalog-category:nth-child(3):not(.active) { background: #efd4c5; border-color: #c99880; }
.catalog-category:nth-child(4):not(.active) { background: #d8e7e7; border-color: #93b6b8; }
.catalog-category.active { color: #fff; background: #365f45; border-color: #274b35; box-shadow: 0 7px 16px rgba(38,79,52,.2); }
.catalog-products { border-top-color: #aebdac; border-top-style: solid; }
.product-card { box-shadow: 0 7px 20px rgba(43,72,50,.11); }
.product-image { border-bottom-color: #b9c7b7; border-bottom-style: solid; }
.empty-state { color: #5b685e; background: #f7f1e7; border: 1px solid #b9c6b6; box-shadow: inset 0 0 0 4px rgba(255,255,255,.4); }

.auth-page { background: linear-gradient(120deg,#cbdcc7 0%,#e4eadb 50%,#f3eadc 50%,#f8f2e8 100%); }
.auth-intro { background: #c8d9c4; }
.auth-intro::before, .auth-intro::after { background: rgba(183,117,82,.14); border: 1px solid #91aa91; }
.auth-card { border-top: 5px solid #bc8a53; box-shadow: 0 26px 60px rgba(44,71,49,.2); }

.admin-layout { background: transparent; }
.sidebar {
  color: #fff;
  background: linear-gradient(180deg,#244a35 0%,#315b41 58%,#294f39 100%);
  background-image: linear-gradient(180deg,#244a35 0%,#315b41 58%,#294f39 100%);
  border-right: 1px solid #1c3b2a;
  box-shadow: 8px 0 24px rgba(30,61,41,.16);
}
.admin-brand { border-bottom: 1px solid rgba(255,255,255,.2); }
.admin-brand > .doodle-logo { stroke: #f4ead9; }
.admin-brand .logo-fill { fill: #c99565; }
.admin-brand strong { color: #fff9ed; }
.admin-brand small { color: #bfd0c1; }
.sidebar button { color: #d7e2d7; }
.sidebar button:hover { color: #fff; background: rgba(255,255,255,.11); }
.sidebar button.active {
  color: #244a35;
  background: #f2e7d5;
  border: 1px solid #d4bc94;
  border-radius: 11px;
  box-shadow: inset 4px 0 0 #b97855, 0 5px 12px rgba(17,43,28,.18);
  transform: none;
}

.workspace-head { border-bottom: 1px solid #aabaaa; }
.workspace-head::after { border-bottom-color: #ad694d; }
.overview-filters {
  background: #d8e4d3;
  border: 1px solid #9eb19d;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(42,71,48,.11);
}
.overview-stat { border-width: 1px; box-shadow: 0 7px 18px rgba(43,72,50,.11); }
.overview-stat:nth-child(1), .overview-stat:nth-child(5) { background: #f7fbf3; }
.overview-stat:nth-child(2), .overview-stat:nth-child(6) { background: #f4e4d8; border-color: #d8b6a3; }
.overview-stat:nth-child(3) { background: #dfecef; border-color: #aec8cc; }
.overview-stat:nth-child(4) { background: #f2e7bf; border-color: #d4bf77; }
.analysis-card { box-shadow: 0 8px 22px rgba(42,70,48,.12); }

.batch-toolbar,
.pagination {
  color: #536158;
  background: #e0e8d9;
  border: 1px solid #a8b8a5;
  border-radius: 12px;
}
.table-wrap { border-style: solid; box-shadow: 0 8px 20px rgba(42,70,48,.11); }
.table-wrap th, th { color: #294735; background: #cfddca; border-bottom: 1px solid #aabaaa; }
.table-wrap td, td { border-bottom: 1px solid #cbd4c8; }
tbody tr:nth-child(even) { background: #f5f2e9; }
tbody tr:hover { background: #e7eee1; }
.modal-bg { background: rgba(31,51,37,.64); }

@media (max-width: 760px) {
  .mobile-home-row { background: #e0e9d9; }
  .sidebar { background: #294f39; border-bottom: 1px solid #1c3b2a; }
  .sidebar button { color: #d8e4d9; }
  .sidebar button.active { color: #244a35; background: #f2e7d5; }
  .workspace { background: rgba(230,236,223,.78); }
}

/* compact visual category cards */
.catalog-categories { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 26px; }
.catalog-category {
  min-height: 68px;
  padding: 10px 12px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
}
.catalog-category::after { width: 48px; height: 48px; right: -22px; bottom: -25px; }
.category-visual {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: #476f52;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(71,108,80,.25);
  border-radius: 12px 9px 13px 10px;
}
.category-emoji { display: inline-grid; width: 32px; height: 32px; place-items: center; font-family: "Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif; font-size: 28px; line-height: 1; }
.category-home .doodle-logo { width: 32px; height: 32px; }
.category-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.catalog-category strong { overflow: hidden; font-size: 16px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.category-copy small { color: #66766b; font-size: 11px; line-height: 1; }
.category-number { color: #66766b; font-family: ui-monospace,Consolas,monospace; font-size: 11px; font-weight: 700; }
.catalog-category.active .category-visual { color: #fff; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.38); }
.catalog-category.active .category-copy small, .catalog-category.active .category-number { color: #dce9dc; }
.catalog-category:nth-child(2):not(.active) .category-visual { color: #8a6925; }
.catalog-category:nth-child(3):not(.active) .category-visual { color: #9a5f48; }
.catalog-category:nth-child(4):not(.active) .category-visual { color: #4b7a7d; }

@media (max-width: 760px) {
  .catalog-categories {
    display: flex;
    margin: 0 -12px 18px;
    padding: 0 12px 4px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .catalog-categories::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .catalog-category { flex: 0 0 126px; min-width: 126px; min-height: 50px; padding: 6px 9px; gap: 7px; scroll-snap-align: start; }
  .category-visual { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px 8px 11px 9px; }
  .category-emoji, .category-home .doodle-logo { width: 26px; height: 26px; }
  .category-emoji { font-size: 23px; }
  .catalog-category strong { font-size: 13px; }
  .catalog-category .category-copy small { display: none; }
}

/* multicolor brand and category marks */
.doodle-logo { stroke: none; }
.doodle-logo .logo-fill { fill: #e4b37c; stroke: none; }
.doodle-logo .logo-house { fill: none; stroke: #2f6546; stroke-width: 2.35; stroke-linecap: round; stroke-linejoin: round; }
.doodle-logo .logo-door { fill: #f1cf74; stroke: #8b6826; stroke-width: 2; stroke-linejoin: round; }
.doodle-logo .logo-accent { fill: none; stroke: #bd674b; stroke-width: 2.5; stroke-linecap: round; }
.admin-brand > .doodle-logo { stroke: none; }
.admin-brand .logo-fill { fill: #d99a62; }
.admin-brand .logo-house { stroke: #fff5df; }
.admin-brand .logo-door { fill: #efc96d; stroke: #7f5c20; }
.admin-brand .logo-accent { stroke: #ef8a69; }
.catalog-category.active .category-home .doodle-logo { stroke: none; }
.catalog-category.active .category-home .logo-fill { fill: #e2a66e; }
.catalog-category.active .category-home .logo-house { stroke: #fff; }
.catalog-category.active .category-home .logo-door { fill: #f3d373; stroke: #7b5a20; }
.catalog-category.active .category-home .logo-accent { stroke: #ff9d77; }

/* consistent modal structure and actions */
.modal-bg { padding: 20px; }
.modal {
  display: flex;
  width: min(640px,100%);
  max-height: 90vh;
  padding: 0;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid #c4cec1;
  background: #f1eadf;
}
.modal-head h2 { margin: 0; }
.modal-body {
  min-height: 0;
  padding: 20px 22px;
  overflow-y: auto;
}
.modal-actions {
  display: flex;
  padding: 14px 22px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #c4cec1;
  background: #eef3e9;
}
.modal-actions > button { min-width: 92px; margin: 0; }
.modal-actions > .secondary { order: 1; }
.modal-actions > button:not(.secondary) { order: 2; }

@media (max-width: 760px) {
  .modal-bg { padding: 10px; }
  .modal { max-height: calc(100vh - 20px); }
  .modal-head { padding: 17px 16px 12px; }
  .modal-body { padding: 16px; }
  .modal-actions { padding: 12px 16px; }
  .modal-actions > button { min-width: 0; flex: 1; }
}

/* category logo selector */
.category-icon-picker {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}
.category-icon-choice {
  display: flex;
  min-width: 0;
  padding: 10px 6px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #344d3c;
  background: #f7f3ea;
  border: 1px solid #c8d2c3;
  box-shadow: none;
}
.category-icon-choice:hover { border-color: #6d8c72; background: #edf3e8; }
.category-icon-choice.active { color: #fff; background: #38694b; border-color: #38694b; }
.category-icon-choice .category-visual { width: 46px; height: 46px; flex-basis: 46px; }
.category-icon-choice > span:last-child { overflow: hidden; max-width: 100%; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.category-table-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #4c7458;
  background: #edf3e8;
  border-radius: 12px 9px 13px 10px;
}

/* category drawer, emoji library and drag sorting */
.drawer-bg {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(25,43,31,.58);
  backdrop-filter: blur(3px);
}
.drawer {
  display: flex;
  width: min(540px,100%);
  height: 100%;
  flex-direction: column;
  background: #fbfcf8;
  border-left: 1px solid #9fb1a1;
  box-shadow: -24px 0 60px rgba(20,44,28,.22);
  animation: drawer-in .22s ease-out;
}
@keyframes drawer-in { from { transform: translateX(32px); opacity: .65; } to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  display: flex;
  padding: 22px 24px 17px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #e8f0df;
  border-bottom: 1px solid #b9c8b5;
}
.drawer-head span { color: #637568; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.drawer-head h2 { margin: 3px 0 0; font-size: 24px; }
.drawer-body { min-height: 0; padding: 22px 24px; overflow-y: auto; }
.drawer-actions { display: flex; padding: 15px 24px; justify-content: flex-end; gap: 10px; background: #eef3e9; border-top: 1px solid #bdc9b9; }
.drawer-actions button { min-width: 104px; }
.icon-picker-field { margin-top: 20px; }
.category-icon-picker { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.category-icon-choice { min-height: 78px; padding: 9px 5px 8px; border-radius: 12px; }
.category-picker-emoji { font-family: "Segoe UI Emoji","Apple Color Emoji",sans-serif; font-size: 28px; line-height: 1; }
.category-icon-choice.active .category-picker-emoji { transform: scale(1.08); }
.toolbar-note { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.category-sort-row { transition: transform .15s ease, background .15s ease, opacity .15s ease; }
.category-sort-row.dragging { opacity: .42; background: #dfeadd; }
.category-sort-row.drop-target { box-shadow: inset 0 3px #e86732; }
.category-drag-cell { width: 58px; text-align: center; }
.drag-handle { display: inline-grid; width: 38px; height: 38px; place-items: center; color: #587160; font-size: 22px; font-weight: 900; letter-spacing: -5px; cursor: grab; user-select: none; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.category-sort-hint { display: block; margin-top: 3px; color: #7a897e; font-size: 12px; font-weight: 500; }

@media (max-width: 600px) {
  .drawer { width: 100%; border-left: 0; }
  .drawer-head { padding: 18px 16px 14px; }
  .drawer-body { padding: 18px 16px; }
  .drawer-actions { padding: 12px 16px; }
  .drawer-actions button { flex: 1; min-width: 0; }
  .category-icon-picker { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
  .category-icon-choice { min-height: 70px; }
  .category-picker-emoji { font-size: 25px; }
}
.category-table-icon .category-emoji { width: 34px; height: 34px; font-size: 30px; }

@media (max-width: 760px) {
  .category-icon-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.product-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #466b51;
  background: linear-gradient(145deg,#eef3e8,#f4eadb);
}
.product-visual .category-emoji { width: 72px; height: 72px; font-size: 58px; }
.product-visual > span { color: #607166; font-size: 13px; font-weight: 700; letter-spacing: .08em; }

/* responsive data pages and row editing */
.table-wrap tbody tr.clickable-row { cursor: pointer; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.table-wrap tbody tr.clickable-row:hover { background: #f0f5ed; box-shadow: inset 4px 0 #4f7a5a; }
.table-wrap tbody tr.clickable-row:focus-visible { outline: 3px solid rgba(56,105,75,.28); outline-offset: -3px; }

@media (max-width: 760px) {
  .workspace { padding: 18px 12px 90px; overflow: visible; }
  .workspace > h1, .workspace .toolbar h1 { font-size: 24px; }
  .workspace .toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  .workspace .toolbar > button { min-height: 40px; }
  .batch-toolbar { position: static; display: flex; width: 100%; padding: 10px 12px; align-items: center; flex-wrap: wrap; gap: 8px; }
  .batch-toolbar span { min-width: 180px; flex: 1; }
  .table-wrap { margin-top: 10px; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .table-wrap table, .table-wrap tbody { display: block; width: 100%; min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .table-wrap tbody { display: grid; gap: 12px; }
  .table-wrap tbody tr {
    display: block;
    overflow: hidden;
    padding: 8px 12px;
    background: #fffdf8;
    border: 1px solid #b8c6b6;
    border-radius: 15px 12px 16px 13px;
    box-shadow: 0 7px 17px rgba(42,70,48,.1);
  }
  .table-wrap tbody tr.clickable-row:active { transform: scale(.992); background: #edf4e9; }
  .table-wrap tbody td {
    display: grid;
    grid-template-columns: 88px minmax(0,1fr);
    min-height: 38px;
    padding: 8px 2px;
    align-items: center;
    gap: 10px;
    color: #263d2d;
    border-bottom: 1px solid #e2e7df;
    font-size: 14px;
    text-align: right;
  }
  .table-wrap tbody td:last-child { border-bottom: 0; }
  .table-wrap tbody td::before {
    content: attr(data-label);
    color: #718075;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: left;
  }
  .table-wrap tbody td.select-cell { grid-template-columns: 88px 1fr; }
  .table-wrap tbody td.select-cell input { justify-self: end; width: 22px; height: 22px; }
  .table-wrap tbody td button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
  .table-wrap tbody td:has(button) { display: flex; justify-content: flex-end; flex-wrap: wrap; }
  .table-wrap tbody td:has(button)::before { margin-right: auto; }
  .table-wrap tbody .table-empty { padding: 22px; }
  .table-wrap tbody .table-empty td { display: flex; min-height: 160px; padding: 0; flex-direction: column; justify-content: center; border: 0; text-align: center; }
  .table-wrap tbody .table-empty td::before { content: none; }
  .pagination { padding: 10px 12px; border-style: solid; border-color: #c3cec0; background: #f4f7f1; }
}

/* consistent management page titles */
.workspace > .workspace-head,
.workspace > .toolbar,
.workspace > h1 {
  min-height: 58px;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid #aabaaa;
}
.workspace > .workspace-head,
.workspace > .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.workspace > .workspace-head h1,
.workspace > .toolbar h1,
.workspace > h1 {
  margin: 0;
  color: var(--ink);
  font-family: "KaiTi", "STKaiti", "FangSong", serif;
  font-size: var(--page-title-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .015em;
}
.workspace > .workspace-head::after { display: none; }
.workspace > .workspace-head button,
.workspace > .toolbar > button { flex: 0 0 auto; }

@media (max-width: 760px) {
  .workspace > .workspace-head,
  .workspace > .toolbar,
  .workspace > h1 { min-height: 52px; margin-bottom: 14px; padding-bottom: 11px; }
  .workspace > .workspace-head h1,
  .workspace > .toolbar h1,
  .workspace > h1 { font-size: 24px; }
}

/* Fixed catalog controls and shopper product details */
.catalog-sticky-head {
  position: sticky;
  top: 76px;
  z-index: 7;
  margin: -8px -14px 24px;
  padding: 10px 14px 1px;
  background: rgba(244,248,240,.97);
  border-bottom: 1px solid #c7d2c3;
  box-shadow: 0 8px 18px rgba(48,75,54,.08);
  backdrop-filter: blur(12px);
}
.catalog-sticky-head .catalog-toolbar { margin-bottom: 12px; }
.catalog-sticky-head .catalog-categories { margin-bottom: 12px; }
.clickable-product { cursor: pointer; }
.clickable-product:focus-visible { outline: 3px solid #6f9c76; outline-offset: 3px; }
.product-detail-page { max-width: 1160px; }
.detail-back { margin-bottom: 16px; }
.product-detail-card {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr);
  gap: 28px;
  padding: 24px;
  background: #fffdf8;
  border: 1px solid #bac9b7;
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(42,70,48,.12);
}
.product-detail-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.product-detail-gallery .product-image { aspect-ratio: 1/1; border-radius: 16px; border: 1px solid #d2dbce; }
.product-detail-info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.product-detail-info h1 { margin: 10px 0 14px; font-family: "KaiTi","STKaiti","FangSong",serif; font-size: 34px; }
.product-detail-info p { margin: 0 0 18px; color: #53665a; line-height: 1.7; }
.detail-category { padding: 5px 11px; color: #315f3c; background: #dcebd8; border-radius: 999px; font-weight: 800; }
.detail-merchant { color: #748178; font-size: 14px; }
.detail-purchase { width: 100%; margin: 24px 0 16px; display: flex; justify-content: space-between; align-items: center; }
.product-detail-info > button { width: 100%; }
.admin-entry-wrap { max-width: 1160px; margin: 18px auto -4px; padding: 0 28px; }
.admin-entry { width: 100%; display: flex; align-items: center; gap: 13px; padding: 14px 18px; color: #234c2f; background: #e3efe0; border: 1px solid #aebfa9; text-align: left; }
.admin-entry .ui-icon { width: 26px; }
.admin-entry span { display: flex; flex-direction: column; }
.admin-entry strong { font-size: 17px; }
.admin-entry small { margin-top: 2px; color: #637267; }

@media (max-width: 760px) {
  .catalog-sticky-head { top: 0; margin: -8px -12px 18px; padding: 9px 12px 1px; }
  .catalog-sticky-head .catalog-categories { margin: 0 -12px 8px; padding: 0 12px 4px; }
  .product-detail-page { padding-top: 14px; }
  .product-detail-card { display: block; padding: 13px; border-radius: 18px; }
  .product-detail-gallery { gap: 8px; }
  .product-detail-gallery .product-image { border-radius: 13px; }
  .product-detail-info { padding: 20px 4px 6px; }
  .product-detail-info h1 { font-size: 28px; }
  .admin-entry-wrap { margin: 12px auto -7px; padding: 0 12px; }
}

/* Refined responsive management data pages */
.workspace > .toolbar {
  min-height: 66px;
  padding: 12px 14px;
  background: rgba(255,253,248,.86);
  border: 1px solid #b9c7b7;
  border-radius: 15px;
  box-shadow: 0 8px 22px rgba(42,70,48,.08);
}
.workspace > .toolbar h1 { padding-left: 4px; }
.batch-toolbar { min-height: 52px; padding: 9px 12px; }
.batch-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.batch-actions button { white-space: nowrap; }
.table-wrap table { font-variant-numeric: tabular-nums; }
.table-wrap thead th { height: 48px; padding: 10px 12px; vertical-align: middle; }
.table-wrap tbody td { height: 54px; padding: 10px 12px; vertical-align: middle; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody td:first-of-type:not(.select-cell) { font-weight: 750; color: #263f2f; }

@media (min-width: 761px) {
  .table-wrap { border-radius: 15px; }
  .table-wrap tbody tr { transition: background .16s ease, box-shadow .16s ease; }
  .table-wrap tbody tr.clickable-row:hover { box-shadow: inset 4px 0 #517b5b; }
  .table-wrap th.select-cell, .table-wrap td.select-cell { width: 52px; }
  .pagination { min-height: 50px; padding-inline: 15px; }
}

@media (max-width: 760px) {
  .workspace { padding: 14px 10px 86px; }
  .workspace > .toolbar { min-height: 58px; margin-bottom: 12px; padding: 10px 11px; border-radius: 13px; }
  .workspace > .toolbar h1 { padding-left: 0; font-size: 23px; }
  .workspace > .toolbar > button { margin-left: auto; }
  .batch-toolbar { align-items: stretch; padding: 10px; flex-direction: column; }
  .batch-toolbar span { min-width: 0; }
  .batch-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; gap: 7px; }
  .batch-actions button { min-height: 40px; padding: 6px 8px; font-size: 12px; }
  .table-wrap tbody { gap: 10px; }
  .table-wrap tbody tr { position: relative; padding: 12px 13px 9px; border-radius: 14px; }
  .table-wrap tbody td { min-height: 34px; padding: 6px 2px; grid-template-columns: 92px minmax(0,1fr); font-size: 14px; }
  .table-wrap tbody td::before { font-size: 11px; }
  .table-wrap tbody td.select-cell {
    position: absolute;
    top: 10px;
    right: 11px;
    display: block;
    width: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
  }
  .table-wrap tbody td.select-cell::before { content: none; }
  .table-wrap tbody td.select-cell + td { min-height: 42px; padding-right: 42px; color: #244532; font-size: 17px; font-weight: 800; }
  .table-wrap tbody td button { min-height: 38px; }
  .pagination { margin-top: 8px; padding: 9px 10px; }

  .overview-filters {
    display: flex;
    width: calc(100% + 20px);
    margin: 0 -10px 16px;
    padding: 12px 10px;
    gap: 9px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .overview-filters::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .overview-filter { flex: 0 0 178px; scroll-snap-align: start; }
  .overview-filter-actions { display: flex; flex: 0 0 176px; padding-top: 19px; align-items: flex-end; gap: 7px; }
  .overview-filter-actions button { flex: 1; min-width: 0; padding-inline: 8px; }
}

/* One-line compact catalog category filter on desktop and mobile */
.catalog-sticky-head .catalog-categories {
  display: flex;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 4px;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.catalog-sticky-head .catalog-categories::-webkit-scrollbar { display: none; width: 0; height: 0; }
.catalog-sticky-head .catalog-category {
  flex: 0 0 116px;
  min-width: 116px;
  min-height: 48px;
  padding: 6px 8px;
  gap: 7px;
  scroll-snap-align: start;
}
.catalog-sticky-head .category-visual { width: 32px; height: 32px; flex-basis: 32px; }
.catalog-sticky-head .category-emoji,
.catalog-sticky-head .category-home .doodle-logo { width: 25px; height: 25px; }
.catalog-sticky-head .category-emoji { font-size: 22px; }
.catalog-sticky-head .catalog-category strong { font-size: 13px; }
.catalog-sticky-head .catalog-category .category-copy small { display: none; }

@media (max-width: 760px) {
  .catalog-sticky-head .catalog-categories { width: calc(100% + 24px); margin: 0 -12px 8px; padding: 0 12px 4px; }
}

/* Pure white storefront, compact cart actions and animated count badge */
body {
  background-color: #fff;
  background-image: none;
}
.shell,
.catalog-page,
.content { background: #fff; }
.editorial-header,
.topbar,
.bottom-nav { background: rgba(255,255,255,.98); }

.order-filter-bar {
  display: grid;
  grid-template-columns: minmax(240px,1fr) 150px auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  padding: 13px;
  background: #f5f8f3;
  border: 1px solid #d7e1d4;
  border-radius: 16px;
}
.order-search { position: relative; display: block; }
.order-search .ui-icon { position: absolute; left: 14px; top: 50%; width: 18px; color: #718077; transform: translateY(-50%); pointer-events: none; }
.order-search input,
.order-filter-select { width: 100%; min-height: 44px; border: 1px solid #c8d4c6; border-radius: 11px; background: #fff; color: var(--ink); outline: none; }
.order-search input { padding: 9px 13px 9px 42px; }
.order-filter-select { padding: 8px 12px; }
.order-search input:focus,
.order-filter-select:focus { border-color: #76a082; box-shadow: 0 0 0 4px rgba(70,124,87,.1); }
.order-result-count { min-width: 68px; color: #718077; font-size: 13px; text-align: right; white-space: nowrap; }
.user-order-card { cursor: pointer; transition: border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.user-order-card:hover { border-color: #b9cdb6; box-shadow: 0 8px 22px rgba(37,71,44,.09); transform: translateY(-1px); }
.catalog-sticky-head { background: rgba(255,255,255,.97); }
.product-body { display: grid; }

/* Fast catalog loading: compact sorting and an unobtrusive infinite-scroll marker */
.catalog-title-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.catalog-sort { display: flex; align-items: center; padding: 3px; gap: 2px; background: #edf3eb; border: 1px solid #c6d2c3; border-radius: 999px; }
.catalog-sort button { min-height: 32px; padding: 5px 13px; color: #526359; background: transparent; border-radius: 999px; font-size: 13px; box-shadow: none; }
.catalog-sort button:hover { transform: none; color: #285b37; background: #f8fbf7; }
.catalog-sort button.active { color: #fff; background: #3f7650; box-shadow: 0 3px 8px rgba(45,88,57,.2); }
.catalog-load-sentinel { grid-column: 1/-1; min-height: 48px; display: grid; place-items: center; color: #758279; font-size: 13px; }
.product-image { content-visibility: auto; }

@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .order-filter-bar { grid-template-columns: minmax(0,1fr) 116px; gap: 8px; padding: 10px; }
  .order-result-count { grid-column: 1/-1; min-width: 0; text-align: left; }
  .catalog-section-title { align-items: center; gap: 8px; }
  .catalog-section-title h2 { white-space: nowrap; font-size: 20px; }
  .catalog-title-actions { min-width: 0; gap: 6px; }
  .catalog-title-actions > span { display: none; }
  .catalog-sort { gap: 1px; }
  .catalog-sort button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
  .catalog-load-sentinel { min-height: 42px; }
}
.product-body > button.add-cart-button,
.product-detail-info > button.add-cart-button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 32px;
  margin-top: 11px;
  padding: 5px 11px 5px 9px;
  align-items: center;
  justify-self: end;
  gap: 5px;
  color: #fff;
  background: linear-gradient(135deg,#397750,#e28a63);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 5px 12px rgba(126,90,63,.18);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}
.add-cart-button .ui-icon { width: 15px; height: 15px; stroke-width: 2; }
.product-body > button.add-cart-button:hover,
.product-detail-info > button.add-cart-button:hover { background: linear-gradient(135deg,#2f6845,#d97a55); transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 8px 17px rgba(126,90,63,.23); }
.product-body > button.add-cart-button:active,
.product-detail-info > button.add-cart-button:active { transform: translateY(0) scale(.96); }
.product-body > button.add-cart-button:disabled,
.product-detail-info > button.add-cart-button:disabled { background: #d9dfd8; box-shadow: none; }
.product-detail-info > .detail-add-cart { width: auto; min-width: 148px; align-self: flex-start; justify-self: auto; }
.cart-icon-wrap {
  position: relative;
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  transform-origin: 50% 70%;
}
.cart-icon-wrap > .ui-icon { width: 22px; height: 22px; }
.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  color: #fff;
  background: #df7653;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(117,62,43,.24);
  font-family: Inter,"Microsoft YaHei",sans-serif;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}
.cart-bump { animation: cart-bump .46s cubic-bezier(.2,.85,.35,1.35); }
.cart-bump .cart-count { animation: count-pop .46s ease-out; }
@keyframes cart-bump {
  0% { transform: scale(1) rotate(0); }
  38% { transform: scale(1.3) rotate(-10deg); }
  68% { transform: scale(.92) rotate(5deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes count-pop {
  0% { transform: scale(.3); opacity: .2; }
  60% { transform: scale(1.28); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cart-bump,
  .cart-bump .cart-count { animation: none; }
}

@media (max-width: 760px) {
  .add-cart-button { min-height: 30px; margin-top: 8px; padding: 4px 9px 4px 8px; font-size: 11px; }
  .product-detail-info > .detail-add-cart { min-width: 138px; }
}

/* Mobile fixed home title and right-thumb action alignment */
@media (max-width: 760px) {
  .life-header.editorial-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #d7e0d6;
    box-shadow: 0 4px 14px rgba(39,69,47,.08);
  }
  .editorial-header .mobile-home-row {
    display: flex;
    height: 64px;
    padding: 8px 12px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
  }
  .editorial-header .brand-mark { width: 42px; height: 42px; }
  .editorial-header .brand-lockup strong { font-size: 19px; }

  .catalog-sticky-head { top: 65px; z-index: 15; }

  .modal-actions,
  .drawer-actions {
    justify-content: flex-end;
  }
  .modal-actions > button,
  .drawer-actions > button {
    flex: 0 0 auto;
    min-width: 88px;
  }
  .batch-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .batch-actions button {
    flex: 0 0 auto;
    min-width: 88px;
  }
  .content > button:not(.detail-back),
  .content > .card > button,
  .profile-form > button,
  .product-detail-info > .detail-add-cart {
    display: flex;
    width: auto;
    margin-left: auto;
    justify-content: center;
  }
  .toolbar > button,
  .overview-filter-actions,
  .table-wrap tbody td:has(button) {
    margin-left: auto;
    justify-content: flex-end;
  }
}

/* Pagination keeps only right-aligned navigation controls */
.pagination { justify-content: flex-end; }
.pagination > div { margin-left: auto; }
@media (max-width: 760px) {
  .pagination { align-items: center; flex-direction: row; justify-content: flex-end; }
  .pagination > div { width: auto; justify-content: flex-end; }
  .pagination button { flex: 0 0 auto; }
}

/* Compact batch actions without instructional copy */
.batch-toolbar {
  min-height: 0;
  margin: 0 0 9px;
  padding: 0;
  justify-content: flex-end;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.batch-toolbar + .table-wrap { margin-top: 0; }
.batch-toolbar .batch-actions { width: auto; margin-left: auto; justify-content: flex-end; }
.table-wrap th[data-column="操作"],
.table-wrap th[data-column="管理"],
.table-wrap td[data-label="操作"],
.table-wrap td[data-label="管理"] { text-align: right; }
.table-wrap td[data-label="操作"] button,
.table-wrap td[data-label="管理"] button { margin-left: 7px; margin-right: 0; }
.qty { margin-left: auto; justify-content: flex-end; }
@media (max-width: 760px) {
  .batch-toolbar { padding: 0; align-items: flex-end; flex-direction: row; }
  .batch-toolbar .batch-actions { display: flex; width: auto; justify-content: flex-end; flex-wrap: wrap; }
  .table-wrap td[data-label="操作"],
  .table-wrap td[data-label="管理"] { justify-content: flex-end; padding-right: 0; }
}

/* Unified registration and back-office media controls */
.register-type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 16px; padding: 4px; background: #edf3eb; border-radius: 14px; }
.register-type-tabs button { min-height: 40px; color: #53645a; background: transparent; box-shadow: none; }
.register-type-tabs button.active { color: #fff; background: #3f7650; }
.icon-accordion-toggle { width: 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; color: #2e4936; background: #eef4eb; border: 1px solid #becbb9; text-align: left; }
.selected-category-icon { font-weight: 800; }
.product-image-manager { padding: 12px; background: #f4f7f2; border: 1px solid #c7d2c3; border-radius: 14px; }
.product-image-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 10px; }
.managed-image { display: grid; gap: 5px; font-size: 13px; }
.managed-image img { width: 100%; aspect-ratio: 1/1; object-fit: contain; object-position: center; background: #f6f6f6; border-radius: 10px; border: 1px solid #b9c7b7; }
.product-image-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.product-image-actions input[type="file"] { flex: 1 1 220px; min-width: 0; }
.order-admin-detail { min-width: min(520px,80vw); }
@media (max-width:760px) {
  .product-image-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .product-image-actions input[type="file"] { grid-column: 1/-1; width: 100%; }
  .order-admin-detail { min-width: 0; }
}

/* Single-level My page */
.my-page { max-width: 820px; padding-top: 22px; }
.my-page-title { margin: 0 0 16px; }

.my-profile-section { margin-bottom: 16px; padding: 24px; }
.my-section-heading { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.my-section-heading h2 { margin: 0 0 4px; }
.my-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.my-section-heading > .ui-icon { width: 27px; height: 27px; color: var(--green); }

.my-admin-entry.admin-entry-wrap { margin: 0; padding: 0; }

/* New-order badge shared by administrator and merchant navigation. */
.sidebar-nav button.has-order-notice { position: relative; color: #fff; background: rgba(230,139,91,.18); }
.sidebar-nav button.has-order-notice:not(.active) .ui-icon { animation: order-bell 1.05s ease-in-out infinite; }
.nav-order-badge {
  position: relative;
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  margin-left: auto;
  padding: 0 6px;
  place-items: center;
  color: #fff;
  background: #df6f4d;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 999px;
  box-shadow: 0 4px 11px rgba(102,43,27,.3);
  font-family: Inter,"Microsoft YaHei",sans-serif;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  animation: order-badge-pop 1.15s ease-in-out infinite;
}
.nav-order-badge::after { content:""; position:absolute; inset:-5px; border:2px solid rgba(226,112,77,.48); border-radius:999px; animation:order-ring 1.15s ease-out infinite; }
@keyframes order-bell { 0%,100%{transform:rotate(0)} 30%{transform:rotate(-12deg)} 60%{transform:rotate(10deg)} }
@keyframes order-badge-pop { 0%,100%{transform:scale(1)} 45%{transform:scale(1.13)} }
@keyframes order-ring { 0%{opacity:.8;transform:scale(.72)} 100%{opacity:0;transform:scale(1.28)} }
@media (prefers-reduced-motion:reduce) {
  .sidebar-nav button.has-order-notice .ui-icon,.nav-order-badge,.nav-order-badge::after { animation:none; }
}

/* Only the three sorting buttons float; the product heading scrolls normally. */
.catalog-products { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; }
.catalog-products > .catalog-section-title { display: contents; }
.catalog-products > .catalog-section-title h2 { grid-column: 1; grid-row: 1; align-self: center; margin-bottom: 17px; }
.catalog-products > .catalog-section-title .catalog-title-actions {
  position: sticky;
  top: 216px;
  z-index: 6;
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 17px;
}
.catalog-products > .catalog-section-title .catalog-title-actions > span { display: none; }
.catalog-products > .catalog-section-title .catalog-sort { box-shadow: 0 7px 15px rgba(48,75,54,.12); backdrop-filter: blur(10px); }
.catalog-products > .product-grid { grid-column: 1 / -1; width: 100%; }
.toolbar .merchant-registration-toggle { border: 1px solid; box-shadow: none; }
.toolbar .merchant-registration-toggle.enabled { color: #8a492f; background: #fff1e8; border-color: #d9a28b; }
.toolbar .merchant-registration-toggle.paused { color: #fff; background: #3f7650; border-color: #315f40; }
@media (max-width:760px) {
  .my-page { padding-top: 14px; }
  .my-page-title { margin-bottom: 12px; }

  .my-profile-section { padding: 18px 16px; }
  
  .catalog-products > .catalog-section-title .catalog-title-actions {
    top: 205px;
  }
}
