: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 { background: transparent; box-shadow: inset 1px 0 0 rgba(239,68,68,.55), inset -1px 0 0 rgba(239,68,68,.55); }
.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 { --split-h: max(320px, calc(100vh - 300px)); display: flex; height: var(--split-h); 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: transparent; box-shadow: inset 1px 0 0 rgba(239,68,68,.55), inset -1px 0 0 rgba(239,68,68,.55); }
.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: transparent; box-shadow: inset 0 0 0 1px rgba(239,68,68,.7); 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: var(--mud-palette-surface); box-shadow: inset 0 0 0 1px rgba(239,68,68,.7); 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: color-mix(in srgb, var(--mud-palette-surface) 55%, #facc15) !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; }
.dl-sum { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0 0 .6rem; font-size: .85rem; color: var(--mud-palette-text-secondary); } .dl-sum b { color: var(--mud-palette-text-primary); } .dl-count { margin-left: auto; }
.prj tbody tr.dl-sel td { background: rgba(96,165,250,.18); } .prj tbody tr.dl-off td { opacity: .55; }
.dl-sel-box { font: inherit; font-size: .75rem; padding: .1rem .3rem; border-radius: 6px; background: var(--mud-palette-surface); color: var(--mud-palette-text-primary); border: 1px solid var(--mud-palette-lines-default); }
.dl-sel-box.ok { border-color: #4ade80; } .dl-sel-box.warn { border-color: #fbbf24; } .dl-sel-box.err { border-color: #f87171; }
.dl-detail { margin-top: .8rem; border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; padding: .8rem 1rem; background: var(--mud-palette-surface); }
.dl-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; } .dl-head .sf-btn { margin-left: auto; }
.dl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; font-size: .8rem; } .dl-cols h4 { margin: 0 0 .4rem; } .dl-cols label { display: block; margin-top: .4rem; color: var(--mud-palette-text-secondary); } .dl-cols .sf-input { width: 100%; }
.dl-mini { border-collapse: collapse; width: 100%; } .dl-mini th, .dl-mini td { text-align: left; padding: .2rem .4rem; border-bottom: 1px solid var(--mud-palette-lines-default); } .dl-add { display: flex; gap: .4rem; margin-top: .5rem; }
.prj tbody tr.dl-crit td { background: rgba(239,68,68,.28); } .prj tbody tr.dl-crit.dl-sel td { background: rgba(239,68,68,.42); } .dl-crit-n b { color: #f87171; }
.dl-file { display: inline-flex; align-items: center; gap: .15rem; margin-left: .3rem; vertical-align: middle; } .dl-folder { position: relative; cursor: pointer; display: inline-flex; color: var(--mud-palette-text-secondary); } .dl-folder:hover { color: var(--mud-palette-primary); } .dl-folder.has { color: #4ade80; } .dl-folder input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; font-size: 0; }
.dl-dl { background: none; border: 0; padding: 0; cursor: pointer; color: var(--mud-palette-text-secondary); display: inline-flex; } .dl-dl:hover { color: var(--mud-palette-primary); } .dl-fname { margin: 0 .3rem; color: var(--mud-palette-text-secondary); }
.dl-pop-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1150; display: flex; align-items: center; justify-content: center; }
.dl-pop { width: min(1000px, 92vw); height: 86vh; display: flex; flex-direction: column; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 14px; overflow: hidden; }
.dl-pop-head { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; border-bottom: 1px solid var(--mud-palette-lines-default); } .dl-pop-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-pop-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; background: #fff; color: #111; } .dl-pop-body iframe { width: 100%; height: 100%; border: 0; } .dl-pop-body img { max-width: 100%; max-height: 100%; } .dl-pop-body p { padding: 1rem; }
.dl-pop-setup { width: min(1200px, 95vw); } .dl-pop-scroll { flex: 1; overflow: auto; padding: 1rem 1.2rem; }
.maa-load-box { width: min(420px, 80vw); text-align: center; }
.maa-load-title { font-size: 1.6rem; font-weight: 600; letter-spacing: .15em; margin-bottom: 1rem; color: #fff; }
.maa-load-bar { height: 8px; border-radius: 4px; background: #1B2740; overflow: hidden; }
#maa-load-fill { height: 100%; width: 0; background: #4F8CFF; transition: width .2s; }
#maa-load-fill.indet { width: 40% !important; animation: maa-indet 1.2s infinite ease-in-out; }
@keyframes maa-indet { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
#maa-load-text { margin-top: .7rem; font-size: .85rem; color: #8FA0B8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.split-controls { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.split-controls { justify-content: space-between; }
.split-controls-left, .split-controls-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cal-switch { display: flex; flex-direction: column; gap: 4px; width: 330px; }
.cal-switch .maa-viewmode { display: flex; width: 100%; }
.cal-switch .maa-viewmode .mud-toggle-item { flex: 1 1 0; justify-content: center; white-space: nowrap; min-width: 0; }
.cal-nav { position: sticky; left: 0; top: 0; width: 100%; height: 0; z-index: 7; pointer-events: none; }
.cal-nav-btn { position: absolute; width: 12px; height: 22px; padding: 0; border: 0; line-height: 20px; font-size: .9rem; font-weight: 700; cursor: pointer; pointer-events: auto; color: #fff; background: rgba(59,130,246,.55); }
.cal-nav-btn:hover { background: #3b82f6; }
.cal-nav-btn.l { left: 0; border-radius: 0 4px 4px 0; } .cal-nav-btn.r { right: 0; border-radius: 4px 0 0 4px; }

/* Calendar edge gutters: arrows sit in opaque side strips, the calendar scrolls between them. */
.split-right > .gantt { padding: 0 16px; box-sizing: content-box; }
.split-right > table.cal-table { margin: 0 16px; width: calc(100% - 32px); }
.cal-gut { position: absolute; top: 0; width: 16px; height: calc(var(--split-h) - 2px); background: var(--mud-palette-surface); box-shadow: 0 0 0 1px var(--mud-palette-lines-default); }
.cal-gut.l { left: 0; } .cal-gut.r { right: 0; }
.cal-nav-btn { width: 16px; background: transparent !important; color: #60a5fa; font-size: 1.05rem; border-radius: 0 !important; }
.cal-nav-btn:hover { background: rgba(96,165,250,.25) !important; color: #fff; }
.cal-nav-btn { border-bottom: 1px solid var(--mud-palette-lines-default) !important; box-sizing: border-box; }
.cal-gut.l { border-right: 1px solid var(--mud-palette-lines-default); } .cal-gut.r { border-left: 1px solid var(--mud-palette-lines-default); }
.cal-range-inline { display: flex; flex-direction: column; gap: 4px; }
.cal-range-inline label { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .75rem; color: var(--mud-palette-text-secondary); }
.cal-range-inline input { background: transparent; color: var(--mud-palette-text-primary); border: 1px solid var(--mud-palette-lines-default); border-radius: 4px; padding: 1px 4px; font-size: .8rem; color-scheme: dark; }

.split-divider { flex: 0 0 14px; position: relative; z-index: 8; display: flex; align-items: center; justify-content: center; background: var(--mud-palette-lines-default); }
.split-divider::before { content: ''; width: 4px; height: 48px; border-radius: 2px; background: repeating-linear-gradient(to bottom, #94a3b8 0 3px, transparent 3px 6px); }
.split-divider::after { content: ''; position: absolute; inset: 0 -6px; }

.pkg-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pkg-btn { min-width: 72px; }
.legend-wrap { position: relative; margin-left: auto; }
.legend-pop { position: absolute; right: 0; top: 110%; z-index: 30; display: flex; flex-direction: column; gap: .35rem; padding: .7rem .9rem; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default); border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; }
.legend-pop .legend-chip { margin-right: 0; }

.split-divider { flex: 0 0 16px; background: #475569; border-left: 1px solid #64748b; border-right: 1px solid #64748b; }
.split-divider::before { width: 6px; height: 64px; background: repeating-linear-gradient(to bottom, #e2e8f0 0 4px, transparent 4px 8px); }
.split-divider:hover, .split.dragging .split-divider { background: #3b82f6; }

.split-calendar .split-divider { display: flex; pointer-events: none; }

.plan-left { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.plan-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.plan-project { width: 480px; max-width: 100%; }
.plan-search { width: 200px; }
.cal-tl { display: flex; flex-direction: column; gap: .4rem; }
.cal-tl .mud-button-root { width: 110px; justify-content: center; }
.legend-wrap { margin-left: 0; }
.cal-tl .legend-pop { right: 0; }

.split-controls:has(.plan-left) { justify-content: flex-start; align-items: flex-start; gap: 1rem; flex-wrap: nowrap; }
.split-controls:has(.plan-left) .split-controls-right { flex-wrap: nowrap; align-items: flex-start; }
.plan-left { width: 480px; flex: 0 0 480px; }
.plan-left .plan-row { max-width: 480px; }
.plan-left .plan-project { flex: 1 1 0; min-width: 0; width: auto; }

.plan-left .plan-row { width: 100%; }
.plan-left .plan-project { width: 100%; }

.cal-icons { display: grid; grid-template-columns: 34px 34px; gap: 0; align-self: center; }
.cal-icons .legend-pop { right: auto; left: 0; }

.plan-views { display: flex; gap: .5rem; margin-bottom: .5rem; }
@media (max-width: 1500px), (max-height: 850px) { .split-controls { zoom: .85; } }
@media (max-width: 1250px), (max-height: 720px) { .split-controls { zoom: .7; } .plan-views { zoom: .85; } }
@media (max-width: 1000px) { .split-controls { zoom: .6; } }

.prj .qc.day { border-left: 1px solid rgba(127,127,127,.12); }
.prj .qc.day.sat { background: rgba(127,127,127,.22); }
.prj .qc.day.sun { background: rgba(127,127,127,.12); }
.prj .qc.day { position: relative; }
.prj .qc.day.w1::after, .prj .qc.day.w2::after, .prj .qc.day.w3::after, .prj .qc.day.w4::after, .prj .qc.day.w5::after { content: ""; position: absolute; inset: 3px 1px; border-radius: 4px; }
.prj .qc.day.w1::after { background: #90EE90; } .prj .qc.day.w2::after { background: #006400; } .prj .qc.day.w3::after { background: #FFA500; } .prj .qc.day.w4::after { background: #DC143C; } .prj .qc.day.w5::after { background: #8B4513; }

.prj .qc.day.sel { box-shadow: inset 0 0 0 1px #60a5fa; background-color: rgba(96,165,250,.28); }
.prj .qc.day { user-select: none; }
.ctx-bg { position: fixed; inset: 0; z-index: 1900; }
.ctx-menu { position: fixed; z-index: 1901; 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,.4); padding: .25rem; }
.ctx-menu button { display: block; background: none; border: 0; color: inherit; font: inherit; padding: .4rem .9rem; cursor: pointer; border-radius: 6px; }
.ctx-menu button:hover { background: rgba(96,165,250,.18); }
.prj tr.cov > td { background: rgba(250,204,21,.10); }
.prj tr.rep > td { background: rgba(168,85,247,.14); }
.prj tr.cov > td:first-child, .prj tr.rep > td:first-child { padding-left: 1.6rem; }
.prj tr.cov td.qc.day.sat, .prj tr.rep td.qc.day.sat { background: rgba(127,127,127,.22); }
.prj tr.cov td.qc.day.sun, .prj tr.rep td.qc.day.sun { background: rgba(127,127,127,.12); }
.prj .qc.day.cvd::after { opacity: .22; }
.prj .qc.day.cvd::before { content: ""; position: absolute; left: 2px; right: 2px; top: 50%; height: 2px; background: #cbd5e1; z-index: 1; }
.plan-log { position: fixed; top: 84px; right: 24px; z-index: 1400; }
.log-pop { position: fixed; top: 72px; right: 16px; width: min(760px, calc(100vw - 100px)); z-index: 1500; background: var(--mud-palette-surface); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.log-pop .log-close { position: absolute; top: 4px; right: 4px; z-index: 2; }
.prj .qc.day.sel { cursor: grab; }

.hdr-tools { position: sticky; top: 0; left: 0; height: 0; z-index: 8; }
.hdr-tools-in { position: absolute; top: 6px; left: 6px; display: flex; align-items: center; gap: 2px; }
.hdr-tools .legend-pop { right: auto; left: 0; }

.cal-icons:not(:has(*)) { display: none; }
.cal-tl .mud-icon-button { width: auto; }

.hdr-tools .mud-icon-button { color: #60a5fa; }
.hdr-tools .ic-today { color: #ef4444; }
.hdr-tools .ic-exp { color: #4ade80; }
.hdr-tools .ic-col { color: #fb923c; }
.hdr-tools .ic-leg { color: #c084fc; }

.plan-log { display: flex; align-items: center; gap: 2px; }
.plan-save.pend { color: #f59e0b; }
.plan-badge { background: #f59e0b; color: #111; border-radius: 9px; font-size: .7rem; padding: 0 6px; margin-right: 4px; }
.pend-list { padding: 10px 16px 0; font-size: .82rem; color: #f59e0b; }
tr.pend td { box-shadow: inset 0 0 0 1px rgba(245,158,11,.55); background-color: rgba(245,158,11,.08); }
tr.pend td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }

.chg, .chg .mud-input-control { background: rgba(245,158,11,.14) !important; border-radius: 6px; }
.chg-row td { box-shadow: inset 0 -1px 0 rgba(245,158,11,.5); }
.chg-box { border-color: #f59e0b !important; }

.my { max-width: 640px; margin: 0 auto; }
.my-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 2px; }
.my-head span, .my small { opacity: .7; }
.my-now { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.my-now > div { background: var(--mud-palette-surface); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.my-nav { display: flex; align-items: center; justify-content: space-between; }
.my-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.my-dow { text-align: center; font-size: .75rem; opacity: .6; }
.my-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: .9rem; color: #111; box-shadow: inset 0 0 0 1px rgba(128,128,128,.25); }
.my-day.now { box-shadow: inset 0 0 0 2px #ef4444; }
.my-day.req { outline: 2px dashed #f59e0b; outline-offset: -3px; }
.my-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: .75rem; }
.my-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; }
.my-card { display: flex; align-items: center; gap: 10px; background: var(--mud-palette-surface); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.my-card > i { width: 6px; height: 36px; border-radius: 3px; flex: none; }
.my-card > div { display: flex; flex-direction: column; flex: 1; }
.my-card > i.cert-ok { background: #22c55e; } .my-card > i.cert-warn { background: #f59e0b; } .my-card > i.cert-err { background: #ef4444; }
.my-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
@media (max-width: 700px) { .my .mud-tab { min-width: 0; padding: 6px 8px; } }

.my-rot { background: var(--mud-palette-surface); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.my-rot-top { display: flex; justify-content: space-between; align-items: baseline; }
.my-rot-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 1px; }
.my-rot-bar i { display: block; min-width: 3px; }

.my-warn { color: #f59e0b; opacity: 1 !important; font-weight: 600; }

.my-day { cursor: pointer; } .my-day.sel { outline: 3px solid #3b82f6; outline-offset: -3px; }

.my-cal-actions { display: flex; gap: 8px; margin-top: 8px; }

.vac-pop { position: fixed; inset: 72px 16px 16px 16px; z-index: 1300; background: var(--mud-palette-surface); border: 1px solid rgba(128,128,128,.3); border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; }
.vac-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(128,128,128,.25); flex-wrap: wrap; }
.vac-sp { flex: 1; }
.vac-body { overflow: auto; padding: 8px 12px; flex: 1; }
.vac-tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.vac-tbl th { text-align: left; padding: 6px 8px; opacity: .7; position: sticky; top: 0; background: var(--mud-palette-surface); }
.vac-tbl td { padding: 6px 8px; border-top: 1px solid rgba(128,128,128,.15); vertical-align: middle; }
.vac-tbl tr.sel td { background: rgba(59,130,246,.15); }
.vac-tbl tbody tr { cursor: pointer; }
.vac-ok { color: #22c55e; } .vac-bad { color: #f59e0b; }
.vac-act { white-space: nowrap; display: flex; gap: 6px; }
.vac-st { padding: 2px 8px; border-radius: 10px; font-size: .75rem; background: #f59e0b33; color: #f59e0b; }
.vac-st.st-Approved { background: #22c55e33; color: #22c55e; } .vac-st.st-Rejected { background: #ef444433; color: #ef4444; }
.vac-detail { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(128,128,128,.25); }
.vac-strip { display: flex; flex-wrap: wrap; gap: 3px; margin: 8px 0; }
.vac-strip .my-day { width: 34px; aspect-ratio: 1; font-size: .75rem; }
.vac-other { color: #f59e0b; font-size: .85rem; }
.usr-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.usr-table { width: 100%; }
.tm-chips{display:flex;gap:6px;flex-wrap:wrap}.tm-chips .prj-chip b{margin-left:6px;opacity:.7}

.prj td.vacant { background: rgba(250,204,21,.38) !important; }
.prj td.pick { cursor: pointer; }
.prj td.vacant.pick:hover { background: rgba(250,204,21,.6) !important; }
.person-pick { position: fixed; z-index: 2000; width: 280px; background: var(--mud-palette-surface, #1e293b); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); padding: 8px; }
.person-pick .pp-search { width: 100%; padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit; outline: none; }
.pp-list { max-height: 260px; overflow-y: auto; margin-top: 6px; }
.pp-list button, .pp-clear { display: flex; justify-content: space-between; width: 100%; padding: 5px 8px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; border-radius: 4px; }
.pp-list button:hover, .pp-clear:hover { background: rgba(255,255,255,.1); }
.pp-list small { opacity: .6; }
.pp-clear { color: #f59e0b; margin-top: 4px; }

.profile-card { padding: 10px 16px 8px; min-width: 250px; }
.pc-name { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.pc-row { display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; padding: 2px 0; }
.pc-row span { opacity: .65; }
.pc-none { color: #f59e0b; }

/* Light theme globe hero */
.hero-light { color: #0f172a; border-color: rgba(100,116,139,.35); background: radial-gradient(ellipse at 50% 55%, #ffffff 0%, #e8f0fc 55%, #d6e4f8 100%); }
.hero-light::before { opacity: 0; }
.hero-light .sys-card, .hero-light .hero-rail, .hero-light .target-card { background: rgba(255,255,255,.78); border-color: rgba(100,116,139,.3); }
.hero-light .sys-title, .hero-light .sys-card dt, .hero-light .hero-rail div, .hero-light .target-card small { color: #475569; }
.hero-light .sys-card dd, .hero-light .hero-rail strong { color: #0f172a; }
.hero-light .sys-title b { color: #15803d; }

/* Compact status tiles, usable on small screens */
.home { height: auto; min-height: calc(100vh - 64px - 3rem); overflow: visible; gap: .6rem; }
.hero { flex: 1 1 auto; min-height: 300px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .6rem; }
.tile { height: auto; max-height: 210px; padding: .5rem .7rem; border-radius: 14px; overflow: auto; }
.tile header { margin-bottom: .35rem; font-size: .65rem; }
.tile .loc-table { font-size: .62rem; } .tile .loc-table th, .tile .loc-table td { padding: .12rem .15rem; }
.acc-count .acc-days strong { font-size: 2.2rem !important; } .acc-time { font-size: .95rem; }
.sys-card { padding: .5rem .7rem; min-width: 190px; border-radius: 12px; } .sys-card dl { font-size: .7rem; gap: .1rem 1rem; } .sys-title { margin-bottom: .3rem; }
.hero-rail { width: 100px; padding: .7rem .5rem; gap: .6rem; } .hero-rail strong { font-size: 1.3rem; }
@media (max-height: 800px) { .tile { max-height: 170px; } .hero { min-height: 240px; } }

/* Side menu: icons only, auto-hide to the left edge */
.maa-drawer { transition: transform .25s ease, width .2s ease !important; }
.maa-drawer.maa-drawer-hidden { transform: translateX(calc(-100% + 6px)); }
.maa-edge { position: fixed; left: 0; top: 64px; bottom: 0; width: 12px; z-index: 1300; }
.maa-main-wide { padding-left: 6px !important; margin-left: 0 !important; }

/* Organigram */
.org-wrap{display:flex;gap:16px;align-items:flex-start;padding:0 8px;flex-wrap:wrap}
.org-tree{flex:1 1 420px;max-height:calc(100vh - 190px);overflow:auto}
.org-side{flex:1 1 360px;min-width:300px}
.org-row{display:flex;align-items:center;gap:8px;cursor:pointer;border-radius:6px;min-height:34px;padding-right:8px}
.org-row:hover{background:color-mix(in srgb,var(--mud-palette-primary) 10%,transparent)}
.org-row.sel{background:color-mix(in srgb,var(--mud-palette-primary) 22%,transparent)}
.org-name{font-weight:500}
.org-sub{opacity:.65;font-size:.8rem;margin-left:auto}
.org-count{min-width:28px;text-align:right;font-size:.8rem;opacity:.8}

/* Menu rail + management planning */
.maa-rail .rail-nav{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0}
.maa-rail .rail-nav .mud-nav-link{padding:8px 10px;min-width:0;justify-content:center}
.maa-rail .rail-nav .mud-nav-link .mud-nav-link-icon{margin:0}
.maa-rail .rail-sep{width:60%;height:1px;background:var(--mud-palette-lines-default);margin:4px 0}
.mg-bar{display:flex;gap:12px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.mg-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.mg-tl{border-collapse:collapse;font-size:.85rem}
.mg-tl th,.mg-tl td{border:1px solid var(--mud-palette-lines-default);padding:4px 8px;text-align:center;min-width:56px}
.mg-tl .mg-name{text-align:left;white-space:nowrap;font-weight:500}
.mg-vac{background:color-mix(in srgb,var(--mud-palette-warning) 45%,transparent)}
.mg-cov{background:color-mix(in srgb,var(--mud-palette-info) 35%,transparent)}
.mg-legend{font-size:.8rem;opacity:.8}
.mg-legend i{display:inline-block;width:12px;height:12px;margin:0 4px 0 10px;vertical-align:middle}
