:root{
  --bg:#f6f7fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --line-strong:#cbd5e1;
  --brand:#2563eb;
  --brand-2:#0f172a;
  --success:#15803d;
  --danger:#dc2626;
  --warning:#d97706;
  --info:#2563eb;
  --shadow:0 24px 70px rgba(15,23,42,.10);
  --radius:22px;
  --sidebar:292px;
  --safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box}
html{height:100%;scroll-behavior:smooth;width:100%;max-width:100%;overflow-x:hidden;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-height:100%;width:100%;max-width:100%;overflow-x:hidden;margin:0;background:linear-gradient(180deg,#eef4ff 0%,var(--bg) 240px);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;font-size:15px;line-height:1.45;touch-action:manipulation}
button,input,select,textarea{font:inherit;font-size:16px}
button{cursor:pointer;touch-action:manipulation}
a{color:inherit;text-decoration:none}
/* V13 mobile Safari hardening: iOS zooms focused inputs under 16px and double-tap zoom can break the admin viewport. */
input,select,textarea{font-size:16px!important;-webkit-appearance:none;appearance:none;max-width:100%;touch-action:manipulation}
input[type="checkbox"],input[type="radio"]{-webkit-appearance:auto;appearance:auto}
button,.soft-btn,.primary-btn,.danger-btn,.icon-btn,a{touch-action:manipulation;-webkit-tap-highlight-color:rgba(37,99,235,.12)}
img,svg,video,canvas{max-width:100%;height:auto}
.app-shell{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;padding:18px 14px;background:rgba(255,255,255,.78);backdrop-filter:blur(18px);border-right:1px solid rgba(226,232,240,.84);overflow:auto;z-index:30}
.brand{display:flex;align-items:center;gap:12px;padding:8px 8px 18px}
.brand-mark{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(135deg,var(--brand),#7c3aed);color:#fff;font-weight:900;box-shadow:0 14px 26px rgba(37,99,235,.28)}
.brand strong{display:block;font-size:15px;letter-spacing:-.01em}.brand span{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.side-search{display:block;margin:0 6px 14px}.side-search span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin:0 0 6px 4px}.side-search input{width:100%;border:1px solid var(--line);background:#fff;border-radius:14px;padding:11px 12px;outline:none}.side-search input:focus{border-color:rgba(37,99,235,.55);box-shadow:0 0 0 4px rgba(37,99,235,.10)}
.nav-list{display:flex;flex-direction:column;gap:6px}.nav-item{display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;padding:10px;border-radius:16px;color:#334155;border:1px solid transparent}.nav-item:hover,.nav-item.is-active{background:#fff;border-color:var(--line);box-shadow:0 10px 28px rgba(15,23,42,.05)}.nav-icon{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:var(--surface-2)}.nav-copy strong{display:block;font-size:14px}.nav-copy small{display:block;color:var(--muted);font-size:11px}.nav-item em{font-style:normal;color:var(--muted);font-size:10px;text-transform:uppercase;border:1px solid var(--line);border-radius:999px;padding:3px 6px;background:#fff}
.main{min-width:0;padding:18px 22px 48px}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0 18px;background:linear-gradient(180deg,rgba(246,247,251,.98),rgba(246,247,251,.82) 70%,rgba(246,247,251,0));backdrop-filter:blur(10px)}.topbar-title{min-width:0}.topbar-title span{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.12em}.topbar-title h1{margin:2px 0 0;font-size:26px;letter-spacing:-.04em}.topbar-actions{display:flex;gap:10px;align-items:center}.icon-btn,.soft-btn,.primary-btn,.danger-btn{border:0;border-radius:14px;padding:10px 13px;font-weight:800;transition:.16s ease}.icon-btn{display:none;background:#fff;border:1px solid var(--line)}.soft-btn{background:#fff;color:#0f172a;border:1px solid var(--line)}.primary-btn{background:var(--brand);color:#fff;box-shadow:0 12px 28px rgba(37,99,235,.24)}.danger-btn{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}.soft-btn:hover,.icon-btn:hover{border-color:var(--line-strong);transform:translateY(-1px)}.primary-btn:hover,.danger-btn:hover{transform:translateY(-1px)}
.content{max-width:1440px;margin:0 auto;width:100%}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.page-head h2{margin:0;font-size:22px;letter-spacing:-.03em}.page-head p{margin:4px 0 0;color:var(--muted)}.grid{display:grid;gap:14px}.grid.metrics{grid-template-columns:repeat(6,minmax(0,1fr))}.card{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 14px 40px rgba(15,23,42,.05);overflow:hidden}.card-pad{padding:18px}.metric{padding:16px}.metric span{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.08em}.metric strong{display:block;margin-top:8px;font-size:28px;letter-spacing:-.04em}.metric small{display:block;color:var(--muted);margin-top:4px}.split{display:grid;grid-template-columns:1.35fr .65fr;gap:14px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px}.filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:5px}.field label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.field input,.field select,.field textarea{border:1px solid var(--line);background:#fff;border-radius:14px;padding:10px 12px;outline:none;min-width:130px}.field input:focus,.field select:focus,.field textarea:focus{border-color:rgba(37,99,235,.55);box-shadow:0 0 0 4px rgba(37,99,235,.10)}.field.search input{min-width:260px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:13px 14px;border-top:1px solid var(--line);vertical-align:middle}.table th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);background:#f8fafc}.table tbody tr{transition:.12s ease}.table tbody tr:hover{background:#f8fafc}.click-row{cursor:pointer}.money{font-weight:900}.muted{color:var(--muted)}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;border:1px solid var(--line);background:#fff}.pill.success{color:var(--success);background:#dcfce7;border-color:#bbf7d0}.pill.danger{color:var(--danger);background:#fee2e2;border-color:#fecaca}.pill.warning{color:var(--warning);background:#fef3c7;border-color:#fde68a}.pill.info{color:var(--info);background:#dbeafe;border-color:#bfdbfe}.empty{padding:42px 18px;text-align:center;color:var(--muted)}.empty strong{display:block;color:var(--text);font-size:18px;margin-bottom:5px}.pagination{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:12px 14px;border-top:1px solid var(--line)}.pagination button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 11px;font-weight:800}.pagination button:disabled{opacity:.45;cursor:not-allowed}.module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.module-card{padding:16px;min-height:154px;display:flex;flex-direction:column;gap:12px}.module-card .module-top{display:flex;align-items:center;justify-content:space-between}.module-card .big-icon{width:46px;height:46px;border-radius:16px;background:#f1f5f9;display:grid;place-items:center;font-size:22px}.module-card h3{margin:0;font-size:16px}.module-card p{margin:0;color:var(--muted);font-size:13px}.module-card .module-actions{margin-top:auto;display:flex;gap:8px}.health-list{display:grid;gap:10px}.health-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);background:#fff;border-radius:15px;padding:11px 13px}.legacy-shell{height:calc(100vh - 126px);min-height:620px;display:flex;flex-direction:column}.legacy-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--line);background:#fff}.legacy-frame{border:0;width:100%;height:100%;background:#fff}.drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.28);z-index:60;backdrop-filter:blur(2px)}.drawer{position:fixed;top:0;right:0;height:100vh;width:min(620px,100%);background:#fff;z-index:70;box-shadow:-24px 0 80px rgba(15,23,42,.22);overflow:auto;transform:translateX(0);animation:drawerIn .18s ease}.drawer-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}.drawer-head h2{margin:0;font-size:21px}.drawer-body{padding:18px;display:grid;gap:14px}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.info-box{border:1px solid var(--line);border-radius:16px;padding:12px;background:#f8fafc}.info-box span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.info-box strong{display:block;margin-top:4px}.items-list{display:grid;gap:8px}.item-row{display:grid;grid-template-columns:1fr auto;gap:10px;border:1px solid var(--line);border-radius:16px;padding:11px;background:#fff}.item-row small{display:block;color:var(--muted)}.drawer-actions{display:flex;gap:8px;flex-wrap:wrap}.toast-zone{position:fixed;right:18px;bottom:calc(18px + var(--safe-bottom));z-index:100;display:grid;gap:10px}.toast{padding:12px 14px;border-radius:16px;background:#0f172a;color:#fff;box-shadow:var(--shadow);animation:toastIn .16s ease;max-width:min(380px,calc(100vw - 36px));font-weight:700}.toast.success{background:#166534}.toast.error{background:#991b1b}.toast.warning{background:#92400e}.skeleton-page{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.skeleton-page div{height:140px;border-radius:var(--radius);background:linear-gradient(90deg,#eef2f7,#fff,#eef2f7);background-size:220% 100%;animation:skeleton 1.2s infinite}.bottom-nav{display:none}.codebox{white-space:pre-wrap;background:#0f172a;color:#e2e8f0;border-radius:16px;padding:14px;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px}.note{border:1px solid #bfdbfe;background:#eff6ff;color:#1e3a8a;border-radius:18px;padding:14px}.danger-note{border-color:#fecaca;background:#fef2f2;color:#991b1b}
@keyframes drawerIn{from{transform:translateX(24px);opacity:.2}to{transform:translateX(0);opacity:1}}@keyframes toastIn{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes skeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}
@media (max-width:1180px){.grid.metrics{grid-template-columns:repeat(3,1fr)}.module-grid{grid-template-columns:repeat(3,1fr)}.split{grid-template-columns:1fr}}
@media (max-width:860px){:root{--sidebar:286px}.app-shell{display:block}.sidebar{position:fixed;left:0;top:0;bottom:0;transform:translateX(-105%);transition:.18s ease;box-shadow:var(--shadow)}body.sidebar-open .sidebar{transform:translateX(0)}.main{padding:12px 12px 88px}.topbar{padding-top:10px}.icon-btn{display:inline-flex}.topbar-title h1{font-size:21px}.topbar-actions .soft-btn{display:none}.grid.metrics{grid-template-columns:repeat(2,1fr)}.module-grid{grid-template-columns:repeat(2,1fr)}.page-head{display:block}.field.search input{min-width:100%;width:100%}.toolbar{align-items:stretch}.filters,.field{width:100%}.filters select,.filters input{width:100%}.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:50;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px 8px calc(8px + var(--safe-bottom));background:rgba(255,255,255,.92);backdrop-filter:blur(16px);border-top:1px solid var(--line)}.bottom-nav a{display:grid;place-items:center;gap:2px;border-radius:14px;padding:7px 4px;color:#334155;font-weight:900}.bottom-nav span{font-size:10px}.bottom-nav a.is-active{background:#eff6ff;color:#1d4ed8}.table thead{display:none}.table,.table tbody,.table tr,.table td{display:block;width:100%}.table tr{border-top:1px solid var(--line);padding:10px 12px}.table td{border:0;padding:4px 0}.table td::before{content:attr(data-label);display:block;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}.pagination{justify-content:center}.legacy-shell{height:calc(100vh - 170px);min-height:520px}.drawer{width:100%}.detail-grid{grid-template-columns:1fr}.drawer-actions .primary-btn,.drawer-actions .soft-btn,.drawer-actions .danger-btn{width:100%}}
@media (max-width:540px){.grid.metrics{grid-template-columns:1fr}.module-grid{grid-template-columns:1fr}.metric strong{font-size:24px}.topbar-actions .primary-btn{display:none}.card-pad{padding:14px}}

/* v8 orders quick-edit + product photos */
.section-title-line{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 12px}.section-title-line h3{margin:0}.quick-fees .field{min-width:150px}.order-edit-list{gap:10px}.order-item-edit{display:grid;grid-template-columns:76px 1fr;gap:12px;align-items:stretch;border:1px solid var(--line);border-radius:18px;background:#fff;padding:10px}.item-thumb{width:76px;min-height:76px;border:1px solid var(--line);border-radius:16px;background:#f8fafc;display:grid;place-items:center;overflow:hidden;cursor:pointer}.item-thumb img{width:100%;height:100%;object-fit:cover;display:block}.item-thumb.is-empty{cursor:default;color:var(--muted);font-size:25px}.order-item-main{display:grid;gap:9px;min-width:0}.order-item-title strong{display:block;font-size:14px;line-height:1.25}.order-item-title small{display:block;color:var(--muted);font-size:12px;margin-top:2px}.item-edit-fields{display:grid;grid-template-columns:90px 120px 1fr;gap:8px;align-items:end}.item-edit-fields .field input{min-width:0;width:100%;padding:9px 10px}.line-total{border:1px solid var(--line);background:#f8fafc;border-radius:14px;padding:9px 11px}.line-total span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.line-total strong{display:block;margin-top:2px}.item-actions{display:flex;gap:8px;flex-wrap:wrap}.add-product-panel{margin-top:14px;border:1px dashed var(--line-strong);border-radius:18px;padding:13px;background:#f8fafc}.add-product-panel h4{margin:0 0 10px}.mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}.product-results{display:grid;gap:7px;margin-top:8px;max-height:310px;overflow:auto}.product-result{border:1px solid var(--line);background:#fff;border-radius:15px;padding:8px;display:grid;grid-template-columns:48px 1fr;gap:10px;align-items:center;text-align:left;cursor:pointer}.product-result:hover{border-color:rgba(37,99,235,.45);box-shadow:0 8px 22px rgba(15,23,42,.07)}.product-result-thumb{width:48px;height:48px;border-radius:12px;background:#eef2f7;display:grid;place-items:center;overflow:hidden}.product-result-thumb img{width:100%;height:100%;object-fit:cover}.product-result strong{display:block;font-size:13px}.product-result small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.product-result-empty{padding:10px;border-radius:14px;background:#fff;color:var(--muted);border:1px solid var(--line)}.image-modal{position:fixed;inset:0;z-index:130;background:rgba(15,23,42,.74);backdrop-filter:blur(6px);display:grid;place-items:center;padding:18px}.image-modal-card{position:relative;width:min(760px,100%);background:#fff;border-radius:24px;padding:14px;box-shadow:0 28px 90px rgba(0,0,0,.35);display:grid;gap:10px}.image-modal-card .icon-btn{display:inline-flex;position:absolute;right:10px;top:10px;background:#fff}.image-modal-card img{width:100%;max-height:72vh;object-fit:contain;border-radius:18px;background:#f8fafc}.image-modal-card strong{font-size:14px;padding:0 4px 2px}
@media (max-width:860px){.section-title-line{display:block}.order-item-edit{grid-template-columns:62px 1fr;padding:9px}.item-thumb{width:62px;min-height:62px}.item-edit-fields{grid-template-columns:1fr 1fr}.line-total{grid-column:1 / -1}.mini-grid{grid-template-columns:1fr}.item-actions .soft-btn,.item-actions .danger-btn{flex:1}.quick-fees .field{min-width:0}.quick-fees .primary-btn{width:100%}.image-modal{padding:10px}.image-modal-card{border-radius:20px}.image-modal-card img{max-height:68vh}}
/* v10: live order item validation */
.order-item-edit.has-invalid-price{border-color:rgba(220,38,38,.45);background:#fff7f7}
.order-item-edit.has-invalid-price [data-line-total]{color:#b91c1c}

.order-item-edit.needs-repair{border-color:rgba(245,158,11,.55);background:#fffbeb}
.item-repair-note{font-size:12px;line-height:1.35;color:#92400e;background:#fff7ed;border:1px solid rgba(245,158,11,.35);border-radius:12px;padding:8px 10px}

/* v12: final order-edit email button */
.final-edit-mail-panel{margin-top:14px;border:1px solid rgba(37,99,235,.22);background:#eff6ff;border-radius:18px;padding:13px;display:grid;gap:8px}
.final-edit-mail-panel p{margin:0;font-size:13px;line-height:1.4}
.final-edit-mail-btn{width:100%;font-size:15px;padding:12px 14px}
@media (max-width:860px){.final-edit-mail-panel{position:sticky;bottom:calc(76px + var(--safe-bottom));z-index:3;box-shadow:0 16px 38px rgba(15,23,42,.12)}}


/* V13: stop iPhone auto-zoom + horizontal UI breakage */
@media (max-width:860px){
  html,body,.app-shell,.main,.content{width:100%;max-width:100vw;overflow-x:hidden}
  .main{padding-left:max(10px,env(safe-area-inset-left,0px));padding-right:max(10px,env(safe-area-inset-right,0px))}
  .topbar,.page-head,.card,.toolbar,.filters,.table-wrap,.drawer,.drawer-head,.drawer-body,.order-item-edit,.order-item-main,.add-product-panel{max-width:100%;min-width:0}
  .page-head h2,.drawer-head h2,.order-item-title strong{overflow-wrap:anywhere;word-break:break-word}
  .grid.metrics{grid-template-columns:1fr 1fr}
  .metric{min-width:0;padding:14px}
  .metric strong{font-size:clamp(22px,7vw,28px)}
  .field input,.field select,.field textarea,.item-edit-fields .field input{font-size:16px!important;line-height:1.25;min-height:46px}
  .soft-btn,.primary-btn,.danger-btn,.icon-btn{min-height:46px;font-size:16px}
  .drawer{height:100dvh;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .drawer-head{padding-top:max(14px,env(safe-area-inset-top,0px))}
  .bottom-nav{min-height:calc(66px + var(--safe-bottom))}
  .toast-zone{left:12px;right:12px;bottom:calc(80px + var(--safe-bottom))}
  .toast{max-width:none;width:100%;text-align:center}
}
@media (max-width:430px){
  .grid.metrics{grid-template-columns:1fr}
  .item-edit-fields{grid-template-columns:1fr 1fr}
  .order-item-edit{grid-template-columns:58px 1fr;gap:9px}
  .item-thumb{width:58px;min-height:58px}
}


/* v15 operations upgrades */
.head-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
.invoice-grid,.ops-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.ops-box{border:1px solid var(--line);border-radius:18px;padding:12px;background:rgba(255,255,255,.72)}
.ops-box strong{display:block;font-size:1rem;margin-bottom:6px}
.audit-list{display:grid;gap:8px;max-height:280px;overflow:auto;padding-right:4px}
.audit-row{border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff;display:grid;gap:3px}
.audit-row small{color:var(--muted);font-weight:700}
.detail-modal .detail-modal-card{width:min(720px,92vw);max-height:86vh;overflow:auto;background:#fff;border-radius:24px;padding:18px;box-shadow:0 24px 80px rgba(15,23,42,.28);position:relative}
.detail-modal-card h3{margin:0 44px 12px 0;font-size:1.35rem}
.modal-invoice-grid{margin-top:10px}
.order-alert{min-width:min(420px,92vw);background:#0f172a;color:#fff;border-radius:22px;padding:14px 14px 14px 16px;box-shadow:0 18px 60px rgba(15,23,42,.32);display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid rgba(255,255,255,.14)}
.order-alert strong,.order-alert span{grid-column:1/2}.order-alert span{opacity:.82;font-weight:700}.order-alert .primary-btn{grid-column:1/-1}.order-alert .icon-btn{grid-column:2/3;grid-row:1/2;background:rgba(255,255,255,.14);color:#fff;border-color:rgba(255,255,255,.18)}
.customer-edit-card textarea{resize:vertical;min-height:86px}
.final-edit-mail-panel .primary-btn::after{content:' + invoice sync';font-size:.85em;opacity:.8;margin-left:4px}
@media(max-width:720px){.head-actions{width:100%;justify-content:stretch}.head-actions .soft-btn{flex:1}.invoice-grid,.ops-grid{grid-template-columns:1fr}.detail-modal .detail-modal-card{width:94vw;border-radius:20px}.order-alert{margin-left:auto;margin-right:auto}.customer-edit-card .mini-grid{grid-template-columns:1fr}}


/* v17 notification settings */
.notification-table input[type="email"],
.notification-table input[type="text"] { min-width: 170px; }
.check-pill { display:inline-flex; align-items:center; gap:6px; padding:8px 10px; border:1px solid var(--border); border-radius:999px; background:#fff; font-weight:800; color:var(--text); }
.check-pill input { width:18px; height:18px; accent-color:#2563eb; }
.danger-btn { border:1px solid #fecaca; background:#fee2e2; color:#991b1b; border-radius:16px; padding:12px 16px; font-weight:900; cursor:pointer; min-height:44px; }
@media (max-width: 760px) {
  .notification-table-wrap { overflow:visible; }
  .notification-table, .notification-table thead, .notification-table tbody, .notification-table tr, .notification-table th, .notification-table td { display:block; width:100%; }
  .notification-table thead { display:none; }
  .notification-table tr { background:#fff; border:1px solid var(--border); border-radius:22px; padding:12px; margin-bottom:12px; box-shadow:var(--shadow-soft); }
  .notification-table td { border:0 !important; padding:8px 0 !important; }
  .notification-table td::before { content:attr(data-label); display:block; font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-weight:900; margin-bottom:5px; }
  .notification-table input[type="email"], .notification-table input[type="text"] { width:100%; min-width:0; font-size:16px; }
}

/* v19 native modules polish */
.inline-fields{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.inline-fields label{display:flex;flex-direction:column;gap:6px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.08em;font-size:12px}
.native-products-table input,.native-products-table select,.notification-table input,.notification-table select{min-width:120px}
.product-thumb{width:70px;height:70px;border-radius:18px;border:1px solid var(--border, #dbe3ef);background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:0;cursor:pointer}
.product-thumb img{width:100%;height:100%;object-fit:contain;display:block}
.muted-thumb{font-size:12px;color:#94a3b8;text-align:center;padding:8px}
.table td .check-pill{white-space:nowrap}
.table td input[type="text"],.table td input[type="number"],.table td input[type="search"],.table td input[type="date"],.table td select{width:100%;box-sizing:border-box}
.codebox{max-height:360px;overflow:auto;white-space:pre-wrap;word-break:break-word}
@media (max-width: 760px){
  .inline-fields{display:grid;grid-template-columns:1fr;align-items:stretch}
  .product-thumb{width:92px;height:92px}
  .native-products-table tr{grid-template-columns:1fr}
  .native-products-table td[data-label="Photo"]{justify-content:flex-start}
  .table td .primary-btn,.table td .soft-btn{width:100%;margin-top:6px}
}


/* v20 product description native editor */
.native-product-desc-row td{background:#f8fafc!important;padding:0 14px 16px!important;border-top:0!important}
.product-description-editor{border:1px solid var(--line);border-radius:20px;background:#fff;padding:14px;display:grid;gap:12px;box-shadow:0 10px 28px rgba(15,23,42,.04)}
.product-description-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.product-description-head strong{display:block;font-size:16px;letter-spacing:-.02em}
.product-description-head small{display:block;color:var(--muted);font-weight:700;margin-top:2px}
.product-description-editor textarea{width:100%;min-height:180px;border:1px solid var(--line);border-radius:18px;padding:14px 15px;font-size:16px!important;line-height:1.5;resize:vertical;background:#fff;outline:none}
.product-description-editor textarea:focus{border-color:rgba(37,99,235,.55);box-shadow:0 0 0 4px rgba(37,99,235,.10)}
@media (max-width:760px){
  .native-products-table .native-product-desc-row{display:block;width:100%;border:1px solid var(--line);border-top:0;border-radius:0 0 22px 22px;margin:-13px 0 14px;background:#f8fafc}
  .native-products-table .native-product-desc-row td{display:block;width:100%;padding:12px!important;border:0!important}
  .product-description-editor{border-radius:20px;padding:12px;box-shadow:none}
  .product-description-head{display:grid;grid-template-columns:1fr;align-items:stretch}
  .product-description-head .primary-btn{width:100%;order:2}
  .product-description-editor textarea{min-height:260px;font-size:16px!important;padding:15px;line-height:1.55}
}

/* V21 Wolt native builder */
.wolt-head { align-items: flex-start; }
.wolt-actions-top,
.wolt-button-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.wolt-card { overflow:hidden; }
.wolt-status-card { background: linear-gradient(135deg, #f8fbff, #eef6ff); border-color:#cfe0ff; }
.wolt-status-main { display:flex; flex-direction:column; gap:4px; margin-bottom:14px; }
.wolt-status-main strong { font-size:18px; color:#0f172a; }
.wolt-status-main span { color:#64748b; font-weight:700; }
.wolt-push-options { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; margin:12px 0 14px; }
.wolt-push-options label,
.wolt-builder-box label { display:flex; flex-direction:column; gap:6px; font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:#64748b; font-weight:900; }
.wolt-push-options select,
.wolt-builder-box select,
.wolt-builder-box input,
.wolt-root-table input,
[data-wolt-price-value],
[data-wolt-price-mode],
[data-wolt-product-search] { min-height:48px; border-radius:14px; border:1px solid #dbe4ef; padding:0 14px; font-size:16px; background:#fff; color:#0f172a; font-weight:800; }
.wolt-builder-grid { display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.wolt-builder-box { border:1px solid #dbe4ef; border-radius:18px; padding:16px; background:#fbfdff; }
.wolt-builder-box h3 { margin:0 0 12px; color:#0f172a; }
.wolt-assign-panel { border:1px dashed #b8c6d9; border-radius:20px; padding:14px; margin-top:16px; background:#f8fafc; }
.wolt-product-list { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:10px; max-height:520px; overflow:auto; padding:4px; }
.wolt-product-pick { display:grid; grid-template-columns: auto 64px minmax(0,1fr); gap:10px; align-items:center; border:1px solid #dbe4ef; border-radius:16px; padding:10px; background:#fff; cursor:pointer; transition:.15s ease; }
.wolt-product-pick:hover { transform: translateY(-1px); box-shadow:0 12px 28px rgba(15,23,42,.08); }
.wolt-product-pick input { width:22px; height:22px; }
.wolt-product-img { width:64px; height:64px; border-radius:14px; background:#eef2f7; display:flex; align-items:center; justify-content:center; overflow:hidden; color:#64748b; font-size:11px; font-weight:900; text-align:center; }
.wolt-product-img img { width:100%; height:100%; object-fit:cover; }
.wolt-product-info { min-width:0; display:flex; flex-direction:column; gap:4px; }
.wolt-product-info strong { color:#0f172a; line-height:1.2; }
.wolt-product-info small { color:#64748b; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wolt-badge { display:inline-flex; width:max-content; max-width:100%; align-items:center; border-radius:999px; padding:5px 9px; font-size:12px; font-weight:900; }
.wolt-badge.ok { background:#dcfce7; color:#166534; }
.wolt-badge.warn { background:#fff7ed; color:#9a3412; }
.wolt-tree-preview { display:grid; gap:12px; }
.wolt-mode-note { border:1px solid #bfdbfe; background:#eff6ff; color:#1e3a8a; border-radius:18px; padding:16px; display:flex; flex-direction:column; gap:6px; }
.wolt-tree-root { border:1px solid #dbe4ef; border-radius:18px; padding:14px; background:#fff; }
.wolt-tree-root h4 { margin:0 0 10px; color:#0f172a; font-size:18px; }
.wolt-tree-sub { border-top:1px solid #edf2f7; padding:10px 0; display:grid; grid-template-columns:220px minmax(0,1fr); gap:12px; }
.wolt-tree-sub:first-of-type { border-top:0; }
.wolt-tree-sub small { display:block; color:#64748b; font-weight:800; }
.wolt-mini-products { display:flex; flex-wrap:wrap; gap:6px; }
.wolt-mini-products span { background:#f1f5f9; border:1px solid #e2e8f0; border-radius:999px; padding:5px 8px; font-size:12px; font-weight:800; color:#334155; }
.wolt-log { background:#08111f; color:#dbeafe; border-radius:18px; padding:14px; min-height:180px; max-height:420px; overflow:auto; white-space:pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size:13px; line-height:1.55; }
.wolt-root-table small { display:block; color:#94a3b8; margin-top:4px; max-width:260px; overflow:hidden; text-overflow:ellipsis; }
.danger-btn { border:0; border-radius:16px; background:#b91c1c; color:#fff; font-weight:900; padding:12px 16px; min-height:44px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
.danger-btn:hover { filter:brightness(.95); }
.error-box { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; border-radius:16px; padding:14px; font-weight:800; }

@media (max-width: 900px) {
  .wolt-push-options,
  .wolt-builder-grid,
  .wolt-product-list { grid-template-columns:1fr; }
  .wolt-actions-top { width:100%; }
  .wolt-actions-top .primary-btn,
  .wolt-actions-top .danger-btn,
  .wolt-actions-top .soft-btn { flex:1 1 160px; }
  .wolt-button-row > * { flex:1 1 150px; }
  .wolt-tree-sub { grid-template-columns:1fr; }
  .wolt-product-pick { grid-template-columns:auto 58px minmax(0,1fr); padding:12px; }
  .wolt-product-img { width:58px; height:58px; }
  .wolt-root-table-wrap { overflow-x:auto; }
}

/* V21 public product description-ready styles, also safe for preview fragments */
.mc-product-info-card {
  background:#ffffff;
  color:#0f172a;
  border:1px solid #dbe4ef;
  border-radius:20px;
  padding:18px;
  margin:16px 0;
  box-shadow:0 18px 45px rgba(15,23,42,.10);
}
.mc-product-price-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.mc-product-price-label { color:#64748b; font-size:14px; font-weight:900; text-transform:uppercase; letter-spacing:.12em; }
.mc-product-price-value { background:linear-gradient(135deg,#22c55e,#14b8a6); color:#fff; border-radius:999px; padding:9px 14px; font-size:18px; font-weight:900; white-space:nowrap; }
.mc-product-section { background:#f8fafc; border:1px solid #e2e8f0; border-radius:18px; padding:15px; margin-top:12px; }
.mc-product-section h3 { margin:0 0 10px; font-size:18px; color:#0f172a; }
.mc-product-section p, .mc-product-section li { color:#334155; font-size:16px; line-height:1.65; }
.mc-product-section ul { margin:0; padding-left:20px; }
.mc-spec-chips { display:flex; flex-wrap:wrap; gap:8px; }
.mc-spec-chip { background:#eff6ff; color:#1e40af; border:1px solid #bfdbfe; border-radius:999px; padding:8px 10px; font-size:13px; font-weight:900; }
.mc-desc-toggle { width:100%; margin-top:12px; border:0; border-radius:14px; background:#0f172a; color:#fff; font-size:16px; font-weight:900; min-height:48px; padding:12px 16px; }
.mc-full-description[hidden] { display:none !important; }
@media (max-width:768px){ .mc-product-info-card{border-radius:18px;padding:15px}.mc-product-section{padding:14px}.mc-product-section p,.mc-product-section li{font-size:16px}.mc-product-price-value{font-size:17px} }

/* v22 Wolt friendly full builder shell */
.wolt-friendly-shell {
  padding: 0;
  overflow: hidden;
  min-height: calc(100vh - 170px);
  border-radius: 24px;
}
.wolt-friendly-frame {
  width: 100%;
  min-height: calc(100vh - 172px);
  height: 82vh;
  border: 0;
  display: block;
  background: #f4f7fb;
}
@media (max-width: 768px) {
  .wolt-friendly-shell {
    min-height: calc(100vh - 120px);
    border-radius: 18px;
  }
  .wolt-friendly-frame {
    min-height: calc(100vh - 125px);
    height: 88vh;
  }
}


/* v28 Wolt exact-engine embedded app */
.wolt-exact-head{align-items:flex-start}
.wolt-exact-head code{background:#eef4ff;border:1px solid #cfe0ff;border-radius:8px;padding:2px 6px;font-weight:900;color:#1d4ed8}
.wolt-exact-shell{padding:0;overflow:hidden;height:calc(100dvh - 138px);min-height:820px;border-radius:26px;background:#f8fafc;border-color:#dbeafe;box-shadow:0 20px 60px rgba(15,23,42,.08)}
.wolt-exact-frame{display:block;border:0;width:100%;height:100%;background:#f8fafc}
@media (max-width:860px){.wolt-exact-shell{height:calc(100dvh - 126px);min-height:740px;border-radius:20px;margin-left:-8px;margin-right:-8px}.wolt-exact-head .wolt-actions-top{width:100%}.wolt-exact-head .wolt-actions-top .soft-btn{flex:1 1 120px}.wolt-exact-head p{font-size:13px}}


/* Wolt v11: app-like full route, no nested card chrome */
.wolt-mobile-shell{padding:0!important;overflow:hidden!important;height:calc(100dvh - 92px)!important;min-height:0!important;border-radius:0!important;background:transparent!important;border:0!important;box-shadow:none!important;margin:-8px!important}
.wolt-mobile-shell .wolt-exact-frame{display:block;width:100%;height:100%;border:0;background:#f4f7fb}
@media (max-width:860px){.wolt-mobile-shell{height:calc(100dvh - 76px)!important;margin:-10px!important}}

/* v12 Wolt mobile price edit */
.price-edit-input{font-size:22px!important;font-weight:900!important;color:#0f172a!important;background:#fff!important;border:2px solid #2563eb!important;box-shadow:0 0 0 4px rgba(37,99,235,.10)!important}
.price-note{margin:8px 0 12px;padding:10px 12px;border-radius:16px;background:#eef6ff;color:#1e3a8a;font-weight:800;font-size:13px;line-height:1.35}
.advanced-price{border:1px solid rgba(148,163,184,.35);border-radius:18px;padding:10px 12px;background:#fff;margin:8px 0 12px}
.advanced-price summary{cursor:pointer;font-weight:900;color:#334155}
.advanced-price[open] summary{margin-bottom:10px}

/* v32 Email Center — app-like email audit/resend UI */
.email-center-shell{display:grid;gap:16px;max-width:1180px;margin:0 auto;padding-bottom:92px}
.email-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#0f172a,#1d4ed8 58%,#06b6d4);color:#fff;overflow:hidden;position:relative}
.email-hero:after{content:'';position:absolute;right:-80px;top:-80px;width:220px;height:220px;border-radius:999px;background:rgba(255,255,255,.12)}
.email-hero h2{margin:4px 0 6px;font-size:clamp(24px,4vw,38px);letter-spacing:-.04em}
.email-hero p{margin:0;max-width:720px;color:rgba(255,255,255,.84);font-weight:700;line-height:1.45}
.email-hero .eyebrow{display:inline-flex;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.24);border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.12em}
.email-hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;z-index:1}
.email-hero-actions .soft-btn,.email-hero-actions .primary-btn{box-shadow:0 14px 30px rgba(0,0,0,.14)}
.email-filters{display:grid;grid-template-columns:minmax(240px,1fr) 140px 140px 150px;gap:12px;align-items:end}
.email-list{display:grid;gap:10px;margin-top:12px}
.email-card{border:1px solid rgba(148,163,184,.28);border-radius:18px;padding:13px;display:flex;gap:12px;align-items:stretch;justify-content:space-between;background:#fff;box-shadow:0 12px 28px rgba(15,23,42,.05);cursor:pointer;transition:.16s ease}
.email-card:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.35);box-shadow:0 18px 42px rgba(15,23,42,.08)}
.email-card-main{display:grid;gap:7px;min-width:0}
.email-card-top{display:flex;gap:10px;align-items:center;justify-content:space-between;min-width:0}
.email-card-top strong{font-size:15px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:760px}
.email-card-meta{display:flex;gap:7px;flex-wrap:wrap;color:#475569;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.email-card-meta span{border:1px solid rgba(148,163,184,.25);background:#f8fafc;border-radius:999px;padding:4px 8px}
.email-card-side{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;gap:10px;flex:0 0 auto;color:#64748b;font-weight:800}
.legacy-email-card{cursor:default;background:#f8fafc}
.legacy-email-card details{margin-top:6px}.legacy-email-card pre{white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e2e8f0;padding:10px;border-radius:12px;max-height:260px;overflow:auto;font-size:12px}
.email-detail-drawer{display:grid;gap:14px}
.email-preview-card{min-height:340px}.email-preview-frame{width:100%;height:520px;border:1px solid rgba(148,163,184,.3);border-radius:16px;background:#fff}.email-detail-drawer textarea[data-email-html]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;line-height:1.5}.danger-text{color:#b91c1c;font-weight:900}.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:14px}.pager span{font-weight:900;color:#475569}
@media (max-width:760px){
  .email-center-shell{gap:12px;margin:0 -8px;padding-bottom:110px}.email-hero{display:grid;border-radius:0 0 28px 28px;margin:-12px -12px 0;padding:22px 18px}.email-hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.email-hero-actions [data-email-refresh]{grid-column:1/-1}.email-filters{grid-template-columns:1fr 1fr;gap:10px}.email-filters .search{grid-column:1/-1}.email-card{border-radius:20px;padding:14px;display:grid}.email-card-top{align-items:flex-start}.email-card-top strong{white-space:normal;max-width:100%;font-size:16px}.email-card-side{flex-direction:row;align-items:center}.email-card-side .soft-btn{width:50%}.email-preview-frame{height:460px}.email-detail-drawer .mini-grid{grid-template-columns:1fr}.drawer .email-detail-drawer{padding-bottom:110px}
}
