/* Dark Flow Futures Mission Control shell controls
   Frontend-only: theme, notifications, admin/profile menus and modal surfaces. */

.df-top-tools{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;position:relative}
.df-icon-btn,.df-profile-btn{height:36px;border:1px solid var(--df-line,#253347);border-radius:9px;background:rgba(255,255,255,.025);color:var(--df-text,#e7ecf3);display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:transform .18s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease}
.df-icon-btn{width:38px;padding:0;position:relative}.df-icon-btn:hover,.df-profile-btn:hover{transform:translateY(-1px);border-color:rgba(101,146,232,.38);background:rgba(101,146,232,.07);box-shadow:0 8px 24px rgba(0,0,0,.16)}
.df-icon-btn svg,.df-profile-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.df-notification-count{position:absolute;right:-4px;top:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;display:grid;place-items:center;background:#e96a77;color:#fff;font-size:8px;font-weight:800;box-shadow:0 0 0 2px #080c12,0 0 12px rgba(233,106,119,.32)}
.df-notification-count[hidden]{display:none!important}
.df-profile-btn{padding:0 9px 0 6px;min-width:144px;justify-content:flex-start}
.df-avatar{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;background:linear-gradient(145deg,#4f7fce,#2f5595);color:#fff;font-size:10px;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 0 16px rgba(101,146,232,.14)}
.df-profile-copy{display:grid;min-width:0;text-align:left;line-height:1.15}.df-profile-copy strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.df-profile-copy span{font-size:8px;color:var(--df-muted,#8f9caf);letter-spacing:.06em;text-transform:uppercase;margin-top:2px}.df-chevron{margin-left:auto;width:12px!important;height:12px!important;color:var(--df-muted,#8f9caf)}

.df-popover{position:fixed;z-index:120;width:min(360px,calc(100vw - 24px));border:1px solid var(--df-line,#263446);border-radius:13px;background:rgba(10,15,22,.985);color:var(--df-text,#e7ecf3);box-shadow:0 24px 64px rgba(0,0,0,.46),0 0 0 1px rgba(101,146,232,.035);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);overflow:hidden;animation:dfShellPopover .18s ease both}
.df-popover[hidden]{display:none!important}.df-popover-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid var(--df-line-soft,rgba(148,163,184,.09));background:linear-gradient(180deg,rgba(20,29,40,.9),rgba(12,18,26,.9))}.df-popover-head strong{font-size:11px}.df-popover-head small{font-size:8px;color:var(--df-muted,#8f9caf)}
.df-text-btn{border:0;background:transparent;color:var(--df-accent-2,#82a9f3);font-size:9px;font-weight:700;padding:5px;cursor:pointer}.df-text-btn:hover{text-decoration:underline}

.df-notification-list{max-height:min(560px,70vh);overflow:auto;scrollbar-width:thin;scrollbar-color:#29384b transparent}.df-notification-empty{padding:30px 18px;text-align:center;color:var(--df-muted,#8f9caf);font-size:10px}.df-notification-item{display:grid;grid-template-columns:9px minmax(0,1fr);gap:10px;padding:11px 14px;border-bottom:1px solid var(--df-line-soft,rgba(148,163,184,.08));background:transparent}.df-notification-item:hover{background:rgba(101,146,232,.035)}.df-notification-item:last-child{border-bottom:0}.df-notification-dot{width:7px;height:7px;border-radius:50%;margin-top:4px;background:#718096;box-shadow:0 0 10px rgba(113,128,150,.2)}.df-notification-item.info .df-notification-dot{background:#6592e8;box-shadow:0 0 10px rgba(101,146,232,.36)}.df-notification-item.good .df-notification-dot{background:#3fc78b;box-shadow:0 0 10px rgba(63,199,139,.34)}.df-notification-item.warn .df-notification-dot{background:#d5a64e;box-shadow:0 0 10px rgba(213,166,78,.34)}.df-notification-item.bad .df-notification-dot{background:#e96a77;box-shadow:0 0 10px rgba(233,106,119,.36)}.df-notification-main{min-width:0}.df-notification-top{display:flex;justify-content:space-between;gap:10px}.df-notification-top strong{font-size:10px}.df-notification-top time{font-size:8px;color:var(--df-muted-2,#69778b);white-space:nowrap}.df-notification-main p{margin:4px 0 0!important;font-size:9px!important;line-height:1.42;color:var(--df-muted,#8f9caf)!important}.df-notification-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.df-mini-chip{display:inline-flex;padding:3px 6px;border:1px solid var(--df-line-soft,rgba(148,163,184,.09));border-radius:999px;background:rgba(255,255,255,.018);color:#91a0b2;font-size:7.5px;font-weight:700}

.df-admin-menu{width:250px}.df-admin-card{display:flex;align-items:center;gap:10px;padding:13px 14px;border-bottom:1px solid var(--df-line-soft,rgba(148,163,184,.08))}.df-admin-card .df-avatar{width:34px;height:34px;border-radius:10px}.df-admin-card-copy{display:grid;line-height:1.25}.df-admin-card-copy strong{font-size:11px}.df-admin-card-copy span{font-size:8px;color:var(--df-muted,#8f9caf);text-transform:uppercase;letter-spacing:.06em}.df-menu-list{display:grid;padding:6px}.df-menu-item{display:flex;align-items:center;gap:10px;width:100%;min-height:36px;border:0;border-radius:8px;padding:0 9px;background:transparent;color:#b8c2cf;text-align:left;cursor:pointer;font-size:10px}.df-menu-item:hover{background:rgba(101,146,232,.07);color:#eef4fd}.df-menu-item.danger:hover{background:rgba(233,106,119,.07);color:#ef9ca6}.df-menu-icon{width:25px;height:25px;border:1px solid var(--df-line-soft,rgba(148,163,184,.09));border-radius:7px;display:grid;place-items:center;color:#8190a3;font-size:11px}.df-menu-item small{margin-left:auto;color:#647286;font-size:8px}

.df-modal-backdrop{position:fixed;z-index:160;inset:0;display:grid;place-items:center;padding:18px;background:rgba(2,5,9,.72);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);animation:dfShellFade .16s ease both}.df-modal-backdrop[hidden]{display:none!important}.df-modal{width:min(620px,100%);max-height:min(760px,90vh);overflow:auto;border:1px solid var(--df-line,#263446);border-radius:16px;background:linear-gradient(180deg,#101720,#090e14);box-shadow:0 32px 88px rgba(0,0,0,.55),0 0 0 1px rgba(101,146,232,.04);color:var(--df-text,#e7ecf3);animation:dfShellModal .22s cubic-bezier(.2,.75,.25,1) both}.df-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:18px 19px 14px;border-bottom:1px solid var(--df-line-soft,rgba(148,163,184,.09))}.df-modal-eyebrow{font-size:8px;font-weight:800;letter-spacing:.12em;color:var(--df-cyan,#41bfd4);text-transform:uppercase;margin-bottom:4px}.df-modal-head h2{margin:0;font-size:18px}.df-modal-head p{margin:3px 0 0!important;font-size:9px!important;color:var(--df-muted,#8f9caf)!important}.df-close{width:32px;height:32px;border:1px solid var(--df-line,#263446);border-radius:8px;background:#0a1017;color:#a8b4c3;cursor:pointer;font-size:18px;line-height:1}.df-close:hover{border-color:rgba(233,106,119,.28);color:#f2a1aa}.df-modal-body{padding:16px 19px 19px}.df-settings-section{padding:13px 0;border-bottom:1px solid var(--df-line-soft,rgba(148,163,184,.08))}.df-settings-section:first-child{padding-top:0}.df-settings-section:last-child{border-bottom:0;padding-bottom:0}.df-settings-title{display:flex;justify-content:space-between;gap:10px;margin-bottom:9px}.df-settings-title strong{font-size:11px}.df-settings-title span{font-size:8px;color:var(--df-muted,#8f9caf)}.df-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.df-choice{position:relative;display:grid;gap:3px;padding:10px;border:1px solid var(--df-line,#263446);border-radius:10px;background:#0a1017;color:#bdc7d4;cursor:pointer;text-align:left}.df-choice:hover{border-color:rgba(101,146,232,.28)}.df-choice.active{border-color:rgba(101,146,232,.52);background:rgba(101,146,232,.075);box-shadow:inset 0 0 0 1px rgba(101,146,232,.06)}.df-choice strong{font-size:10px}.df-choice small{color:var(--df-muted,#8f9caf);font-size:8px}.df-setting-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:9px 0}.df-setting-row-copy{display:grid}.df-setting-row-copy strong{font-size:10px}.df-setting-row-copy small{font-size:8px;color:var(--df-muted,#8f9caf);margin-top:2px}.df-switch{position:relative;width:38px;height:22px;flex:0 0 38px}.df-switch input{position:absolute;opacity:0;pointer-events:none}.df-switch span{position:absolute;inset:0;border-radius:999px;background:#222d3b;border:1px solid #303d4d;cursor:pointer;transition:.2s}.df-switch span::after{content:"";position:absolute;width:16px;height:16px;left:2px;top:2px;border-radius:50%;background:#8997a8;transition:.2s}.df-switch input:checked+span{background:rgba(101,146,232,.22);border-color:rgba(101,146,232,.48)}.df-switch input:checked+span::after{transform:translateX(16px);background:#9cbcff;box-shadow:0 0 10px rgba(101,146,232,.42)}

.df-security-state{display:flex;align-items:center;gap:9px;padding:10px 11px;border:1px solid var(--df-line,#263446);border-radius:10px;background:#0a1017;margin-bottom:12px}.df-security-led{width:8px;height:8px;border-radius:50%;background:#d5a64e;box-shadow:0 0 12px rgba(213,166,78,.35)}.df-security-state.good .df-security-led{background:#3fc78b;box-shadow:0 0 12px rgba(63,199,139,.36)}.df-security-state.bad .df-security-led{background:#e96a77;box-shadow:0 0 12px rgba(233,106,119,.36)}.df-security-copy{display:grid}.df-security-copy strong{font-size:10px}.df-security-copy small{font-size:8px;color:var(--df-muted,#8f9caf);margin-top:2px}.df-security-form{display:grid;gap:10px}.df-security-form label{font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:#9ba8b9}.df-security-form input{margin-top:5px!important}.df-security-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:3px}.df-security-msg{min-height:18px;font-size:9px;color:var(--df-muted,#8f9caf)}.df-security-msg.ok{color:#65d2a3!important}.df-security-msg.err{color:#ee8e9a!important}.df-security-hint{padding:10px 11px;border:1px solid rgba(213,166,78,.2);border-radius:9px;background:rgba(213,166,78,.055);color:#ccb276;font-size:9px;line-height:1.45}

/* Motion preference */
html[data-df-motion="off"] *,html[data-df-motion="off"] *::before,html[data-df-motion="off"] *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}

/* Light Mission Control palette: same component language, brighter surfaces. */
html[data-df-theme="light"]{
  color-scheme:light;
  --df-bg:#eef3f9;--df-bg-2:#f6f9fc;--df-panel:#ffffff;--df-panel-2:#f7f9fc;--df-panel-3:#edf2f8;--df-panel-soft:rgba(255,255,255,.96);
  --df-line:rgba(28,45,70,.14);--df-line-soft:rgba(28,45,70,.08);--df-line-strong:rgba(28,45,70,.22);--df-muted:#66758a;--df-muted-2:#8290a1;--df-text:#263347;--df-text-strong:#111b2b;
  --df-shadow-panel:0 1px 0 rgba(255,255,255,.7),0 10px 28px rgba(36,55,78,.08);--df-shadow-raised:0 18px 44px rgba(36,55,78,.14),0 0 0 1px rgba(61,102,170,.04)
}
html[data-df-theme="light"] body{background:radial-gradient(circle at 14% -8%,rgba(77,123,196,.13),transparent 34rem),radial-gradient(circle at 92% 8%,rgba(51,176,199,.07),transparent 30rem),linear-gradient(180deg,#f9fbfd 0%,#eef3f9 48%,#edf2f8 100%);color:var(--df-text)}
html[data-df-theme="light"] aside{background:linear-gradient(180deg,#f7f9fc,#eef3f8);border-right-color:var(--df-line);box-shadow:12px 0 30px rgba(35,54,78,.06)}
html[data-df-theme="light"] .brand-lockup .brand,html[data-df-theme="light"] h1,html[data-df-theme="light"] h2,html[data-df-theme="light"] h3,html[data-df-theme="light"] h4,html[data-df-theme="light"] strong,html[data-df-theme="light"] b{color:var(--df-text-strong)}
html[data-df-theme="light"] .nav{color:#66758a}html[data-df-theme="light"] .nav::before{border-color:rgba(28,45,70,.1);background:rgba(255,255,255,.7);color:#7b899a}html[data-df-theme="light"] .nav:hover{background:rgba(69,112,183,.07);color:#243650}html[data-df-theme="light"] .nav.active{background:linear-gradient(90deg,rgba(69,112,183,.13),rgba(69,112,183,.04));color:#18355f;box-shadow:inset 2px 0 0 #5b86cf,0 6px 16px rgba(50,75,108,.05)}
html[data-df-theme="light"] main>header{background:rgba(247,250,253,.88);border-bottom-color:var(--df-line)}
html[data-df-theme="light"] .card,html[data-df-theme="light"] .panel,html[data-df-theme="light"] .mc-panel,html[data-df-theme="light"] .mc-account-card,html[data-df-theme="light"] .mc-status,html[data-df-theme="light"] .mc-top-stats>.mc-metric{background:linear-gradient(180deg,#fff,#fbfcfe);border-color:var(--df-line);color:var(--df-text);box-shadow:var(--df-shadow-panel)}
html[data-df-theme="light"] .data-table-wrap{background:#fff;border-color:var(--df-line)}html[data-df-theme="light"] .data-table{color:#263347}html[data-df-theme="light"] .data-table th{background:#f2f6fa;color:#42536a}html[data-df-theme="light"] .data-table th,html[data-df-theme="light"] .data-table td{border-color:rgba(28,45,70,.07)}html[data-df-theme="light"] .data-table tr:hover td{background:#f7faff}
html[data-df-theme="light"] input,html[data-df-theme="light"] select,html[data-df-theme="light"] textarea{background:#fff;color:#172235;border-color:#cfd9e5}html[data-df-theme="light"] input::placeholder{color:#97a4b3}
html[data-df-theme="light"] .secondary,html[data-df-theme="light"] button.secondary{background:#edf2f7;color:#35455b;border-color:#d1dbe6}
html[data-df-theme="light"] .status-card,html[data-df-theme="light"] .logout-button{background:rgba(255,255,255,.72);border-color:var(--df-line);color:#66758a}
html[data-df-theme="light"] .firm-section,html[data-df-theme="light"] .broker-card,html[data-df-theme="light"] .control-field,html[data-df-theme="light"] .series-control-card,html[data-df-theme="light"] .strategy-route-panel,html[data-df-theme="light"] .strategy-broker-card,html[data-df-theme="light"] .strategy-series-card{background:#fff!important;border-color:var(--df-line)!important;color:#263347!important}
html[data-df-theme="light"] .stage-head,html[data-df-theme="light"] .account-column-header,html[data-df-theme="light"] .account-excel-header,html[data-df-theme="light"] .strategy-route-head,html[data-df-theme="light"] .strategy-broker-head,html[data-df-theme="light"] .strategy-series-head,html[data-df-theme="light"] .admin-nav{background:#f2f6fa!important;color:#42536a!important;border-color:var(--df-line)!important}
html[data-df-theme="light"] .account-row.account-control-row,html[data-df-theme="light"] .account-row.account-excel-row{background:#fff!important;color:#263347!important;border-color:var(--df-line-soft)!important}
html[data-df-theme="light"] .sig-life-toolbar,html[data-df-theme="light"] .sig-life-summary>div{background:#fff!important;border-color:var(--df-line)!important;color:#263347!important}html[data-df-theme="light"] .sig-life-note{background:#edf5ff!important;color:#52637d!important}html[data-df-theme="light"] .sig-life-table thead th{background:#f2f6fa!important;color:#42536a!important}
html[data-df-theme="light"] .ej-health-panel,html[data-df-theme="light"] .ej-comparison-panel,html[data-df-theme="light"] .ej-errors-panel,html[data-df-theme="light"] .ej-stage,html[data-df-theme="light"] .ej-series-lane,html[data-df-theme="light"] .ej-health-lane,html[data-df-theme="light"] .ej-comparison-lane,html[data-df-theme="light"] .ej-error-lane{background:#fff!important;border-color:var(--df-line)!important;color:#263347!important}
html[data-df-theme="light"] .df-icon-btn,html[data-df-theme="light"] .df-profile-btn,html[data-df-theme="light"] .df-close,html[data-df-theme="light"] .df-choice,html[data-df-theme="light"] .df-security-state{background:#fff;color:#33445a;border-color:var(--df-line)}
html[data-df-theme="light"] .df-popover,html[data-df-theme="light"] .df-modal{background:rgba(252,253,255,.985);color:#263347;border-color:var(--df-line);box-shadow:0 24px 64px rgba(35,52,75,.16)}html[data-df-theme="light"] .df-popover-head{background:#f4f7fa;border-color:var(--df-line)}html[data-df-theme="light"] .df-menu-item{color:#4d5d72}html[data-df-theme="light"] .df-menu-item:hover{color:#17375f;background:#edf4ff}html[data-df-theme="light"] .df-notification-count{box-shadow:0 0 0 2px #f6f9fc,0 0 12px rgba(233,106,119,.24)}

@keyframes dfShellPopover{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
@keyframes dfShellModal{from{opacity:0;transform:translateY(9px) scale(.985)}to{opacity:1;transform:none}}
@keyframes dfShellFade{from{opacity:0}to{opacity:1}}
@media(max-width:900px){.df-profile-btn{min-width:0;padding-right:6px}.df-profile-copy,.df-chevron{display:none}.df-choice-grid{grid-template-columns:1fr}.df-top-tools{width:100%;justify-content:flex-start;flex-wrap:wrap}.df-top-tools>#openAdd{order:3;width:100%}}
@media(prefers-reduced-motion:reduce){.df-popover,.df-modal,.df-modal-backdrop{animation:none!important}}
