/* Perfect Herbals — admin back office.
   Moss sidebar, sage canvas, turmeric marker for "you are here". Everything else stays quiet. */
body.admin-mode {
  --moss: #16291f; --moss-2: #1f3a2c; --moss-line: #2b4a39; --moss-text: #c9d6cd; --moss-dim: #8aa294;
  --sage: #eef1ec; --surface: #ffffff; --line: #dfe5dd; --ink: #1b241f; --muted: #67736c;
  --leaf: #2f7a4f; --leaf-soft: #e3efe6; --turmeric: #e0a526; --turmeric-soft: #fbf1d6;
  --danger: #b4372b; --danger-soft: #fbe7e4;
  --brand: var(--leaf); --brand-soft: var(--leaf-soft); --ok: var(--leaf); --ok-soft: var(--leaf-soft);
  --warn: #8a6100; --warn-soft: var(--turmeric-soft); --bad: var(--danger); --bad-soft: var(--danger-soft);
  --radius: 12px;
  background: var(--sage); color: var(--ink);
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
body.admin-mode .top { display: none; }
body.admin-mode main { max-width: none; padding: 0; margin: 0; }

/* toast instead of a banner */
body.admin-mode .flash { position: fixed; top: 18px; right: 18px; z-index: 60; margin: 0; max-width: 380px;
  box-shadow: 0 10px 30px rgba(22, 41, 31, .18); border: 1px solid var(--line); font-weight: 600; }

/* ---------- shell ---------- */
.ad-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--moss) 264px, transparent 264px); }
.ad-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--moss); color: var(--moss-text);
  display: flex; flex-direction: column; padding: 22px 14px 16px; }
.ad-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; color: #fff; text-decoration: none; }
.ad-brand .mark { width: 36px; height: 36px; border-radius: 10px; background: var(--moss-2); display: grid; place-items: center;
  border: 1px solid var(--moss-line); color: var(--turmeric); }
.ad-brand b { display: block; color: #fff; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.ad-brand span { display: block; font-size: 12px; color: var(--moss-dim); font-weight: 500; }

.ad-side .ad-nav { display: block; position: static; background: none; padding: 0; border: 0; flex-direction: column; }
.ad-group { margin: 6px 0 14px; }
.ad-group h4 { margin: 0 0 6px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--moss-dim); }
.ad-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0;
  border-radius: 9px; color: var(--moss-text); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.ad-link svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.ad-link:hover { background: var(--moss-2); color: #fff; }
.ad-link.on { background: #fff; color: var(--moss); }
.ad-link.on svg { opacity: 1; color: var(--leaf); }
.ad-link.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0;
  background: var(--turmeric); }
.ad-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; font-size: 12px; font-weight: 700;
  text-align: center; background: var(--turmeric); color: var(--moss); }
