:root{--tg-ink:#182230;--tg-muted:#667085;--tg-navy:#101828;--tg-blue:#2563eb;--tg-violet:#7c3aed;--tg-surface:#fff;--tg-bg:#f5f7fb;--tg-border:#e4e7ec;--tg-success:#16845b;--tg-warning:#b76e00;--tg-danger:#c43232;--tg-radius:14px}
html{font-size:15px;min-height:100%}body{min-height:100vh;background:var(--tg-bg);color:var(--tg-ink);display:flex;flex-direction:column}main{flex:1;max-width:1600px;width:100%}
.app-header{background:linear-gradient(100deg,#0f172a,#172554);box-shadow:0 2px 14px rgba(16,24,40,.16)}.navbar{min-height:64px}.navbar-brand{font-weight:700;letter-spacing:-.02em}.brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#fff;color:#1d4ed8;font-size:.8rem}.navbar .nav-link{color:rgba(255,255,255,.72);border-radius:8px;padding:.5rem .75rem!important}.navbar .nav-link:hover{color:#fff;background:rgba(255,255,255,.08)}
.account-mode{display:inline-flex;align-items:center;gap:.45rem;color:#dbeafe;font-size:.72rem;font-weight:700;letter-spacing:.08em}.mode-dot{width:8px;height:8px;border-radius:50%;background:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.18)}.account-mode-live{color:#ede9fe}.account-mode-live .mode-dot{background:var(--tg-violet);box-shadow:0 0 0 3px rgba(124,58,237,.2)}
.app-footer{color:var(--tg-muted);font-size:.8rem;padding:1.25rem 0;border-top:1px solid var(--tg-border);background:#fff}.page-title{font-size:1.65rem;font-weight:720;letter-spacing:-.03em;margin:0}.page-subtitle{color:var(--tg-muted);margin:.35rem 0 0}.card{border:1px solid var(--tg-border);border-radius:var(--tg-radius);box-shadow:0 1px 3px rgba(16,24,40,.04)}.card-header{background:transparent;border-bottom:1px solid var(--tg-border);padding:1rem 1.2rem;font-weight:650}.metric-card{padding:1.15rem;height:100%}.metric-label{color:var(--tg-muted);font-size:.78rem;font-weight:650;text-transform:uppercase;letter-spacing:.05em}.metric-value{font-size:1.35rem;font-weight:720;margin-top:.4rem}
.status-dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:.45rem;background:#98a2b3}.status-healthy{background:var(--tg-success)}.status-degraded{background:var(--tg-warning)}.status-failed{background:var(--tg-danger)}.status-unknown{background:#98a2b3}.badge-soft{padding:.42rem .65rem;border-radius:999px;background:#eef2ff;color:#3730a3;font-weight:650}.nav-tabs{border-bottom-color:var(--tg-border);gap:.15rem}.nav-tabs .nav-link{color:var(--tg-muted);border:0;border-bottom:2px solid transparent}.nav-tabs .nav-link.active{color:var(--tg-blue);background:transparent;border-bottom-color:var(--tg-blue);font-weight:650}
.form-label{font-weight:650;font-size:.9rem}.form-text{color:var(--tg-muted)}.help-button{border:0;background:#eef2ff;color:#4338ca;width:22px;height:22px;border-radius:50%;font-size:.75rem;font-weight:700}.setup-shell{max-width:920px;margin:1rem auto}.setup-progress{height:6px;border-radius:999px;background:#e9eef7;overflow:hidden}.setup-progress>span{display:block;height:100%;background:linear-gradient(90deg,var(--tg-blue),var(--tg-violet))}.code-viewer{background:#0b1220;color:#d6e4ff;border-radius:10px;padding:1rem;max-height:520px;overflow:auto;white-space:pre-wrap;font:12px/1.55 ui-monospace,SFMono-Regular,Consolas,monospace}.app-toast{position:fixed;right:1.5rem;top:5rem;z-index:1080}.btn-primary{background:var(--tg-blue);border-color:var(--tg-blue)}.table>:not(caption)>*>*{padding:.8rem .75rem;border-bottom-color:var(--tg-border)}
@media(max-width:767px){.app-footer span:last-child{display:none}.setup-shell{margin:0}}
.job-status{display:inline-flex;align-items:center;border-radius:999px;padding:.3rem .6rem;font-size:.75rem;font-weight:700;background:#f2f4f7;color:#475467}.job-status-completed{background:#ecfdf3;color:#067647}.job-status-running{background:#eff8ff;color:#175cd3}.job-status-pending{background:#fffaeb;color:#b54708}.job-status-failed{background:#fef3f2;color:#b42318}.job-status-skipped{background:#f2f4f7;color:#475467}

/* Daily trading cockpit */
.desk-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:2rem;margin-bottom:1.35rem}
.desk-heading h1{margin:.3rem 0 0;font-size:clamp(1.8rem,3vw,2.5rem);font-weight:760;letter-spacing:-.045em}
.desk-heading p{margin:.4rem 0 0;color:var(--tg-muted);font-size:1.02rem}
.desk-kicker{display:flex;align-items:center;gap:.48rem;color:#475467;font-size:.78rem;font-weight:750;letter-spacing:.055em;text-transform:uppercase}
.desk-kicker-dot{width:8px;height:8px;border-radius:50%;background:#22a06b;box-shadow:0 0 0 4px rgba(34,160,107,.12)}

.desk-strip{display:grid;grid-template-columns:1.05fr 1.2fr .95fr .9fr 1.35fr;margin-bottom:1.5rem;background:#fff;border:1px solid var(--tg-border);border-radius:var(--tg-radius);box-shadow:0 1px 3px rgba(16,24,40,.04);overflow:hidden}
.desk-stat{min-width:0;padding:1rem 1.1rem;border-right:1px solid var(--tg-border)}
.desk-stat:last-child{border-right:0}
.desk-stat-label{display:block;margin-bottom:.36rem;color:var(--tg-muted);font-size:.69rem;font-weight:750;letter-spacing:.065em;text-transform:uppercase}
.desk-stat strong{display:block;overflow:hidden;color:#1d2939;font-size:.98rem;font-weight:720;text-overflow:ellipsis;white-space:nowrap}
.desk-stat small{display:block;margin-top:.26rem;color:#98a2b3;font-size:.72rem}
.desk-stat small a{color:#667085;text-decoration:none}
.desk-stat small a:hover{color:var(--tg-blue)}

.focus-card{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2rem;min-height:245px;padding:2rem;overflow:hidden;color:#fff;border:0;border-radius:20px;background:linear-gradient(125deg,#172554 0%,#1e3a8a 58%,#2563eb 100%);box-shadow:0 16px 36px rgba(30,58,138,.18)}
.focus-card.focus-tone-attention{background:linear-gradient(125deg,#3b2f19 0%,#71511b 55%,#b7791f 100%);box-shadow:0 16px 36px rgba(113,81,27,.17)}
.focus-card.focus-tone-calm{background:linear-gradient(125deg,#12372f 0%,#176b58 56%,#159a7d 100%);box-shadow:0 16px 36px rgba(23,107,88,.16)}
.focus-card.focus-tone-failure{background:linear-gradient(125deg,#4a1d1d 0%,#7a271a 56%,#b42318 100%);box-shadow:0 16px 36px rgba(180,35,24,.18)}
.focus-glow{position:absolute;right:-80px;top:-130px;width:360px;height:360px;border-radius:50%;background:rgba(255,255,255,.1);filter:blur(1px)}
.focus-glow:after{content:"";position:absolute;inset:70px;border:1px solid rgba(255,255,255,.14);border-radius:50%}
.focus-content{position:relative;z-index:1;max-width:680px}
.focus-eyebrow{display:inline-block;margin-bottom:.75rem;color:rgba(255,255,255,.78);font-size:.73rem;font-weight:780;letter-spacing:.095em;text-transform:uppercase}
.focus-card h2{max-width:700px;margin:0;font-size:clamp(1.55rem,3vw,2.25rem);font-weight:760;letter-spacing:-.035em;line-height:1.12}
.focus-card p{max-width:660px;margin:.9rem 0 1.35rem;color:rgba(255,255,255,.82);font-size:.96rem;line-height:1.58}
.focus-card .btn-light{border:0;color:#172554;font-weight:700;box-shadow:0 5px 16px rgba(0,0,0,.14)}
.focus-safety{color:rgba(255,255,255,.7);font-size:.76rem}
.focus-progress{position:relative;z-index:1;align-self:stretch;display:flex;flex-direction:column;justify-content:center;min-width:118px;padding-left:1.5rem;border-left:1px solid rgba(255,255,255,.18)}
.focus-progress div{padding:.62rem 0}
.focus-progress strong{display:block;font-size:1.45rem;line-height:1;font-weight:760}
.focus-progress span{display:block;margin-top:.25rem;color:rgba(255,255,255,.66);font-size:.68rem;font-weight:650;text-transform:uppercase;letter-spacing:.04em}

.timeline-card{overflow:hidden}
.timeline-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.2rem 1.45rem}
.section-kicker{display:block;margin-bottom:.25rem;color:#667085;font-size:.68rem;font-weight:760;letter-spacing:.075em;text-transform:uppercase}
.timeline-header h2,.rail-heading h2,.context-card h2{margin:0;color:#1d2939;font-size:1.05rem;font-weight:740;letter-spacing:-.015em}
.timeline-list{padding:.35rem 1.45rem .65rem}
.timeline-item{display:grid;grid-template-columns:76px 26px minmax(0,1fr);align-items:stretch;min-height:142px}
.timeline-item time{padding-top:1.35rem;color:#667085;font-size:.73rem;font-weight:700;line-height:1.3}
.timeline-rail{position:relative;display:flex;justify-content:center}
.timeline-rail:after{content:"";position:absolute;top:0;bottom:0;width:2px;background:#eaecf0}
.timeline-item:first-child .timeline-rail:after{top:1.6rem}
.timeline-item:last-child .timeline-rail:after{bottom:calc(100% - 1.65rem)}
.timeline-rail span{position:relative;z-index:1;width:12px;height:12px;margin-top:1.45rem;border:3px solid #fff;border-radius:50%;background:#98a2b3;box-shadow:0 0 0 2px #d0d5dd}
.timeline-complete .timeline-rail span{background:#16845b;box-shadow:0 0 0 2px #a6f4c5}
.timeline-active .timeline-rail span{background:#2563eb;box-shadow:0 0 0 2px #b2ddff;animation:cockpit-pulse 2s ease-in-out infinite}
.timeline-attention .timeline-rail span{background:#d78b16;box-shadow:0 0 0 2px #fedf89}
.timeline-failure .timeline-rail span{background:var(--tg-danger);box-shadow:0 0 0 2px #fecdca}
@keyframes cockpit-pulse{50%{box-shadow:0 0 0 6px rgba(37,99,235,.13)}}
.timeline-body{padding:1.15rem 0 1.2rem 1rem;border-bottom:1px solid #eaecf0}
.timeline-item:last-child .timeline-body{border-bottom:0}
.timeline-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.timeline-title-row h3{margin:0 0 .22rem;color:#1d2939;font-size:.99rem;font-weight:730}
.timeline-job-type{color:#98a2b3;font-size:.68rem;font-weight:650}
.timeline-status{flex:0 0 auto;padding:.28rem .52rem;border-radius:999px;background:#f2f4f7;color:#475467;font-size:.66rem;font-weight:750;text-transform:uppercase;letter-spacing:.035em}
.timeline-complete .timeline-status{background:#ecfdf3;color:#067647}
.timeline-active .timeline-status{background:#eff8ff;color:#175cd3}
.timeline-attention .timeline-status{background:#fffaeb;color:#b54708}
.timeline-failure .timeline-status{background:#fef3f2;color:#b42318}
.timeline-timing{display:inline-flex;margin-top:.62rem;padding:.22rem .46rem;border-radius:6px;background:#f8fafc;color:#667085;font-size:.67rem;font-weight:650}
.timeline-body p{margin:.55rem 0 .42rem;color:#667085;font-size:.82rem;line-height:1.5}
.timeline-link{color:#344054;font-size:.74rem;font-weight:680;text-decoration:none}
.timeline-link:hover{color:var(--tg-blue)}
.timeline-empty{padding:3.4rem 1.5rem;text-align:center}
.timeline-empty-mark{display:grid;place-items:center;width:42px;height:42px;margin:0 auto .9rem;border-radius:50%;background:#ecfdf3;color:#067647;font-size:1.1rem;font-weight:800}
.timeline-empty h3{font-size:1.05rem}.timeline-empty p{color:var(--tg-muted);font-size:.88rem}

.cockpit-rail{display:flex;flex-direction:column;gap:1rem}
.rail-card{overflow:hidden}
.rail-card .card-body{padding:1.25rem}
.rail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.attention-total{display:grid;place-items:center;min-width:30px;height:30px;padding:0 .45rem;border-radius:9px;background:#f2f4f7;color:#344054;font-size:.8rem;font-weight:760}
.queue-clear{display:flex;align-items:center;gap:.75rem;padding:.85rem;border:1px solid #d1fadf;border-radius:11px;background:#f6fef9;color:#067647}
.queue-clear>span{display:grid;place-items:center;flex:0 0 auto;width:25px;height:25px;border-radius:50%;background:#dcfae6;font-weight:800}
.queue-clear strong,.queue-clear small{display:block}.queue-clear strong{font-size:.81rem}.queue-clear small{margin-top:.15rem;color:#528b72;font-size:.7rem}
.queue-row{display:grid;grid-template-columns:8px minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.75rem .15rem;border-bottom:1px solid var(--tg-border);color:#344054;text-decoration:none}
.queue-row:last-child{border-bottom:0}.queue-row:hover{color:var(--tg-blue)}
.queue-indicator{width:8px;height:34px;border-radius:999px;background:#98a2b3}.queue-indicator-attention{background:#d78b16}.queue-indicator-workflow{background:#2563eb}
.queue-row strong,.queue-row small{display:block}.queue-row strong{font-size:.8rem}.queue-row small{margin-top:.15rem;color:#98a2b3;font-size:.68rem}.queue-row b{font-size:.9rem}

.context-card{position:relative}
.context-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:#98a2b3}
.context-card-next:before{background:#7c3aed}
.context-label{display:inline-flex;margin-bottom:.65rem;padding:.22rem .48rem;border-radius:6px;font-size:.64rem;font-weight:760;letter-spacing:.06em;text-transform:uppercase}
.context-label-past{background:#f2f4f7;color:#475467}
.context-label-next{background:#f4f3ff;color:#5925dc}
.context-card p{display:-webkit-box;overflow:hidden;margin:.65rem 0;color:#667085;font-size:.78rem;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.context-card a{font-size:.73rem;font-weight:680;text-decoration:none}
.operations-row{display:flex;align-items:center;justify-content:space-between;padding:.52rem 0;border-bottom:1px solid #f2f4f7;color:#667085;font-size:.77rem}
.operations-row strong{color:#344054}

@media(max-width:1199px){.desk-strip{grid-template-columns:repeat(3,1fr)}.desk-stat:nth-child(3){border-right:0}.desk-stat:nth-child(n+4){border-top:1px solid var(--tg-border)}.cockpit-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.attention-card,.operations-card{grid-column:span 2}}
@media(max-width:767px){.desk-heading{align-items:flex-start;flex-direction:column;gap:1rem}.desk-heading .btn{width:100%}.desk-strip{grid-template-columns:repeat(2,1fr)}.desk-stat:nth-child(3){border-right:1px solid var(--tg-border)}.desk-stat:nth-child(even){border-right:0}.desk-stat:nth-child(n+3){border-top:1px solid var(--tg-border)}.desk-stat:last-child{grid-column:span 2}.focus-card{grid-template-columns:1fr;padding:1.45rem}.focus-progress{flex-direction:row;justify-content:flex-start;gap:1.4rem;padding:1rem 0 0;border-top:1px solid rgba(255,255,255,.18);border-left:0}.focus-progress div{padding:0}.focus-safety{display:block}.timeline-header{align-items:flex-start}.timeline-item{grid-template-columns:58px 20px minmax(0,1fr)}.timeline-list{padding-left:.9rem;padding-right:.9rem}.timeline-body{padding-left:.65rem}.timeline-title-row{gap:.5rem}.cockpit-rail{display:flex}.attention-card,.operations-card{grid-column:auto}}
@media(max-width:479px){.desk-strip{grid-template-columns:1fr}.desk-stat,.desk-stat:nth-child(3),.desk-stat:nth-child(even){border-right:0}.desk-stat:nth-child(n+2){border-top:1px solid var(--tg-border)}.desk-stat:last-child{grid-column:auto}.focus-progress{gap:.8rem;justify-content:space-between}.timeline-item{grid-template-columns:1fr}.timeline-item time{padding:1rem 0 .25rem}.timeline-rail{display:none}.timeline-body{padding:.25rem 0 1rem}.timeline-header .badge-soft{display:none}}
@media(prefers-reduced-motion:reduce){.timeline-active .timeline-rail span{animation:none}}

/* Weekly schedule clock */
.weekly-clock-card{overflow:hidden}
.schedule-week .accordion-item{border-color:var(--tg-border)}
.schedule-week .accordion-item:last-child{border-bottom:0}
.schedule-week .accordion-button{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:1.25rem;padding:1rem 1.25rem;background:#fff;color:var(--tg-ink);box-shadow:none}
.schedule-week .accordion-button:not(.collapsed){background:#f8faff;color:#172554;box-shadow:inset 3px 0 0 var(--tg-blue)}
.schedule-week .accordion-button:focus{z-index:2;border-color:transparent;box-shadow:inset 0 0 0 2px rgba(37,99,235,.18)}
.schedule-week .accordion-button:after{grid-column:3;grid-row:1;align-self:center;margin-left:.25rem}
.schedule-day-name{display:block;min-width:0}
.schedule-day-name strong,.schedule-day-name small{display:block}
.schedule-day-name strong{font-size:.95rem;font-weight:740}
.schedule-day-name small{overflow:hidden;margin-top:.18rem;color:#667085;font-size:.72rem;font-weight:500;text-overflow:ellipsis;white-space:nowrap}
.schedule-day-summary{display:flex;align-items:center;justify-content:flex-end;gap:.65rem;padding-right:.5rem;color:#667085;font-size:.72rem;font-weight:650;white-space:nowrap}
.schedule-today-badge{padding:.24rem .5rem;border-radius:999px;background:#eff8ff;color:#175cd3;font-size:.65rem;font-weight:760;letter-spacing:.035em;text-transform:uppercase}
.schedule-day-today>.accordion-header .accordion-button.collapsed{background:#fbfcff}
.schedule-day-table thead th{padding:.66rem .9rem;background:#f9fafb;color:#667085;font-size:.68rem;font-weight:740;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.schedule-day-table tbody td{padding:.82rem .9rem;font-size:.79rem}
.schedule-day-table tbody tr:last-child td{border-bottom:0}
.schedule-day-table .schedule-time{width:110px;color:#344054;font-weight:720;white-space:nowrap}
.schedule-day-table td:nth-child(2){min-width:260px}
.schedule-day-table td:nth-child(3){min-width:175px}
.schedule-day-table td:nth-child(4){min-width:130px}
@media(max-width:767px){.schedule-week .accordion-button{grid-template-columns:minmax(0,1fr) auto;gap:.6rem;padding:.9rem 1rem}.schedule-day-name small{max-width:58vw}.schedule-day-summary>span:last-child{display:none}.schedule-day-table tbody td{padding:.75rem}.schedule-day-table td:nth-child(2){min-width:225px}}
