﻿:root { --maa-cell: 28px; --maa-name-w: 200px; }

html, body { font-family: 'Inter', 'Segoe UI', sans-serif; margin: 0; }
h1:focus { outline: none; }

.maa-loading { display: grid; place-items: center; height: 100vh; background: #0B1220; color: #B6C2D2; font-size: 1.1rem; }
.maa-brand { font-weight: 700; letter-spacing: .08em; }
.maa-appbar, .maa-drawer { border-bottom: 1px solid var(--mud-palette-lines-default); }
.maa-drawer { border-right: 1px solid var(--mud-palette-lines-default); }
.maa-card { border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; }
.maa-kpi { padding: 1.25rem; border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; background: var(--mud-palette-surface); transition: transform .15s, box-shadow .15s; }
.maa-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }

/* Dashboard hero with globe */
.home { height: calc(100vh - 64px - 3rem); display: flex; flex-direction: column; gap: 1rem; overflow: hidden; }
.hero { position: relative; flex: 1 1 0; min-height: 260px; border-radius: 24px; overflow: hidden; color: #f8fafc;
  border: 1px solid rgba(148,163,184,.18);
  background: radial-gradient(ellipse at 50% 55%, #12254a 0%, #0a1226 45%, #060a16 100%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: radial-gradient(1px 1px at 12% 20%, #fff, transparent), radial-gradient(1px 1px at 78% 12%, #cbd5e1, transparent), radial-gradient(1.5px 1.5px at 88% 70%, #fff, transparent),
    radial-gradient(1px 1px at 30% 82%, #cbd5e1, transparent), radial-gradient(1px 1px at 60% 30%, #fff, transparent), radial-gradient(1px 1px at 5% 60%, #94a3b8, transparent), radial-gradient(1px 1px at 45% 8%, #fff, transparent); }
.hero-globe { position: absolute; inset: 0; }
.hero-globe canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.hero-copy { position: absolute; left: 3rem; top: 50%; transform: translateY(-50%); max-width: 460px; pointer-events: none; z-index: 2; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 { font-size: clamp(1.5rem, 5.2vh, 3.2rem); line-height: 1.02; font-weight: 300; letter-spacing: .01em; margin: 1.25rem 0; }
.hero-copy h1 em { font-style: normal; color: #86efac; }
.hero-copy p { color: #b6c2d2; font-size: 1rem; line-height: 1.6; max-width: 380px; margin: 0 0 1.75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-light.mud-button-root { background: #f8fafc !important; color: #0b1220 !important; border-radius: 999px; padding: .75rem 1.5rem; font-weight: 600; letter-spacing: .06em; font-size: .75rem; }
.btn-ghost.mud-button-root { border-color: rgba(148,163,184,.4) !important; color: #f8fafc !important; border-radius: 999px; padding: .75rem 1.5rem; letter-spacing: .06em; font-size: .75rem; background: rgba(15,23,42,.5); }
.status-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid rgba(148,163,184,.25); background: rgba(15,23,42,.6); font-size: .7rem; letter-spacing: .08em; color: #b6c2d2; }
.status-chip i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status-chip b { color: #86efac; font-weight: 600; }
.hero-rail { position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem .9rem; width: 130px; text-align: center;
  border-radius: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(10px); border: 1px solid rgba(148,163,184,.15); z-index: 2; }
.hero-rail div { display: flex; flex-direction: column; align-items: center; gap: .15rem; color: #94a3b8; }
.hero-rail strong { font-size: 1.7rem; font-weight: 500; color: #f8fafc; line-height: 1.1; }
.hero-rail span { font-size: .6rem; letter-spacing: .08em; }
.hero-rail .warn strong { color: #fbbf24; }
.target-card { position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .1rem; padding: .7rem 1.2rem; text-align: center;
  border-radius: 16px; background: rgba(15,23,42,.7); backdrop-filter: blur(10px); border: 1px solid rgba(148,163,184,.25); z-index: 2; }
.target-card small { color: #94a3b8; font-size: .7rem; letter-spacing: .06em; }
.target-card strong { font-size: 1.05rem; }

.tiles { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.5fr); gap: 1rem; flex: 0 0 auto; }
.tile { border-radius: 20px; padding: .8rem 1.1rem; height: 300px; overflow: hidden; display: flex; flex-direction: column; color: #f8fafc;
  background: linear-gradient(180deg, rgba(30,41,59,.65), rgba(15,23,42,.8)); border: 1px solid rgba(148,163,184,.16); }
.tile header { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; letter-spacing: .08em; color: #cbd5e1; margin-bottom: .75rem; }
.tile header b { background: rgba(148,163,184,.15); padding: .1rem .55rem; border-radius: 8px; font-weight: 600; }
.tile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.tile li { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 12px; font-size: .85rem; background: rgba(148,163,184,.06); }
.tile li small { display: block; color: #94a3b8; font-size: .7rem; }
.tile li span { flex: 1; min-width: 0; }
.tile li em { font-style: normal; color: #cbd5e1; font-weight: 600; }
.site-list { overflow: hidden; }
.phase-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.phase { font-size: .65rem; padding: .15rem .5rem; border-radius: 999px; background: rgba(148,163,184,.12); color: #cbd5e1; }
.phase b { margin-left: .25rem; color: #f8fafc; }
.ph-installing { box-shadow: inset 0 0 0 1px #38bdf8; } .ph-commissioning { box-shadow: inset 0 0 0 1px #4ade80; }
.ph-service { box-shadow: inset 0 0 0 1px #a78bfa; } .ph-weatherstandby { box-shadow: inset 0 0 0 1px #fbbf24; }
.phase-tag { font-size: .68rem; color: #94a3b8 !important; font-weight: 500 !important; }
.acc-days { text-align: center; margin-top: .4rem; } .acc-days strong { font-size: 3.2rem; font-weight: 300; color: #86efac; line-height: 1; }
.acc-days small { margin-left: .4rem; color: #94a3b8; }
.acc-time { text-align: center; font-variant-numeric: tabular-nums; font-size: 1.5rem; letter-spacing: .08em; }
.tile footer { text-align: center; color: #94a3b8; font-size: .72rem; margin-top: auto; }
.stat-list em.c-red { color: #f87171; } .stat-list em.c-amber { color: #fbbf24; }
.loc-table { width: 100%; border-collapse: collapse; font-size: .78rem; text-align: right; }
.loc-table th { color: #94a3b8; font-weight: 500; padding: .2rem .3rem; } .loc-table td { padding: .35rem .3rem; border-top: 1px solid rgba(148,163,184,.12); }
.loc-table th:first-child, .loc-table td:first-child { text-align: left; }
.site-list li { cursor: pointer; transition: background .15s, box-shadow .15s; }
.site-list li:hover, .site-list li.sel { background: rgba(96,165,250,.16); box-shadow: inset 0 0 0 1px rgba(147,197,253,.4); }
.site-list i { width: 8px; height: 8px; border-radius: 50%; }
.site-list i.ok { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.site-list i.plan { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.cert-list em.c-red { color: #f87171; } .cert-list em.c-amber { color: #fbbf24; }
.ring { --p: 80; width: 130px; height: 130px; margin: auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#86efac calc(var(--p) * 1%), rgba(148,163,184,.15) 0); -webkit-mask: radial-gradient(circle 52px, transparent 98%, #000 100%); mask: radial-gradient(circle 52px, transparent 98%, #000 100%); }
.tile .ring + footer { text-align: center; color: #94a3b8; font-size: .78rem; margin-top: .75rem; }
.ring strong { display: none; }
.bar-list li { background: none; padding: .3rem 0; }
.bar-list span { flex: 0 0 38px; color: #94a3b8; font-size: .75rem; }
.bar-list div { flex: 1; height: 8px; border-radius: 6px; background: rgba(148,163,184,.15); overflow: hidden; }
.bar-list div i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #38bdf8, #86efac); }
@media (max-width: 960px) {
  .hero { height: auto; min-height: 640px; }
  .hero-copy { left: 1.25rem; right: 1.25rem; top: 1.25rem; transform: none; }
  .hero-globe { top: 40%; }
  .hero-rail { flex-direction: row; width: auto; left: 1rem; right: 1rem; top: auto; bottom: 4.5rem; transform: none; padding: .6rem; }
  .hero-rail div { flex: 1; }
  .hero-rail strong { font-size: 1.2rem; }
}

/* Projects table */
.prj-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.prj-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--mud-palette-text-primary); background: transparent; border: 1px solid var(--mud-palette-lines-default); }
.prj-chip.on { background: var(--mud-palette-primary); color: #0B1220; border-color: transparent; font-weight: 600; }
.prj-chip i, .prj .grp i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: .4rem; }
.prj-wrap { border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; overflow: auto; max-height: calc(100vh - 260px); background: var(--mud-palette-surface); }
.prj { border-collapse: separate; border-spacing: 0; font-size: .78rem; width: max-content; min-width: 100%; }
.prj th, .prj td { padding: .35rem .6rem; white-space: nowrap; border-bottom: 1px solid var(--mud-palette-lines-default); text-align: left; }
.prj thead th { position: sticky; top: 0; z-index: 3; background: var(--mud-palette-surface); font-weight: 600; color: var(--mud-palette-text-secondary); }
.prj thead tr:nth-child(2) th { top: 31px; }
.prj th.fy { text-align: center; border-left: 1px solid var(--mud-palette-lines-default); color: var(--mud-palette-text-primary); }
.prj th.q { text-align: center; padding: .25rem 0; min-width: 40px; }
.prj .num { text-align: right; }
.prj .c-id { position: sticky; left: 0; z-index: 2; background: var(--mud-palette-surface); border-right: 1px solid var(--mud-palette-lines-default); }
.prj thead .c-id { z-index: 4; }
.prj .c-id b { display: block; } .prj .c-id small { color: var(--mud-palette-text-secondary); }
.prj tbody tr:not(.grp):hover td { background: rgba(96,165,250,.1); }
.prj tbody tr:not(.grp):hover .c-id { background: color-mix(in srgb, var(--mud-palette-surface) 85%, #60a5fa); }
.prj .grp td { background: rgba(127,127,127,.12); font-weight: 600; position: sticky; left: 0; }
.prj .grp small { color: var(--mud-palette-text-secondary); margin-left: .4rem; }
.prj .qc { padding: 0; height: 36px; border-left: 1px solid rgba(127,127,127,.12); }
.prj .qc.now, .prj th.now { background: rgba(96,165,250,.14); }
.prj .bar { display: block; height: 14px; margin: 0; opacity: .92; }
.prj .bar.first { margin-left: 4px; border-radius: 7px 0 0 7px; } .prj .bar.last { margin-right: 4px; border-radius: 0 7px 7px 0; }
.prj .bar.first.last { border-radius: 7px; }
.t-off-i { background: #3b82f6; } .t-off-s { background: #38bdf8; }
.t-on-i { background: #22c55e; } .t-on-s { background: #86efac; }
.t-grid-i { background: #f59e0b; } .t-grid-s { background: #fcd34d; }
.st { padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; background: rgba(148,163,184,.2); }
.st.Active { background: rgba(74,222,128,.2); color: #4ade80; } .st.Planned { background: rgba(251,191,36,.18); color: #fbbf24; }

/* Split view (details | divider | calendar) */
.split { display: flex; height: calc(100vh - 300px); min-height: 320px; border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; overflow: hidden; background: var(--mud-palette-surface); }
.split-pane { overflow: auto; min-width: 0; }
.split-left { flex: 0 0 var(--split-left, 560px); }
.split-right { flex: 1 1 0; }
.split-divider { flex: 0 0 8px; cursor: col-resize; touch-action: none; background: var(--mud-palette-lines-default); }
.split-divider:hover, .split.dragging .split-divider { background: var(--mud-palette-primary); }
.split.dragging { user-select: none; }
.split-details .split-right, .split-details .split-divider, .split-calendar .split-divider { display: none; }
.split-calendar .split-left { flex: 0 0 auto; max-width: 220px; overflow: hidden; }
.split-calendar .split-left th:not(:first-child), .split-calendar .split-left td:not(:first-child) { display: none; }
.split-details .split-left, .split-calendar .split-right { flex: 1 1 0; }
.split .prj { min-width: 0; }
.split .prj td { height: 34px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.split .prj thead th { height: var(--hh, 32px); box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.split .prj thead tr:nth-child(2) th { top: 32px; }
.prj thead tr.h64 th, .prj thead tr.h48 th, .prj thead tr.h40 th { height: var(--hh, 64px); }
.split .prj .grp td { height: 34px; }
.split .qc { height: 34px; }
.maa-viewmode { flex: 0 0 auto; }

/* Sort / filter headers */
.sf-th { cursor: pointer; user-select: none; }
.sf-ind { margin-left: .3rem; color: var(--mud-palette-primary); font-size: .65rem; }
.sf-btn { margin-left: .35rem; border: 0; background: transparent; color: var(--mud-palette-text-secondary); cursor: pointer; font-size: .7rem; padding: 0 .15rem; border-radius: 4px; }
.sf-btn:hover, .sf-btn.on { color: var(--mud-palette-primary); background: rgba(96,165,250,.15); }
.sf-pop { position: absolute; left: 0; top: 100%; z-index: 20; display: flex; gap: .25rem; padding: .4rem; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.sf-input { font: inherit; font-size: .78rem; padding: .25rem .5rem; width: 170px; color: var(--mud-palette-text-primary); background: transparent; border: 1px solid var(--mud-palette-lines-default); border-radius: 6px; }
.sf-clear { border: 0; background: transparent; color: var(--mud-palette-text-secondary); cursor: pointer; }

/* Planning grid */
.gantt { min-width: max-content; background: var(--mud-palette-surface); }
.gantt-row { display: grid; align-items: stretch; min-width: max-content; height: 34px; box-sizing: border-box; box-shadow: inset 0 -1px 0 var(--mud-palette-lines-default); }
.gantt-row.gantt-head { height: 66px; }
.gantt-row:not(.gantt-head) { background-image: linear-gradient(to right, transparent 71.4286%, rgba(127,127,127,.12) 71.4286%); background-size: calc(100% * 7 / var(--cols)) 100%; }
.gantt-row .gantt-seg { margin: 6px 1px; border-radius: 4px; padding: 0; }
.gantt-name { position: sticky; left: 0; z-index: 2; background: var(--mud-palette-surface); padding: 0 .75rem; display: flex; align-items: center; border-right: 1px solid var(--mud-palette-lines-default); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .85rem; }
.gantt-head { position: sticky; top: 0; z-index: 3; background: var(--mud-palette-surface); }
.gantt-head .gantt-name { z-index: 4; }
.gantt-month, .gantt-day { text-align: center; font-size: .7rem; border-right: 1px solid var(--mud-palette-lines-default); color: var(--mud-palette-text-secondary); line-height: 1.5rem; overflow: hidden; }
.gantt-month { font-weight: 600; color: var(--mud-palette-text-primary); border-bottom: 1px solid var(--mud-palette-lines-default); }
.gantt-day.we { background: rgba(127,127,127,.12); }
.gantt-day.today, .gantt-bg.today { background: rgba(96,165,250,.35); }
.gantt-seg { height: 20px; margin: 6px 0; border-radius: 6px; color: #0B1220; font-size: .68rem; font-weight: 600; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: default; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.gantt-row:hover .gantt-name { background: rgba(96,165,250,.12); }
.legend-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; margin-right: 1rem; }
.legend-chip i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

#blazor-error-ui { background: #7f1d1d; color: #fff; bottom: 0; display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 9999; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.site-list i.done { background: #64748b; }

/* Home: system status card, tables, accident counter */
.maa-slogan { font-size: .8rem; letter-spacing: .22em; font-weight: 500; white-space: nowrap; } .maa-slogan em { font-style: normal; color: #86efac; }
@media (max-width: 1100px) { .maa-slogan { display: none; } }
.sys-card { position: absolute; left: 1.25rem; top: 1.25rem; z-index: 2; padding: .8rem 1rem; border-radius: 16px; min-width: 250px;
  background: rgba(15,23,42,.6); backdrop-filter: blur(10px); border: 1px solid rgba(148,163,184,.2); }
.sys-title { font-size: .72rem; letter-spacing: .08em; color: #b6c2d2; margin-bottom: .5rem; display: flex; align-items: center; gap: .5rem; }
.sys-title b { color: #86efac; } .sys-title i { width: 7px; height: 7px; border-radius: 50%; }
.sys-title i.on { background: #4ade80; box-shadow: 0 0 8px #4ade80; } .sys-title i.off { background: #f87171; box-shadow: 0 0 8px #f87171; }
.sys-card dl { display: grid; grid-template-columns: auto auto; gap: .2rem 1.5rem; margin: 0; font-size: .8rem; }
.sys-card dt { color: #94a3b8; } .sys-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; color: #f8fafc; }
.tile .loc-table td, .tile .loc-table th { white-space: nowrap; }
.tile .loc-table td:first-child { white-space: normal; }
.loc-table td.c-red, .c-red { color: #f87171; } .loc-table td.c-amber { color: #fbbf24; } .c-green { color: #4ade80; }
.prj-table tbody tr { cursor: pointer; } .prj-table tbody tr:hover, .prj-table tbody tr.sel { background: rgba(96,165,250,.16); }
.prj-table td, .prj-table th { text-align: left; } .prj-table td:first-child { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate { padding: .1rem .45rem; border-radius: 999px; font-size: .65rem; background: rgba(148,163,184,.15); }
.rate.ok { color: #4ade80; } .rate.warn { color: #fbbf24; } .rate.bad { color: #f87171; }
.acc-main { display: flex; gap: .75rem; align-items: stretch; flex: 1; min-height: 0; }
.acc-count { flex: 0 0 auto; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.acc-count .acc-days { margin: 0; } .acc-count .acc-days strong { font-size: 3.4rem; }
.acc-since { font-size: 1rem; font-weight: 600; letter-spacing: .04em; color: #f8fafc; }
.acc-count small { color: #94a3b8; }
.enab { font-size: .72rem; } .enab td:first-child { white-space: normal !important; }
.enab td { padding: .22rem .3rem !important; }.tile .loc-table { font-size: .68rem; } .tile .loc-table th, .tile .loc-table td { padding: .22rem .2rem; }
.prj-table td:first-child { max-width: 90px !important; } .prj-table td { white-space: nowrap; }
.tile .acc-main .enab { flex: 1; min-width: 0; align-self: flex-start; }
.acc-count .acc-days strong { font-size: 2.8rem !important; } .acc-since { font-size: .9rem; }.tile .prj-table td:first-child { white-space: nowrap; max-width: 80px; }
.tile .enab { font-size: .62rem; } .tile .enab td:first-child { white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; max-width: 86px; }
.tile .enab th, .tile .enab td { padding: .2rem .15rem; }
.acc-count { max-width: 112px; } .acc-time { font-size: 1.1rem; letter-spacing: .04em; } .acc-since { font-size: .82rem; }
.tile .loc-table th { font-size: .6rem; }
/* Fixed-height rows for virtualized tables */
.prj.fx td { height: 36px; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.pbar { height: 6px; min-width: 120px; border-radius: 3px; background: rgba(127,127,127,.25); overflow: hidden; }
.pbar i { display: block; height: 100%; } .pbar i.ok { background: #4ade80; } .pbar i.warn { background: #fbbf24; }
.cc { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .72rem; line-height: 1.4; }
.cc.ok { background: rgba(74,222,128,.18); color: #4ade80; } .cc.warn { background: rgba(251,191,36,.2); color: #fbbf24; }
.cc.err { background: rgba(248,113,113,.2); color: #f87171; } .cc.none { background: rgba(127,127,127,.18); color: var(--mud-palette-text-secondary); }
.gantt-seg.lbl { overflow: visible; position: relative; z-index: 1; justify-content: flex-start; }
.gantt-seg.lbl > span { position: absolute; left: 4px; white-space: nowrap; font-size: .7rem; font-weight: 600; color: #0B1220; pointer-events: none; }
.gantt-row .gantt-seg { overflow: visible; }
.sf-th { position: relative; }
.col-rs { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; }
.col-rs:hover { background: var(--mud-palette-primary); }
.prj.tfix { table-layout: fixed; }
.prj.tfix td, .prj.tfix th { overflow: hidden; text-overflow: ellipsis; }
.split-left > table.prj { min-width: 100%; }
.split-right > .gantt { min-width: max-content; }
.gantt-band { text-align: center; font-size: .68rem; line-height: 22px; overflow: hidden; white-space: nowrap; border-right: 1px solid var(--mud-palette-lines-default); border-bottom: 1px solid var(--mud-palette-lines-default); color: var(--mud-palette-text-secondary); box-sizing: border-box; }
.gantt-band.we { background: rgba(127,127,127,.16); }
.gantt-band.now { background: rgba(96,165,250,.35); color: var(--mud-palette-text-primary); }
.gantt.z-year .gantt-row .gantt-seg { margin: 6px .5px; border-radius: 1px; }
.gantt.z-month .gantt-row .gantt-seg { margin: 6px .5px; }
.split .prj.cal-table { table-layout: fixed; min-width: 0; }
.split .prj.cal-table thead th { height: 22px; line-height: 22px; padding: 0; text-align: center; font-size: .68rem; overflow: hidden; border-right: 1px solid var(--mud-palette-lines-default); }
.split .prj.cal-table thead th.we { background: color-mix(in srgb, var(--mud-palette-surface) 85%, #888); }
.split .prj.cal-table thead th.now { background: rgba(96,165,250,.35); color: var(--mud-palette-text-primary); }
.split .prj.cal-table td.qc { padding: 0; border-left: 0; }
.gantt-band.lft, .split .prj.cal-table thead th.lft { text-align: left; padding-left: 6px; }
.split .prj.prj-rows tr:not(.grp) td, .split .prj.cal-table tr:not(.grp) td { height: 37px; line-height: 1.15; }
.split .prj.prj-rows tr:not(.grp) td.c-id small { display: block; }

.split-right [data-d] { cursor: col-resize; }
.gantt-band.selx, .split .prj.cal-table thead th.selx { background: rgba(250,204,21,.45) !important; color: var(--mud-palette-text-primary); }
.split-right.selecting { user-select: none; }
.cal-range { display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 200px; }
.cal-range label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; }
.cal-range input { background: transparent; color: inherit; border: 1px solid var(--mud-palette-lines-default); border-radius: 4px; padding: 2px 6px; color-scheme: dark; }

.role-table { width: auto; min-width: 640px; }
.role-table th.rc, .role-table td.rc { text-align: center; width: 120px; }
.role-table td.rc .na { opacity: .4; }
.role-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--mud-palette-primary); cursor: pointer; }
.role-table input[type=checkbox]:disabled { cursor: not-allowed; }

.mud-nav-link.dev-nav { background: rgba(220,38,38,.85) !important; color: #fff !important; }
.mud-nav-link.dev-nav .mud-icon-root { color: #fff !important; }

.sp-chart{display:flex;flex-direction:column;gap:6px}
.sp-row{display:flex;align-items:center;gap:8px}
.sp-label{width:48px;font-size:12px;font-weight:600}
.sp-track{position:relative;flex:1;height:18px;background:rgba(255,255,255,.06);border-radius:4px}
.sp-bar{position:absolute;top:2px;height:14px;background:rgba(66,165,245,.55);border-radius:3px;overflow:hidden}
.sp-fill{height:100%;background:#42a5f5}
.sp-today{position:absolute;top:0;bottom:0;width:2px;background:#ef5350}
.sp-pct{width:40px;text-align:right;font-size:12px}
.sp-axis{display:flex;justify-content:space-between;font-size:11px;opacity:.7;margin-left:56px;margin-right:48px}

.prj.cur td { padding: .2rem .4rem; }
.cur-in { font: inherit; font-size: .78rem; color: var(--mud-palette-text-primary); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: .15rem .3rem; }
.cur-in:hover, .cur-in:focus { border-color: var(--mud-palette-lines-default); background: var(--mud-palette-background); }
.cur-in option { background: var(--mud-palette-surface); }
.cur-x { background: none; border: 0; cursor: pointer; color: var(--mud-palette-text-secondary); font-size: 1rem; line-height: 1; }
.cur-x:hover { color: var(--mud-palette-error); }
.cur-role { max-width: 110px; white-space: normal !important; vertical-align: bottom; }
.cur-cell.lv-MBS { background: rgba(239,83,80,.25); }
.cur-cell.lv-MBW { background: rgba(255,167,38,.25); }
.cur-cell.lv-REQ { background: rgba(66,165,245,.25); }
.cur-cell.lv-TSR { background: rgba(102,187,106,.25); }

.cur-sort { cursor: pointer; user-select: none; }
.cur-filter { width: 64px; font-size: .7rem; }
.cur-filter.on { border-color: var(--mud-palette-primary); }

.cur-bar { border: 1px solid var(--mud-palette-lines-default); border-radius: 8px; padding: .5rem .75rem; margin-bottom: .75rem; display: flex; flex-direction: column; gap: .5rem; }
.cur-bar-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cur-bar-label { min-width: 52px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cur-bar-sep { flex: 1; }
.cur-bar-row { justify-content: flex-start !important; }
.cur-bar .mud-input-control { margin-top: 0; }
.cur-bar .cur-w-search { flex: 0 0 210px; width: 210px; } .cur-bar .cur-w-sel { flex: 0 0 160px; width: 160px; }
.cur-split .split { height: calc(100vh - 400px); min-height: 260px; }
.cur-split .prj thead th { vertical-align: bottom; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* Common page header: title left, context/actions right; toolbar row: search/filters left, view tools right. */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; min-height: 56px; }
.ph-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-left: auto; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.pt-left, .pt-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pt-right { margin-left: auto; }
.page-toolbar .mud-input-control { min-width: 200px; }