/* MillFlow premium UI / Nov 2026. Shared authenticated Live + Sandbox visual system.
   Presentation-only: no workflow, access, RLS, sensor or business-state overrides. */
#app .layout{
 --mf-luxe-ink:#173b57;--mf-luxe-navy:#0a253b;--mf-luxe-gold:#bd9c6d;
 --mf-luxe-hairline:#d9e6ef;--mf-luxe-muted:#6c8598;
 --mf-luxe-shadow:0 9px 28px rgba(10,45,72,.065);
 font-kerning:normal;
}
#app .layout .main{background:radial-gradient(ellipse at 95% -15%,rgba(177,205,225,.23),transparent 40%),#eef4f8}
#app .layout .content{max-width:1490px}
#app .layout :is(.panel,.prod-card,.stat,.mf-ticket-pane,.mf-gw-saved-window){
 border-radius:16px;border-color:var(--mf-luxe-hairline);
 box-shadow:var(--mf-luxe-shadow);min-width:0
}
/* Keep component-defined overflow behavior for dialogs, charts and sticky content. */
#app .layout .panel-head{background:linear-gradient(110deg,#fff,#f9fbfd);border-radius:16px 16px 0 0}
#app .layout .panel-head h3{font-weight:850;letter-spacing:-.03em}
#app .layout .page-head{padding-block:5px 2px}
#app .layout .page-head h2{font-weight:870;letter-spacing:-.043em}
#app .layout .page-head p:not(.eyebrow){max-width:650px;font-size:13px}
#app .layout .stat{transition:border-color .18s,box-shadow .18s;position:relative}
#app .layout .stat:hover{border-color:#b8cddd;box-shadow:0 13px 30px rgba(10,45,72,.09)}
#app .layout .btn{font-weight:750;transition:background .15s,border-color .15s,box-shadow .15s}
#app .layout .btn.primary{background:linear-gradient(135deg,#1d5d86,#123b59);border-color:#1c547a;box-shadow:0 5px 13px rgba(14,59,86,.16)}
#app .layout .btn.primary:hover{background:linear-gradient(135deg,#24749e,#17496e)}
#app .layout :is(.btn,button,a,input,select,textarea):focus-visible{outline:3px solid #c8a473;outline-offset:2px}
#app .layout :is(input,select,textarea){border-radius:10px;min-width:0}
#app .layout .topbar{border-bottom:1px solid #dae6ee}
#app .layout .topbar .mf-mode-switch{box-shadow:0 3px 12px rgba(25,74,104,.06)}
#app .layout .mobile-nav{border-top:1px solid #be9c6b55;box-shadow:0 -8px 24px rgba(8,30,46,.18)}
#app .layout .mobile-nav button{min-width:0}
#app .layout .mobile-nav button.selected{box-shadow:inset 0 2px #d9b57c}
#app .layout .mf-route-symbol svg{stroke-linecap:round;stroke-linejoin:round}
#app .layout :is(.v2d-panel,.v2d-command-card,.sri-panel,.mf-asset-card,.mf-route-card,.iw-panel,.fi-card,.mf-stock-card){
 border-radius:16px;min-width:0
}

/* Notification inbox: editorial hierarchy rather than a giant table of buttons. */
#app .layout .mf-notice-shell{
 padding:0!important;overflow:hidden;
 border:1px solid #d7e5ee;border-radius:21px;
 background:#fff;box-shadow:0 19px 50px rgba(10,43,70,.08)
}
#app .layout .mf-notice-header{
 display:flex;align-items:center;gap:14px;min-width:0;padding:22px 24px 18px;
 background:linear-gradient(125deg,#0b2942,#143d58 72%,#23455d);
 position:relative;color:#f9fbff
}
#app .layout .mf-notice-header:before{
 content:"";position:absolute;inset:0 0 auto;height:2px;
 background:linear-gradient(90deg,#a38152,#e0c399 44%,#80b3d0)
}
#app .layout .mf-notice-title-icon{
 display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;
 border-radius:14px;background:#ffffff0e;border:1px solid #dfc09566;color:#ebcc9f
}
#app .layout .mf-notice-heading{flex:1;min-width:0}
#app .layout .mf-notice-overline{font-size:9px;letter-spacing:.19em;font-weight:850;color:#dbbb8c}
#app .layout .mf-notice-header h3{color:#fff;font-size:clamp(19px,2.3vw,25px);line-height:1.17;
 letter-spacing:-.03em;margin:5px 0 5px;font-weight:850}