.ad-link.on .ad-badge { background: var(--turmeric-soft); color: #7a5400; }
.ad-link:focus-visible, .ad-me button:focus-visible, .ad-menu:focus-visible { outline: 2px solid var(--turmeric); outline-offset: 2px; }

.ad-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--moss-line); }
.ad-me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; }
.ad-me .av { width: 36px; height: 36px; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; flex: none; }
.ad-me .who { min-width: 0; flex: 1; }
.ad-me .who b { display: block; color: #fff; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-me .who span { display: block; color: var(--moss-dim); font-size: 12px; }
.ad-me button { background: transparent; border: 1px solid var(--moss-line); color: var(--moss-text); padding: 7px; border-radius: 8px; display: grid; }
.ad-me button:hover { background: var(--moss-2); color: #fff; }
.ad-me svg { width: 17px; height: 17px; }

.ad-main { min-width: 0; display: flex; flex-direction: column; }
.ad-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 18px 36px;
  background: rgba(238, 241, 236, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.ad-top h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ad-top p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.ad-chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ad-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ad-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--turmeric); }
.ad-chip.live i { background: var(--leaf); }
.ad-menu { display: none; background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 8px; border-radius: 10px; }
.ad-menu svg { width: 20px; height: 20px; display: block; }
.ad-content { padding: 28px 36px 60px; max-width: 1240px; width: 100%; }
.ad-scrim { display: none; }

/* ---------- content components ---------- */
.ad-content h2 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin: 28px 0 12px; }
.ad-content .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: none; }
.ad-content .table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ad-content table { background: transparent; font-size: 14px; }
.ad-content th { background: #f5f7f3; color: var(--muted); font-weight: 700; font-size: 12.5px; position: sticky; top: 0; }
.ad-content td, .ad-content th { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ad-content tr:last-child td { border-bottom: 0; }
.ad-content tbody tr:hover td, .ad-content tr:hover td { background: #fafbf9; }
.ad-content button, .ad-content .btn { background: var(--leaf); border-radius: 9px; font-weight: 700; font-family: inherit; }
.ad-content button:hover { filter: brightness(1.06); }
.ad-content button.ghost, .ad-content .btn.ghost { background: var(--surface); color: var(--leaf); border: 1px solid #bcd3c3; }
.ad-content input, .ad-content select, .ad-content textarea { border-color: var(--line); border-radius: 9px; font-family: inherit; }
.ad-content input:focus, .ad-content select:focus, .ad-content textarea:focus { outline: 2px solid #9cc5ab; outline-offset: 0; border-color: var(--leaf); }
.ad-content label { font-weight: 700; font-size: 13.5px; }
.ad-content .notice { background: var(--turmeric-soft); color: #5e4300; border: 1px solid #f0dca5; }
.ad-content .pill { font-weight: 700; }
.ad-content .tabs { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 4px; gap: 2px; display: inline-flex; flex-wrap: wrap; margin-bottom: 20px; }
.ad-content .tabs button { background: transparent; color: var(--muted); border: 0; padding: 8px 14px; font-size: 13.5px; border-radius: 8px; }
.ad-content .tabs button.on { background: var(--moss); color: #fff; }
.ad-content .stat .label { color: var(--muted); font-weight: 600; }
.ad-content .stat .value { font-weight: 800; letter-spacing: -.02em; }

/* overview */
.ov-strip { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ov-strip > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.ov-strip > div:first-child { border-left: 0; }
.ov-strip .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.ov-strip .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-top: 6px; }
.ov-strip .lead .v { font-size: 34px; color: var(--moss); }
.ov-strip .s { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ov-bar { height: 8px; border-radius: 99px; background: #e8ece6; overflow: hidden; margin-top: 12px; position: relative; }
.ov-bar span { display: block; height: 100%; background: var(--leaf); border-radius: 99px; }
.ov-bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--turmeric); }
.ov-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; margin-top: 20px; }
.ov-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ov-list h3 { margin: 0; padding: 16px 20px; font-size: 15px; font-weight: 800; border-bottom: 1px solid var(--line); }
.ov-item { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ov-item:last-child { border-bottom: 0; }
a.ov-item:hover { background: #fafbf9; }
.ov-item .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--leaf-soft); color: var(--leaf); flex: none; }
.ov-item .ic.warn { background: var(--turmeric-soft); color: #8a6100; }
.ov-item .ic.bad { background: var(--danger-soft); color: var(--danger); }
.ov-item .ic svg { width: 18px; height: 18px; }
.ov-item b { display: block; font-size: 14px; }
.ov-item span { display: block; color: var(--muted); font-size: 13px; }
.ov-item .amt { margin-left: auto; font-weight: 800; font-size: 15px; white-space: nowrap; }
.ov-kv { display: grid; grid-template-columns: 1fr auto; }
.ov-kv div { padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ov-kv div:nth-last-child(-n+2) { border-bottom: 0; }
.ov-kv div:nth-child(even) { text-align: right; font-weight: 800; }
.ov-kv div:nth-child(odd) { color: var(--muted); }

/* ---------- tablet & mobile ---------- */
@media (max-width: 1100px) {
  .ov-strip { grid-template-columns: 1fr 1fr; }
  .ov-strip > div:nth-child(3) { border-left: 0; }
  .ov-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ov-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .ad-shell { grid-template-columns: 1fr; background: none; }
  .ad-side { position: fixed; left: 0; top: 0; bottom: 0; width: 284px; max-width: 86vw; z-index: 50;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  .ad-shell.open .ad-side { transform: none; }
  .ad-shell.open .ad-scrim { display: block; position: fixed; inset: 0; background: rgba(22, 41, 31, .45); z-index: 40; }
  .ad-menu { display: block; }
  .ad-top { padding: 12px 16px; }
  .ad-top h1 { font-size: 19px; }
  .ad-top p { display: none; }
  .ad-chips .ad-chip span { display: none; }
  .ad-chips .ad-chip { padding: 7px; }
  .ad-content { padding: 18px 14px 50px; }
  .ad-content .tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; }
  .ad-content .tabs button { white-space: nowrap; }
  .ov-strip > div { padding: 16px; }
  .ov-strip .lead .v { font-size: 28px; }
  .ov-strip .v { font-size: 21px; }
  body.admin-mode .flash { left: 14px; right: 14px; top: 12px; max-width: none; }
}
@media (max-width: 480px) {
  .ov-strip { grid-template-columns: 1fr; }
  .ov-strip > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .ov-strip > div:first-child { border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .ad-side { transition: none; } }

/* ---------- dashboard ---------- */
.db-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.db-bar .tabs { margin: 0; }
.db-d { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.db-d.up { color: var(--leaf); } .db-d.down { color: var(--danger); }
.db-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.db-grid > .db-wide { grid-column: span 1; }
@media (min-width: 1101px) { .db-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.db-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; min-width: 0; }
.db-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.db-head h3 { margin: 0; font-size: 15px; font-weight: 800; margin-right: auto; }
.db-legend { display: inline-flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.db-legend i, .db-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.db-chart { position: relative; }
.db-chart svg { display: block; width: 100%; height: auto; }
.db-chart .ax { font-size: 11px; fill: var(--muted); font-family: inherit; }
.db-tip { position: absolute; top: 6px; min-width: 190px; background: var(--moss); color: #fff; border-radius: 10px; padding: 10px 12px;
  font-size: 12.5px; pointer-events: none; box-shadow: 0 10px 24px rgba(22, 41, 31, .25); }
.db-tip b { display: block; margin-bottom: 6px; }
.db-tip div { display: flex; align-items: center; gap: 2px; margin: 3px 0; color: #dfe8e2; }
.db-tip span { margin-left: auto; padding-left: 14px; font-weight: 700; color: #fff; }
.db-tip .t { border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 5px; margin-top: 6px; color: #fff; }
.db-table { margin-top: 10px; font-size: 13px; }
.db-table summary { cursor: pointer; color: var(--leaf); font-weight: 700; }
.db-table .table-wrap { margin-top: 8px; max-height: 260px; overflow: auto; }
.db-hbars { display: grid; gap: 12px; }
.db-hrow { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) auto; gap: 12px; align-items: center; font-size: 13.5px; }
.db-hrow .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.db-hrow .track { height: 10px; background: #edf1eb; border-radius: 99px; overflow: hidden; }
.db-hrow .track span { display: block; height: 100%; background: var(--leaf); border-radius: 0 4px 4px 0; }
.db-hrow .v { font-weight: 800; text-align: right; }
.db-rows { display: grid; }
.db-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.db-row:last-child { border-bottom: 0; }
.db-row .av { width: 32px; height: 32px; border-radius: 50%; background: var(--leaf-soft); color: var(--leaf); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.db-row .who { min-width: 0; flex: 1; }
.db-row .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-row .who span { display: block; color: var(--muted); font-size: 12.5px; }
@media (max-width: 1100px) { .db-grid { grid-template-columns: 1fr; } }

/* hide the public website chrome inside the back office */
body.admin-mode .site-header, body.admin-mode .site-footer, body.admin-mode .wa-float, body.admin-mode .drawer { display: none !important; }
body.admin-mode h1, body.admin-mode h2, body.admin-mode h3, body.admin-mode h4 { font-family: "Manrope", sans-serif; color: var(--ink); }
body.admin-mode button, body.admin-mode .btn { font-family: "Manrope", sans-serif; border-radius: 9px; }
body.admin-mode input, body.admin-mode select, body.admin-mode textarea { font-family: "Manrope", sans-serif; padding: 10px 12px; font-size: 14.5px; }
body.admin-mode .flash.ok { background: var(--moss); }
body.admin-mode .ad-group h4 { color: var(--moss-dim); font-size: 12px; font-weight: 600; }
body.admin-mode label { color: var(--ink); }
body.admin-mode .ad-content .card { border-radius: var(--radius); }

/* ---------- website editor (CMS) ---------- */
.cms-bar { position: sticky; top: 77px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; box-shadow: 0 10px 24px -20px rgba(22, 41, 31, .5); }
.cms-bar b { font-size: 15px; }
.cms-bar .row { gap: 8px; }
.cms-bar .btn svg, .cms-bar button svg { width: 16px; height: 16px; }
.cms-form { display: grid; gap: 14px; max-width: 900px; }
.cms-group { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.cms-group > summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.cms-group > summary::-webkit-details-marker { display: none; }
.cms-group > summary::after { content: ""; }
.cms-group[open] > summary { border-bottom: 1px solid var(--line); }
.cms-body { padding: 6px 18px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cms-body > .cms-field:has(textarea), .cms-body > .cms-list, .cms-body > .cms-field:has(.cms-img), .cms-body > .switch { grid-column: 1 / -1; }
.cms-form > .cms-field, .cms-form > .switch, .cms-form > .cms-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px 16px; }
.cms-form > .switch { padding: 14px 18px; }
.cms-field label { margin-top: 12px; }
.cms-field .small.muted { margin-top: 4px; }
.cms-list { margin-top: 14px; }
.cms-list-head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-bottom: 8px; }
.cms-item { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fbfcfa; }
.cms-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 13.5px; }
.cms-item-head .muted { font-weight: 500; }
.cms-item-body { padding: 0 14px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.cms-item-body > .cms-field:has(textarea), .cms-item-body > .cms-list, .cms-item-body > .cms-field:has(.cms-img) { grid-column: 1 / -1; }
.cms-item-body > .cms-icon { max-width: 220px; }
.icon-sq { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; background: var(--surface) !important; color: var(--muted) !important; border: 1px solid var(--line) !important; border-radius: 8px !important; }
.icon-sq svg { width: 16px; height: 16px; }
.icon-sq:hover:not(:disabled) { color: var(--ink) !important; border-color: #bcc8bd !important; }
.icon-sq.danger:hover { color: var(--danger) !important; border-color: #f0b8b1 !important; }
.icon-sq:disabled { opacity: .35; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; margin: 12px 0 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 40px; height: 23px; border-radius: 99px; background: #cfd8cf; position: relative; flex: none; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--leaf); }
.switch input:checked + span::after { transform: translateX(17px); }
.switch input:focus-visible + span { outline: 2px solid var(--turmeric); outline-offset: 2px; }
.cms-icon { position: relative; }
.icon-pick { display: inline-flex; align-items: center; gap: 8px; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; padding: 8px 12px !important; font-weight: 600; }
.icon-pick svg { width: 20px; height: 20px; color: var(--leaf); }
.icon-pick svg:last-child { width: 14px; height: 14px; color: var(--muted); }
.icon-pop { position: absolute; z-index: 30; top: 100%; left: 0; margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  display: grid; grid-template-columns: repeat(8, 38px); gap: 4px; box-shadow: 0 18px 40px -16px rgba(22, 41, 31, .45); }
.icon-pop button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; background: transparent !important; color: var(--moss) !important; border-radius: 8px; }
.icon-pop button:hover { background: var(--leaf-soft) !important; }
.icon-pop svg { width: 20px; height: 20px; }
.cms-img { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cms-img img, .cms-img .noimg { width: 132px; height: 88px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(#eef1ec 0 25%, #fff 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.cms-img .noimg { display: grid; place-items: center; color: var(--muted); }
.cms-img .noimg svg { width: 26px; height: 26px; }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(22, 41, 31, .55); display: grid; place-items: center; padding: 20px; }
.modal-card { background: var(--surface); border-radius: 18px; padding: 22px; width: min(900px, 100%); max-height: 86vh; overflow: auto; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-tile { display: block; padding: 0; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; text-align: left; }
.media-tile:hover { border-color: var(--leaf) !important; box-shadow: 0 0 0 3px var(--leaf-soft); }
.media-tile img { width: 100%; height: 110px; object-fit: contain; background: repeating-conic-gradient(#eef1ec 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.media-tile span { display: block; padding: 6px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-grid.big { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-top: 16px; }
.media-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.media-thumb { height: 150px; overflow: hidden; background: repeating-conic-gradient(#eef1ec 0 25%, #fff 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; }
.media-thumb img { width: 100%; height: 150px; object-fit: contain; }
.media-meta { padding: 10px 12px 12px; }
.media-meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropzone { border: 2px dashed #c6d3c6; border-radius: 14px; padding: 22px; text-align: center; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dropzone.over { border-color: var(--leaf); background: var(--leaf-soft); }
.dropzone .btn { display: inline-flex; }
@media (max-width: 900px) {
  .cms-bar { position: static; }
  .cms-bar .row button, .cms-bar .row .btn { padding: 7px 11px; font-size: 13px; }
  .cms-body, .cms-item-body { grid-template-columns: 1fr; }
  .icon-pop { grid-template-columns: repeat(6, 38px); }
}

/* styled text (titles & subtitles) */
.cms-body > .cms-styled { grid-column: 1 / -1; }
.st-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.st-tog { min-width: 38px; height: 34px; padding: 0 10px !important; background: var(--surface) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; border-radius: 8px !important; font-size: 13px; font-weight: 800; }
.st-tog.on { background: var(--moss) !important; color: #fff !important; border-color: var(--moss) !important; }
.st-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.swatches { display: inline-flex; gap: 6px; }
.swatch { width: 28px; height: 28px; padding: 0 !important; border-radius: 50% !important; border: 2px solid #fff !important; box-shadow: 0 0 0 1px var(--line); background: var(--surface); color: var(--muted) !important; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--moss); }
.swatch.custom { position: relative; overflow: hidden; background: conic-gradient(#e44, #ec3, #4c4, #3be, #44e, #c4c, #e44) !important; margin: 0; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.swatch.custom span { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.st-preview { margin-top: 10px; }
.st-sample { background: linear-gradient(180deg, #f3faec, #e9f5df); border: 1px solid #dbe9d3; border-radius: 10px; padding: 14px 16px; overflow-wrap: anywhere; }
.st-warn { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.swatch[data-val=""] { background: #fff !important; color: var(--muted) !important; font-family: "Outfit", sans-serif; }

/* order details */
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
.modal-card h4 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; }
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--leaf-soft); }
.tl li { position: relative; padding: 4px 0 10px 8px; }
.tl li::before { content: ""; position: absolute; left: -25px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 3px var(--surface); }
.stategrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 10px; margin-top: 12px; }
.stategrid label { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 13.5px; padding: 3px 0; }
.stategrid label input { width: auto; accent-color: var(--leaf); }
.stategrid label.other { color: #b0b8b0; }
textarea.longtext { font-size: 14px; line-height: 1.6; }
@media (max-width: 700px) { .od-grid { grid-template-columns: 1fr; } }
.qr { width: 168px; height: 168px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.qr svg { width: 100%; height: 100%; }
.backup { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 14px; margin-top: 10px; justify-content: start; }
.backup code { font-size: 15px; font-weight: 700; letter-spacing: .05em; }
@media (max-width: 600px) { .backup { grid-template-columns: repeat(2, auto); } }
