:root { font-family: system-ui, sans-serif; color: #18212f; background: #f4f7fb; }
body { margin: 0; }
.nav-shell { display:flex; justify-content:space-between; align-items:center; padding:1rem 2rem; background:#172033; color:white; }
.brand { color:white; text-decoration:none; font-weight:700; }
.nav-user { display:flex; gap:1rem; align-items:center; }
.page-shell { max-width:1200px; margin:2rem auto; padding:0 1.25rem; }
.card-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1rem; }
.card { background:white; border-radius:.75rem; padding:1.2rem; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.card span { display:block; color:#5c667a; }
.card strong { display:block; font-size:1.75rem; margin-top:.5rem; }
.login-panel { max-width:420px; margin:4rem auto; background:white; padding:2rem; border-radius:.75rem; box-shadow:0 2px 18px rgba(0,0,0,.08); }
label { display:block; margin-top:1rem; font-weight:600; }
input { width:100%; box-sizing:border-box; padding:.7rem; margin-top:.35rem; border:1px solid #b8c0cc; border-radius:.35rem; }
button { margin-top:1.25rem; padding:.7rem 1rem; border:0; border-radius:.35rem; background:#2457d6; color:white; cursor:pointer; }
.link-button { margin:0; background:transparent; padding:0; text-decoration:underline; }
.check-row { display:flex; gap:.5rem; align-items:center; font-weight:400; }
.check-row input { width:auto; margin:0; }
.validation { color:#a82020; }
.muted { color:#5c667a; }
.nav-left { display:flex; align-items:center; gap:1.25rem; }
.nav-link { color:#dce5f5; text-decoration:none; font-size:.95rem; }
.nav-link:hover { color:white; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-bottom:1.5rem; }
.page-heading h1 { margin-bottom:.35rem; }
.panel { background:white; border-radius:.75rem; padding:1.5rem; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.upload-panel { max-width:700px; }
.small { font-size:.9rem; }
.secondary-button, .primary-link { display:inline-block; text-decoration:none; border-radius:.35rem; padding:.65rem .9rem; }
.secondary-button { color:#2457d6; border:1px solid #aebbd6; background:white; }
.primary-link { color:white; background:#2457d6; }
.action-row { display:flex; align-items:center; gap:1rem; margin:1.25rem 0; }
.action-row form, .action-row button { margin:0; }
button:disabled { opacity:.5; cursor:not-allowed; }
.import-summary { margin:1.25rem 0; }
.table-shell { overflow:auto; background:white; border-radius:.75rem; box-shadow:0 2px 12px rgba(0,0,0,.06); }
table { width:100%; border-collapse:collapse; font-size:.92rem; }
th, td { padding:.8rem .9rem; text-align:left; border-bottom:1px solid #e5eaf2; white-space:nowrap; }
th { background:#eef2f8; color:#3e4a60; }
.status { display:inline-block; padding:.25rem .5rem; border-radius:999px; font-size:.8rem; font-weight:700; }
.status-new { background:#dff5e6; color:#146c35; }
.status-update { background:#fff1cc; color:#875a00; }
.status-error { background:#fde3e3; color:#a82020; }
.status-neutral { background:#e8edf5; color:#4d596c; }
.result-panel { max-width:950px; margin:2rem auto; }
select { width:100%; box-sizing:border-box; padding:.7rem; margin-top:.35rem; border:1px solid #b8c0cc; border-radius:.35rem; background:white; }
.filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1rem; align-items:end; }
.filter-grid label { margin-top:0; }
.filter-actions { display:flex; gap:.6rem; align-items:end; }
.filter-actions button { margin:0; }
.result-count { margin:1.25rem 0 .75rem; }
.pager { display:flex; justify-content:space-between; margin-top:1rem; }
.details-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1rem; margin:1rem 0; }
.detail-list { display:grid; grid-template-columns:140px 1fr; gap:.65rem 1rem; }
.detail-list dt { font-weight:700; color:#5c667a; }
.detail-list dd { margin:0; overflow-wrap:anywhere; }
.timeline-panel { margin-top:1rem; }
.timeline { list-style:none; padding:0; margin:1.25rem 0 0; }
.timeline li { position:relative; display:flex; gap:1rem; padding:0 0 1.5rem 1.5rem; border-left:2px solid #c8d2e5; }
.timeline li:last-child { border-left-color:transparent; }
.timeline-dot { position:absolute; left:-7px; top:3px; width:12px; height:12px; border-radius:50%; background:#2457d6; }
.timeline p { margin:.25rem 0; }
.date-value { font-size:1.05rem !important; }

/* Phase 1: SkyNet Analysis and Performance Portal */
.nav-section { color:#91a0bb; font-size:.75rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; border-left:1px solid #3b465c; padding-left:1.1rem; }
.portal-hero { background:linear-gradient(135deg,#172033,#273b67); color:white; border-radius:1rem; padding:2.4rem; margin-bottom:1.5rem; box-shadow:0 8px 24px rgba(23,32,51,.18); }
.portal-hero h1 { margin:.35rem 0 .65rem; font-size:2.25rem; }
.portal-hero p { max-width:760px; color:#dce5f5; margin:0; font-size:1.05rem; }
.eyebrow { display:block; color:#e31b23; font-size:.78rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.module-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:1rem; margin-bottom:1.5rem; }
.module-card { min-height:230px; display:flex; flex-direction:column; justify-content:space-between; background:white; border-radius:.85rem; padding:1.5rem; box-shadow:0 2px 12px rgba(0,0,0,.06); border-top:4px solid #e31b23; }
.module-card h2 { margin:.75rem 0 .55rem; }
.module-card p { color:#5c667a; line-height:1.55; }
.module-disabled { border-top-color:#aeb7c7; background:#f8f9fc; }
.module-status { display:inline-block; padding:.25rem .5rem; background:#e8edf5; color:#4d596c; border-radius:999px; font-size:.78rem; font-weight:700; }
.disabled-link { color:#7b8495; font-weight:700; }
.platform-summary { margin-top:1rem; }
.service-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.75rem; margin-top:1rem; }
.service-grid span { background:#eef2f8; border-radius:.5rem; padding:.75rem; color:#3e4a60; font-weight:600; }
.module-breadcrumb { display:flex; gap:.5rem; align-items:center; color:#6b7588; font-size:.9rem; margin-bottom:1rem; }
.module-breadcrumb a { color:#2457d6; text-decoration:none; }
@media (max-width:900px) { .nav-shell,.nav-left { align-items:flex-start; } .nav-left { flex-wrap:wrap; } .nav-shell { gap:1rem; } .portal-hero h1 { font-size:1.75rem; } }

.architecture-list { display: grid; grid-template-columns: 120px 1fr; gap: .45rem .8rem; margin: 1.25rem 0 0; }
.architecture-list dt { font-weight: 700; color: #384152; }
.architecture-list dd { margin: 0; color: #667085; }

/* Module 2: Customer Delivery Analysis */
.page-heading-row { display:flex; justify-content:space-between; gap:1.5rem; align-items:flex-start; }
.button { display:inline-block; padding:.7rem 1rem; border-radius:.35rem; background:#2457d6; color:white; text-decoration:none; }
.button-secondary { background:white; color:#2457d6; border:1px solid #aebbd6; }
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1rem; margin:1rem 0; }
.kpi-grid.compact { grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); }
.kpi-card { background:white; border-radius:.75rem; padding:1.15rem; box-shadow:0 2px 12px rgba(0,0,0,.06); border-left:4px solid #e31b23; }
.kpi-card span,.kpi-card small { display:block; color:#667085; }
.kpi-card strong { display:block; font-size:1.7rem; margin:.35rem 0; }
.dashboard-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(420px,1fr)); gap:1rem; margin-bottom:1rem; }
.narrow-panel { max-width:850px; margin:0 auto; }
.table-scroll { overflow:auto; margin-top:1rem; }
.file-label { margin-bottom:1rem; }
.validation-summary { color:#a82020; }
.status-valid { background:#dff5e6; color:#146c35; }
.status-warning { background:#fff1cc; color:#875a00; }
.status-excluded { background:#e8edf5; color:#4d596c; }
@media (max-width:900px) { .page-heading-row { flex-direction:column; } .dashboard-grid { grid-template-columns:1fr; } }

/* Customer Delivery Control Tower - API phase 1 */
.control-hero{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;background:linear-gradient(120deg,#123f69,#1c6f94);color:white;border-radius:1rem;padding:1.7rem 2rem;margin-bottom:1rem;box-shadow:0 10px 28px rgba(18,63,105,.18)}
.control-hero.compact{padding:1.25rem 1.6rem}.control-hero h1{margin:.25rem 0;font-size:2rem}.control-hero p{margin:.25rem 0;color:#d8ecf7}.hero-actions{display:flex;gap:.65rem;flex-wrap:wrap}.control-filter-panel{padding:1rem 1.25rem;margin-bottom:1rem}.control-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:.75rem;align-items:end}.control-filter-grid label{margin:0;font-size:.82rem;color:#506176}.control-filter-grid input,.control-filter-grid select{padding:.55rem;margin-top:.25rem}.control-actions{display:flex;gap:.65rem;align-items:center}.control-actions button{margin:0}.control-actions a{color:#2457d6}.control-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:1rem;margin:1rem 0}.control-kpis.dense{grid-template-columns:repeat(8,1fr)}.control-kpis article{background:#fff;border-radius:.8rem;padding:1rem 1.15rem;border-top:4px solid #2c7da0;box-shadow:0 3px 14px rgba(24,51,78,.07)}.control-kpis article.good{border-top-color:#35a26f}.control-kpis article.warn{border-top-color:#e48b35}.control-kpis span,.control-kpis small{display:block;color:#667085}.control-kpis strong{display:block;font-size:1.8rem;margin:.25rem 0;color:#123f69}.control-grid{display:grid;grid-template-columns:1.05fr 1.35fr .9fr;gap:1rem;margin-bottom:1rem}.health-card{text-align:center}.health-ring{--pct:0;width:190px;height:190px;border-radius:50%;margin:1rem auto;display:grid;place-items:center;background:conic-gradient(#35a26f calc(var(--pct)*1%),#e8edf2 0)}.health-ring:before{content:"";position:absolute}.health-ring>div{width:135px;height:135px;border-radius:50%;background:white;display:flex;flex-direction:column;align-items:center;justify-content:center}.health-ring strong{font-size:2rem;color:#123f69}.health-ring span{color:#667085}.health-legend{display:flex;justify-content:center;gap:.6rem;flex-wrap:wrap;font-size:.78rem;color:#667085}.dot{width:9px;height:9px;border-radius:50%;display:inline-block}.dot.delivered{background:#35a26f}.dot.ontime{background:#2c7da0}.dot.delayed{background:#e05a47}.dot.pending{background:#d9a52e}.metric-bar{margin:.85rem 0}.metric-bar>div{display:flex;justify-content:space-between}.metric-bar i{display:block;height:9px;background:#edf1f5;border-radius:99px;overflow:hidden;margin-top:.35rem}.metric-bar b{display:block;height:100%;background:#2c7da0;border-radius:99px}.mini-stat{display:flex;justify-content:space-between;padding:.8rem 0;border-bottom:1px solid #e7ebf0}.mini-stat strong{color:#123f69}.trend-bars{height:240px;display:flex;align-items:flex-end;gap:1rem;padding:1rem .5rem 0;overflow-x:auto}.trend-column{min-width:54px;text-align:center}.trend-column .stack{height:185px;display:flex;align-items:flex-end;justify-content:center;gap:2px}.trend-column i{width:12px;display:block;min-height:2px;border-radius:3px 3px 0 0}.s-del{background:#35a26f}.s-delay{background:#e05a47}.s-pend{background:#d9a52e}.trend-column span{font-size:.72rem;color:#667085}.notice{padding:.8rem 1rem;border-radius:.5rem;margin:1rem 0}.notice.success{background:#e4f5eb;color:#1a6a3b}.notice.error{background:#fde8e5;color:#9c2f20}
@media(max-width:1100px){.control-filter-grid{grid-template-columns:repeat(2,1fr)}.control-kpis,.control-kpis.dense{grid-template-columns:repeat(3,1fr)}.control-grid{grid-template-columns:1fr}}@media(max-width:650px){.control-hero{flex-direction:column;align-items:flex-start}.control-filter-grid,.control-kpis,.control-kpis.dense{grid-template-columns:1fr}}

/* Module 2 Phase 2: account-master analytics and dashboard refinement */
.field-help{display:block;margin-top:.25rem;color:#7a8798;font-size:.7rem;line-height:1.25}
.panel-title-row{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.8rem}.panel-title-row h2{margin:.15rem 0}.panel-kicker{display:block;color:#1c6f94;font-size:.7rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase}
.phase2-basic-grid{grid-template-columns:1fr 1.15fr .9fr}.phase2-summary-grid{grid-template-columns:1fr 1fr}
.health-legend>span{display:inline-flex;align-items:center;gap:.3rem}.health-legend .dot{margin-right:.1rem}
.status-progress{margin:1rem 0}.status-progress>div{display:flex;justify-content:space-between;align-items:center}.status-progress>i,.ratio-card>i{display:block;height:11px;background:#edf1f5;border-radius:99px;overflow:hidden;margin:.38rem 0}.status-progress>i b,.ratio-card>i b{display:block;height:100%;border-radius:99px;background:#2c7da0}.status-progress small,.metric-bar small{color:#7b8796}.status-progress.large{margin:1.2rem 0}.status-progress .delivered{background:#35a26f}.status-progress .ontime{background:#2c7da0}.status-progress .delayed{background:#e05a47}.status-progress .pending{background:#d9a52e}.status-label{display:inline-flex;align-items:center;padding:.25rem .55rem;border-radius:999px;color:#fff;font-size:.75rem;font-weight:700;background:#60758c}.status-label.delivered{background:#35a26f}.status-label.ontime{background:#2c7da0}.status-label.delayed{background:#e05a47}.status-label.pending{background:#d9a52e}
.ratio-card{display:grid;grid-template-columns:1fr auto;gap:.15rem 1rem;margin:1rem 0}.ratio-card strong{color:#123f69}.ratio-card i{grid-column:1/-1}.ratio-card i b{background:linear-gradient(90deg,#1c6f94,#35a26f)}
.refresh-panel-form{margin-top:1rem}.refresh-panel-form button{width:100%;margin:0}
.account-bar b{background:linear-gradient(90deg,#123f69,#2c7da0)}.trend-legend{display:flex;gap:1rem;justify-content:flex-end;color:#667085;font-size:.78rem}.trend-legend span{display:inline-flex;align-items:center;gap:.35rem}.trend-legend i{display:inline-block;width:10px;height:10px;border-radius:2px}.trend-column strong{display:block;color:#123f69;font-size:.75rem;margin-top:.25rem}.compact-trend{height:275px}.compact-trend .trend-column .stack{height:205px}
.performance-table th{background:#eef5f8;color:#23465f}.performance-table tbody tr:hover,.shipment-table tbody tr:hover{background:#f7fbfd}.performance-table td:first-child{white-space:normal;min-width:180px}
.extended-visual-grid{grid-template-columns:1.2fr .8fr}.shipment-filter-grid{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}.shipment-table th,.shipment-table td{font-size:.82rem}.account-name-cell{font-weight:700;color:#123f69}.status-pill{display:inline-block;padding:.25rem .5rem;border-radius:999px;background:#eaf3f8;color:#1b5f83;font-size:.72rem;font-weight:700}.inline-form{margin:0}.small-button{margin:0;padding:.4rem .65rem;font-size:.78rem}
@media(max-width:1100px){.phase2-basic-grid,.phase2-summary-grid,.extended-visual-grid{grid-template-columns:1fr}}