#app .layout .mf-notice-header p{margin:0;color:#bcd2e2;line-height:1.4;font-size:11px;max-width:550px}
#app .layout .mf-notice-count{min-width:70px;flex:0 0 78px;display:grid;justify-items:center;gap:4px;
 border:1px solid #c6a67570;border-radius:13px;background:#ffffff0a;padding:10px 9px}
#app .layout .mf-notice-count strong{font-size:28px;line-height:1;font-weight:850;color:#f2debe;letter-spacing:-.05em}
#app .layout .mf-notice-count span{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:#d1e0eb}
#app .layout .mf-notice-filters{display:flex;gap:7px;align-items:center;padding:13px 20px;
 border-bottom:1px solid #e4edf3;background:#f9fbfd}
#app .layout .mf-notice-filters button{
 display:inline-flex;align-items:center;justify-content:space-between;gap:10px;
 border:1px solid #dce7ef;border-radius:10px;background:#fff;padding:9px 12px;
 min-height:40px;color:#41677e;cursor:pointer;font-size:12px;font-weight:800
}
#app .layout .mf-notice-filters button:hover{border-color:#8bb1c9;background:#f1f7fb}
#app .layout .mf-notice-filters button.selected{
 background:#1a4b6c;border-color:#1a4b6c;color:#fff;box-shadow:inset 0 2px #d6b27d
}
#app .layout .mf-notice-filters button span{display:grid;place-items:center;min-width:23px;padding:3px 5px;
 border-radius:6px;background:#eaf1f6;color:#446b82;font-size:10px;font-weight:850}
#app .layout .mf-notice-filters button.selected span{background:#ffffff25;color:#f9ead0}
#app .layout .mf-notice-list{display:grid;gap:8px;padding:14px}
#app .layout .mf-notice-card{
 display:grid;grid-template-columns:42px minmax(0,1fr);gap:13px;align-items:start;
 min-width:0;padding:16px 17px;
 background:#fff;border:1px solid #e2ebf2;border-left:3px solid #bdcdd9;
 border-radius:13px;box-shadow:0 3px 12px rgba(17,54,79,.035)
}
#app .layout .mf-notice-card.unread{background:linear-gradient(110deg,#fff,#f8fbfd);border-left-color:#b6a074}
#app .layout .mf-notice-card[data-tone="critical"]{border-left-color:#c64d4c}
#app .layout .mf-notice-card[data-tone="warning"]{border-left-color:#d4a04c}
#app .layout .mf-notice-card:not(.unread){opacity:.82;box-shadow:none}
#app .layout .mf-notice-symbol{display:grid;place-items:center;width:42px;height:42px;flex:none;
 border:1px solid #d8e6f0;border-radius:12px;background:#edf5fa;color:#2b709c}
#app .layout .mf-notice-card[data-tone="warning"] .mf-notice-symbol{background:#fff5e3;color:#986717;border-color:#eed8a6}
#app .layout .mf-notice-card[data-tone="critical"] .mf-notice-symbol{background:#fff0ee;color:#b33c3e;border-color:#f1c3be}
#app .layout .mf-notice-main{min-width:0}
#app .layout .mf-notice-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:0 0 6px}
#app .layout .mf-notice-category{font-size:10px;font-weight:850;letter-spacing:.075em;text-transform:uppercase;color:#967443}
#app .layout .mf-notice-state{font-size:10px;font-weight:750;padding:3px 7px;border:1px solid #e0e8ef;
 border-radius:999px;background:#f2f5f8;color:#698393;white-space:nowrap}
