/* FirstMarket Premium V10 */
:root{
  --fm10-ink:#102a3a;--fm10-muted:#62758a;--fm10-line:#dfe8ee;--fm10-card:#fff;--fm10-canvas:#f4f8fa;
  --fm10-mint:#12a88b;--fm10-mint-dark:#08715f;--fm10-mint-soft:#e8faf5;--fm10-coral:#ff6b6b;
  --fm10-indigo:#5b5bd6;--fm10-blue:#2f80ed;--fm10-amber:#f5a623;--fm10-red:#df3f5e;
  --fm10-shadow:0 14px 38px rgba(16,42,58,.09);--fm10-shadow-lg:0 30px 90px rgba(9,28,45,.22);
  --fm10-radius:18px;--fm10-font:Tahoma,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
}
html,body{max-width:100%;overflow-x:hidden}body{font-family:var(--fm10-font)!important;font-size:16px!important;line-height:1.75!important}body *{box-sizing:border-box}
body :where(button,.btn,.primary,.secondary,.ghost-btn,.primary-btn,.danger-btn,.warning-soft,.danger-soft,.action-btn){min-height:44px;font-size:15px!important;line-height:1.35!important}
body :where(input,select,textarea){font-size:16px!important;min-height:44px}body :where(table,th,td){font-size:14.5px!important}
body :where(h1,.page-title h1,.top-title h1){font-size:clamp(25px,2.4vw,32px)!important}body :where(h2){font-size:clamp(20px,1.8vw,25px)!important}body :where(h3){font-size:18px!important}

