:root {
  color-scheme:dark;
  --bg:#060d15; --surface:#101c29; --soft:#142536; --ink:#edf6ff;
  --muted:#a0b3c7; --line:#243b50; --accent:#39e5d3; --accent-soft:#10332f;
  --blue:#33b8ff; --purple:#a19aff; --danger:#ff9aab; --danger-soft:#39202c;
  --amber:#ffd18a; --amber-soft:#352c1c; --shadow:0 16px 40px #00000026;
  --radius:20px; --content-top:0px; --content-bottom:0px;
  --page-gutter:clamp(24px,3vw,40px); --section-gap:24px; --panel-padding:24px; --control-gap:12px;
  --card:linear-gradient(145deg,#142331 0%,#0d1723 100%);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-synthesis:none;
}
* { box-sizing:border-box; }
body {
  margin:0; color:var(--ink); background:var(--bg);
  background-image:radial-gradient(ellipse at 85% 0,#123d6038,transparent 50%),radial-gradient(ellipse at 0 55%,#0878640c,transparent 45%);
  background-attachment:fixed;
  font-size:14px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
button,input,textarea,select { font:inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { opacity:.45; cursor:default; }
button:focus-visible,a:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
input:focus,textarea:focus,select:focus { outline:2px solid #33b8ff; outline-offset:2px; }
a { color:var(--blue); }
h1,h2,h3,p { margin:0; }
h1 { font-size:30px; line-height:1.2; letter-spacing:-1px; font-weight:750; }
h2 { font-size:18px; line-height:1.35; letter-spacing:-.35px; }
h3 { font-size:15px; }
.icon { width:20px; height:20px; flex-shrink:0; }
.app-shell { min-height:100dvh; }
.sidebar {
  position:fixed; inset:0 auto 0 0; width:246px; display:flex; flex-direction:column;
  padding:30px 18px 24px; background:linear-gradient(175deg,#101d2bea,#080f18f5);
  border-right:1px solid #25435980; z-index:5;
}
.brand { display:flex; align-items:center; gap:10px; padding:0 13px; font-size:26px; font-weight:780; letter-spacing:-1px; }
.brand img { width:40px; height:43px; filter:drop-shadow(0 0 12px #10cddd30); }
.brand small { display:block; font-size:9px; letter-spacing:1.7px; color:var(--muted); font-weight:500; text-transform:uppercase; margin-top:-3px; }
.nav-list { display:flex; flex-direction:column; gap:10px; margin-top:45px; }
.nav-item { display:flex; align-items:center; gap:12px; border:1px solid transparent; background:transparent; color:var(--muted); padding:14px 15px; border-radius:13px; font-weight:600; text-align:left; transition:background .15s,border-color .15s; }
.nav-item:hover { background:#12283b; color:var(--ink); }
.nav-item.active { color:#60ecdf; background:linear-gradient(110deg,#123a39,#122c3e); border-color:#238c8b70; box-shadow:inset 0 1px 0 #5ffffb0a,0 0 24px #10cab707; }
.nav-item.active .icon { filter:drop-shadow(0 0 6px #24ebd550); }
.sidebar-caption { margin:30px 13px 0; color:#7294ac; font-size:10px; letter-spacing:1.8px; }
.sidebar-foot { margin-top:auto; padding:20px 10px 0; border-top:1px solid var(--line); display:flex; gap:10px; align-items:center; color:var(--muted); font-size:11px; }
.avatar { width:36px; height:36px; display:grid; place-items:center; border-radius:12px; border:1px solid #267279; background:linear-gradient(145deg,#17464b,#112c3e); color:#6ff3e4; font-weight:700; flex-shrink:0; }
.user-name { color:var(--ink); font-size:13px; font-weight:650; }
.workspace { margin-left:246px; }
.topbar { min-height:83px; border-bottom:1px solid #1c354b; display:flex; align-items:center; justify-content:space-between; padding:17px 38px; gap:16px; background:linear-gradient(110deg,#0e1b2be8,#0c1822df); }
.topbar-label { color:var(--muted); font-size:11px; }
.shop-picker { display:flex; align-items:center; gap:12px; background:transparent; border:0; color:var(--ink); padding:0; text-align:left; min-width:0; }
.shop-picker .shop-icon { padding:11px; border:1px solid #2c657b; border-radius:13px; background:linear-gradient(140deg,#173e4d,#12263a); display:flex; color:#5de9e3; }
.shop-picker strong { font-size:14px; display:block; max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.shop-picker > .icon { color:var(--muted); width:16px; margin-left:7px; }
.shop-picker:hover strong,.shop-picker[aria-expanded="true"] strong { color:var(--accent); }
.shop-picker:disabled { opacity:.65; }
.dot { width:6px; height:6px; border-radius:50%; display:inline-block; background:var(--accent); box-shadow:0 0 9px #31e9c98a; flex-shrink:0; }
main { display:flex; flex-direction:column; gap:var(--section-gap); min-width:0; max-width:1220px; margin:0 auto; padding:32px var(--page-gutter) 64px; }
main > * { min-width:0; margin-block:0; }
main > .button.quiet:first-child { align-self:flex-start; margin-bottom:-12px; }
main > .breadcrumb { margin-bottom:-8px; }
main > .section-label { margin-top:8px; }
main > .section-label + * { margin-top:-8px; }
.editor-content { display:flex; flex-direction:column; gap:var(--section-gap); min-width:0; }
.page-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-start; gap:16px; }
.page-head > div:first-child { min-width:0; flex:1 1 220px; }
h1,h2,h3 { overflow-wrap:anywhere; }
.page-head p { margin-top:8px; color:var(--muted); font-size:13px; }
.head-actions { display:flex; flex-wrap:wrap; align-items:center; gap:var(--control-gap); flex-shrink:0; max-width:100%; }
.button { min-height:44px; display:inline-flex; align-items:center; justify-content:center; gap:8px; border:1px solid #304b64; border-radius:12px; padding:11px 16px; background:linear-gradient(160deg,#1b3044,#142435); color:var(--ink); font-weight:600; line-height:1.3; text-decoration:none; box-shadow:inset 0 1px 0 #ffffff05; transition:filter .15s,border-color .15s; }
.button:hover:not(:disabled) { filter:brightness(1.13); border-color:#49789a; }
.button.primary { border-color:#40cbfd; color:#fff; background:linear-gradient(120deg,#0878b5,#2268e5); box-shadow:inset 0 1px 0 #a8f9ff40,0 4px 18px #087cdb25; text-shadow:0 1px 2px #00487866; }
.button.primary:hover:not(:disabled) { border-color:#8ceaff; }
.button.danger { color:var(--danger); background:linear-gradient(145deg,#352431,#231b29); border-color:#673445; }
.button.quiet { border-color:transparent; background:transparent; color:var(--muted); padding:8px; box-shadow:none; }
.button.icon-button { padding:10px; min-width:40px; background:transparent; color:var(--muted); border-color:transparent; box-shadow:none; }
.button .icon { width:17px; height:17px; }
.button.small { min-height:36px; font-size:12px; padding:7px 11px; }
.overview-hero { position:relative; min-height:226px; display:flex; align-items:center; gap:20px; padding:29px 32px; margin-bottom:24px; border:1px solid #286276; border-radius:24px; overflow:hidden; background:radial-gradient(ellipse at 82% 75%,#0094d033,transparent 44%),linear-gradient(110deg,#102837,#0a1421 70%); box-shadow:inset 0 1px 0 #67fff71a,0 15px 60px #0003; }
.overview-hero:before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(125deg,transparent 48%,#1cd7f408 48%,#1cd7f408 49%,transparent 49%); }
.hero-copy { position:relative; z-index:1; flex:1; min-width:0; }
.eyebrow { display:flex; align-items:center; gap:8px; color:#62e8e1; font-size:10px; letter-spacing:1.8px; font-weight:650; margin-bottom:13px; }
.hero-copy h1 { font-size:34px; letter-spacing:-1.2px; max-width:400px; }
.hero-copy h1 span { display:block; color:#76cfff; }
.hero-copy p { color:#b3c6d7; font-size:13px; margin-top:11px; max-width:350px; }
.hero-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:21px; }
.hero-art { flex-shrink:0; position:relative; width:208px; height:208px; margin:-18px 1px -18px 0; }
.hero-art img { display:block; width:100%; height:100%; object-fit:contain; border-radius:50%; box-shadow:0 0 36px #04a5ee22; }
.stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.stat { --stat-color:var(--accent); position:relative; overflow:hidden; padding:22px; border:1px solid #28524e; background:radial-gradient(ellipse at 100% 0,#13dcaa0d,transparent 70%),var(--card); border-radius:var(--radius); box-shadow:var(--shadow),inset 0 1px 0 #7cf9e907; }
.stat:nth-child(2) { --stat-color:var(--blue); border-color:#254b67; background:radial-gradient(ellipse at 100% 0,#187fe41a,transparent 70%),var(--card); }
.stat:nth-child(3) { --stat-color:var(--purple); border-color:#3b3d65; background:radial-gradient(ellipse at 100% 0,#7564e315,transparent 70%),var(--card); }
.stat-top { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#bfd0e0; font-size:12px; }
.stat-top .icon { width:21px; height:21px; padding:9px; box-sizing:content-box; border:1px solid color-mix(in srgb,var(--stat-color) 30%,transparent); background:color-mix(in srgb,var(--stat-color) 8%,transparent); color:var(--stat-color); border-radius:12px; filter:drop-shadow(0 0 7px #27dbe30a); }
.stat strong { display:block; font-size:35px; letter-spacing:-1px; line-height:1.25; margin-top:6px; font-weight:750; }
.stat small { display:block; color:var(--muted); font-size:11px; margin-top:6px; }
.panel { border:1px solid #263d52; background:var(--card); border-radius:var(--radius); padding:var(--panel-padding); display:flex; flex-direction:column; gap:16px; min-width:0; box-shadow:var(--shadow),inset 0 1px 0 #d3efff04; }
.panel-title { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:0; }
.panel-title > div { min-width:0; }
.panel-title p { color:var(--muted); font-size:12px; margin-top:5px; }
.panel > h2 { margin:0; }
.panel > :not(.text-counter) { margin-block:0; min-width:0; }
.panel > .button { align-self:flex-start; max-width:100%; }
.panel > .field,.panel > .stock-actions { width:100%; }
.status-panel { display:flex; flex-direction:row; align-items:center; gap:17px; border-color:#23675d; background:linear-gradient(105deg,#11352e,#0f222c 75%); }
.status-panel.paused { border-color:#685431; background:linear-gradient(105deg,#2d291e,#16212b 75%); }
.status-orb { width:48px; height:48px; border:1px solid #2a9c86; border-radius:15px; background:linear-gradient(145deg,#155546,#143c3e); color:#65f5cf; box-shadow:0 0 22px #14dcb114,inset 0 1px 0 #77ffe42b; display:grid; place-items:center; flex-shrink:0; }
.paused .status-orb { color:var(--amber); border-color:#967649; background:#463a25; box-shadow:none; }
.status-copy { flex:1; min-width:0; }
.status-copy p { color:#abcbca; font-size:12px; margin-top:5px; }
.status-copy h2 { font-size:16px; color:#dcfff5; }
.paused .status-copy h2 { color:#ffe3b0; }
.badge { display:inline-flex; align-items:center; justify-content:center; gap:5px; border:1px solid #34485a; border-radius:7px; padding:4px 9px; background:#142536; color:#adc2d6; font-size:11px; font-weight:600; white-space:nowrap; line-height:1.4; }
.badge.good { border-color:#227365; background:#10382f; color:#7cf2ca; }
.badge.warn { border-color:#705c36; background:var(--amber-soft); color:var(--amber); }
.badge.bad { border-color:#784454; background:var(--danger-soft); color:var(--danger); }
.toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-bottom:20px; }
.search { display:flex; align-items:center; gap:11px; padding:12px 15px; border:1px solid #304b64; border-radius:12px; background:#0d1b29; color:#77a6c8; width:100%; max-width:330px; }
.search:focus-within { border-color:var(--blue); box-shadow:0 0 0 2px #33b8ff1a; }
.search input { background:transparent; border:0; outline:none; width:100%; color:var(--ink); min-width:0; }
.search input:focus { outline:none; }
::placeholder { color:#7e99b0; opacity:1; }
.filters { display:flex; gap:6px; flex-wrap:wrap; }
.filter { background:transparent; border:1px solid transparent; border-radius:9px; min-height:38px; padding:8px 12px; color:var(--muted); font-size:12px; font-weight:550; }
.filter:hover { color:var(--ink); background:#122538; }
.filter.active { border-color:#267a78; background:linear-gradient(130deg,#133937,#102a3a); color:#6ef3e1; }
.catalog-meta { color:var(--muted); font-size:12px; margin-bottom:14px; }
.product-list { border:1px solid #2b4359; background:var(--card); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.product-row { width:100%; display:grid; grid-template-columns:48px minmax(0,1fr) 120px 104px 18px; align-items:center; gap:15px; padding:20px 22px; border:0; border-bottom:1px solid #22394e; background:transparent; text-align:left; color:var(--ink); transition:background .15s; }
.product-row:last-child { border-bottom:0; }
.product-row:hover { background:#152e425c; }
.product-icon { width:46px; height:46px; border:1px solid #246c94; border-radius:14px; display:grid; place-items:center; background:linear-gradient(145deg,#154b6e,#11263c); color:#53cfff; box-shadow:inset 0 1px 0 #9cefff12,0 0 18px #139deb08; }
.product-icon.program { background:linear-gradient(145deg,#3b3260,#20253e); border-color:#5b5188; color:#b8aaff; }
.product-name { display:block; font-weight:650; font-size:14px; overflow-wrap:anywhere; }
.product-kind { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.product-stock strong { display:block; font-size:14px; font-weight:650; }
.product-stock span { display:block; color:var(--muted); font-size:10px; margin-top:2px; }
.product-row > .icon { color:#6c8ea9; width:16px; }
.empty { text-align:center; padding:52px 24px; background:var(--card); border:1px solid #2b465d; border-radius:var(--radius); }
.empty-icon { display:inline-grid; place-items:center; width:62px; height:62px; border:1px solid #237a8c; border-radius:20px; background:linear-gradient(145deg,#164a58,#102d40); color:#50e4e3; margin-bottom:18px; box-shadow:0 0 30px #12c7d211; }
.empty-icon .icon { width:29px; height:29px; }
.empty p { color:var(--muted); max-width:380px; margin:12px auto 23px; }
.breadcrumb { display:flex; align-items:center; gap:7px; margin-bottom:22px; color:var(--muted); font-size:12px; }
.breadcrumb button { background:transparent; border:0; padding:0; color:var(--muted); }
.breadcrumb .icon { width:14px; height:14px; }
.product-head { margin-bottom:25px; }
.product-head h1 { overflow-wrap:anywhere; }
.product-sub { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:13px; }
.tabs { display:flex; gap:25px; border-bottom:1px solid var(--line); margin-bottom:25px; overflow:auto; }
.tab { padding:0 2px 14px; background:transparent; border:0; border-bottom:2px solid transparent; color:var(--muted); font-weight:600; white-space:nowrap; }
.tab.active { color:#55e9df; border-bottom-color:var(--accent); text-shadow:0 0 18px #39e5d32a; }
.editor-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:var(--section-gap); align-items:start; }
.field { display:flex; flex-direction:column; gap:8px; margin:0; min-width:0; }
.field-label { font-size:12px; font-weight:650; color:#d6e5f2; }
.hint { color:var(--muted); font-size:12px; line-height:1.65; font-weight:400; }
input[type="text"],input[type="number"],textarea,select { padding:12px 13px; border:1px solid #35516b; background:#091622; color:#e5f3ff; border-radius:11px; width:100%; min-width:0; }
textarea { resize:vertical; line-height:1.7; }
textarea.mono,pre,.mono { font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace; font-size:12px; }
textarea.template { min-height:270px; }
.field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.switch-row { display:flex; gap:15px; align-items:center; justify-content:space-between; padding:0 0 16px; margin:0; border-bottom:1px solid var(--line); }
.switch-row p { color:var(--muted); font-size:12px; margin-top:5px; }
.switch { appearance:none; width:42px; height:25px; padding:0; border:1px solid #436079; border-radius:30px; background:#26394b; cursor:pointer; flex-shrink:0; position:relative; }
.switch:after { content:""; position:absolute; width:17px; height:17px; top:3px; left:3px; background:#d1deea; border-radius:50%; box-shadow:0 1px 4px #0005; transition:transform .15s; }
.switch:checked { background:linear-gradient(100deg,#1aab94,#178fca); border-color:#46e2ce; box-shadow:0 0 15px #22dcb616; }
.switch:checked:after { transform:translateX(17px); background:#f5fffe; }
.token-row { display:flex; gap:6px; flex-wrap:wrap; margin:0; }
.button.token { min-height:32px; border:1px solid #2b646b; background:linear-gradient(145deg,#123d3e,#122a37); border-radius:7px; padding:6px 9px; color:#72f0dc; font-family:monospace; font-size:11px; font-weight:500; box-shadow:none; }
.text-counter { color:var(--muted); font-size:11px; text-align:right; }
.panel > .text-counter { margin-top:-8px; }
.preview-panel { position:sticky; top:22px; background:radial-gradient(ellipse at 100% 0,#1d6b9930,transparent 70%),linear-gradient(145deg,#12283a,#0c1927); border:1px solid #306282; border-radius:var(--radius); padding:22px; min-height:340px; box-shadow:inset 0 1px 0 #a9f0ff0a; }
.preview-label { display:flex; align-items:center; gap:7px; font-size:10px; text-transform:uppercase; letter-spacing:1.5px; color:#85cbe9; margin-bottom:18px; }
.preview-label:before { content:""; width:5px; height:5px; border-radius:50%; background:var(--blue); box-shadow:0 0 8px var(--blue); }
.preview-bubble { background:linear-gradient(145deg,#1d354c,#182c40); border:1px solid #3a5873; border-radius:16px 16px 16px 4px; padding:17px; box-shadow:var(--shadow); white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.75; }
.preview-note { font-size:12px; color:var(--muted); margin-top:15px; line-height:1.7; }
.preview-bubble.error { color:var(--danger); border-color:#784254; }
.callout { padding:14px 16px; border:1px solid #2b485e; border-radius:12px; background:#102333; color:#b0c5d8; font-size:12px; margin:16px 0 18px; overflow-wrap:anywhere; }
.callout.warn { color:var(--amber); border-color:#655438; background:#2d281c; }
.callout.error { color:var(--danger); border-color:#784254; background:var(--danger-soft); }
.save-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px 0; }
.save-bar .button { flex-shrink:0; }
.save-state { min-width:0; }
.save-state { font-size:12px; color:var(--muted); }
.stock-list { display:flex; flex-direction:column; gap:12px; }
.stock-unit { border:1px solid #2c4a63; border-radius:14px; background:var(--card); padding:18px; box-shadow:0 8px 26px #0000001a; }
.unit-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:10px; }
.unit-id { color:#8ab7d6; font-size:11px; font-weight:600; }
.unit-actions { display:flex; gap:4px; }
.unit-actions .button { min-height:34px; padding:7px; min-width:34px; }
.stock-unit pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:#e1f2ff; line-height:1.8; }
.pagination { display:flex; align-items:center; gap:10px; justify-content:space-between; margin-top:var(--section-gap); }
.stock-actions { display:flex; align-items:center; gap:var(--control-gap); flex-wrap:wrap; min-width:0; }
.stock-actions .button { max-width:100%; }
.stock-head > .stock-actions { width:auto; }
.stock-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:20px; }
.stock-head p { color:var(--muted); font-size:12px; margin-top:5px; }
.modal { border:1px solid #365e7d; border-radius:23px; background:linear-gradient(145deg,#15293b,#0b1724 85%); color:var(--ink); width:min(560px,calc(100% - 32px)); max-height:calc(100dvh - 48px - max(env(safe-area-inset-top),var(--content-top)) - max(env(safe-area-inset-bottom),var(--content-bottom))); padding:0; overflow:hidden; box-shadow:0 25px 100px #0008,0 0 50px #11a8ed10; }
.modal::backdrop { background:#020911bc; backdrop-filter:blur(6px); }
.modal[open] { display:flex; flex-direction:column; }
.modal-head { flex-shrink:0; padding:20px 24px 16px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.modal-head h2 { font-size:20px; }
.modal-body { padding:0 24px 24px; min-height:0; overflow:auto; overscroll-behavior:contain; }
.modal-body > div,.modal-body form { display:flex; flex-direction:column; gap:16px; min-width:0; }
.modal-body > div > *,.modal-body form > * { margin-block:0; }
.modal-body .filters { flex-direction:row; }
.modal-body .field { width:100%; }
.modal-actions { flex-shrink:0; flex-wrap:wrap; padding:16px 24px; border-top:1px solid #2a465d; display:flex; gap:9px; justify-content:flex-end; background:#0b1925; }
.body-copy { font-size:13px; color:#b0c5d8; line-height:1.8; white-space:pre-line; }
.kind-options { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.kind-option { display:flex; flex-direction:column; gap:8px; border:1px solid #34506b; border-radius:14px; padding:18px 14px; cursor:pointer; position:relative; background:#0d1d2d; }
.kind-option:has(input:checked) { border-color:#34b9ce; background:linear-gradient(140deg,#144653,#113047); box-shadow:0 0 18px #12d8cf08; }
.kind-option > .icon { color:#54dfff; width:23px; height:23px; }
.kind-option input { position:absolute; right:10px; top:10px; accent-color:#31d5d0; }
.kind-option strong { font-size:12px; }
.kind-option span { font-size:11px; color:#b0c5d8; }
.kind-fieldset { border:0; padding:0; margin:0 0 19px; min-width:0; }
.kind-fieldset legend { margin-bottom:10px; }
.shop-option { width:100%; display:flex; align-items:center; gap:12px; border:1px solid #304e68; background:#102334; color:var(--ink); padding:16px; border-radius:13px; margin-bottom:10px; text-align:left; }
.shop-option > .icon { color:#5adaf4; }
.shop-option span { flex:1; min-width:0; overflow-wrap:anywhere; }
.shop-option small { display:block; color:var(--muted); margin-top:3px; }
.shop-option.active { border-color:#2b9b99; background:linear-gradient(110deg,#124039,#122e40); }
.shop-option:hover { border-color:#49bfc8; }
.upload-zone { border:1px dashed #32b2bc; border-radius:14px; background:linear-gradient(130deg,#133b40,#112a3e); padding:22px; display:flex; flex-direction:column; align-items:center; gap:8px; cursor:pointer; margin:18px 0; color:#69e8ec; }
.upload-zone span { font-size:12px; font-weight:600; }
.upload-zone small { font-size:11px; color:#a9c2d7; }
.upload-zone input { max-width:100%; font-size:11px; color:#c0daee; }
.upload-zone input::file-selector-button { padding:7px 10px; border:1px solid #40738b; border-radius:7px; background:#173e51; color:#dcf7ff; cursor:pointer; }
.upload-text { min-height:190px; }
.import-result { white-space:pre-line; }
.bottom-nav { display:none; }
.chat-preview { min-width:0; flex:1; }
.chat-preview small { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:65vw; }
.chat-row { width:100%; text-align:left; }
.conversation { display:flex; flex-direction:column; gap:14px; }
.message-history { display:flex; flex-direction:column; gap:12px; overflow:auto; height:clamp(260px,48dvh,650px); overscroll-behavior:contain; padding:8px; }
.message-bubble { align-self:flex-start; max-width:88%; border:1px solid #274b62; border-radius:14px; background:#122534; padding:12px 15px; overflow-wrap:anywhere; flex-shrink:0; }
.message-bubble.outgoing { align-self:flex-end; background:#143a38; border-color:#23645e; }
.message-bubble.system { align-self:center; max-width:96%; background:transparent; opacity:.8; }
.message-bubble p { white-space:pre-wrap; margin:6px 0; color:var(--ink); }
.message-bubble a { color:#67eddf; }
.message-author,.message-time { display:block; color:var(--muted); font-size:11px; }
.message-compose { flex-shrink:0; display:grid; gap:8px; }
.chat-compose-row { display:flex; align-items:flex-end; gap:8px; min-width:0; }
.message-compose textarea { flex:1; width:100%; resize:none; min-height:44px; max-height:120px; padding:9px 11px; line-height:1.5; }
.chat-compose-row > .button { flex-shrink:0; }
.chat-send[aria-busy="true"] .icon { display:none; }
.chat-send[aria-busy="true"]::after { content:""; width:18px; height:18px; border:2px solid #ffffff60; border-top-color:#fff; border-radius:50%; animation:spin .8s linear infinite; }
.chat-page .conversation > .hint[data-state="sending"] { color:var(--blue); background:#0d2334; }
.chat-image-drafts:empty,.chat-deals:empty { display:none; }
.message-delivery { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.message-delivery-field { margin-top:12px; }
.message-delivery-label { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.message-delivery-label .button { font-size:11px; flex-shrink:0; white-space:nowrap; }
.message-delivery pre { margin:8px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; font-size:13px; color:var(--ink); user-select:text; }
.conversation [hidden],.chat-more[hidden] { display:none; }
.message-attachments,.message-buttons { display:flex; flex-wrap:wrap; gap:8px; }
.message-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin-top:4px; }
.message-date { align-self:center; flex-shrink:0; color:var(--muted); font-size:11px; padding:3px 10px; background:#132231; border-radius:12px; }
.message-bubble:not(.system) > .message-author { display:none; }
.message-bubble { padding:9px 12px; }
.message-image { display:block; padding:0; border:0; background:transparent; cursor:zoom-in; max-width:100%; }
.message-image img { display:block; max-width:100%; width:auto; max-height:260px; border-radius:8px; object-fit:contain; }
.message-file { display:block; padding:10px 0; overflow-wrap:anywhere; }
.message-context { margin:8px 0; padding:10px; border:1px solid var(--line); border-radius:8px; display:grid; gap:8px; }
.message-context a { display:block; font-size:12px; margin-top:5px; }
.message-context p { font-size:12px; }
.chat-deals { display:flex; flex-shrink:0; gap:8px; max-width:100%; overflow-x:auto; scroll-snap-type:x proximity; }
.chat-deals .chat-deal-card { flex:1 0 min(280px,100%); min-width:0; padding:8px 12px; gap:10px; text-align:left; border-color:var(--line); background:#101f2c; scroll-snap-align:start; }
.chat-deal-product { flex:1; min-width:0; display:grid; gap:2px; }
.chat-deal-product small { color:var(--muted); font-size:10px; font-weight:400; }
.chat-deal-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:600; }
.chat-deal-summary { flex-shrink:0; display:grid; justify-items:end; gap:3px; color:var(--blue); white-space:nowrap; }
.chat-deal-summary small { font-size:10px; color:var(--amber); }
.chat-deal-badge { padding:4px 8px; border-radius:7px; background:#153047; font-size:11px; font-weight:500; }
.chat-deal-card > .icon { flex-shrink:0; width:14px; height:14px; color:var(--muted); }
.chat-deals [data-state="CONFIRMED"] .chat-deal-badge { color:var(--accent); background:var(--accent-soft); }
.chat-deals [data-state="ROLLED_BACK"] .chat-deal-badge,.chat-deals [data-state="FAILED"] .chat-deal-badge { color:var(--amber); background:var(--amber-soft); }
.chat-lightbox img { display:block; max-width:100%; max-height:65dvh; margin:auto; object-fit:contain; }
.chat-image-drafts { display:flex; gap:8px; overflow:auto; }
.chat-image-draft { display:flex; align-items:center; flex-shrink:0; gap:8px; max-width:260px; padding:8px; border:1px solid var(--line); border-radius:8px; }
.chat-image-draft img { width:48px; height:48px; object-fit:cover; border-radius:6px; }
.chat-image-draft span { font-size:11px; max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.modal-body .chat-deal-content { display:flex; flex-direction:column; gap:20px; }
.chat-deal-details { display:grid; gap:8px; min-width:0; overflow-wrap:anywhere; }
.chat-deal-actions .button { flex:1 1 160px; min-height:44px; }
.chat-deal-content textarea { width:100%; }
.chat-page { height:calc(100dvh - 84px - var(--content-top)); min-height:0; max-width:none; gap:8px; padding:12px 16px; }
.chat-header { display:flex; align-items:center; gap:8px; flex-shrink:0; min-width:0; }
.chat-heading { flex:1; min-width:0; }
.chat-heading small { display:block; color:var(--muted); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-header h1 { min-width:0; font-size:20px; margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-header > .button { flex-shrink:0; font-size:12px; padding:10px; }
.chat-header > .button:last-child { width:44px; }
.chat-page > .conversation { flex:1; min-height:0; padding:12px; gap:8px; }
.chat-page .message-history { flex:1; height:auto; min-height:80px; padding:4px; }
.chat-page .message-history::before { content:""; margin-top:auto; }
.chat-page .conversation > .hint { flex-shrink:0; font-size:11px; }
@media(max-width:700px) {
  main.chat-page { height:calc(100dvh - 152px - var(--content-top) - max(env(safe-area-inset-bottom),var(--content-bottom))); padding:8px; }
  .chat-page > .conversation { padding:10px; border-radius:14px; }
  .chat-header { gap:4px; }
  .chat-header h1 { font-size:18px; }
  .chat-header > .button { padding:8px; }
  .chat-compose-row .chat-attach,.chat-compose-row .chat-send { width:44px; min-width:44px; padding:10px; font-size:0; gap:0; }
}
.loading { min-height:180px; display:flex; justify-content:center; align-items:center; gap:13px; color:var(--muted); }
.spinner { display:inline-block; width:22px; height:22px; border:2px solid #23425b; border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.launch { display:flex; align-items:center; justify-content:center; flex-direction:column; min-height:100dvh; gap:18px; padding:30px; text-align:center; background:radial-gradient(ellipse at center,#0e334d,transparent 65%); }
.launch p { color:var(--muted); }
.auth-screen { max-width:460px; margin:4dvh auto 0; padding:24px; }
.auth-screen .brand { justify-content:center; margin-bottom:22px; }
.auth-art { display:block; width:150px; height:150px; border-radius:50%; margin:0 auto 24px; box-shadow:0 0 45px #05b7e51c; }
#toast { position:fixed; bottom:28px; left:50%; transform:translate(-50%,15px); max-width:min(520px,calc(100% - 32px)); width:max-content; display:flex; gap:10px; align-items:center; padding:14px 18px; border:1px solid #37657c; border-radius:14px; box-shadow:0 10px 40px #0008; background:#142b3d; color:var(--ink); z-index:40; opacity:0; pointer-events:none; transition:opacity .15s,transform .15s; font-size:12px; }
#toast.visible { opacity:1; transform:translate(-50%,0); }
#toast .icon { color:var(--accent); width:18px; }
#toast.error { border-color:#805164; }
#toast.error .icon { color:var(--danger); }
.hidden { display:none!important; }
.form-error:empty,.hint:empty { display:none; }
.form-error { color:var(--danger); font-size:12px; margin-bottom:12px; white-space:pre-line; }
hr { border:0; border-top:1px solid var(--line); margin:25px 0; }
@media(min-width:1500px) { main { padding-top:40px; } }
@media(max-width:1100px) {
  .sidebar { width:214px; padding-inline:13px; } .workspace { margin-left:214px; }
  :root { --page-gutter:24px; } .topbar { padding-inline:var(--page-gutter); }
  .editor-grid { grid-template-columns:1fr; } .preview-panel { position:static; min-height:220px; }
  .product-row { grid-template-columns:42px minmax(0,1fr) 90px 90px 16px; gap:12px; padding-inline:16px; }
  .overview-hero { padding:25px; } .hero-copy h1 { font-size:29px; } .hero-art { width:170px; height:170px; }
}
@media(max-width:700px) {
  :root { --page-gutter:16px; --section-gap:20px; --panel-padding:20px; }
  h1 { font-size:26px; } .sidebar { display:none; } .workspace { margin-left:0; }
  .topbar { padding:calc(13px + var(--content-top)) 18px 13px; min-height:78px; }
  .shop-picker strong { max-width:calc(100vw - 115px); } .shop-picker .shop-icon { padding:10px; }
  main { padding:24px max(var(--page-gutter),env(safe-area-inset-left)) calc(104px + max(env(safe-area-inset-bottom),var(--content-bottom))); }
  .page-head { margin-bottom:23px; gap:12px; } .page-head p { font-size:12px; }
  .page-head > .button { flex-shrink:0; padding:11px 12px; font-size:12px; }
  .head-actions .button { padding:10px 12px; font-size:12px; }
  .overview-hero { padding:23px 20px; min-height:221px; border-radius:21px; margin-bottom:17px; gap:0; align-items:flex-start; }
  .hero-copy h1 { font-size:27px; max-width:220px; letter-spacing:-.8px; }
  .hero-copy p { max-width:205px; font-size:12px; margin-top:10px; }
  .eyebrow { font-size:9px; letter-spacing:1.3px; margin-bottom:12px; }
  .hero-art { position:absolute; right:14px; top:35px; width:106px; height:106px; margin:0; }
  .hero-actions { gap:8px; margin-top:22px; } .hero-actions .button { padding:10px 13px; font-size:12px; }
  .stats { gap:9px; margin-bottom:17px; }
  .stat { padding:15px 12px; border-radius:15px; } .stat-top { font-size:10px; align-items:flex-start; min-height:31px; }
  .stat-top .icon { width:16px; height:16px; padding:0; border:0; background:none; border-radius:0; }
  .stat strong { font-size:29px; margin-top:6px; } .stat small { font-size:10px; line-height:1.45; min-height:29px; }
  .panel { padding:var(--panel-padding); } .panel-title { margin-bottom:0; }
  .panel-title h2 { font-size:17px; } .panel-title p { font-size:11px; }
  .status-panel { flex-wrap:wrap; gap:13px; } .status-panel .button { width:100%; }
  .status-orb { width:43px; height:43px; border-radius:13px; } .status-copy h2 { font-size:15px; } .status-copy p { font-size:11px; }
  .toolbar { gap:12px; } .search { max-width:none; } .filters { gap:3px; } .filter { padding:7px 9px; font-size:11px; min-height:36px; }
  .product-list { border-radius:16px; } .product-row { grid-template-columns:39px minmax(0,1fr) 68px 12px; gap:10px; padding:17px 12px; }
  .product-icon { width:38px; height:40px; border-radius:12px; }
  .product-name { font-size:13px; } .product-kind { font-size:10px; } .product-row > .badge { display:none; }
  .product-stock strong { font-size:12px; } .product-stock span { font-size:10px; } .product-row > .icon { width:12px; }
  .panel .product-row { grid-template-columns:36px minmax(0,1fr) 57px 10px; gap:8px; padding:15px 10px; }
  .panel .product-icon { width:35px; height:37px; } .panel .product-name { font-size:12px; }
  .empty { padding:38px 20px; } .stock-head { align-items:flex-start; flex-direction:column; } .stock-actions { width:100%; }
  .stock-actions .button { flex:1 1 140px; font-size:12px; } .product-head { flex-direction:column; } .product-head .head-actions { width:100%; }
  .tabs { gap:24px; margin-bottom:0; } .field-grid { gap:16px; } .editor-grid { gap:var(--section-gap); }
  .save-bar { position:sticky; bottom:calc(76px + var(--content-bottom)); background:#102233f5; padding:13px; border:1px solid #355976; border-radius:14px; box-shadow:0 8px 30px #0006; z-index:3; }
  .save-bar .button { padding:11px 13px; font-size:12px; } .save-state { font-size:11px; }
  .bottom-nav { position:fixed; inset:auto 0 0; padding:9px 22px calc(9px + max(env(safe-area-inset-bottom),var(--content-bottom))); display:flex; justify-content:center; gap:10px; background:#0b1723f5; border-top:1px solid #274b62; box-shadow:0 -8px 30px #0003; z-index:8; backdrop-filter:blur(14px); }
  .bottom-nav .nav-item { flex:1; max-width:200px; display:flex; flex-direction:column; gap:4px; padding:6px; font-size:10px; border:1px solid transparent; background:transparent; }
  .bottom-nav .nav-item .icon { width:21px; height:21px; }
  .bottom-nav .nav-item.active { color:#67eddf; border-color:#23645e; background:linear-gradient(110deg,#123931,#102b37); box-shadow:none; }
  #toast { bottom:calc(92px + var(--content-bottom)); }
  .modal-body { padding-inline:20px; } .modal-head,.modal-actions { padding-inline:20px; }
  .auth-screen { margin-top:2dvh; }
}
@media(max-width:375px) {
  .hero-art { width:86px; height:86px; right:10px; top:40px; }
  .hero-copy h1 { font-size:25px; max-width:195px; }
  .hero-copy p { max-width:175px; }
  .hero-actions .button { padding-inline:11px; font-size:11px; }
  .stat { padding-inline:10px; } .stat-top .icon { display:none; }
  .product-row { gap:8px; grid-template-columns:35px minmax(0,1fr) 61px 10px; }
  .product-icon { width:34px; height:37px; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { animation:none!important; transition:none!important; } }

@media(max-width:340px) { .hero-art { width:62px; height:62px; right:12px; top:20px; } }

/* Management sections share the same surfaces and touch targets as the catalog. */
.resource-list { display:flex; flex-direction:column; gap:12px; margin:0; }
.resource-row { display:flex; width:100%; align-items:center; justify-content:space-between; gap:16px; border:1px solid #2c4a63; border-radius:14px; padding:17px 19px; background:var(--card); color:var(--ink); text-align:left; }
button.resource-row:hover { border-color:#38738c; background:#142d41; }
.resource-row > div { min-width:0; }
.resource-row strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.resource-row small { display:block; font-size:11px; color:var(--muted); overflow-wrap:anywhere; margin-top:5px; }
.resource-meta { display:flex; flex-direction:column; align-items:flex-end; gap:7px; flex-shrink:0; }
.section-label { margin:24px 0 17px; }
.details { display:grid; grid-template-columns:155px minmax(0,1fr); gap:14px 20px; margin:0 0 24px; font-size:13px; }
.details dt { color:var(--muted); }
.details dd { margin:0; overflow-wrap:anywhere; }
.delivery-data { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
.shop-card { margin-bottom:0; }
.panel > .resource-row { margin:0; }
.nav-list { margin-top:18px; }
.sidebar-caption { margin-top:31px; }
@media(max-width:700px) {
 .bottom-nav { padding-inline:7px; gap:2px; }
 .bottom-nav .nav-item { min-width:0; border-radius:11px; padding:7px 4px; font-size:9px; }
 .resource-row { gap:11px; padding:15px; }
 .resource-meta { max-width:115px; }
 .member-row { align-items:flex-start; flex-direction:column; }
 .details { grid-template-columns:1fr; gap:4px; }
 .details dd { margin:0; }
 .details dt:not(:first-child) { margin-top:12px; }
 .sidebar-caption { display:none; }
}

.button[aria-busy="true"]:before,.login-progress:before { content:""; display:inline-block; flex-shrink:0; width:14px; height:14px; border:2px solid #8dc9ed60; border-top-color:var(--accent); border-radius:50%; animation:spin .8s linear infinite; }
.login-progress { display:flex; align-items:center; gap:10px; color:#a8d9e9; padding:12px; border:1px solid #2b5971; border-radius:10px; background:#112b3c; font-size:12px; margin-bottom:16px; }
@media(prefers-reduced-motion:reduce) { .button[aria-busy="true"]:before,.login-progress:before { animation:none; } }

/* Shared rhythm for page sections, forms, dialogs and action groups. */
.topbar { padding-inline:max(var(--page-gutter),calc((100% - 1220px)/2 + var(--page-gutter))); }
.button { min-width:0; overflow-wrap:anywhere; }
.tab { min-height:44px; }
.editor-grid > .panel { margin:0; }
.modal-body .upload-zone { padding:20px; }
.modal-body .stock-actions { margin:0; }
.modal-body .button.quiet { align-self:flex-start; }
.modal-head .icon-button { flex-shrink:0; }
.delivery-data { margin:0; }
.resource-row > .badge { flex-shrink:0; }
@media(max-width:700px) {
  .topbar { padding-inline:var(--page-gutter); }
  .page-head > div:first-child { flex-basis:100%; }
  .head-actions { width:100%; }
  .head-actions .button { flex:1 1 120px; }
  .panel-title { align-items:flex-start; row-gap:10px; }
  .preview-panel { padding:var(--panel-padding); }
  .stock-head > .stock-actions { width:100%; }
  .stock-unit { padding:16px; }
  .unit-actions { gap:8px; }
  .unit-actions .button { min-width:44px; min-height:44px; }
  .modal { width:calc(100% - 32px); border-radius:20px; }
  .modal-head { padding:16px 20px; }
  .modal-body { padding:0 20px 20px; }
  .modal-actions { padding:16px 20px; gap:12px; }
  .modal-actions .button { flex:1 1 120px; }
  .modal-head h2 { font-size:18px; }
}
@media(max-width:380px) {
  :root { --panel-padding:16px; }
  .field-grid { grid-template-columns:minmax(0,1fr); }
  .save-bar { align-items:stretch; flex-direction:column; gap:10px; }
  .save-bar .button { width:100%; }
}
/* Product bonus editor */
.bonus-import-result { display:flex; flex-direction:column; gap:7px; border:1px solid #3a5c6e; padding:12px; border-radius:12px; background:#142a3a; min-width:0; }
.bonus-import-result strong { font-size:13px; }
.bonus-import-result p { font-size:12px; color:var(--muted); line-height:1.5; overflow-wrap:anywhere; }
.bonus-import-feedback:empty { display:none; }
.modal-actions .button[hidden] { display:none; }
.bonus-import-feedback { margin-top:12px; }
.bonus-intro { display:flex; flex-direction:column; gap:6px; }
.bonus-intro h2 { font-size:21px; }
.bonus-stock-panel[hidden],.field[hidden] { display:none; }
.bonus-stock-panel .panel-title { gap:10px; }
.bonus-history-row { flex-wrap:wrap; }
.bonus-history-row .resource-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.bonus-history-row strong { overflow-wrap:anywhere; }
.bonus-stock-panel .stock-actions { display:flex; gap:9px; flex-wrap:wrap; }
.bonus-stock-panel .stock-actions > .button { flex:1 1 130px; }

.shop-finances { display:flex; flex-direction:column; gap:var(--section-gap); min-width:0; }
.finance-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.finance-stats > div { padding:15px; background:#122536; border:1px solid #2a445a; border-radius:12px; min-width:0; }
.finance-stats span { display:block; color:var(--muted); font-size:11px; line-height:1.5; }
.finance-stats strong { display:block; font-size:19px; margin-top:5px; font-weight:750; overflow-wrap:anywhere; }
@media(max-width:380px) {
  .finance-stats { gap:8px; }
  .finance-stats > div { padding:11px; }
  .finance-stats strong { font-size:16px; }
}
.lot-settings { border:1px solid #2c4a63; border-radius:14px; background:#0f1e2b; overflow:hidden; }
.lot-settings + .lot-settings { margin-top:0; }
.lot-summary { display:flex; align-items:center; gap:12px; padding:17px 18px; cursor:pointer; list-style:none; }
.lot-summary::-webkit-details-marker { display:none; }
.lot-summary > div { flex:1; min-width:0; }
.lot-summary strong { display:block; font-size:14px; overflow-wrap:anywhere; }
.lot-summary small { display:block; color:var(--muted); font-size:11px; margin-top:4px; overflow-wrap:anywhere; }
.lot-summary > .icon { width:16px; height:16px; flex-shrink:0; transition:transform .2s; }
.lot-settings[open] .lot-summary > .icon { transform:rotate(180deg); }
.lot-summary:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.lot-settings-body { display:flex; flex-direction:column; gap:16px; padding:0 15px 16px; }
.lot-settings-body .panel { box-shadow:none; }
.lot-settings-body .resource-row { flex-wrap:wrap; }

/* Guided promotion setup: everything stays inside its product's listing. */
.lot-config-panel { gap:18px; background:linear-gradient(155deg,#152b3b,#101e2d 58%,#0e1b29); }
.lot-intro { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.lot-intro > div { flex:1 1 190px; }
.lot-intro h2 { font-size:19px; }
.lot-intro p { margin-top:7px; color:var(--muted); font-size:12px; line-height:1.6; }
.lot-mode-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.lot-mode-card {
  position:relative; min-height:145px; display:flex; flex-direction:column; align-items:flex-start;
  gap:10px; padding:15px; border-radius:14px; border:1px solid #375167;
  background:linear-gradient(150deg,#192c40,#122233); cursor:pointer; transition:border-color .18s,background .18s;
}
.lot-mode-card:focus-within { outline:2px solid var(--blue); outline-offset:2px; }
.lot-mode-card.selected { border-color:#43d6c7; background:linear-gradient(145deg,#153f3d,#142a3b); box-shadow:0 0 0 1px #16b3a330 inset; }
.lot-mode-card input { position:absolute; z-index:2; top:18px; right:15px; opacity:0; width:18px; height:18px; cursor:pointer; }
.lot-mode-card .lot-mode-indicator { pointer-events:none; }
.lot-mode-icon { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:10px; background:#204052; color:#73badd; }
.lot-mode-card.selected .lot-mode-icon { background:#1b5955; color:#78f7db; }
.lot-mode-icon .icon { width:19px; height:19px; }
.lot-mode-copy { display:flex; flex-direction:column; gap:5px; min-width:0; }
.lot-mode-copy strong { font-size:13px; line-height:1.35; }
.lot-mode-copy small { color:var(--muted); font-size:11px; line-height:1.5; }
.lot-mode-indicator { position:absolute; top:19px; right:16px; width:16px; height:16px; border:2px solid #4b667a; border-radius:50%; }
.lot-mode-card.selected .lot-mode-indicator { background:var(--accent); border-color:var(--accent); box-shadow:inset 0 0 0 3px #123536; }
.lot-mode-body { display:flex; flex-direction:column; gap:14px; }
.lot-mode-body[hidden] { display:none; }
.lot-step-heading { display:flex; align-items:flex-start; gap:11px; }
.lot-step-number { display:flex; align-items:center; justify-content:center; width:27px; height:27px; flex-shrink:0; border:1px solid #276f77; border-radius:9px; background:#144041; color:#76f1dd; font-size:13px; font-weight:750; }
.lot-step-heading h3 { font-size:15px; padding-top:1px; }
.lot-step-heading p { font-size:12px; margin-top:4px; color:var(--muted); line-height:1.55; }
.lot-step-divider { height:1px; background:#2b465980; margin:5px 0; }
.lot-assist { color:var(--muted); font-size:12px; line-height:1.65; }
.lot-check-result { display:flex; flex-direction:column; gap:9px; }
.lot-check-result:empty { display:none; }
.lot-verified-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px; border-radius:12px; border:1px solid #326056; background:#142e32; }
.lot-verified-row strong { font-size:12px; }
.lot-presets { display:flex; flex-wrap:wrap; gap:8px; }
.lot-presets .button { flex:1 1 75px; }
.lot-full-action { width:100%; }
.lot-confirm-choice { display:flex; align-items:flex-start; gap:12px; padding:14px; background:#112e30; border:1px solid #29605a; border-radius:12px; cursor:pointer; font-size:12px; line-height:1.6; }
.lot-confirm-choice input { width:19px; height:19px; flex-shrink:0; margin-top:1px; accent-color:var(--accent); }
.lot-confirm-choice input:disabled { cursor:not-allowed; }
.lot-budget-box { display:flex; flex-direction:column; gap:12px; padding:16px; background:#101d2b; border:1px solid #2a445a; border-radius:14px; }
.lot-budget-status { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
.lot-budget-edit { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.lot-budget-edit .field { flex:1 1 130px; }
.lot-budget-edit .button { flex:1 1 140px; }
.lot-inline-help { color:var(--muted); font-size:11px; margin-top:-8px; }
.lot-forecast { border-radius:13px; border:1px solid #375267; padding:16px; background:#102539; }
.lot-forecast strong { display:block; font-size:13px; line-height:1.5; }
.lot-forecast p { margin-top:6px; font-size:12px; color:var(--muted); line-height:1.7; }
.lot-save-actions { display:flex; }
.lot-save-actions .button { flex:1; min-height:48px; }
.lot-extras { border:1px solid #30495c; border-radius:15px; background:#111e2c; overflow:hidden; }
.lot-extras > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:15px 18px; cursor:pointer; list-style:none; font-weight:650; }
.lot-extras > summary::-webkit-details-marker { display:none; }
.lot-extras > summary .icon { transition:transform .2s; width:17px; }
.lot-extras[open] > summary .icon { transform:rotate(180deg); }
.lot-extras-body { display:flex; flex-direction:column; align-items:stretch; gap:14px; padding:0 16px 17px; }
.lot-extras-body > .button { width:100%; }
.lot-enabled-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; }
.lot-enabled-row > div { flex:1; }
.lot-enabled-row p { font-size:11px; color:var(--muted); margin-top:4px; }
.lot-review { display:flex; flex-direction:column; gap:10px; }
.lot-review:empty { display:none; }
@media (max-width:740px) {
  .lot-mode-grid { grid-template-columns:1fr; gap:8px; }
  .lot-mode-card { min-height:0; flex-direction:row; align-items:center; gap:12px; padding:13px 38px 13px 12px; }
  .lot-mode-icon { flex-shrink:0; }
  .lot-mode-copy small { font-size:11px; }
  .lot-mode-indicator { top:calc(50% - 8px); right:13px; }
  .lot-mode-card input { top:calc(50% - 9px); right:12px; }
}
@media (max-width:420px) {
  .lot-settings-body { padding:0 10px 12px; }
  .lot-config-panel { padding:14px; }
  .lot-budget-box { padding:12px; }
  .lot-budget-edit .button { width:100%; flex:1 1 100%; }
}

.lot-position-settings { display:flex; flex-direction:column; gap:16px; }
.lot-position-settings[hidden] { display:none; }
.lot-consent { display:flex; align-items:flex-start; gap:12px; font-size:12px; line-height:1.55; color:var(--muted); }
.lot-consent input { flex-shrink:0; width:18px; height:18px; margin-top:2px; }


/* Avoid WebKit's automatic page zoom when focusing small touch-screen form fields. */
@media (pointer:coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea,textarea.mono,select { font-size:16px; }
}

/* A buyer conversation is a dedicated messenger screen on a phone. */
@media(max-width:700px) {
  body.chat-open { overflow:hidden; }
  body.chat-open .topbar,body.chat-open .bottom-nav { display:none; }
  body.chat-open main.chat-page {
    position:fixed; z-index:9; top:var(--chat-top,0px); left:0; width:100%;
    height:var(--chat-height,100dvh); min-height:0; max-width:none; margin:0;
    padding:var(--content-top) 0 max(env(safe-area-inset-bottom),var(--content-bottom));
    gap:0; background:var(--bg);
  }
  .chat-page .chat-header { gap:2px; min-height:60px; padding:4px 8px; border-bottom:1px solid var(--line); background:#0d1b28; }
  .chat-page .chat-header > .button { width:44px; min-height:44px; padding:10px; }
  .chat-page .chat-header .icon { width:20px; height:20px; }
  .chat-page .chat-heading { padding-inline:4px; }
  .chat-page .chat-heading h1 { font-size:17px; letter-spacing:-.3px; }
  .chat-page > .chat-deals:not(:empty) { padding:8px 12px; border-bottom:1px solid var(--line); background:#0a1520; }
  .chat-page .chat-deal-card { flex-basis:100%; }
  .chat-page > .conversation { padding:0; gap:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  .chat-page .message-history { min-height:0; padding:12px; gap:9px; }
  .chat-page .message-bubble { max-width:90%; border-radius:16px; line-height:1.5; }
  .chat-page .message-bubble p { margin:3px 0; }
  .chat-page .message-time { font-size:10px; }
  .chat-page .message-compose { padding:8px 10px; background:#0d1b28; border-top:1px solid var(--line); }
  .chat-page .chat-compose-row { gap:7px; }
  .chat-page .message-compose textarea { order:1; border-radius:20px; }
  .chat-page .chat-attach { order:0; border:0; background:transparent; box-shadow:none; color:var(--muted); }
  .chat-page .chat-send { order:2; border-radius:50%; }
  .chat-page .conversation > .hint:not(:empty) { padding:7px 12px; color:var(--amber); background:var(--amber-soft); }
  .chat-menu-actions { display:grid; gap:12px; }
  body.chat-open #toast { bottom:calc(76px + var(--content-bottom)); }
}


/* Messaging: one primary action, compact state, progressive settings. */
.reply-tabs { display:flex; gap:4px; padding:5px; margin:0; border:1px solid #21384b; border-radius:15px; background:#0b1722; }
.reply-tab { display:flex; align-items:center; justify-content:center; flex:1; gap:8px; min-height:44px; padding:10px 16px; border:1px solid transparent; border-radius:10px; color:var(--muted); background:transparent; font-weight:600; white-space:nowrap; transition:background .15s,color .15s; }
.reply-tab .icon { width:17px; height:17px; }
.reply-tab:hover { background:#132738; color:var(--ink); }
.reply-tab.active { color:#78eee0; background:#163238; border-color:#28534f; box-shadow:0 2px 5px #0002; }
.reply-content,.reply-cards { display:grid; gap:16px; min-width:0; }
.reply-content .page-head { margin-bottom:0; align-items:center; }
.reply-page-head p { max-width:480px; }
.reply-overview { border:1px solid var(--line); border-radius:18px; background:#0e1c29; padding:18px 20px 10px; }
.reply-overview.enabled { border-color:#265247; }
.reply-status-row { display:flex; gap:12px; align-items:center; }
.reply-status-icon { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; background:#1e2d3b; color:#9aafc4; flex-shrink:0; }
.enabled .reply-status-icon { background:#133e35; color:#6de3c4; }
.reply-status-copy { flex:1; min-width:0; }
.reply-status-copy strong { display:block; font-size:15px; }
.reply-status-copy small { display:block; color:var(--muted); font-size:12px; margin-top:2px; }
.reply-status-footer { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:12px 0 0 54px; min-width:0; }
.reply-status-summary { color:#92aabd; font-size:12px; }
.reply-overview-actions { display:grid; grid-template-columns:auto minmax(0,1fr) 44px; align-items:center; gap:4px; border-top:1px solid #203343; margin-top:14px; padding-top:6px; }
.reply-overview-actions > .icon-button { grid-column:3; justify-self:end; margin-left:0; }
.reply-overview-actions .button { min-height:44px; height:44px; }
.reply-overview-actions .button.small { padding:8px; justify-self:start; }
.reply-attention-action { color:var(--amber) !important; }
.reply-save-error { margin-top:12px; padding:10px 12px; border:1px solid #75424e; border-radius:10px; color:var(--danger); background:var(--danger-soft); font-size:12px; }
.reply-card > .reply-save-error { margin-top:12px; }
.reply-save-error[hidden] { display:none; }
.reply-check { display:flex; align-items:center; gap:9px; font-size:13px; cursor:pointer; min-height:36px; }
.reply-check input[type=checkbox] { width:18px; height:18px; flex-shrink:0; accent-color:var(--accent); }
.reply-switch { position:relative; gap:9px; min-height:44px; flex-shrink:0; }
.reply-switch input[type=checkbox] { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; z-index:1; }
.reply-toggle-track { display:block; position:relative; width:40px; height:24px; flex-shrink:0; border-radius:20px; border:1px solid #486075; background:#253747; transition:background .15s,border-color .15s; }
.reply-toggle-track::after { content:""; position:absolute; width:16px; height:16px; left:3px; top:3px; border-radius:50%; background:#d6e0e9; box-shadow:0 1px 3px #0004; transition:transform .15s; }
.reply-switch input:checked + .reply-toggle-track { background:#1c8874; border-color:#35b79c; }
.reply-switch input:checked + .reply-toggle-track::after { transform:translateX(16px); background:#f3fffc; }
.reply-switch input:focus-visible + .reply-toggle-track { outline:2px solid var(--accent); outline-offset:4px; }
.reply-switch:has(input:disabled) { cursor:default; opacity:.5; }
.reply-switch input:disabled { cursor:default; }
.reply-switch > span:last-child { color:var(--muted); font-size:12px; }
.reply-global-toggle > span:last-child { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.reply-card { padding:20px; min-width:0; box-shadow:none; gap:0; }
.reply-card h2 { font-size:17px; margin:0; overflow-wrap:anywhere; }
.reply-card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.reply-card-head > h2,.reply-card-head > div { min-width:0; }
.reply-card-actions { display:flex; align-items:center; gap:6px; margin:0; }
.reply-card-footer { display:flex; gap:12px; justify-content:space-between; align-items:center; border-top:1px solid #223849; padding-top:13px; margin-top:16px; }
.reply-card-footer > small { font-size:11px; }
.reply-card-actions > .button { min-height:40px; }
.reply-rule-context { display:grid; gap:5px; margin:8px 0 14px; color:#9eb5c9; font-size:12px; }
.reply-card > .reply-rule-context { margin:10px 0 14px; }
.reply-card > .reply-card-footer { margin-top:14px; }
.reply-rule-context > span { display:flex; align-items:flex-start; gap:7px; overflow-wrap:anywhere; }
.reply-rule-context .icon { width:15px; height:15px; margin-top:2px; opacity:.7; }
.reply-snippet { white-space:pre-wrap; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.reply-rule-message { padding:12px 14px; border-left:2px solid #3d6c76; background:#0916207a; border-radius:0 10px 10px 0; color:#c5d9e8; font-size:13px; }
.reply-rule-card.disabled .reply-rule-message { border-left-color:#334653; }
.reply-rule-notice { font-size:12px; color:var(--amber); margin-top:10px; }
.reply-actions-menu { position:relative; }
.reply-actions-menu > summary { display:flex; align-items:center; justify-content:center; list-style:none; cursor:pointer; width:40px; min-height:40px; border-radius:10px; color:var(--muted); }
.reply-actions-menu > summary::-webkit-details-marker { display:none; }
.reply-actions-menu > summary:hover,.reply-actions-menu[open] > summary { background:#203746; color:var(--ink); }
.reply-actions-menu > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.reply-menu-content { position:absolute; right:0; top:calc(100% + 5px); z-index:20; min-width:200px; display:flex; flex-direction:column; gap:3px; padding:6px; border:1px solid #355269; border-radius:13px; background:#122331; box-shadow:0 15px 45px #0008; }
.reply-menu-content .button { justify-content:flex-start; width:100%; min-height:44px; text-align:left; }
.reply-danger-action { color:var(--danger) !important; }
.reply-filters { display:flex; align-items:center; gap:10px; }
.reply-filters > input { flex:1; min-width:0; }
.reply-filters > select { width:auto; max-width:45%; }
.reply-content input[type=search],.reply-form input:not([type=checkbox]):not([type=radio]) { padding:12px 13px; border:1px solid #35516b; background:#091622; color:#e5f3ff; border-radius:11px; width:100%; min-width:0; min-height:44px; }
.reply-filters > input[type=search],.reply-filters > select { height:48px; min-height:48px; padding-block:10px; }
.reply-content input::placeholder,.reply-form input::placeholder,.reply-form textarea::placeholder { color:#809baf; opacity:1; }
.reply-filter-chips { display:flex; gap:5px; overflow:auto; scrollbar-width:none; }
.reply-filter-chip { min-height:40px; padding:7px 14px; background:transparent; border:1px solid transparent; border-radius:30px; color:var(--muted); white-space:nowrap; font-size:12px; }
.reply-filter-chip[aria-pressed=true] { border-color:#2b5661; background:#15313a; color:#99e8e1; }
.reply-filter-chip:hover { background:#182b39; }
.reply-rules-toolbar,.reply-library-toolbar { display:grid; gap:12px; }
.reply-list-heading { display:flex; align-items:center; gap:9px; margin-top:4px; }
.reply-list-heading h2 { font-size:15px; }
.reply-list-heading > small { border-radius:7px; background:#182a38; padding:0 6px; }
.reply-rules-toolbar input { max-width:400px; }
.reply-template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.reply-template-grid > .empty { grid-column:1/-1; }
.reply-template-card { display:flex; flex-direction:column; }
.reply-template-message { color:#bacedd; background:#0a1721; border:1px solid #213746; border-radius:12px; padding:14px; margin-top:16px; min-height:88px; font-size:13px; }
.reply-template-card > .reply-template-message { margin-top:14px; }
.reply-template-card > .reply-card-footer { margin-top:auto; border-top:0; padding-top:14px; }
.reply-eyebrow { display:block; color:#74bbb9; font-size:11px; margin-bottom:5px; }
.reply-favorite.selected { color:var(--amber); }
.reply-favorite.selected .icon { fill:#ffd18a20; }
.reply-usage { color:#829aae; font-size:11px; margin-top:8px; }
.reply-card > .reply-usage { margin-top:6px; }
.reply-onboarding { display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; border:1px dashed #315365; border-radius:20px; padding:30px 24px; background:linear-gradient(160deg,#10272e60,#0a172440); }
.reply-onboarding-icon { display:grid; place-items:center; width:54px; height:54px; border-radius:17px; background:#143b41; color:#70e5db; }
.reply-onboarding-icon .icon { width:26px; height:26px; }
.reply-onboarding h2 { font-size:20px; }
.reply-onboarding > p { max-width:410px; color:var(--muted); font-size:13px; }
.reply-onboarding > .button { margin-top:3px; }
.reply-onboarding-steps { display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-top:8px; }
.reply-onboarding-steps > span { display:flex; align-items:center; gap:6px; color:#8da9bc; font-size:11px; }
.reply-onboarding-steps b { display:grid; place-items:center; width:19px; height:19px; border-radius:50%; background:#1c3543; color:#aac9d6; font-weight:500; }
.reply-cards:empty { display:none; }
.reply-categories { border:1px solid #274755; border-radius:16px; background:linear-gradient(125deg,rgba(21,48,58,.65),rgba(11,26,38,.92)); margin-top:16px; overflow:hidden; }
.reply-categories > summary { display:flex; gap:12px; align-items:center; padding:17px 16px; min-height:88px; cursor:pointer; list-style:none; }
.reply-categories > summary::-webkit-details-marker { display:none; }
.reply-categories > summary::marker { content:""; }
.reply-categories > summary:focus-visible { outline:2px solid #57d9c9; outline-offset:-3px; border-radius:15px; }
.reply-categories-symbol { display:grid; place-items:center; width:42px; height:42px; flex-shrink:0; border-radius:12px; background:#193b43; color:#7edbcf; }
.reply-categories-symbol .icon { width:22px; height:22px; }
.reply-categories-copy { display:grid; gap:5px; flex:1; min-width:0; }
.reply-categories-copy strong { color:var(--ink); font-size:15px; font-weight:650; }
.reply-categories-copy small { color:var(--muted); font-size:11px; line-height:1.5; }
.reply-categories-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; flex-shrink:0; border:1px solid #37625e; border-radius:10px; color:#80dfd2; background:rgba(42,105,95,.20); padding:11px 10px; font-size:12px; font-weight:650; white-space:nowrap; }
.reply-categories-action .icon { width:15px; height:15px; transition:transform .18s ease; }
.reply-categories[open] .reply-categories-action .icon { transform:rotate(180deg); }
.reply-categories > summary:hover .reply-categories-action { background:rgba(42,105,95,.35); }
.reply-categories-body { padding:12px 16px 16px; border-top:1px solid var(--line); }
.reply-categories-body > .hint { margin:0 0 12px; line-height:1.6; }
.reply-categories-body > .button { margin-top:8px; }
@media(max-width:380px) {
  .reply-categories > summary { padding:14px 11px; gap:9px; }
  .reply-categories-symbol { width:34px; height:34px; border-radius:10px; }
  .reply-categories-symbol .icon { width:19px; height:19px; }
  .reply-categories-copy strong { font-size:13px; }
  .reply-categories-copy small { font-size:10px; }
  .reply-categories-action { gap:4px; padding:9px 7px; font-size:11px; }
  .reply-categories-action .icon { width:13px; height:13px; }
}

.reply-category-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:8px; margin:10px 0; }
.reply-category-row { display:flex; align-items:center; min-width:0; gap:5px; }
.reply-category-row > .button:first-child { min-width:0; flex:1; white-space:normal; overflow-wrap:anywhere; text-align:left; justify-content:flex-start; }
.reply-category-row > .button:last-child { flex-shrink:0; min-width:36px; }

.reply-form { display:flex; flex-direction:column; gap:18px; }
.reply-form details { border:1px solid var(--line); border-radius:12px; padding:13px 14px; }
.reply-form details > summary { cursor:pointer; font-weight:600; font-size:13px; }
.reply-form details[open] > * + * { margin-top:14px; }
.reply-form-section { display:grid; gap:14px; border-top:1px solid #294053; padding-top:18px; }
.reply-section-heading { display:flex; align-items:center; gap:10px; }
.reply-section-heading h3 { font-size:15px; }
.reply-step { display:grid; place-items:center; width:29px; height:29px; border:1px solid #2a5c65; border-radius:10px; background:#12383d; color:#84e7db; font-weight:650; font-size:12px; flex-shrink:0; }
.reply-section-heading .hint { font-size:11px; margin-top:2px; }
.reply-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.reply-variables { display:flex; gap:4px; flex-wrap:wrap; }
.reply-variables .button { min-height:34px; border-radius:8px; border:1px solid #2b4658; padding:5px 8px; background:#102431; font-size:11px; }
.reply-editor-tools { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.reply-character-count { color:#7c99ae; font-size:10px; white-space:nowrap; padding-top:8px; }
.reply-rule-form textarea { background:#0a1723; line-height:1.7; }
.reply-live-preview > summary { display:flex; align-items:center; gap:8px; list-style:none; color:#9ebacd; font-weight:500 !important; }
.reply-live-preview .icon { width:16px; height:16px; }
.reply-buyer-preview { display:grid; gap:8px; }
.reply-buyer-bubble { background:#153831; border:1px solid #2a5b50; border-radius:14px 14px 4px 14px; padding:13px; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.reply-buyer-bubble.placeholder { color:var(--muted); }
.reply-buyer-preview small { color:#8fa7ba; font-size:10px; text-align:right; }
.reply-activation { padding:14px; border-radius:14px; border:1px solid #2a4c4c; background:#12332f66; }
.reply-activation > .hint { font-size:11px; margin-top:4px; }
.reply-select-list { display:grid; gap:8px; }
.reply-choices { display:grid; gap:4px; max-height:210px; overflow:auto; padding:4px; }
.reply-choices .reply-check { border-radius:9px; padding:5px 7px; }
.reply-choices .reply-check:has(input:checked) { background:#153c39; }
.reply-preview { white-space:pre-wrap; overflow-wrap:anywhere; padding:14px; border-radius:12px; background:#0a1a26; font:inherit; }
.reply-test-item,.reply-history-row { border-bottom:1px solid var(--line); padding:14px 0; }
.reply-test-item .badge { margin-left:8px; }
.reply-scenarios { display:flex; flex-direction:column; gap:16px; }
.reply-scenario-grid { display:grid; gap:9px; }
.reply-scenario-card { width:100%; min-height:74px; justify-content:flex-start; padding:13px; background:#102432; border:1px solid #2a4558; text-align:left; border-radius:14px; }
.reply-scenario-card > span:nth-child(2) { flex:1; min-width:0; }
.reply-scenario-card strong { display:block; font-size:14px; }
.reply-scenario-card small { display:block; font-size:11px; color:var(--muted); font-weight:400; margin-top:3px; }
.reply-scenario-card > .icon { color:#7c9eaf; width:15px; }
.reply-scenario-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:11px; color:#73ded5; background:#17404a; flex-shrink:0; }
.reply-start-blank { width:100%; }
.reply-days { display:flex; gap:12px; flex-wrap:wrap; }
.reply-quick-modal { width:min(580px,calc(100% - 32px)); }
.reply-quick-form { gap:14px !important; }
.reply-quick-hint { display:flex; align-items:center; gap:7px; color:#a1cabc; font-size:12px; }
.reply-quick-hint .icon { width:15px; height:15px; }
.reply-quick-tools { position:sticky; top:0; z-index:2; background:#102333; display:grid; gap:10px; padding:4px 0 10px; }
.reply-search { position:relative; }
.reply-search > .icon { position:absolute; left:13px; top:14px; width:17px; height:17px; color:#8aa9bc; }
.reply-form .reply-search input:not([type=checkbox]):not([type=radio]) { padding-left:39px; }
.reply-quick-filters { display:flex; align-items:center; gap:10px; }
.reply-quick-filters select { min-width:0; flex:1; }
.reply-quick-filters > select,.reply-quick-filters > .reply-quick-favorite { height:48px; min-height:48px; }
.reply-quick-favorite { position:relative; border:1px solid #2e4a60; border-radius:12px; padding:8px 11px; min-height:44px; font-size:12px; }
.reply-quick-favorite input[type=checkbox] { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.reply-quick-favorite > .icon { width:16px; height:16px; }
.reply-quick-favorite:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.reply-quick-favorite:has(input:checked) { border-color:#658168; background:#233d32; color:#cfebcb; }
.reply-quick-list { display:grid; gap:10px; }
.reply-quick-group { font-size:11px; font-weight:600; color:#91aec2; margin:2px 0; }
.reply-quick-item { display:flex; flex-direction:column; align-items:stretch; gap:8px; width:100%; text-align:left; border:1px solid #2c4a5a; border-radius:14px; padding:14px; color:var(--ink); background:#102633; box-shadow:none; font-weight:400; }
.reply-quick-item:hover { border-color:#3c8887; background:#16333c; }
.reply-quick-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.reply-quick-title strong { font-size:14px; }
.reply-quick-title .icon { color:#69cfc3; width:17px; height:17px; }
.reply-quick-item .reply-snippet { color:#a8c1d1; font-size:12px; }
.reply-quick-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#89aabd; font-size:11px; }
.reply-quick-meta > .icon { color:#c9b47c; width:14px; height:14px; }
.reply-form .button[hidden],.reply-check[hidden],.reply-form .field[hidden],.reply-preview[hidden],.reply-select-list > p[hidden] { display:none; }
.chat-quick { width:40px; min-width:40px; padding:9px; }
/* Keep chat navigation, filtering and refresh together without a separate checkbox row. */
.chat-list-header { display:grid; grid-template-columns:minmax(0,1fr) auto auto; grid-template-areas:"title filters refresh"; align-items:center; gap:16px; }
.chat-list-header h1 { grid-area:title; margin:0; }
.chat-list-header > .button { grid-area:refresh; }
.chat-list-filters { grid-area:filters; display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:13px; background:#0b1824; }
.chat-list-filters > .button,.chat-attention-filter { position:relative; display:flex; align-items:center; justify-content:center; min-height:44px; margin:0; padding:9px 13px; border:1px solid transparent; border-radius:9px; background:transparent; box-shadow:none; color:var(--muted); font-size:12px; font-weight:600; line-height:1.3; white-space:nowrap; cursor:pointer; }
.chat-filter-all[aria-pressed="true"],.chat-attention-filter:has(input:checked) { border-color:#2a625f; background:var(--accent-soft); color:var(--accent); }
.chat-list-filters > .button:hover,.chat-attention-filter:hover { color:var(--ink); }
.chat-attention-filter input { position:absolute; inset:0; width:100%; height:100%; padding:0; margin:0; opacity:0; cursor:pointer; }
.chat-attention-filter:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.chat-list .chat-row { display:flex; align-items:flex-start; gap:12px; padding:15px; }
.chat-avatar { flex:0 0 40px; width:40px; height:40px; display:grid; place-items:center; border:1px solid #28505d; border-radius:13px; background:#12303b; color:#92dfdc; font-size:12px; font-weight:700; }
.chat-list .chat-preview { display:flex; flex-direction:column; gap:7px; overflow:hidden; }
.chat-row-heading,.chat-row-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; }
.chat-row-heading strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-row-time { flex-shrink:0; color:var(--muted); font-size:10px; white-space:nowrap; }
.chat-list .chat-preview small { min-width:0; max-width:none; flex:1; margin:0; font-size:12px; }
.chat-row-bottom > .badge { flex-shrink:0; }
.chat-preview > .badge { align-self:flex-start; font-size:10px; }
@media (max-width:900px) {
  .chat-list-header { grid-template-columns:minmax(0,1fr) 44px; grid-template-areas:"title refresh" "filters filters"; gap:12px; }
  .chat-list-header > .button { width:44px; min-width:44px; padding:12px; font-size:0; gap:0; }
  .chat-list-filters > .button,.chat-attention-filter { flex:1; }
}
@media (max-width:700px) {
  .chat-list .chat-row { padding:13px 12px; gap:10px; }
  .chat-avatar { flex-basis:36px; width:36px; height:36px; border-radius:11px; font-size:11px; }
  .chat-row-heading,.chat-row-bottom { gap:8px; }
}
.chat-page .chat-quick { order:0; }
@media (max-width:700px) {
  .reply-tabs { gap:2px; padding:4px; }
  .reply-tab { gap:6px; font-size:12px; padding:10px 8px; }
  .reply-tab .icon { width:15px; height:15px; }
  .reply-template-grid { grid-template-columns:1fr; }
  .reply-card { padding:16px; }
  .reply-card-head { align-items:flex-start; }
  .reply-card-head h2 { font-size:15px; padding-top:9px; }
  .reply-template-card h2 { padding-top:0; }
  .reply-overview { padding:15px 15px 8px; }
  .reply-status-icon { width:36px; height:36px; border-radius:11px; }
  .reply-status-copy strong { font-size:13px; }
  .reply-status-copy small { font-size:11px; }
  .reply-status-footer { margin-left:0; }
  .reply-overview-actions .button.small { font-size:11px; padding:8px 6px; }
  .reply-overview-actions .button .icon { width:15px; height:15px; }
  .reply-switch { gap:6px; }
  .reply-switch > span:last-child { font-size:10px; }
  .reply-form-grid { grid-template-columns:1fr; }
  .reply-card-footer { gap:8px; }
  .reply-card-actions { gap:2px; }
  .reply-onboarding { padding:25px 18px; }
  .reply-onboarding-steps { flex-direction:column; align-items:flex-start; gap:8px; }
  .reply-onboarding h2 { font-size:18px; }
  .reply-editor-modal .modal-actions > .primary { width:100%; }
  .reply-quick-modal { margin:auto 0 0; width:100%; max-width:none; max-height:85dvh; border-radius:23px 23px 0 0; border-bottom:0; padding-bottom:env(safe-area-inset-bottom); }
  .reply-quick-modal .modal-head { padding-top:18px; }
  .reply-quick-modal .modal-actions > .button { width:100%; }
  .chat-page .chat-quick { width:32px; min-width:32px; padding:7px; border:0; background:transparent; color:var(--muted); }
  .chat-page .chat-compose-row { gap:3px; }
  .chat-page .message-compose textarea { min-width:0; }
}
@media (max-width:360px) {
  .reply-tab { gap:4px; padding-inline:4px; }
}
@media (prefers-reduced-motion:reduce) {
  .reply-toggle-track,.reply-toggle-track::after,.reply-tab { transition:none; }
}

/* Product details: action-first navigation instead of a long multi-purpose form. */
.product-section-nav { display:flex; align-items:center; gap:12px; min-width:0; }
.product-section-nav[hidden],.save-bar[hidden] { display:none !important; }
.product-section-nav .button { flex-shrink:0; }
.product-section-nav h2 { font-size:18px; letter-spacing:-.3px; }
.product-section-label { font-size:11px; color:#88aabb; font-weight:750; letter-spacing:1.1px; }
.product-health { display:flex; flex-direction:column; gap:15px; border:1px solid #285369;
  border-radius:20px; padding:22px; background:linear-gradient(135deg,#11293b,#111d2a); }
.product-health-title { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.product-health-title small { color:#69d7d4; display:block; font-size:10px; letter-spacing:1px; font-weight:700; margin-bottom:5px; }
.product-health-title h2 { font-size:19px; }
.product-checks { display:grid; gap:10px; }
.product-check { display:flex; align-items:center; gap:10px; font-size:13px; line-height:1.5; }
.product-check .icon { width:17px; height:17px; }
.product-check.ready .icon { color:#65e7cc; }
.product-check.needs-action .icon { color:var(--amber); }
.product-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.product-action { display:flex; align-items:center; width:100%; gap:13px; min-width:0;
  min-height:90px; padding:16px; border:1px solid #29475b; border-radius:16px;
  background:linear-gradient(140deg,#17293a,#101c29); color:var(--ink);
  text-align:left; box-shadow:inset 0 1px 0 #ffffff0a; }
.product-action:hover { border-color:#318d95; background:#1b3446; }
.product-action:focus-visible { outline-offset:2px; }
.product-action-icon { display:grid; place-items:center; width:44px; height:44px; flex-shrink:0;
  border-radius:13px; color:#6ce8e3; background:#163c47; }
.product-action-icon.success { background:#164137; }
.product-action-copy { display:flex; flex:1; flex-direction:column; min-width:0; gap:3px; }
.product-action-copy strong { font-size:15px; font-weight:700; }
.product-action-copy small { color:var(--muted); font-size:12px; line-height:1.5; }
.product-action > .badge { flex-shrink:0; }
.product-action > .icon { width:17px; height:17px; color:#7893a7; flex-shrink:0; }
.product-compact-panel { gap:12px; }
.product-danger-panel { border-color:#65404b; margin-top:12px; }
.product-danger-panel > .button { align-self:flex-start; }
.product-head { margin-bottom:0; }
.product-head .product-sub { margin-top:10px; }
.editor-content:empty { display:none; }
@media(max-width:850px) {
  .product-actions { grid-template-columns:1fr; gap:9px; }
  .product-action { min-height:76px; padding:13px 14px; }
  .product-health { padding:17px; gap:13px; }
  .product-health-title h2 { font-size:17px; }
}
@media(max-width:700px) {
  main:has(> .product-section-nav) { gap:16px; }
  main > .product-section-nav { margin-top:-7px; }
  main > .product-head { margin-bottom:0; }
  .product-head h1 { font-size:25px; }
  .product-action > .badge { font-size:10px; white-space:nowrap; }
  .product-action-copy strong { font-size:14px; }
  .product-action-copy small { font-size:11px; }
  .product-action-icon { width:39px; height:39px; border-radius:12px; }
  .product-section-nav h2 { font-size:16px; }
  .save-bar:not([hidden]) { bottom:calc(76px + var(--content-bottom)); }
}

/* Expand advanced tasks only when needed. */
.product-accordion { border:1px solid #29465b; border-radius:16px; background:#112131; min-width:0; overflow:hidden; }
.product-accordion[hidden] { display:none !important; }
.product-accordion > summary { display:flex; align-items:center; justify-content:space-between; gap:10px;
  min-height:62px; padding:15px 17px; cursor:pointer; list-style:none; }
.product-accordion > summary::-webkit-details-marker { display:none; }
.product-accordion > summary::after { content:""; display:block; width:8px; height:8px; flex-shrink:0;
  border-right:2px solid #8faabe; border-bottom:2px solid #8faabe; transform:rotate(45deg); transition:transform .2s; }
.product-accordion[open] > summary::after { transform:rotate(225deg); }
.product-accordion > summary strong { font-size:14px; font-weight:700; }
.product-accordion > summary .hint { margin-left:auto; font-size:11px; color:var(--muted); }
.product-accordion-body { display:flex; flex-direction:column; gap:15px; padding:0 17px 17px; min-width:0; }
.product-accordion > .bonus-stock-panel { display:flex; flex-direction:column; gap:14px; padding:0 17px 17px; }
.bonus-stock-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.bonus-stock-heading .badge { flex-shrink:0; }
.bonus-stock-panel > .hint,.bonus-stock-heading > .hint { margin:0; }
.bonus-stock-panel .stock-list > .empty { padding:28px 20px; }
.product-accordion > .bonus-stock-panel > .panel-title { margin-bottom:12px; }
.product-accordion .preview-panel { position:static; max-width:none; min-height:0; border:0; border-top:1px solid var(--line);
  padding:16px; border-radius:0; box-shadow:none; background:transparent; }
.product-accordion .preview-bubble { max-height:350px; overflow:auto; }
.product-form-advanced { background:#0c1d2a; margin-top:6px; }
@media(max-width:700px) {
  .product-accordion > summary { flex-wrap:wrap; min-height:58px; padding:13px 14px; }
  .product-accordion > summary .hint { order:3; width:100%; margin-left:0; margin-top:-7px; }
  .product-accordion > .bonus-stock-panel { padding:0 14px 14px; }
  .product-accordion-body { padding:0 14px 14px; }
  .product-accordion .preview-panel { padding:14px; }
}

/* Shop settings: compact destinations and a standalone seller reputation screen. */
.shop-tabs { display:flex; gap:8px; flex-wrap:wrap; padding:5px; border:1px solid var(--line);
  border-radius:15px; background:#102132; width:fit-content; max-width:100%; }
.shop-tab { display:flex; align-items:center; gap:8px; border:1px solid transparent;
  border-radius:11px; color:var(--muted); padding:11px 15px; background:transparent; font-weight:650; }
.shop-tab.active { color:var(--accent); border-color:#29766b; background:#183a3b; }
.shop-tab .icon { width:18px; height:18px; }
.shop-connection { gap:13px; }
.shop-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.shop-action { display:flex; align-items:center; gap:13px; min-height:92px; border:1px solid var(--line);
  border-radius:17px; background:var(--card); color:var(--ink); padding:15px; text-align:left; min-width:0; }
.shop-action:hover { border-color:#3e7582; }
.shop-action-icon { display:grid; place-items:center; width:43px; height:43px; flex-shrink:0;
  border:1px solid #29566b; border-radius:13px; background:#183946; color:var(--accent); }
.shop-action-copy { display:flex; flex:1; flex-direction:column; gap:4px; min-width:0; }
.shop-action-copy strong { font-size:15px; font-weight:700; }
.shop-action-copy small { font-size:12px; line-height:1.45; color:var(--muted); }
.shop-action > .icon { color:#8299aa; width:17px; height:17px; }
.shop-actions > .button { width:fit-content; min-width:180px; }
.shop-danger { border:1px solid #583843; border-radius:17px; background:#1a1b27; overflow:hidden; }
.shop-danger > summary { display:flex; align-items:center; gap:13px; padding:16px; min-height:56px;
  cursor:pointer; list-style:none; font-weight:700; }
.shop-danger > summary::-webkit-details-marker { display:none; }
.shop-danger > summary > .icon:last-child { margin-left:auto; }
.shop-danger[open] > summary > .icon:last-child { transform:rotate(180deg); }
.shop-danger-body { display:grid; gap:15px; padding:0 17px 17px; }
.shop-wallet { background:radial-gradient(circle at 100% 0,#1b746026,transparent 50%),var(--card); }
.shop-wallet-label { display:flex; align-items:center; gap:9px; color:var(--muted); font-weight:650; }
.shop-wallet-label .icon { color:var(--accent); }
.shop-wallet-label .badge { margin-left:auto; }
.shop-wallet-total { display:grid; gap:7px; padding:17px; border:1px solid #315a65; border-radius:14px; background:linear-gradient(115deg,#173e4a,#122a3a); }
.shop-wallet-total span { font-size:13px; color:var(--muted); }
.shop-wallet-total strong { font-size:clamp(30px,5vw,42px); line-height:1.15; letter-spacing:-.8px; color:var(--ink); }
.shop-wallet-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.shop-wallet-refresh-note { margin:0; font-size:12px; }
.shop-wallet-stat { display:grid; gap:6px; border:1px solid #294459; border-radius:13px; background:#122638; padding:13px; }
.shop-wallet-stat small { color:var(--muted); font-size:11px; }
.shop-wallet-stat strong { font-size:clamp(19px,2.5vw,26px); line-height:1.2; overflow-wrap:anywhere; }
.shop-wallet-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.shop-rating { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:8px; }
.shop-rating-star { font-size:26px; color:var(--amber); }
.shop-rating strong { font-size:27px; line-height:1; }
.shop-reviews-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.shop-review-list { display:grid; gap:10px; }
.shop-review { display:grid; gap:10px; border:1px solid #2a4559; border-radius:15px; padding:15px; background:#112538; }
.shop-review-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.shop-review-top strong { overflow-wrap:anywhere; }
.shop-review-stars { letter-spacing:1px; font-size:16px; color:var(--amber); }
.shop-review p { font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.55; }
.shop-review-footer .button[hidden] { display:none; }
@media(max-width:800px) { .shop-actions { grid-template-columns:1fr; } }
@media(max-width:700px) {
  .shop-tabs { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:5px; }
  .shop-tab { justify-content:center; padding:11px 8px; font-size:12px; }
  .shop-action { min-height:76px; padding:13px; }
  .shop-action-copy strong { font-size:14px; }
  .shop-action-copy small { font-size:11px; }
  .shop-wallet-total strong { font-size:32px; }
  .shop-wallet-grid { gap:7px; grid-template-columns:1fr 1fr; }
  .shop-wallet-stat { padding:11px; }
  .shop-wallet-stat strong { font-size:clamp(18px,4vw,23px); }
}


/* Financial management: compact, read-only-safe, accessible in Telegram Mini App. */
.finance-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.finance-more { position:relative; margin-left:auto; }
.finance-more > summary { list-style:none; min-height:44px; padding:10px 14px; border-radius:9px; color:var(--muted); cursor:pointer; }
.finance-more > summary::-webkit-details-marker { display:none; }
.finance-more > summary::after { content:"⌄"; margin-left:10px; }
.finance-more[open] > summary,.finance-more.active > summary { background:var(--soft); color:var(--ink); }
.finance-more-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:4; display:grid; gap:4px; padding:8px; width:220px; background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); }
.finance-more-menu .filter { text-align:left; }
.finance-overview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.finance-overview-toolbar h2 { font-size:18px; }
.finance-period { display:flex; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.finance-period .filter { white-space:nowrap; }
.finance-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.finance-metric { display:flex; flex-direction:column; gap:12px; min-width:0; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--card); text-align:left; color:var(--ink); font:inherit; }
button.finance-metric:hover { border-color:#427184; }
.finance-metric-label { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; color:#bed0dd; }
.finance-metric-label .icon { width:18px; height:18px; color:var(--accent); }
.finance-metric > strong { font-size:clamp(20px,2.2vw,28px); letter-spacing:-.6px; line-height:1.2; overflow-wrap:anywhere; }
.finance-metric > span { color:var(--muted); font-size:11px; line-height:1.6; }
.finance-metric-pending { background:linear-gradient(135deg,#142635,#101d29); }
.finance-metric-pending > strong { color:var(--muted); }
.finance-metric-attention { border-color:#6a5736; }
.finance-metric-attention .icon { color:var(--amber); }
.finance-overview-grid { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr); gap:18px; align-items:stretch; }
.finance-chart-panel { gap:14px; }
.finance-chart-switch { display:flex; gap:4px; flex-wrap:wrap; }
.finance-chart-switch .button { font-size:11px; padding:7px 9px; }
.finance-chart-switch .active { color:var(--accent); background:var(--accent-soft); }
.finance-chart-total { font-size:27px; letter-spacing:-.7px; font-variant-numeric:tabular-nums; }
.finance-chart-plot { width:100%; min-width:0; }
.finance-chart { display:block; width:100%; height:238px; touch-action:pan-y; }
.finance-chart-label { fill:var(--muted); font-size:11px; }
.finance-chart-grid { stroke:var(--line); stroke-width:1; }
.finance-chart-zero { stroke:var(--muted); stroke-width:1; }
.finance-chart-bar { fill:var(--accent); }
.finance-chart-bar.cost { fill:var(--blue); }
.finance-chart-bar.profit { fill:var(--purple); }
.finance-chart-bar.negative { fill:var(--amber); }
.finance-chart-selection { fill:#ffffff07; }
.finance-chart-panel input[type=range] { width:100%; min-height:28px; accent-color:var(--accent); padding:0; border:0; }
.finance-chart-detail { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px 16px; font-size:13px; color:var(--muted); }
.finance-chart-detail strong { color:var(--ink); font-variant-numeric:tabular-nums; }
.finance-unpriced { color:var(--amber); font-size:11px; }
.finance-chart-empty { color:var(--muted); font-size:12px; }
.finance-chart-footnote { font-size:11px; }
.finance-category { display:grid; gap:9px; }
.finance-category-caption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; font-size:12px; }
.finance-category-caption strong { font-variant-numeric:tabular-nums; }
.finance-category-track { height:6px; border-radius:4px; background:var(--soft); overflow:hidden; }
.finance-category-fill { display:block; height:100%; background:var(--accent); border-radius:4px; }
.finance-category-fill.reversal { background:var(--amber); }
.finance-breakdown { justify-content:flex-start; gap:24px; }
.finance-breakdown .panel-title { align-items:flex-start; }
.finance-breakdown .empty { padding:28px 0; }
.finance-explanation { border-top:1px solid var(--line); padding-top:14px; color:var(--muted); font-size:12px; }
.finance-explanation > summary { display:flex; align-items:center; gap:8px; cursor:pointer; min-height:36px; }
.finance-explanation > div { display:grid; gap:9px; padding:12px 0; max-width:800px; }
.finance-profit-coverage { display:grid; gap:12px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.finance-profit-coverage > .hint { margin:0; }
.finance-profit-coverage .panel-title { margin:0; }
.finance-profit-facts { display:flex; flex-wrap:wrap; gap:8px 22px; color:var(--muted); font-size:12px; }
.finance-profit-facts strong { display:inline-block; color:var(--ink); font-variant-numeric:tabular-nums; }
.finance-profit-issues { font-size:12px; color:var(--muted); }
.finance-profit-issues summary { min-height:32px; cursor:pointer; }
.finance-profit-issues ul { padding-left:20px; margin:8px 0 14px; display:grid; gap:5px; }
.finance-profit-table-scroll { max-width:100%; overflow-x:auto; }
.finance-profit-table { width:100%; border-collapse:collapse; font-size:12px; }
.finance-profit-table th,.finance-profit-table td { padding:13px 10px; border-bottom:1px solid var(--line); text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.finance-profit-table th:first-child { text-align:left; min-width:140px; max-width:250px; white-space:normal; overflow-wrap:anywhere; }
.finance-profit-table small { display:block; margin-top:4px; color:var(--muted); font-weight:400; white-space:normal; }
.finance-profit-table thead th { font-weight:500; color:var(--muted); }
@media(max-width:600px) {
  .finance-profit-table-scroll { overflow-x:visible; }
  .finance-profit-table thead { display:none; }
  .finance-profit-table tbody { display:grid; gap:20px; }
  .finance-profit-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding-bottom:16px; border-bottom:1px solid var(--line); }
  .finance-profit-table th[scope=row] { grid-column:1/-1; max-width:none; }
  .finance-profit-table th,.finance-profit-table td { border:0; padding:0; text-align:left; white-space:normal; overflow-wrap:anywhere; }
  .finance-profit-table td { display:flex; flex-direction:column; gap:3px; }
  .finance-profit-table td::before { content:attr(data-label); color:var(--muted); font-size:11px; }
  .finance-profit-table td:last-child { color:var(--accent); }
}
@media(max-width:1100px) {
  .finance-overview-grid { grid-template-columns:1fr; }
  .finance-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:520px) {
  .finance-tabs { gap:3px; }
  .finance-tabs > .filter { font-size:11px; padding:8px; }
  .finance-more { margin-left:0; }
  .finance-more-menu { left:0; right:auto; }
  .finance-more > summary { font-size:12px; padding:8px; }
  .finance-period { width:100%; }
  .finance-period .filter { flex:1; }
  .finance-metrics { gap:9px; }
  .finance-metric { padding:14px; gap:10px; }
  .finance-metric-label { font-size:11px; }
  .finance-metric > strong { font-size:23px; }
}
.finance-workspace { display:flex; flex-direction:column; gap:18px; min-width:0; }
.finance-warning { flex-direction:row; gap:14px; align-items:flex-start; border-color:#745d3c; background:linear-gradient(115deg,#2b261d,#13212e); }
.finance-warning .finance-notice-icon { flex-shrink:0; width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:#493622; color:var(--amber); }
.finance-warning strong { color:#ffe7b7; }
.finance-warning .hint { margin-top:5px; }
.finance-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.finance-info-line { display:flex; flex-direction:column; justify-content:space-between; gap:8px; padding:20px; border:1px solid #31516a; border-radius:16px; background:var(--card); }
.finance-info-line > strong { font-size:21px; line-height:1.3; overflow-wrap:anywhere; }
.finance-info-line > div > strong { font-size:13px; }
.finance-info-line .hint { margin-top:5px; }
.finance-list { display:flex; flex-direction:column; gap:0; }
.finance-entry { display:flex; justify-content:space-between; gap:18px; padding:14px 0; align-items:center; border-bottom:1px solid var(--line); }
.finance-entry:last-child { border-bottom:0; }
.finance-entry-copy,.finance-entry-total { display:flex; flex-direction:column; gap:4px; min-width:0; }
.finance-entry-copy strong { overflow-wrap:anywhere; }
.finance-entry-copy small { font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
.finance-entry-total { align-items:flex-end; text-align:right; flex-shrink:0; }
.finance-entry-total > strong { font-size:17px; }
.finance-entry-total .button { min-height:34px; padding:6px 10px; font-size:12px; }
.finance-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.finance-product-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:14px; }
.finance-form { display:flex; flex-direction:column; gap:15px; min-width:0; }
.finance-help { padding:12px; border:1px solid var(--line); border-radius:12px; background:#112336; }
.finance-help strong { font-size:13px; }
.finance-help p { margin-top:4px; }
.finance-unit-list { display:flex; flex-direction:column; max-height:300px; overflow-y:auto; border:1px solid var(--line); border-radius:12px; }
.finance-unit { display:flex; gap:12px; align-items:center; padding:10px 14px; border-bottom:1px solid var(--line); cursor:pointer; }
.finance-unit:last-child { border-bottom:0; }
.finance-unit input { accent-color:var(--accent); width:17px; height:17px; }
@media(max-width:800px) {
  .finance-columns { grid-template-columns:1fr; }
}
@media(max-width:520px) {
  .finance-summary,.finance-product-picker { grid-template-columns:1fr; }
  .finance-entry { align-items:flex-start; gap:8px; }
  .finance-entry-copy { flex:1; }
  .finance-entry-total { max-width:46%; }
  .finance-entry-total > strong { font-size:15px; }
  .finance-warning { padding:15px; }
}

/* Per-deal delivery costs: a quiet summary and a readable issue history. */
.delivery-panel { display:flex; flex-direction:column; gap:22px; }
.delivery-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.delivery-heading h2 { margin:0 0 6px; }
.delivery-heading p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.delivery-heading > .button { flex-shrink:0; }
.delivery-summary { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:22px; border:1px solid #236368; border-radius:18px; background:linear-gradient(120deg,#123238,#102230); }
.delivery-eyebrow { display:block; font-size:10px; font-weight:700; letter-spacing:.12em; color:#8cc7c6; }
.delivery-summary-value { font-size:32px; font-weight:750; letter-spacing:-.035em; margin:8px 0; overflow-wrap:anywhere; }
.delivery-summary p { margin:0; max-width:440px; font-size:12px; line-height:1.6; color:var(--muted); }
.delivery-summary-icon { width:48px; height:48px; border-radius:15px; display:grid; place-items:center; background:#205157; color:var(--accent); flex-shrink:0; }
.delivery-summary-icon .icon { width:25px; height:25px; }
.delivery-history { display:flex; flex-direction:column; }
.delivery-panel .delivery-entry { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:14px; padding:17px 0; align-items:start; }
.delivery-entry-icon { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--line); border-radius:12px; background:#102635; color:var(--muted); }
.delivery-entry-icon .icon { width:18px; height:18px; }
.delivery-entry-copy { display:flex; flex-direction:column; align-items:flex-start; gap:5px; min-width:0; padding-top:2px; }
.delivery-entry-copy > strong { font-size:14px; overflow-wrap:anywhere; }
.delivery-entry-copy > small { font-size:12px; line-height:1.5; color:var(--muted); }
.delivery-entry-copy .badge { font-size:10px; padding:4px 7px; }
.delivery-note { margin:3px 0 0; font-size:12px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.delivery-entry-meta { display:flex; flex-direction:column; align-items:flex-end; gap:7px; min-width:0; padding-top:2px; }
.delivery-entry-meta > strong { font-size:16px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.delivery-entry-meta .button { min-height:32px; padding:5px 0 5px 8px; font-size:11px; color:var(--muted); white-space:normal; text-align:right; }
.delivery-help { border-top:1px solid var(--line); padding-top:14px; color:var(--muted); }
.delivery-help > summary { display:flex; gap:8px; align-items:center; cursor:pointer; font-size:12px; font-weight:500; }
.delivery-help > summary .icon { width:16px; height:16px; }
.delivery-help p { margin:12px 0 0; line-height:1.65; font-size:12px; }
.delivery-help .field { margin-top:14px; }
.delivery-empty { margin:0; font-size:13px; line-height:1.7; color:var(--muted); }
.delivery-modal { max-width:540px; }
.delivery-form { display:flex; flex-direction:column; gap:19px; }
.delivery-intro { margin:0; color:var(--muted); font-size:13px; line-height:1.65; }
.delivery-form-grid { display:grid; grid-template-columns:minmax(90px,1fr) minmax(0,2fr); gap:14px; align-items:start; }
.delivery-form .field { margin:0; min-width:0; }
.delivery-preview { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:17px; border:1px solid #26585f; border-radius:13px; background:#102e34; }
.delivery-preview > span { color:#a3cacb; font-size:12px; }
.delivery-preview > strong { font-size:20px; font-variant-numeric:tabular-nums; text-align:right; }
.delivery-confirm { display:flex; align-items:flex-start; gap:11px; padding:15px; border:1px solid var(--line); border-radius:13px; font-size:13px; line-height:1.55; cursor:pointer; }
.delivery-confirm input { flex:0 0 18px; width:18px; height:18px; margin:2px 0 0; accent-color:var(--accent); }
.delivery-footnote { margin:0; color:var(--muted); font-size:11px; line-height:1.65; }
.delivery-form .form-error:empty { display:none; }
@media(max-width:600px) {
  .delivery-panel { gap:18px; }
  .delivery-heading { align-items:stretch; flex-direction:column; gap:13px; }
  .delivery-heading > .button { width:100%; min-height:44px; }
  .delivery-summary { padding:18px; gap:12px; }
  .delivery-summary-value { font-size:29px; }
  .delivery-summary-icon { width:40px; height:40px; border-radius:12px; }
  .delivery-panel .delivery-entry { grid-template-columns:32px minmax(0,1fr); gap:10px; }
  .delivery-entry-icon { width:32px; height:32px; border-radius:10px; }
  .delivery-entry-meta { grid-column:2; flex-direction:row; align-items:center; justify-content:space-between; gap:12px; padding:0; }
  .delivery-entry-meta > strong { font-size:15px; }
  .delivery-entry-meta .button { min-height:40px; max-width:65%; padding:7px 0; }
  .delivery-modal .modal-actions { display:grid; grid-template-columns:1fr; gap:9px; }
  .delivery-modal .modal-actions .primary { order:-1; }
  .delivery-modal .modal-actions .button { width:100%; min-height:44px; }
}
@media(max-width:360px) {
  .delivery-form-grid { grid-template-columns:1fr; }
  .delivery-summary-icon { display:none; }
}