#app .layout .mf-notice-state.is-new{background:#eaf5fb;border-color:#c8e0ef;color:#1d668e}
#app .layout .mf-notice-card h4{font-size:clamp(14px,1.5vw,17px);font-weight:850;line-height:1.34;
 letter-spacing:-.015em;color:#183c55;margin:0 0 6px;overflow-wrap:anywhere}
#app .layout .mf-notice-card p{font-size:12px;line-height:1.55;color:#5f7a8f;margin:0 0 7px;overflow-wrap:anywhere}
#app .layout .mf-notice-card time{display:block;font-size:11px;color:#7b92a3}
#app .layout .mf-notice-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:11px}
#app .layout .mf-notice-actions button{min-height:34px;border:1px solid #d0e0eb;border-radius:9px;
 padding:7px 10px;font-family:inherit;font-size:11px;line-height:1.3;font-weight:800;cursor:pointer}
#app .layout .mf-notice-read{background:#fff;color:#286283}
#app .layout .mf-notice-open{background:#e8f2f8;color:#175b81}
#app .layout .mf-notice-open span{font-size:15px;margin-left:5px;color:#b18d5b}
#app .layout .mf-notice-actions button:hover{background:#dfeef7;border-color:#9dc3da}
#app .layout .mf-notice-empty{text-align:center;display:grid;justify-items:center;gap:9px;
 padding:38px 15px;color:#6d8595}
#app .layout .mf-notice-empty svg{width:27px;height:27px;color:#bb9b69}
#app .layout .mf-notice-empty strong{font-size:17px;font-weight:850;color:#21445f}
#app .layout .mf-notice-empty p{font-size:12px;margin:0}

