/* Team clarity: team, person, roster, skills, time off, my data, access. Area-specific only; the kit lives in app.css. */

.grow { flex: 1; }
.danger-t { color: var(--danger); font-weight: 600; } .warn-t { color: var(--warn); font-weight: 600; }
.plink { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; } .plink:hover span { text-decoration: underline; }
.team-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.team-cols > div > .card, .team-cols > div > details { margin-bottom: 14px; }
.wd-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* team: people today */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pcard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); color: inherit; text-decoration: none; }
.pcard:hover { border-color: var(--accent-line); }
.pcard .av { grid-row: 1 / 3; }
.pc-t { display: flex; flex-direction: column; min-width: 0; } .pc-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-s { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.team-needs { margin-bottom: 16px; border-color: var(--accent-line); }
.needs, .risks, .owned, .agree, .pre, .pats, .warns, .mydata, .princ, .perm-help { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.needs a { display: inline-flex; align-items: center; gap: 6px; }
.owned li, .pre li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.resp-d { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 14px 0 6px; } .resp-d:first-child { margin-top: 0; }
.resps { list-style: none; margin: 0; padding: 0; }
.resp { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: start; padding: 8px 0; border-top: 1px solid var(--border); }
.resps .resp:first-child { border-top: 0; }
.resp-t { display: flex; flex-direction: column; min-width: 0; } .resp-p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: flex-end; }
.resp-edit { grid-column: 1 / -1; } .resp-edit > summary { padding: 0; } .resp-edit[open] { padding: 8px 0; }
.resp-edit:not([open]) { grid-column: 3; grid-row: 1; }
.thanks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.thanks li { padding-bottom: 10px; border-bottom: 1px solid var(--border); } .thanks li:last-child { border-bottom: 0; padding-bottom: 0; }
.th-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .th-h > form { margin-left: auto; display: inline-flex; }
.thanks p { margin: 4px 0 0; }

/* person */
.ph-person { display: flex; align-items: center; gap: 14px; } .ph-person h1 { margin: 0; }
.about { white-space: pre-wrap; margin: 0 0 8px; }
.pweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pw-d { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: var(--r-sm); background: var(--surface-2); min-height: 64px; }
.pw-d.today { outline: 2px solid var(--accent-line); }
.pw-l { font-size: .72rem; color: var(--text-3); font-weight: 600; }
.pw-s { font: 600 .8rem var(--mono); display: flex; flex-direction: column; } .pw-s small { font: 400 .7rem var(--sans); color: var(--muted); }
.ti-g h4 { margin: 10px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); } .ti-g:first-child h4 { margin-top: 0; }
.ti { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ti li { display: flex; align-items: flex-start; gap: 8px; } .ti li.done .ti-b, .ti li.removed .ti-b { text-decoration: line-through; color: var(--muted); } .ti li.removed { padding-left: 30px; }
.ti-b { flex: 1; min-width: 0; } .ti li > .muted { white-space: nowrap; }
.chk { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-2); background: var(--surface); display: inline-grid; place-items: center; padding: 0; cursor: pointer; color: transparent; flex: none; }
.chk .ic { width: 14px; height: 14px; } .chk.on { background: var(--ok); border-color: var(--ok); color: #fff; } .chk.ro { cursor: default; } .chk:disabled { opacity: .45; cursor: not-allowed; }
.talk-add { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.talk-hold { margin-top: 10px; }
.agree-card { border-color: var(--improve); }

/* skill levels: four dots */
.lvl { display: inline-flex; gap: 3px; vertical-align: middle; } .lvl i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-2); }
.lvl i.on { background: var(--accent); border-color: var(--accent); } .lvl.l3 i.on, .lvl.l4 i.on { background: var(--ok); border-color: var(--ok); } .lvl.expired i.on { background: var(--danger); border-color: var(--danger); }

