/* Dietz EOS - app styles
   House style: Arial, navy headers on white text, dd/mm/yyyy dates. */

:root {
  --navy:        #0f2d52;
  --navy-2:      #17406f;
  --navy-ink:    #0a1f3a;
  --accent:      #1d7fd0;
  --bg:          #f4f6f9;
  --panel:       #ffffff;
  --line:        #dde3ea;
  --ink:         #1e2733;
  --muted:       #6a7787;
  --good:        #12794f;
  --good-bg:     #e4f5ec;
  --bad:         #b3261e;
  --bad-bg:      #fdeceb;
  --warn:        #8a5a00;
  --warn-bg:     #fdf3e0;
  --radius:      8px;
  --shadow:      0 1px 2px rgba(16, 34, 56, .08), 0 1px 8px rgba(16, 34, 56, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 14px/1.5 Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

h1 { font-size: 22px; margin: 0 0 2px; color: var(--navy-ink); }
h2 { font-size: 16px; margin: 0 0 10px; color: var(--navy-ink); }
h3 { font-size: 14px; margin: 0 0 6px; color: var(--navy-ink); }
h3.sub { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
p  { margin: 0 0 10px; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted  { color: var(--muted); }
.small  { font-size: 12px; }
.block  { display: block; }
.grow   { flex: 1 1 40%; min-width: 0; }
.right  { text-align: right; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.num    { text-align: right; }
.good   { color: var(--good); }
.bad, .late { color: var(--bad); }
.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus { position: static; background: #fff; padding: 8px; display: inline-block; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--navy); color: #fff; padding: 0 18px; height: 54px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 30px; height: 30px; border-radius: 7px; background: #fff; color: var(--navy);
  display: grid; place-items: center; font-weight: bold; font-size: 16px;
}
.brand-text strong { display: block; font-size: 15px; line-height: 1.1; }
.brand-text small  { color: #b9cbe2; font-size: 11px; }

/* header search + actions */
.topsearch { margin-left: auto; flex: 0 1 340px; }
.topsearch input {
  width: 100%; margin: 0; padding: 7px 11px; border-radius: 18px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.26); color: #fff;
}
.topsearch input::placeholder { color: #b9cbe2; }
.topsearch input:focus { background: #fff; color: var(--ink); outline: 2px solid #bcd9f5; }

.topactions { display: flex; align-items: center; gap: 10px; }
.topactions .ghost { color: #dce7f4; font-size: 13px; }

.create-wrap { position: relative; }
.btn.create { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: bold; }
.btn.create:hover { background: #1668ab; }
.create-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 380px; max-width: 88vw;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  box-shadow: 0 8px 28px rgba(16,34,56,.18);
}
.create-row { display: flex; gap: 6px; margin-bottom: 7px; }
.create-row:last-child { margin-bottom: 0; }
.create-row input { margin: 0; }

.team-switch { margin-left: 0; }
.team-switch select {
  background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28);
  border-radius: 6px; padding: 6px 8px; font: inherit; max-width: 220px;
}
.team-switch select option { color: #111; }

.user-menu { display: flex; align-items: center; gap: 12px; }
.user-menu a { color: #dce7f4; font-size: 13px; }
.who { display: flex; align-items: center; gap: 8px; color: #fff !important; }
.who-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  background: hsl(var(--h, 210) 45% 42%); color: #fff;
  display: inline-grid; place-items: center; font-size: 11px; font-weight: bold;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - 54px); align-items: flex-start; }

.sidebar {
  width: 190px; flex: 0 0 190px; background: #fff; border-right: 1px solid var(--line);
  padding: 12px 0 0; position: sticky; top: 0; align-self: stretch;
  display: flex; flex-direction: column; min-height: calc(100vh - 54px);
}
.nav-groups { flex: 1 1 auto; }
.nav-group + .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

.nav-user {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px;
  border-top: 1px solid var(--line); color: var(--ink);
}
.nav-user:hover { background: #f2f6fb; text-decoration: none; }
.nav-user-text { min-width: 0; }
.nav-user-text strong {
  display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-user-text small { display: block; color: var(--muted); font-size: 11px; }
.nav-signout {
  display: block; padding: 8px 14px 12px; font-size: 12px; color: var(--muted);
}
.nav-signout:hover { color: var(--bad); text-decoration: none; }
.sidebar a {
  display: block; padding: 8px 16px; color: var(--ink); border-left: 3px solid transparent;
}
.sidebar a span  { display: block; font-weight: bold; font-size: 13px; }
.sidebar a small { display: block; color: var(--muted); font-size: 11px; }
.sidebar a:hover { background: #f2f6fb; text-decoration: none; }
.sidebar a.on    { border-left-color: var(--accent); background: #eef5fc; }

.main { flex: 1 1 auto; padding: 18px 22px 40px; min-width: 0; }

.foot {
  margin-top: 32px; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11px;
}

/* ---------- panels ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.panel h2 { display: flex; align-items: baseline; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; align-items: start; }
.span-2 { grid-column: 1 / -1; }
.scroll-x { overflow-x: auto; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.empty { color: var(--muted); font-style: italic; margin: 6px 0; }
.more  { display: inline-block; margin-top: 8px; font-size: 12px; }

/* ---------- buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 7px 13px; border-radius: 6px; font: inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #f2f6fb; text-decoration: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.danger  { border-color: #e2b6b3; color: var(--bad); background: #fff; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost.on { background: #eef5fc; border-color: #b9d5f0; }
.btn.small   { padding: 4px 9px; font-size: 12px; }
.btn.block   { width: 100%; margin-top: 8px; }
.btn.ms      { border-color: #8c8c8c; }
.ms-logo {
  width: 16px; height: 16px; flex: 0 0 auto;
  background:
    linear-gradient(#f25022 0 0) 0 0 / 7px 7px no-repeat,
    linear-gradient(#7fba00 0 0) 9px 0 / 7px 7px no-repeat,
    linear-gradient(#00a4ef 0 0) 0 9px / 7px 7px no-repeat,
    linear-gradient(#ffb900 0 0) 9px 9px / 7px 7px no-repeat;
}

.link-btn {
  background: none; border: 0; color: var(--accent); font: inherit; font-size: 12px;
  cursor: pointer; padding: 2px 4px;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--bad); }

.x {
  background: none; border: 0; color: var(--muted); font-size: 17px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}
.x:hover { color: var(--bad); }

label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
label.check { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input:not([type]), select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; color: var(--ink); background: #fff; margin-top: 3px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bcd9f5; border-color: var(--accent); }
textarea { resize: vertical; }
select { padding-right: 6px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-panel { border-left: 3px solid var(--accent); }

.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline label, .inline select, .inline input { margin: 0; }
.inline select { width: auto; }
.inline-add {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.inline-add input[name=title] { flex: 1 1 220px; }
.inline-add select, .inline-add input[type=date] { width: auto; }
.inline-add input, .inline-add select { margin-top: 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.edit-box {
  width: 100%; margin-top: 10px; padding: 12px; background: #f7f9fc;
  border: 1px solid var(--line); border-radius: 6px;
}
.edit-row td { background: #f7f9fc; }

.alert { padding: 9px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.alert.ok   { background: var(--good-bg); color: var(--good); }
.alert.err  { background: var(--bad-bg);  color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* ---------- stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink); box-shadow: var(--shadow);
}
.stat:hover { text-decoration: none; border-color: #b9d5f0; }
.stat-n { display: block; font-size: 26px; font-weight: bold; color: var(--navy); line-height: 1.1; }
.stat-l { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.pill {
  display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px;
  background: #eef1f5; color: var(--muted); vertical-align: middle;
}
.pill.red   { background: var(--bad-bg);  color: var(--bad); }
.pill.green { background: var(--good-bg); color: var(--good); }
.pill.blue  { background: #e6f0fa;        color: var(--navy); }
.pill.grey  { background: #eef1f5;        color: var(--muted); }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.list > li:last-child { border-bottom: 0; }
.list.tight > li { padding: 5px 0; }
.list .is-done, .list li.is-done .grow { color: var(--muted); text-decoration: line-through; }

.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  flex: 0 0 auto; background: var(--muted); vertical-align: middle;
}
.dot.on_track   { background: var(--good); }
.dot.off_track  { background: var(--bad); }
.dot.complete   { background: var(--navy); }
.dot.incomplete { background: #b9bfc7; }

.check {
  width: 18px; height: 18px; border: 2px solid #b7c1cd; border-radius: 4px;
  background: #fff; cursor: pointer; padding: 0; flex: 0 0 auto;
}
.check:hover { border-color: var(--accent); }
.check.on { background: var(--navy); border-color: var(--navy); }
.check.on::after { content: "\2713"; color: #fff; font-size: 12px; display: block; margin-top: -2px; }

.rank {
  width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff;
  display: inline-grid; place-items: center; font-size: 11px; flex: 0 0 auto;
}
.rank-sel { width: 56px; }
.solution { color: var(--good); }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
.mini td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.mini tr:last-child td { border-bottom: 0; }
.mini .total td { border-top: 2px solid var(--line); }

.grid th, .grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.grid thead th { background: var(--navy); color: #fff; font-size: 12px; white-space: nowrap; }
.grid tbody tr:hover { background: #f7f9fc; }
.grid tr.inactive td { opacity: .55; }

.scorecard th, .scorecard td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scorecard thead th { background: var(--navy); color: #fff; font-size: 12px; position: sticky; top: 0; }
.scorecard thead th.now { background: var(--navy-2); }
.scorecard tbody th { text-align: left; font-weight: normal; }
.scorecard .sticky-l { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 190px; }
.scorecard thead .sticky-l { background: var(--navy); z-index: 2; }
.scorecard td.cell { padding: 2px; }
.scorecard td.cell.good { background: var(--good-bg); }
.scorecard td.cell.bad  { background: var(--bad-bg); }
.scorecard td.now { box-shadow: inset 0 0 0 1px #c8dcf0; }
.scorecard input.score-in {
  width: 74px; margin: 0; padding: 5px 6px; text-align: right;
  border: 1px solid transparent; background: transparent; border-radius: 4px;
}
.scorecard input.score-in:focus { background: #fff; border-color: var(--accent); }
.score-in.saving { opacity: .5; }

/* ---------- rocks ---------- */
.rock-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.rock-head h3 { margin: 0; }
.rock-head .dot { margin-top: 6px; }
.rock-desc { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.milestones { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.milestones li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.milestones li.is-done .grow { color: var(--muted); text-decoration: line-through; }
.milestones .add-ms form { width: 100%; }
.milestones .add-ms input[name=title] { flex: 1 1 auto; }
.milestones .add-ms input[type=date] { width: auto; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs a {
  padding: 8px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px;
}
.tabs a.on { color: var(--navy); border-bottom-color: var(--navy); font-weight: bold; }
.tabs a:hover { text-decoration: none; color: var(--navy); }

/* ---------- meeting ---------- */
.meeting-bar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 12px 18px; margin-bottom: 16px;
}
.meeting-bar h1 { color: #fff; font-size: 18px; }
.meeting-bar .muted { color: #b9cbe2; }
.mb-left { flex: 1 1 auto; }
.mb-clock { text-align: center; }
.clock { font-size: 24px; font-weight: bold; font-variant-numeric: tabular-nums; }
.clock.over { color: #ffb4ad; }
.mb-actions { display: flex; gap: 8px; }
.meeting-bar .btn.ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; }
.meeting-bar .btn.ghost:hover { background: rgba(255,255,255,.26); }
.meeting-bar .btn.primary { background: #fff; border-color: #fff; color: var(--navy); }
.meeting-bar .btn.primary:hover { background: #e6eefa; }

.meeting-shell { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.agenda { width: 210px; flex: 0 0 210px; }
.agenda form { margin: 0; }
.agenda-item {
  width: 100%; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 9px 12px; margin-bottom: 6px; cursor: pointer; font: inherit;
}
.agenda-item:hover { border-color: #b9d5f0; }
.agenda-item.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ai-label { display: block; font-weight: bold; font-size: 13px; }
.ai-time  { display: block; font-size: 11px; color: var(--muted); }
.agenda-item.on .ai-time { color: #b9cbe2; }
.meeting-main { flex: 1 1 420px; min-width: 0; }
.segue-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; }
.segue-list li { display: flex; align-items: center; gap: 8px; }
.quick-issue { border-left: 3px solid var(--accent); }
.ratings { list-style: none; margin: 0; padding: 0; }
.ratings li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.ratings select { width: 70px; }
.conclude-form { margin-top: 16px; }
.cascade { background: #f7f9fc; border-left: 3px solid var(--accent); padding: 10px 12px; border-radius: 4px; }
.big-rating { font-size: 30px; font-weight: bold; color: var(--navy); margin: 0 0 8px; }
.big-rating .muted { font-size: 13px; font-weight: normal; margin-left: 6px; }
.discard { margin-top: 14px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 5px 0 5px 22px; position: relative; }
.checklist li::before { position: absolute; left: 0; }
.checklist li.ok::before { content: "\2713"; color: var(--good); }
.checklist li.no::before { content: "\2717"; color: var(--bad); }

/* ---------- V/TO, people, chart ---------- */
.vto-card textarea { min-height: 120px; }
.vto-read { white-space: normal; font-size: 13px; }
.person-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.person-head h2 { margin: 0; }
.person-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.person-stats strong { color: var(--navy); font-size: 15px; }
.roles summary { cursor: pointer; font-size: 12px; color: var(--accent); margin-top: 8px; }

.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 26px; border-left: 1px solid var(--line); padding-left: 16px; }
.org-tree li { margin: 8px 0; }
.seat {
  display: inline-block; min-width: 210px; max-width: 320px; background: #fff;
  border: 1px solid var(--line); border-left: 3px solid var(--navy); border-radius: 6px; padding: 10px 12px;
}
.seat-name { font-weight: bold; color: var(--navy-ink); }
.seat-person { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 3px; }
.seat-roles { list-style: disc; margin: 6px 0 0 16px; padding: 0; font-size: 12px; color: var(--muted); }

/* ---------- auth ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; background: var(--navy); }
.auth-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 10px; padding: 26px;
  box-shadow: 0 10px 40px rgba(0,0,0,.28); margin: 20px;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-brand .mark { background: var(--navy); color: #fff; }
.auth-brand strong { display: block; font-size: 16px; color: var(--navy-ink); }
.auth-brand small  { color: var(--muted); }
.auth-title { color: var(--navy-ink); margin-top: 0; }
.auth-foot { margin: 18px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.or { text-align: center; border-top: 1px solid var(--line); margin: 18px 0; }
.or span { position: relative; top: -10px; background: #fff; padding: 0 10px; color: var(--muted); font-size: 12px; }

/* ---------- workspace: page head, filter bar, widget cards ---------- */
.work-head { margin: 4px 0 14px; }
.work-head h1 { font-size: 26px; margin-bottom: 4px; }
.work-head .muted { margin: 0; }

.work-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.scope-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 4px 12px 4px 14px;
  font-size: 13px; color: var(--muted);
}
.scope-pill select {
  width: auto; margin: 0; border: 0; padding: 2px 4px; background: transparent;
  font-weight: bold; color: var(--ink);
}
.scope-pill select:focus { outline: 2px solid #bcd9f5; border-radius: 4px; }

.widget {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.widget-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.widget-head h2 { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 9px; }
.count {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: #eef1f5; color: var(--muted); font-size: 12px; font-weight: normal;
}
.widget-controls { display: flex; gap: 14px; align-items: flex-end; }
.widget-controls label { margin: 0; font-size: 11px; }
.widget-controls select { width: auto; min-width: 120px; }

.wtable { width: 100%; border-collapse: collapse; }
.wtable thead th {
  text-align: left; font-size: 11px; font-weight: normal; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
}
.wtable tbody td, .wtable tbody th {
  padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-weight: normal;
  vertical-align: top;
}
.wtable tbody tr:last-child td, .wtable tbody tr:last-child th { border-bottom: 0; }
.wtable tbody tr:hover { background: #f7f9fc; }
.wtable .num { text-align: right; white-space: nowrap; }
.wtable .w-ex { width: 34px; padding-left: 0; }
.wtable .w-st { width: 54px; }
.wtable a { color: var(--ink); }
.wtable a:hover { color: var(--accent); }
.wtable tr.is-done td { color: var(--muted); }
.wtable tr.is-done a { text-decoration: line-through; }

.chev {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 0 4px; transition: transform .12s;
}
.chev:hover { color: var(--accent); }
.chev.open { transform: rotate(90deg); }

.sub-row td { background: #f7f9fc; }
.sub-row .milestones { margin: 0; padding: 0; border: 0; }

.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 9px; background: #eef1f5; color: var(--muted); font-size: 11px;
}

/* Inside a widget the scorecard keeps the airy header of the other tables. */
.widget .scorecard thead th {
  background: transparent; color: var(--muted); position: static;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--line);
}
.widget .scorecard thead .sticky-l { background: #fff; }
.widget .scorecard tbody th.sticky-l { background: #fff; }

.widget-add { display: flex; gap: 8px; margin-top: 14px; }
.widget-add input {
  flex: 1 1 auto; margin: 0; border: 1px dashed var(--line); background: #fbfcfd;
}
.widget-add input:focus { border-style: solid; background: #fff; }

/* ---------- responsive & print ---------- */
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar {
    width: auto; flex: none; position: static; display: block; overflow-x: auto;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 0; min-height: 0;
  }
  .nav-groups { display: flex; }
  .nav-group { display: flex; }
  .nav-group + .nav-group {
    margin: 0; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line);
  }
  .sidebar a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 8px 12px; }
  .sidebar a.on { border-left: 0; border-bottom-color: var(--accent); }
  .sidebar a small { display: none; }
  .nav-user, .nav-signout { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .topsearch { order: 3; flex: 1 1 100%; margin: 0; }
  .topactions { margin-left: auto; }
  .work-head h1 { font-size: 21px; }
  .widget { padding: 15px 14px; }
  .main { padding: 14px; }
  .agenda { width: 100%; flex: 1 1 100%; display: flex; gap: 6px; overflow-x: auto; }
  .agenda-item { width: 170px; }
  .who-name { display: none; }
}

@media print {
  .topbar, .sidebar, .page-actions, .foot, .discard { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; break-inside: avoid; }
}