/* Rest of site: consistent affordances without overriding domain-specific layouts. */
@media(hover:hover){
 #app .layout :is(.prod-card,.mf-stock-card,.mf-package-item,.mf-asset-card,.mf-route-card,.v2d-panel):hover{
  border-color:#b4cedf;box-shadow:0 12px 32px rgba(12,48,74,.085)
 }
}
@media(max-width:760px){
 #app .layout .content{padding-left:12px;padding-right:12px}
 #app .layout .page-head{margin-bottom:14px}
 #app .layout .page-head .eyebrow{font-size:9px}
 #app .layout .page-head h2{font-size:clamp(22px,6vw,29px)}
 #app .layout .page-head p:not(.eyebrow){font-size:12px;line-height:1.5}
 #app .layout .mf-notice-shell{border-radius:16px}
 #app .layout .mf-notice-header{padding:17px 15px;gap:10px}
 #app .layout .mf-notice-title-icon{width:37px;height:37px;flex-basis:37px;border-radius:11px}
 #app .layout .mf-notice-title-icon svg{width:18px;height:18px}
 #app .layout .mf-notice-header h3{font-size:18px}
 #app .layout .mf-notice-header p{font-size:10px;max-width:240px}
 #app .layout .mf-notice-overline{font-size:8px}
 #app .layout .mf-notice-count{min-width:58px;flex:0 0 58px;padding:7px 5px;border-radius:10px}
 #app .layout .mf-notice-count strong{font-size:23px}
 #app .layout .mf-notice-count span{font-size:8px}
 #app .layout .mf-notice-filters{padding:10px;gap:6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 #app .layout .mf-notice-filters button{min-width:0;min-height:41px;padding:8px;gap:4px;font-size:11px}
 #app .layout .mf-notice-filters button span{min-width:18px;font-size:9px;padding:3px}
 #app .layout .mf-notice-list{padding:9px;gap:7px}
 #app .layout .mf-notice-card{grid-template-columns:35px minmax(0,1fr);gap:10px;padding:12px 11px;border-radius:11px}
 #app .layout .mf-notice-symbol{width:34px;height:34px;border-radius:9px}
 #app .layout .mf-notice-symbol svg{width:18px;height:18px}
 #app .layout .mf-notice-card h4{font-size:13px}
 #app .layout .mf-notice-card p{font-size:11px}
 #app .layout .mf-notice-card time{font-size:10px}
 #app .layout .mf-notice-actions{gap:6px;margin-top:9px}
 #app .layout .mf-notice-actions button{min-height:36px;font-size:10px}
}
@media(max-width:375px){
 #app .layout .mf-notice-title-icon{display:none}
 #app .layout .mf-notice-count{flex-basis:52px;min-width:52px}
 #app .layout .mf-notice-card{grid-template-columns:30px minmax(0,1fr);gap:8px}
 #app .layout .mf-notice-symbol{width:30px;height:30px}
}
/* Premium Sandbox context selection; unchanged role and crew behavior. */
body.mf-sandbox-choosing .mf-sb-wizard{
 background:radial-gradient(circle at 11% 7%,rgba(56,93,123,.5),transparent 39%),
 radial-gradient(circle at 86% 84%,rgba(176,142,94,.12),transparent 46%),#081a2b
}
body.mf-sandbox-choosing .mf-sb-wizard-card{
 border-color:#d4dfe6;border-radius:24px;
 box-shadow:0 40px 110px #0006,0 0 0 1px #d7b78147;isolation:isolate
}
body.mf-sandbox-choosing .mf-sb-hero{
 background:radial-gradient(circle at 102% -20%,#4d789133,transparent 45%),
 linear-gradient(116deg,#0b263d,#173b52 83%);
 padding-bottom:24px
}
body.mf-sandbox-choosing .mf-sb-hero-stamp{
 position:absolute;right:26px;top:23px;display:flex;align-items:center;gap:6px;
 border:1px solid #c9aa7875;border-radius:999px;background:#ebc8940b;
 padding:7px 11px;color:#e9d2ac;font-size:9px;font-weight:850;letter-spacing:.12em
}
body.mf-sandbox-choosing .mf-sb-hero-stamp .mf-sb-icon{width:14px;height:14px}
body.mf-sandbox-choosing .mf-sb-ready-dot{display:inline-block;width:7px;height:7px;
 border-radius:50%;background:#399970;margin:0 6px 1px 0}
body.mf-sandbox-choosing .mf-sb-brand{letter-spacing:.19em}
body.mf-sandbox-choosing .mf-sb-monogram{background:#d6b78212;box-shadow:inset 0 0 18px #d8b47d17}
body.mf-sandbox-choosing .mf-sb-eyebrow{color:#ddbc89}
body.mf-sandbox-choosing .mf-sb-hero h2{font-size:clamp(28px,3.1vw,42px);letter-spacing:-.047em}
body.mf-sandbox-choosing .mf-sb-hero p{font-size:13px;color:#c2d2df}
body.mf-sandbox-choosing .mf-sb-layout{background:#f1f5f8;gap:13px;padding:17px}
body.mf-sandbox-choosing .mf-sb-section{
 background:linear-gradient(148deg,#fff,#f9fbfd);border:1px solid #dbe6ed;
 border-radius:16px;box-shadow:0 4px 15px #0e3d6110
}
body.mf-sandbox-choosing .mf-sb-section-num{background:#eef3f7;color:#346f94}
body.mf-sandbox-choosing .mf-sb-section-head h3{color:#193f59;font-weight:850}
body.mf-sandbox-choosing .mf-sb-crew{background:#f4f8fb;border-color:#d1e0e9}
body.mf-sandbox-choosing .mf-sb-crew.active{
 background:linear-gradient(132deg,#163f5d,#205d81);border-color:#caa86e;
 box-shadow:0 5px 18px #1c547934,inset 0 3px #e5c58e;color:#fff
}
body.mf-sandbox-choosing .mf-sb-option.active{border-color:#bb9b69;background:#f1f7fa}
body.mf-sandbox-choosing .mf-sb-select-wrap{border-color:#cddfe9;background:#eef5fa}
body.mf-sandbox-choosing .mf-sb-select-wrap:focus-within{border-color:#c4a372;box-shadow:0 0 0 3px #c4a37235}
body.mf-sandbox-choosing .mf-sb-footer{border-top:1px solid #dbe6eb;box-shadow:0 -3px 18px #2048680a}
body.mf-sandbox-choosing .mf-sb-summary-icon{background:#eaf4ed;border-color:#b8dcc8;color:#247455}
body.mf-sandbox-choosing .mf-sb-enter{background:linear-gradient(124deg,#153d5b,#1c587b);
 border:1px solid #1b5070;border-top-color:#c3a171;
 box-shadow:0 7px 23px #1e527c35;font-size:13px}
body.mf-sandbox-choosing .mf-sb-enter:hover{background:linear-gradient(124deg,#1f587d,#226b93)}
@media(max-width:640px){
 body.mf-sandbox-choosing .mf-sb-hero-stamp{right:14px;top:13px;font-size:7px;padding:5px 7px;letter-spacing:.06em}
 body.mf-sandbox-choosing .mf-sb-hero-stamp .mf-sb-icon{width:11px;height:11px}
 body.mf-sandbox-choosing .mf-sb-wizard-card{border-radius:20px}
 body.mf-sandbox-choosing .mf-sb-hero{padding:15px 18px}
 body.mf-sandbox-choosing .mf-sb-hero h2{font-size:clamp(24px,6.2vw,29px)}
 body.mf-sandbox-choosing .mf-sb-hero p{font-size:11px;line-height:1.4}
 body.mf-sandbox-choosing .mf-sb-layout{gap:8px;padding:9px}
 body.mf-sandbox-choosing .mf-sb-section{border-radius:12px;box-shadow:none}
 body.mf-sandbox-choosing .mf-sb-select-wrap{min-height:46px}
 body.mf-sandbox-choosing .mf-sb-enter{font-size:12px;min-height:45px}
 body.mf-sandbox-choosing .mf-sb-footer{gap:10px}
}
@media(max-width:640px) and (max-height:700px){
 body.mf-sandbox-choosing .mf-sb-hero{padding:10px 15px}
 body.mf-sandbox-choosing .mf-sb-hero h2{font-size:22px}
 body.mf-sandbox-choosing .mf-sb-layout{gap:6px;padding:7px}
}
html[data-mf-theme="dark"] #app .layout .mf-notice-shell{background:#122b41;border-color:#38546a}
html[data-mf-theme="dark"] #app .layout .mf-notice-filters{background:#10273b;border-color:#38546a}
html[data-mf-theme="dark"] #app .layout .mf-notice-filters button{background:#173650;border-color:#42627a;color:#d7e9f5}
html[data-mf-theme="dark"] #app .layout .mf-notice-filters button.selected{background:#2c5e7f;border-color:#bfa077;color:#fff}
html[data-mf-theme="dark"] #app .layout .mf-notice-card{background:#17354e;border-color:#416179}
html[data-mf-theme="dark"] #app .layout .mf-notice-card.unread{background:#1b3b53}
html[data-mf-theme="dark"] #app .layout .mf-notice-card[data-tone="critical"]{border-left-color:#ed7977}
html[data-mf-theme="dark"] #app .layout .mf-notice-card[data-tone="warning"]{border-left-color:#e0b45b}
html[data-mf-theme="dark"] #app .layout .mf-notice-card h4{color:#f4f7fb}
html[data-mf-theme="dark"] #app .layout .mf-notice-card p{color:#bdd0df}
html[data-mf-theme="dark"] #app .layout .mf-notice-card time{color:#a6c1d4}
html[data-mf-theme="dark"] #app .layout .mf-notice-state{background:#21455e;color:#d5e8f3;border-color:#4c6d84}
html[data-mf-theme="dark"] #app .layout .mf-notice-state.is-new{background:#245776;border-color:#467f9c;color:#fff}
html[data-mf-theme="dark"] #app .layout .mf-notice-category{color:#e5c18b}
html[data-mf-theme="dark"] #app .layout .mf-notice-read,
html[data-mf-theme="dark"] #app .layout .mf-notice-open{background:#234a65;border-color:#537993;color:#eaf4fc}
html[data-mf-theme="dark"] #app .layout .mf-notice-symbol{background:#234861;color:#cfdded;border-color:#59758b}
@media(prefers-reduced-motion:reduce){
 #app .layout .stat,#app .layout .btn{transition:none}
}