/* skill tree */
.tree { display: grid; grid-template-columns: repeat(var(--cols), minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.tcol { display: flex; flex-direction: column; gap: 10px; }
.tcol-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; }
.tnode { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); color: inherit; text-decoration: none; }
a.tnode:hover { border-color: var(--accent-line); }
.tnode.have { border-left: 4px solid var(--ok); } .tnode.learning { border-left: 4px solid var(--accent); } .tnode.next { border-left: 4px dashed var(--border-2); }
.tnode.locked { opacity: .62; background: var(--surface-2); }
.tnode.crit .tn-h b::after { content: ' ★'; color: var(--warn); }
.tn-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .tn-h a { color: inherit; }
.tn-s { display: flex; flex-wrap: wrap; gap: 4px; } .tn-a { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; } .tn-a:empty { display: none; }

/* skill matrix */
.mx-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); max-height: 75vh; }
.mx { border-collapse: separate; border-spacing: 0; font-size: .84rem; }
.mx th, .mx td { border-bottom: 1px solid var(--border); padding: 4px; }
.mx thead th, .mx tr:first-child th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mx .mx-p { position: sticky; left: 0; background: var(--surface); text-align: left; padding: 6px 10px; white-space: nowrap; z-index: 2; font-weight: 500; }
.mx-s { vertical-align: bottom; height: 200px; width: 44px; min-width: 44px; }
.mx-s a { display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; max-height: 175px; overflow: hidden; text-overflow: ellipsis; color: inherit; font-weight: 600; font-size: .78rem; margin: 0 auto; }
.mx-s.crit a::before { content: '★ '; color: var(--warn); }
.mx-s small { display: block; text-align: center; font-size: .7rem; margin-top: 4px; }
.mx-c { text-align: center; }
.mx-b { border: 0; background: none; padding: 0; cursor: pointer; }
.mx-v { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; font: 700 .82rem var(--mono); background: var(--surface-2); color: var(--muted); }
.mx-v.l1 { background: var(--accent-soft); color: var(--accent); } .mx-v.l2 { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); color: var(--accent-ink, #fff); }
.mx-v.l3 { background: var(--ok-soft); color: var(--ok); } .mx-v.l4 { background: var(--ok); color: #fff; }
.mx-v.expired { background: var(--danger-soft); color: var(--danger); } .mx-v.rusty { box-shadow: inset 0 0 0 2px var(--warn); } .mx-v.claim { box-shadow: inset 0 0 0 2px var(--improve); }
.mx-b:hover .mx-v { outline: 2px solid var(--accent-line); }
.mx-legend .mx-v { width: 20px; height: 20px; font-size: .7rem; vertical-align: middle; margin-left: 6px; }
.lvl-g { margin-bottom: 10px; } .lvl-g h4 { margin: 0 0 6px; display: flex; align-items: center; gap: 6px; font-size: .86rem; }
.lvl-p { display: inline-flex; align-items: center; gap: 4px; margin: 0 10px 6px 0; }
.sop-picks { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.skill-crit { padding-top: 22px; }
.claim-f { gap: 6px; flex-wrap: wrap; } .claim-f input[name] { height: 30px; width: 180px; }

/* roster */
.roster-plan { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.roster-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.roster { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 860px; font-size: .84rem; }
.roster th, .roster td { border: 1px solid var(--border); padding: 5px; vertical-align: top; }
.roster thead th { font-size: .74rem; font-weight: 600; color: var(--text-2); text-align: left; background: var(--surface-2); }
.roster thead th small { display: block; font-weight: 500; color: var(--warn); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roster tr > th:first-child { width: 170px; }
.roster tr > :last-child { width: 70px; }
.roster th.today, .roster td.today { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.roster .hol { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 12px); }
.roster .rp a { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; font-weight: 500; } .roster .rp { position: relative; }
.roster .rp .pill { margin-top: 4px; }
.rcell { position: relative; height: 54px; }
.rcell .add { opacity: 0; border: 1px dashed var(--border-2); background: none; border-radius: 6px; width: 100%; height: 24px; display: grid; place-items: center; cursor: pointer; color: var(--muted); padding: 0; }
.rcell:hover .add, .rcell .add:focus { opacity: 1; } .rcell .add .ic { width: 14px; height: 14px; }
@media (hover: none) { .rcell .add { opacity: .6; } }
.shift { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 4px 6px; margin-bottom: 4px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); font: 600 .78rem var(--mono); cursor: default; }
button.shift { cursor: pointer; } button.shift:hover { filter: brightness(.97); }
.shift small { font: 400 .7rem var(--sans); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shift.draft { background: var(--surface); border-style: dashed; color: var(--text-2); }
.shift.changed { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn); }
.shift.warn { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.roster-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; } .roster-legend .shift { display: inline-flex; width: auto; margin: 0; }
.avs { position: absolute; top: 2px; right: 2px; display: flex; gap: 2px; }
[class^="av-"] { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.av-unavailable { background: var(--danger); } .av-rather_not { background: var(--warn); } .av-prefer { background: var(--ok); }
.roster tfoot td, .roster tfoot th { background: var(--surface-2); font-size: .76rem; color: var(--text-2); }
.cov td { vertical-align: top; } .cv { display: flex; align-items: center; gap: 3px; font-size: .72rem; margin-bottom: 2px; } .cv .ic { width: 12px; height: 12px; }
.cv.ok { color: var(--ok); } .cv.gap { color: var(--danger); font-weight: 600; }
.roster-warn { margin-top: 14px; } .warns li { display: flex; align-items: center; gap: 6px; } .warns li.stop { color: var(--danger); } .warns li.warn { color: var(--warn); }
.roster-more { margin-top: 22px; }
code.feed { display: block; word-break: break-all; padding: 8px 10px; user-select: all; }

/* time off */
.cal-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.calm { border-collapse: collapse; font-size: .76rem; min-width: 760px; width: 100%; }
.calm th, .calm td { border: 1px solid var(--border); padding: 0; height: 26px; text-align: center; }
.calm tr:first-child th { font-weight: 600; color: var(--text-2); padding: 4px 0; }
.calm tbody th { text-align: left; padding: 2px 8px; white-space: nowrap; width: 150px; }
.calm .we { background: var(--surface-2); } .calm .hol { background: var(--warn-soft); } .calm th.today { background: var(--accent-soft); color: var(--accent); }
.cal { display: block; width: 100%; height: 14px; border-radius: 3px; }
.cal.lv { background: var(--accent); } .cal.asked { background: repeating-linear-gradient(135deg, var(--accent-soft) 0 4px, transparent 4px 8px); border: 1px dashed var(--accent); }
.cal.sick { background: var(--warn); } .cal.off { background: var(--border-2); }
.cal-legend .cal { display: inline-block; width: 16px; height: 10px; vertical-align: middle; }
.sick-card { border-color: var(--warn); } .sick-more { margin-top: 4px; }
.w-num { width: 90px !important; } .w-note { width: 160px !important; }

/* my data, access */
.princ li { display: flex; gap: 8px; align-items: flex-start; } .princ .ic { flex: none; margin-top: 2px; color: var(--accent); }
.mydata { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; margin-bottom: 12px; }
.mydata b { font: 600 1rem var(--mono); }
.stepup { margin-bottom: 14px; border-color: var(--accent-line); } .stepup-inline { margin-bottom: 12px; gap: 8px; flex-wrap: wrap; } .stepup-inline input[type=password] { width: 200px; height: 30px; }
.perm-t td { vertical-align: middle; }
.perm-help { margin-top: 12px; font-size: .86rem; }

@media (max-width: 900px) {
  .team-cols { grid-template-columns: 1fr; }
  .pweek { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* team pages: keep the words on buttons (the kit hides them on phones in bars) */
  .card .btn .bt, .tn-a .btn .bt, .roster-plan .btn .bt, .lt-pane .btn .bt, .row-f .btn .bt, .stepup-inline .btn .bt, .claim-f .btn .bt, .talk-hold .btn .bt { display: inline; }
  .resp { grid-template-columns: 1fr; } .resp-p { justify-content: flex-start; } .resp-edit:not([open]) { grid-column: 1; grid-row: auto; }
  .pweek { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tree { grid-template-columns: 1fr; overflow: visible; }
  .claim-f input[name] { width: 100%; }
}

/* small one-line forms (sick report, allowance, back at work) */
.row-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.row-f select, .row-f input { width: auto; height: 32px; } .row-f input[name=note] { min-width: 160px; }