/* Customer palette */
body[data-role="customer"]{--primary:var(--fm10-mint)!important;--primary-dark:var(--fm10-mint-dark)!important;--primary-soft:var(--fm10-mint-soft)!important;--blue:var(--fm10-indigo)!important;--text:var(--fm10-ink)!important;--muted:var(--fm10-muted)!important;--line:var(--fm10-line)!important;--bg:#f5fbf9!important;color:var(--fm10-ink)!important;background:radial-gradient(circle at 92% -8%,rgba(18,168,139,.16),transparent 30%),radial-gradient(circle at -8% 28%,rgba(91,91,214,.08),transparent 25%),#f5fbf9!important}
body[data-role="customer"] :where(.hero,.status-hero,.desktop-side){background:radial-gradient(circle at 18% 0,rgba(255,255,255,.13),transparent 34%),linear-gradient(145deg,#083b3c 0%,#0b6f66 48%,#14345d 100%)!important}
body[data-role="customer"] :where(.logo,.brand-logo,.success-icon,.avatar,.category-icon,.hero-ico){background:linear-gradient(145deg,#19c7a3,#0b8d78 58%,#5b5bd6)!important;box-shadow:0 14px 36px rgba(11,141,120,.26)!important;color:#fff!important}
body[data-role="customer"] :where(.primary,.pay-btn,.checkout-btn,.add-btn,.track-btn,.save){background:linear-gradient(135deg,#12a88b,#08715f 62%,#315a8c)!important;color:#fff!important;border:0!important;box-shadow:0 12px 28px rgba(8,113,95,.24)!important}
body[data-role="customer"] :where(.card,.shop-card,.product,.category-card,.summary-card,.address-card,.notification,.order-card){border-color:rgba(173,211,201,.72)!important;box-shadow:0 10px 30px rgba(13,78,70,.075)!important}
body[data-role="customer"] :where(.card,.summary-card,.shop-card,.product,.category-card){background:linear-gradient(180deg,#fff,#fbfffd)!important}
body[data-role="customer"] :where(.tab.active,.filter.active,.step.active,.chip.good,.badge.good){background:#e6faf4!important;color:#08715f!important;border-color:#bceadc!important}
body[data-role="customer"] .bottom-nav{background:rgba(255,255,255,.96)!important;border-top-color:#dcece7!important;backdrop-filter:blur(18px)}body[data-role="customer"] .bottom-nav .active{color:#08715f!important}
body[data-role="customer"] input:focus,body[data-role="customer"] select:focus,body[data-role="customer"] textarea:focus{border-color:#12a88b!important;box-shadow:0 0 0 4px rgba(18,168,139,.13)!important}

/* Shared polish */
body :where(.card,.panel,.widget,.summary-card,.modal-card,.sheet,.drawer){border-radius:var(--fm10-radius)!important}
body[data-role="admin"] .app,body[data-role="seller"] .app{width:100%!important;max-width:none!important;min-width:0!important;overflow:visible!important}
body[data-role="admin"] :where(.main,.main-content),body[data-role="seller"] :where(.main,.main-content){min-width:0!important;max-width:none!important}
body[data-role="admin"] :where(.kpi-grid,.stats,.grid,.cards,.queue-grid,.metric-grid),body[data-role="seller"] :where(.kpi-grid,.stats,.grid,.cards,.queue-grid,.metric-grid){grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr))!important}
body[data-role="admin"] .table-wrap,body[data-role="seller"] .table-wrap{width:100%!important;max-width:100%!important;overflow:auto!important;overscroll-behavior-inline:contain}
body[data-role="admin"] table,body[data-role="seller"] table{width:100%!important;min-width:920px!important}
body[data-role="admin"] :where(.topbar-actions,.header-actions,.top-actions,.page-actions),body[data-role="seller"] :where(.topbar-actions,.header-actions,.top-actions,.page-actions){display:flex;flex-wrap:wrap;gap:8px}
.fm10-sidebar-shade{position:fixed;inset:0;z-index:5990;background:rgba(3,15,29,.55);backdrop-filter:blur(4px);opacity:0;visibility:hidden;transition:.22s}.fm10-sidebar-shade.show{opacity:1;visibility:visible}

/* Create button */
.fm10-create{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--primary,#5b5bd6),#253f63);color:#fff;font:800 14.5px/1.25 var(--fm10-font);cursor:pointer;box-shadow:0 12px 30px rgba(37,63,99,.24);white-space:nowrap;z-index:1200}.fm10-create::before{content:"＋";font-size:19px}.fm10-create:hover{transform:translateY(-1px);filter:brightness(1.05)}.fm10-create.fm10-floating{position:fixed;left:22px;bottom:24px}

/* Real modal form */
.fm10-modal{position:fixed;inset:0;z-index:10000;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(3,15,29,.68);backdrop-filter:blur(10px)}.fm10-modal.open{display:flex;animation:fm10Fade .18s ease}
.fm10-dialog{width:min(780px,100%);max-height:min(90dvh,860px);overflow:auto;background:#fff;border:1px solid rgba(255,255,255,.75);border-radius:24px;box-shadow:var(--fm10-shadow-lg);animation:fm10Rise .22s ease}
.fm10-dialog-head{position:sticky;top:0;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid #e7edf2;background:rgba(255,255,255,.97);backdrop-filter:blur(14px)}
.fm10-dialog-title h3{margin:0 0 5px;font-size:21px!important;color:#102a3a}.fm10-dialog-title p{margin:0;color:#6b7c8e;font-size:14px!important}.fm10-close{width:40px;height:40px;min-height:40px!important;padding:0;border:1px solid #dce4eb;background:#fff;color:#4b5d6c;border-radius:12px;font-size:23px!important;cursor:pointer}
.fm10-form-body{padding:21px 22px}.fm10-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.fm10-field{display:grid;gap:7px}.fm10-field.full{grid-column:1/-1}.fm10-field label{font-size:14px!important;font-weight:800;color:#425568}.fm10-field input,.fm10-field select,.fm10-field textarea{width:100%;padding:10px 12px;border:1px solid #d9e3ea;border-radius:12px;background:#fbfdff}.fm10-field textarea{min-height:104px;resize:vertical}.fm10-error{min-height:17px;color:#c73553;font-size:12.5px}
.fm10-form-actions{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:16px 22px;border-top:1px solid #e7edf2;background:rgba(255,255,255,.97);backdrop-filter:blur(14px)}.fm10-form-actions button{min-width:120px}
.fm10-form-success{display:none;padding:30px 22px;text-align:center}.fm10-form-success.show{display:block}.fm10-success-icon{width:64px;height:64px;margin:0 auto 12px;border-radius:20px;display:grid;place-items:center;background:#e8faf3;color:#08715f;font-size:30px;font-weight:900}.fm10-form-success h3{margin:0 0 7px}.fm10-form-success p{margin:0;color:#66788a}
.fm10-kpi-panel,.fm10-added-list{margin:14px 0;padding:15px 16px;border:1px solid #dce6ee;border-radius:16px;background:linear-gradient(135deg,#fff,#f7fbff);box-shadow:0 8px 24px rgba(16,42,58,.06)}.fm10-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:10px}.fm10-kpi-card{padding:13px;border:1px solid #e1e9ef;border-radius:13px;background:#fff}.fm10-kpi-card span{display:block;color:#708296;font-size:13px}.fm10-kpi-card strong{display:block;margin-top:5px;font-size:19px}

/* Test lab */
.fm10-test-toggle{position:fixed;right:18px;bottom:18px;z-index:8000;min-height:44px;padding:10px 14px;border:0;border-radius:14px;background:linear-gradient(135deg,#102a43,#5b5bd6);color:#fff;font:800 14px var(--fm10-font);box-shadow:0 15px 40px rgba(16,42,67,.25);cursor:pointer}.fm10-test-lab{position:fixed;right:18px;bottom:72px;z-index:7999;width:min(390px,calc(100vw - 28px));max-height:72dvh;overflow:auto;display:none;padding:16px;border:1px solid #dce4ec;border-radius:20px;background:rgba(255,255,255,.98);backdrop-filter:blur(16px);box-shadow:var(--fm10-shadow-lg)}.fm10-test-lab.open{display:block}.fm10-test-lab h3{margin:0 0 5px}.fm10-test-lab p{margin:0 0 12px;color:#687b8e;font-size:13px}.fm10-test-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.fm10-test-grid button{min-height:40px;font-size:13px!important}.fm10-test-status{margin-top:11px;padding:10px;border-radius:12px;background:#f3f7fb;color:#40556a;font-size:13px}

/* Hub */
body[data-role="hub"]{background:radial-gradient(circle at 90% -5%,rgba(18,168,139,.13),transparent 30%),radial-gradient(circle at 0 20%,rgba(91,91,214,.09),transparent 25%),#f4f8fa!important;color:#102a3a}body[data-role="hub"] .header{background:radial-gradient(circle at 15% 0,rgba(255,255,255,.12),transparent 32%),linear-gradient(145deg,#071a2d,#0b5f5a 54%,#333876)!important}body[data-role="hub"] .file-card{border-color:#dde8ed!important;box-shadow:0 10px 30px rgba(16,42,58,.07)!important;transition:.18s}body[data-role="hub"] .file-card:hover{transform:translateY(-3px);border-color:#addfd2!important;box-shadow:0 17px 42px rgba(16,42,58,.11)!important}body[data-role="hub"] .file-icon{background:linear-gradient(145deg,#e4fbf4,#eeeeff)!important;color:#08715f}

@media(max-width:1100px){
 body[data-role="admin"],body[data-role="seller"]{overflow-x:hidden!important}
 body[data-role="admin"] .sidebar,body[data-role="seller"] .sidebar{position:fixed!important;right:0!important;top:0!important;bottom:0!important;left:auto!important;width:min(310px,86vw)!important;height:100dvh!important;z-index:6000!important;transform:translateX(108%)!important;transition:transform .25s ease!important;overflow-y:auto!important}
 body[data-role="admin"] .sidebar.open,body[data-role="seller"] .sidebar.open{transform:translateX(0)!important}
 body[data-role="admin"] :where(.main,.main-content),body[data-role="seller"] :where(.main,.main-content){width:100%!important;margin-right:0!important;padding-right:0!important}
 body[data-role="admin"] :where(.mobile-toggle,#mobileToggle,#mobileMenu),body[data-role="seller"] :where(.mobile-toggle,#mobileToggle,#mobileMenu){display:grid!important;place-items:center!important}
 body[data-role="admin"] :where(.content,.main-content),body[data-role="seller"] :where(.content,.main-content){padding:18px!important}
 body[data-role="admin"] :where(.topbar,.page-head),body[data-role="seller"] :where(.topbar,.page-head){padding-inline:18px!important;width:100%!important}
 body[data-role="admin"] .fm10-create:not(.fm10-floating),body[data-role="seller"] .fm10-create:not(.fm10-floating){position:fixed;left:18px;bottom:20px}
}
@media(max-width:760px){
 body{font-size:15.5px!important}body[data-role="admin"] :where(.content,.main-content),body[data-role="seller"] :where(.content,.main-content){padding:12px!important}
 body[data-role="admin"] :where(.topbar,.page-head,.headrow),body[data-role="seller"] :where(.topbar,.page-head,.headrow){padding-inline:12px!important;flex-wrap:wrap!important;height:auto!important;min-height:64px}
 body[data-role="admin"] :where(.topbar-actions,.header-actions,.top-actions,.page-actions),body[data-role="seller"] :where(.topbar-actions,.header-actions,.top-actions,.page-actions){width:100%;justify-content:flex-start}
 body[data-role="admin"] .table-wrap,body[data-role="seller"] .table-wrap{max-width:calc(100vw - 24px)!important;border-radius:13px!important}
 body[data-role="admin"] table,body[data-role="seller"] table{min-width:840px!important}
 body[data-role="admin"] :where(.drawer,.side-drawer),body[data-role="seller"] :where(.drawer,.side-drawer){width:100%!important;max-width:100%!important}
 .fm10-modal{padding:0;align-items:flex-end}.fm10-dialog{width:100%;max-height:95dvh;border-radius:22px 22px 0 0}.fm10-dialog-head{padding:17px 16px}.fm10-form-body{padding:16px}.fm10-form-grid{grid-template-columns:1fr}.fm10-field.full{grid-column:auto}.fm10-form-actions{padding:13px 16px}.fm10-form-actions button{flex:1;min-width:0}
 .fm10-create.fm10-floating,.fm10-create:not(.fm10-floating){position:fixed!important;left:14px!important;bottom:82px!important;max-width:calc(100vw - 28px)}
 .fm10-test-toggle{right:12px;bottom:12px}.fm10-test-lab{right:12px;bottom:66px;width:calc(100vw - 24px)}
 body[data-role="customer"] :where(.product-grid,.shop-list,.subcats,.stats,.summary){grid-template-columns:1fr!important}
}
@media(max-width:480px){body[data-role="admin"] :where(.kpi-grid,.stats,.grid,.cards,.queue-grid,.metric-grid),body[data-role="seller"] :where(.kpi-grid,.stats,.grid,.cards,.queue-grid,.metric-grid){grid-template-columns:1fr!important}.fm10-test-grid{grid-template-columns:1fr}}
@keyframes fm10Fade{from{opacity:0}to{opacity:1}}@keyframes fm10Rise{from{opacity:0;transform:translateY(18px) scale(.985)}to{opacity:1;transform:none}}
.fm10-mobile-menu{display:none;width:44px;height:44px;min-height:44px;padding:0;border:1px solid #dce5eb;border-radius:13px;background:#fff;color:#17334a;font-size:22px!important;place-items:center;box-shadow:0 6px 20px rgba(16,42,58,.08);cursor:pointer;flex:0 0 44px}
@media(max-width:1100px){.fm10-mobile-menu{display:grid!important}}
