/* FM Best Bargain admin - simple, clear, phone-friendly */
:root {
  --green-900: #0b3a21; --green: #1b6b3f; --green-500: #25a05a; --green-100: #dff3e6; --green-50: #f0f9f3;
  --sun: #ffc233; --red: #e5432d; --red-50: #fdecea; --ink: #13201a; --ink-2: #405047; --ink-3: #75837a;
  --line: #e3e9e5; --bg: #f4f7f4; --card: #fff;
  --f-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -.01em; line-height: 1.15; }
button { font: inherit; cursor: pointer; }
.muted { color: var(--ink-3); }
small { font-size: .8rem; }

/* layout */
.side { position: fixed; inset: 0 auto 0 0; width: 236px; background: linear-gradient(180deg, var(--green-900), #0f4a2a); color: #cfe3d6; display: flex; flex-direction: column; padding: 18px 14px; z-index: 30; transition: transform .3s; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; padding: 0 6px 18px; }
.brand img { height: 44px; }
.side nav { display: grid; gap: 3px; }
.side nav a { display: flex; align-items: center; gap: .7rem; padding: .62rem .75rem; border-radius: 12px; color: #cfe3d6; font-weight: 700; font-size: .93rem; }
.side nav a svg { width: 20px; height: 20px; flex: none; }
.side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side nav a.on { background: var(--sun); color: var(--green-900); }
.pill { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; padding: .05rem .5rem; border-radius: 999px; }
.side-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot a { color: #cfe3d6; font-weight: 600; font-size: .88rem; padding: .45rem .75rem; border-radius: 10px; }
.side-foot a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main { margin-left: 236px; min-height: 100vh; }
.top { display: flex; align-items: center; gap: .8rem; padding: 18px 28px 6px; }
.top h1 { font-size: 1.55rem; }
.menu { display: none; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); place-items: center; color: var(--ink); }
.menu svg { width: 22px; height: 22px; }
.content { padding: 14px 28px 40px; max-width: 1180px; }
.scrim { display: none; }

/* bits */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1.05rem; border-radius: 999px; border: 1.5px solid transparent; font-weight: 800; font-size: .88rem; white-space: nowrap; transition: background .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn.green { background: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-900); }
.btn.line { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn.line:hover { border-color: var(--green); color: var(--green); }
.btn.red-line { background: var(--card); border-color: #f5c9c2; color: var(--red); }
.btn.red-line:hover { background: var(--red-50); }
.btn.sm { padding: .38rem .75rem; font-size: .8rem; }
.btn.big { padding: .8rem 1.3rem; font-size: .95rem; }
.linkbtn { background: none; border: 0; color: var(--green); font-weight: 700; padding: 0; font-size: .86rem; }
.linkbtn.red { color: var(--red); }
.icon { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); font-weight: 800; color: var(--ink-2); }
.icon:disabled { opacity: .35; cursor: default; }
.in { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: .62rem .8rem; font: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.in:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-100); }
.in.err, .drop.err { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
textarea.in { resize: vertical; }
label { display: grid; gap: .3rem; font-weight: 700; font-size: .86rem; color: var(--ink-2); }
label small { font-weight: 500; color: var(--ink-3); }
label.check { display: flex; align-items: center; gap: .55rem; }
label.check input { width: 18px; height: 18px; accent-color: var(--green); }
.flash { padding: .75rem 1rem; border-radius: 12px; font-weight: 700; margin-bottom: 14px; transition: opacity .5s, transform .5s; }
.flash.ok { background: var(--green-100); color: var(--green-900); }
.flash.err { background: var(--red-50); color: #a52a18; }
.flash.hide { opacity: 0; transform: translateY(-6px); }
.tag { display: inline-block; font-size: .7rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; vertical-align: middle; }
.tag.red { background: var(--red-50); color: var(--red); }
.tag.green { background: var(--green-100); color: var(--green); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { font-size: 1.1rem; }
.card-head a { font-weight: 700; font-size: .86rem; }
.empty { text-align: center; padding: 40px 18px; display: grid; gap: .6rem; justify-items: center; }
.backlink { display: inline-block; font-weight: 700; margin-bottom: 12px; font-size: .9rem; }

/* dashboard */
.hello { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: linear-gradient(120deg, var(--green-900), var(--green)); color: #fff; border-radius: 20px; padding: 22px 24px; margin-bottom: 16px; }
.hello h2 { font-size: 1.5rem; }
.hello p { color: #cfe3d6; margin: .2rem 0 0; }
.hello .btn.green { background: var(--sun); color: var(--green-900); }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--ink); display: grid; gap: .1rem; transition: transform .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(11,58,33,.4); }
.stat .n { font-family: var(--f-display); font-weight: 800; font-size: 1.8rem; line-height: 1.1; }
.stat .l { color: var(--ink-3); font-weight: 700; font-size: .84rem; }
.stat .l em { font-style: normal; color: var(--green-500); }
.stat.warn .n { color: var(--red); }
.stat.hot { background: var(--sun); border-color: var(--sun); }
.stat.hot .l { color: var(--green-900); }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.list { display: grid; }
.li { display: flex; align-items: center; gap: .8rem; padding: .6rem .3rem; border-top: 1px solid var(--line); color: var(--ink); border-radius: 8px; }
.list .li:first-child { border-top: 0; }
a.li:hover { background: var(--green-50); }
.li.sel { background: var(--green-50); }
.li .grow { flex: 1; min-width: 0; display: grid; }
.li .grow b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .grow small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .right { text-align: right; display: grid; justify-items: end; gap: .1rem; font-size: .9rem; }
.li .acts { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.li .acts form { display: flex; gap: .25rem; }
.thumb { width: 48px; height: 48px; border-radius: 12px; background: var(--green-50); overflow: hidden; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.round { border-radius: 50%; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.dot.on { background: var(--green-500); box-shadow: 0 0 0 4px var(--green-100); }

/* products table */
.bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 8px; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; flex: 1; }
.filters .in { width: auto; min-width: 160px; flex: 1; max-width: 280px; }
.count { margin: 6px 0 10px; font-size: .9rem; }
.table { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.tr { display: grid; grid-template-columns: minmax(0, 2.4fr) 1.2fr 1.1fr .8fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.table.cust .tr { grid-template-columns: minmax(0, 2.4fr) 1.2fr 1fr 1.3fr auto; }
.table.prods .tr { grid-template-columns: minmax(0, 2.4fr) 1.1fr 1fr .75fr .75fr .75fr auto; }
.tr.th { border-top: 0; background: var(--green-50); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding-block: 9px; }
.prod { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.prod a, .prod > span:last-child { display: grid; min-width: 0; color: var(--ink); }
.prod b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod small a { color: var(--ink-3); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--sun), #ff7a3d); color: var(--green-900); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; flex: none; }
.acts { display: flex; gap: .35rem; justify-content: flex-end; }
.acts form { margin: 0; }
.switch { width: 46px; height: 26px; border-radius: 999px; border: 0; background: #cfd8d2; position: relative; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .25s; }
.switch.on { background: var(--green-500); }
.switch.on i { transform: translateX(20px); }
.pager { display: flex; gap: .35rem; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.pager a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-weight: 700; color: var(--ink); }
.pager a.on { background: var(--green); color: #fff; border-color: var(--green); }

/* forms */
.form { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.fields { display: grid; gap: .9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .3rem; }
.photo-field { display: grid; gap: .4rem; }
.drop { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed #c6d6cc; border-radius: 18px; background: var(--green-50); overflow: hidden; cursor: pointer; text-align: center; transition: border-color .2s; }
.drop:hover { border-color: var(--green); }
.drop.small { aspect-ratio: auto; height: 180px; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.drop.has img { display: block; }
.drop.small.has img { object-fit: contain; background: #fff; }
.drop.has .hint-in { display: none; }
.hint-in { display: grid; gap: .2rem; padding: 14px; color: var(--ink-2); font-weight: 600; }
.hint-in b { color: var(--green); font-size: 1rem; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cats-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.settings { display: grid; gap: 16px; max-width: 760px; }

/* messages */
.msgs { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.reader { position: sticky; top: 16px; display: grid; gap: .6rem; }
.reader h3 { font-size: 1.3rem; }
.msg-body { background: var(--green-50); border-radius: 14px; padding: 14px 16px; white-space: normal; line-height: 1.6; }
.contact-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.contact-row form { margin: 0; }
.only-phone { display: none; }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 10%, #25a05a, var(--green-900) 60%); }
.login-card { width: min(400px, 100%); background: var(--card); border-radius: 24px; padding: 30px 26px; display: grid; gap: .9rem; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.login-card img { width: 110px; margin: 0 auto; }
.login-card h1 { text-align: center; font-size: 1.5rem; }
.login-card p { text-align: center; color: var(--ink-3); margin: -.4rem 0 .2rem; }
.login-card .back { text-align: center; font-weight: 700; font-size: .88rem; }

/* phone */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .cols, .cats-cols, .msgs { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .photo-field { max-width: 320px; }
}
@media (max-width: 820px) {
  .side { transform: translateX(-102%); width: 260px; }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(8,30,18,.5); z-index: 25; opacity: 0; visibility: hidden; transition: opacity .3s; }
  .scrim.open { opacity: 1; visibility: visible; }
  .main { margin-left: 0; }
  .menu { display: grid; }
  .top { padding: 14px 16px 4px; position: sticky; top: 0; background: var(--bg); z-index: 20; }
  .top h1 { font-size: 1.25rem; }
  .content { padding: 10px 16px 40px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .tr.th { display: none; }
  .tr, .table.cust .tr { grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px; }
  .tr .prod { grid-column: 1 / -1; }
  .tr .cell::before { content: attr(data-l); display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
  .tr .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .table.prods .tr { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .table.prods .tr .cell[data-l="Price"] { grid-column: span 2; }
  .filters .in { max-width: none; }
  .msgs.reading > .card:first-child { display: none; }
  .msgs:not(.reading) .reader { display: none; }
  .only-phone { display: inline-block; }
  .reader { position: static; }
  .li .acts { width: 100%; justify-content: flex-start; padding-left: 60px; }
  .cats-cols .li { flex-wrap: wrap; }
}

/* orders */
.table.ord .tr { grid-template-columns: minmax(0, 2.6fr) 1.1fr 1.1fr .9fr auto; }
.otabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.otabs a { padding: .4rem .8rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; font-size: .86rem; }
.otabs a.on { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.otabs a b { background: var(--sun); color: var(--green-900); border-radius: 999px; padding: 0 .45rem; font-size: .74rem; margin-left: .2rem; }
.form textarea.in { min-height: 80px; resize: vertical; font: inherit; }
@media (max-width: 820px) { .table.ord .tr { grid-template-columns: 1fr 1fr; } }

/* staff login choice + employee area */
.role-pick { display: grid; gap: .7rem; }
.role-pick a { display: grid; grid-template-columns: 46px 1fr; gap: .8rem; align-items: center; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; color: inherit; transition: border-color .2s, transform .2s; }
.role-pick a:hover { border-color: var(--green); transform: translateY(-2px); }
.role-pick .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--green-900); color: var(--sun); }
.role-pick .ic svg { width: 24px; height: 24px; }
.role-pick b { display: block; font-size: 1rem; }
.role-pick small { color: var(--ink-3); }
.ref-search { display: flex; gap: .6rem; flex-wrap: wrap; }
.ref-search .in { flex: 1 1 220px; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; font-size: 1.05rem; }
.big-act { width: 100%; justify-content: center; padding: .95rem 1rem; font-size: 1.02rem; }
.warn-box { background: #fde8e8; color: #9b1c1c; border-radius: 14px; padding: 14px; font-weight: 800; text-align: center; }
.ok-box { background: var(--green-50, #f0f9f3); color: var(--green-900); border-radius: 14px; padding: 14px; font-weight: 700; text-align: center; }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: .35rem .8rem; margin: 0; }
.kv dt { color: var(--ink-3); font-size: .85rem; font-weight: 700; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* notifications */
.top { position: relative; }
.bell { margin-left: auto; position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); background: var(--card); border: 1px solid var(--line); flex: none; }
.bell svg { width: 22px; height: 22px; }
.bell.has { color: var(--green-900); }
.bell.has svg { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
.bell b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; display: grid; place-items: center; border: 2px solid var(--bg); }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(14deg); } 80% { transform: rotate(-12deg); } 85% { transform: rotate(8deg); } 90% { transform: rotate(-5deg); } }
.notes { display: grid; gap: 8px; }
.note { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1px solid var(--line); color: inherit; background: var(--card); }
.note.unread { background: #fbfdf9; border-color: #cfe8d8; }
.note:hover { border-color: var(--green-500); }
.nic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #eef2f7; color: #475569; }
.nic svg { width: 22px; height: 22px; }
.lv-success .nic { background: var(--green-100); color: var(--green); }
.lv-warn .nic { background: #fff3d6; color: #b45309; }
.lv-danger .nic { background: var(--red-50); color: var(--red); }
.nbody b { display: block; font-size: .95rem; }
.note:not(.unread) .nbody b { font-weight: 600; color: var(--ink-2); }
.nbody small { display: block; color: var(--ink-2); margin-top: .15rem; line-height: 1.4; }
.nbody em { display: block; font-style: normal; color: var(--ink-3); font-size: .78rem; margin-top: .3rem; }
.ndot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-500); margin-top: 6px; }
.lv-danger .ndot { background: var(--red); }
.exp-tag { display: inline-block; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: .15rem .55rem; margin-top: .2rem; }
.exp-tag.info { background: #eef2f7; color: #475569; }
.exp-tag.warn { background: #fff3d6; color: #b45309; }
.exp-tag.danger { background: var(--red-50); color: var(--red); }
@media (prefers-reduced-motion: reduce) { .bell.has svg { animation: none; } }

/* product options */
.opt-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: grid; gap: .6rem; min-width: 0; }
.opt-box legend { font-weight: 800; padding: 0 .3rem; }
.opt-box p { margin: 0; }
.swatch-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: .3rem .7rem .3rem .35rem; font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.sw i, .chip i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.sw.on { border-color: var(--green); background: var(--green-50); color: var(--green-900); box-shadow: inset 0 0 0 1px var(--green); }
.add-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.add-row .in { flex: 1 1 180px; }
.add-row input[type=color] { width: 44px; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; background: var(--card); }
.chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--green-900); color: #fff; border-radius: 999px; padding: .28rem .35rem .28rem .7rem; font-size: .84rem; font-weight: 700; }
.chip button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }

/* website editor */
.cms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cms-item, .store-slot, .opt-box { min-width: 0; }
.cms-item { display: grid; gap: .8rem; }
.cms-grid { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 18px; align-items: start; }
.cms-grid .fields { display: grid; gap: .7rem; min-width: 0; }
.cms-photo { display: grid; gap: .4rem; }
.drop.wide { aspect-ratio: 3 / 2; }
.cms-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.theme-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -.3rem; }
.theme-pick input { position: absolute; opacity: 0; pointer-events: none; }
.theme-pick span { display: block; width: 42px; height: 42px; border-radius: 12px; cursor: pointer; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.theme-pick input:checked + span { border-color: #fff; box-shadow: 0 0 0 3px var(--green); }
.theme-pick input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
/* on/off switch with a text label (separate from the small .switch used in the product list) */
label.toggle { display: inline-flex; flex-direction: row; align-items: center; gap: .65rem; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--ink); user-select: none; }
label.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.toggle .knob { flex: none; position: relative; width: 46px; height: 26px; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
label.toggle .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
label.toggle input:checked + .knob { background: var(--green); }
label.toggle input:checked + .knob::after { transform: translateX(20px); }
label.toggle input:focus-visible + .knob { outline: 2px solid var(--green); outline-offset: 2px; }
label.toggle .txt { white-space: normal; line-height: 1.3; min-width: 0; }
label.toggle { max-width: 100%; }
.card-head label.toggle .txt { font-size: .85rem; color: var(--ink-2); }
.link-pick + .in { margin-top: .4rem; }
.cms-save { position: sticky; bottom: 0; display: flex; gap: .6rem; flex-wrap: wrap; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); z-index: 5; }
@media (max-width: 760px) { .cms-grid { grid-template-columns: 1fr; } }
.danger-zone { border-color: #f5c9c2; }
.store-slot { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: .6rem; }
.store-slot .slot-title { font-size: .95rem; color: var(--green-900); }

/* extra product photos */
.more-photos { display: grid; gap: .5rem; margin-top: .9rem; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.gal-grid:empty { display: none; }
.gal-item { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: grid; }
.gal-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gal-item.new small { position: absolute; top: 6px; left: 6px; background: var(--green); color: #fff; font-weight: 800; font-size: .7rem; border-radius: 999px; padding: .1rem .5rem; }
.gal-btn { display: block; margin: 0; cursor: pointer; border-top: 1px solid var(--line); }
.gal-btn input { position: absolute; opacity: 0; pointer-events: none; }
.gal-btn span { display: block; text-align: center; font-size: .74rem; font-weight: 800; padding: .35rem .2rem; color: var(--ink-2); }
.gal-btn input:checked + span { background: var(--green); color: #fff; }
.gal-btn input[type=checkbox]:checked + span { background: var(--red); }
.gal-btn input:focus-visible + span { outline: 2px solid var(--green); outline-offset: -2px; }
.gal-add { position: relative; display: grid; place-items: center; align-content: center; gap: .1rem; aspect-ratio: 1; border: 2px dashed var(--line); border-radius: 12px; color: var(--green); cursor: pointer; margin: 0; }
.gal-add:hover { border-color: var(--green); }
.gal-add span { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.gal-add small { font-weight: 700; font-size: .74rem; }
.gal-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pw-row { display: flex; gap: 6px; align-items: center; }
.pw-row .in { flex: 1; min-width: 0; }
.check input[type=checkbox], .check input[type=radio] { flex: none; }

/* bank accounts list (Settings) */
.bank-list { display: grid; gap: 10px; margin-bottom: 4px; }
.bank-item { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--bg); }
.bank-sum { flex: 1 1 220px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.bank-sum > div { min-width: 0; display: grid; }
.bank-sum b { overflow-wrap: anywhere; }
.bank-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green-50); color: var(--green); font-weight: 800; font-size: .85rem; }
.bank-item details > summary { list-style: none; cursor: pointer; display: inline-flex; }
.bank-item details > summary::-webkit-details-marker { display: none; }
.bank-item details[open] { order: 5; flex-basis: 100%; display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.bank-item details[open] > summary { justify-self: start; background: var(--green-50); }
.bank-form { padding: 0; border: 0; box-shadow: none; background: none; }
.bank-add { border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 4px; }
.bank-add h4 { margin: 0; }
