/* GTP (Goal Tracking Platform). Mobile first; one stylesheet, no build step.
   Branded to match dryice.co.za: navy header with the round DII logo, Poppins, navy
   headings, steel-blue panels with white text. Their bright red is kept for "Behind" /
   "Overdue" only, so red always means a problem.
   Status colours always come with a text label, never colour alone. */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/poppins-700.woff2) format("woff2"); }
/* Webcafe pages (sign-in, superadmin): Montserrat headings, Inter text (variable fonts). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-var.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-var.woff2) format("woff2"); }
:root {
  --ink: #2a2a2a;          /* dryice.co.za body text */
  --muted: #707070;
  --line: #e1e5ee;
  --bg: #f4f6fa;
  --card: #ffffff;
  --brand: #263a75;        /* DII navy (header, headings) */
  --brand-2: #4c8ab1;      /* DII steel blue (panels, links) */
  --brand-red: #e30613;    /* red: problems only (Behind, Overdue) */
  --on-brand: #ffffff;     /* text on --brand; /settings/brand.css sets it from the customer colour */
  --on-brand-2: #ffffff;
  --focus: #4c8ab1;
  --s-not_started: #8a8f99;
  --s-on_track: #1f8f4e;
  --s-at_risk: #d68a00;
  --s-behind: var(--brand-red);
  --s-done: #4c8ab1;
  --overdue: var(--brand-red);
  --radius: 6px;
  --shadow: 0 1px 2px rgba(38, 58, 117, .06), 0 3px 10px rgba(38, 58, 117, .06);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Full-height column: main grows, so the footer sits at the bottom of short pages. */
body { margin: 0; background: var(--bg); font-size: 14.5px; line-height: 1.5; padding-bottom: 72px;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; box-sizing: border-box; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--brand); font-weight: 600; }
h1 { font-size: 1.45rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---- header and navigation ---------------------------------------------------------- */
.topbar { background: var(--brand); color: var(--on-brand); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.topbar .in { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .45rem 16px; }
.brand { color: var(--on-brand); display: flex; align-items: center; gap: .7rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 52px; height: 52px; display: block; }
.brand .t { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; }
.brand span { font-weight: 400; opacity: .85; font-size: .78rem; }
.topnav { display: none; gap: .15rem; margin-left: 1.25rem; }
.topnav a { color: var(--on-brand); font-weight: 500; font-size: .92rem; padding: .4rem .75rem; border-radius: 4px; }
.topnav a.on, .topnav a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }
.topnav a.on { box-shadow: inset 0 -3px 0 var(--on-brand); }
.who { margin-left: auto; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.who form { margin: 0; }
.who button { background: transparent; color: var(--on-brand); border: 1px solid rgba(255, 255, 255, .45); border-radius: 4px;
  padding: .3rem .7rem; font: inherit; font-weight: 500; cursor: pointer; }
.who button:hover { background: rgba(255, 255, 255, .12); }
.who a.me, .who span.me { color: var(--on-brand); display: flex; align-items: center; gap: .5rem; padding: .2rem .5rem .2rem .2rem; border-radius: 999px; }
.who a.me:hover, .who a.me.on { background: rgba(255, 255, 255, .14); text-decoration: none; }
.who .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-2); color: #fff; font-weight: 600;
  font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 255, 255, .7); }
.mt0 { margin-top: 0; }
legend.lbl { font-weight: 600; font-size: .85rem; margin: .75rem 0 .4rem; padding: 0; }
fieldset.bare + fieldset.bare { margin-top: .75rem; }
.site-foot { width: 100%; max-width: 1400px; margin: 0 auto; padding: 1.5rem 16px 2rem; color: var(--muted); font-size: .8rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: space-between; border-top: 1px solid var(--line); }
.site-foot a { color: var(--muted); }
.who .name { display: none; }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--card); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { flex: 1; text-align: center; padding: .55rem 0 .5rem; color: var(--muted); font-size: .75rem; }
.tabbar a .i { display: block; font-size: 1.15rem; line-height: 1.2; }
.tabbar a.on { color: var(--brand); font-weight: 600; }
.devbar { background: #fff4d6; color: #6b4b00; text-align: center; font-size: .8rem; padding: .3rem 16px; }
main { flex: 1 0 auto; width: 100%; max-width: 1400px; margin: 0 auto; padding: 1rem 16px 2rem; }
.flash { padding: .6rem .8rem; border-radius: 8px; margin-bottom: .75rem; }
.flash.ok { background: #e3f4ea; color: #155c34; }
.flash.error { background: #fbe4e4; color: #8c2020; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; }
  .who .name { display: inline; }
}

/* ---- building blocks --------------------------------------------------------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--brand); color: var(--on-brand); border: 0; border-radius: 4px;
  padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn.danger { background: #b42d2d; }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.btn.ms { background: #2f2f2f; color: #fff; }
.ms-logo { width: 16px; height: 16px; display: inline-block; flex: none;
  background: linear-gradient(#f25022, #f25022) 0 0 / 7px 7px no-repeat, linear-gradient(#7fba00, #7fba00) 9px 0 / 7px 7px no-repeat,
              linear-gradient(#00a4ef, #00a4ef) 0 9px / 7px 7px no-repeat, linear-gradient(#ffb900, #ffb900) 9px 9px / 7px 7px no-repeat; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], select, textarea {
  font: inherit; color: inherit; border: 1px solid #c8d2dd; border-radius: 8px; padding: .5rem .6rem; background: #fff; width: 100%; }
textarea { min-height: 5rem; resize: vertical; }
label { display: block; font-weight: 600; font-size: .85rem; margin: .75rem 0 .25rem; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; font-size: .95rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: .1rem .5rem;
  border-radius: 999px; background: #e6eef6; color: var(--brand); white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .15rem .55rem;
  border-radius: 999px; color: #fff; white-space: nowrap; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.s-not_started { background: var(--s-not_started); }
.s-on_track { background: var(--s-on_track); }
.s-at_risk { background: var(--s-at_risk); }
.s-behind { background: var(--s-behind); }
.s-done { background: var(--s-done); }
.due.overdue { color: var(--overdue); font-weight: 600; }
.empty { color: var(--muted); padding: 1rem 0; }
table.t { width: 100%; border-collapse: collapse; background: var(--card); }
table.t th, table.t td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--on-brand); background: var(--brand); }
table.t tbody tr:hover { background: #f7f9fc; }
table.t th a { color: inherit; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- dashboard ---------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .8rem; color: var(--ink);
  border-left: 5px solid var(--line); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; border-color: var(--brand-2); }
.kpi .n { font-size: 1.7rem; font-weight: 600; line-height: 1.1; display: block; color: var(--brand); }
.kpi .l { font-size: .8rem; color: var(--muted); }
.kpi.k-not_started { border-left-color: var(--s-not_started); }
.kpi.k-on_track { border-left-color: var(--s-on_track); }
.kpi.k-at_risk { border-left-color: var(--s-at_risk); }
.kpi.k-behind { border-left-color: var(--s-behind); }
.kpi.k-done { border-left-color: var(--s-done); }
.kpi.k-overdue { border-left-color: var(--overdue); }
.kpi.k-overdue .n { color: var(--overdue); }
.bar { display: block; width: 100%; height: 10px; border-radius: 999px; overflow: hidden; background: #e8eef5; margin: .45rem 0 .35rem; }
.r-not_started, .d-not_started { fill: var(--s-not_started); background: var(--s-not_started); }
.r-on_track, .d-on_track { fill: var(--s-on_track); background: var(--s-on_track); }
.r-at_risk, .d-at_risk { fill: var(--s-at_risk); background: var(--s-at_risk); }
.r-behind, .d-behind { fill: var(--s-behind); background: var(--s-behind); }
.r-done, .d-done { fill: var(--s-done); background: var(--s-done); }
.dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .25rem; }
.kpi.k-attention { border-left-color: var(--s-at_risk); }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.mini li:last-child { border-bottom: 0; }
.mini a.t { color: var(--ink); font-weight: 500; }
.mini .meta { font-size: .8rem; color: var(--muted); margin-top: .15rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.more { margin: .6rem 0 0; }

/* Layout: one column on phones (attention, units, activity, my goals); on wide screens
   attention + activity + my goals on the left, the unit list on the right. */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.25rem; grid-template-areas: "attn" "units" "act" "mine"; align-items: start; }
.d-attn { grid-area: attn; } .d-units { grid-area: units; } .d-act { grid-area: act; } .d-mine { grid-area: mine; }

/* Needs attention: tabs (JS) or stacked panels (no JS). */
.tabs-card { padding-top: .25rem; }
.tabs { display: none; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 -1rem .25rem; padding: 0 1rem; overflow-x: auto; }
.js .tabs { display: flex; }
.js .nojs-only { display: none; }
.tab { font: inherit; font-size: .88rem; font-weight: 500; color: var(--muted); background: none; border: 0; padding: .7rem .6rem .6rem;
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.tab:hover { color: var(--brand); }
.tab[aria-selected="true"] { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.tab .tn { font-size: .75rem; font-weight: 600; min-width: 1.5rem; padding: .05rem .4rem; border-radius: 999px; background: #e6eef6; color: var(--brand); text-align: center; }
.tab.t-overdue .tn { background: var(--overdue); color: #fff; }
.tabpanel h3 { margin-top: .75rem; }
.tabpanel .hint { margin: .5rem 0 0; }
@media (max-width: 599px) {
  .tabs { gap: 0; margin: 0 -.75rem .25rem; padding: 0 .5rem; }
  .tab { font-size: .82rem; padding: .7rem .4rem .6rem; gap: .3rem; }
  .tab .tn { min-width: 1.3rem; padding: .05rem .3rem; }
}

/* Business units: one compact row each, worst first. */
.units { padding: 0; overflow: hidden; margin-bottom: .75rem; }
.ugroup-h { background: var(--brand-2); color: var(--on-brand-2); font-weight: 600; font-size: .85rem; padding: .45rem .9rem; }
.urow { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.units > .urow:last-child, .ugroup:last-child > .usub > .urow:last-child, .ugroup:last-child > .usub[hidden] + * { border-bottom: 0; }
.ulink { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name count" "bar bar" "flags flags";
  gap: .2rem .6rem; padding: .6rem .4rem .6rem .9rem; color: var(--ink); }
.ulink:hover { background: #f4f8fc; text-decoration: none; }
.uname { grid-area: name; min-width: 0; line-height: 1.3; }
.uname .muted { font-size: .85rem; }
.uname b { color: var(--brand); font-weight: 600; }
.ulink .bar { grid-area: bar; margin: .15rem 0; height: 8px; }
.uflags { grid-area: flags; display: flex; flex-wrap: wrap; gap: .3rem; }
.ucount { grid-area: count; font-size: .8rem; color: var(--muted); align-self: center; white-space: nowrap; }
.utoggle-gap { width: 2.4rem; flex: none; }
.flag { font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; white-space: nowrap; }
.f-overdue { background: var(--overdue); color: #fff; }
.f-behind { background: #fde3e4; color: #a3050e; }
.f-at_risk { background: #fdf0d5; color: #7a4f00; }
.f-ok { background: #e1f3e8; color: #17663a; }
.usub { background: #f8fafc; }
.usub .ulink { padding-left: 2rem; }
.utoggle, .upin button { background: none; border: 0; cursor: pointer; color: var(--muted); width: 2.4rem; height: 2.4rem;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.05rem; }
.utoggle:hover, .upin button:hover { background: #eef3f9; color: var(--brand); }
.upin { margin: 0 .3rem 0 0; }
.upin button.on { color: #d68a00; }
.chev { width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -.2rem; transition: transform .15s; }
.utoggle[aria-expanded="true"] .chev { transform: rotate(-135deg); margin-top: .25rem; }
.pin-pick { columns: 2 220px; column-gap: 2rem; }
.pin-group { break-inside: avoid; }
.pin-group:has(.pin-kids) { padding-bottom: .35rem; }
.pin-pick label.check { margin: 0; padding: .2rem 0; align-items: center; }
.pin-pick label.check input { flex: none; margin: 0; }
.pin-kids { margin-left: .55rem; padding-left: .9rem; border-left: 2px solid var(--line); }

@media (min-width: 600px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  /* Fixed columns so every unit's bar starts and ends in the same place. */
  .ulink { grid-template-columns: minmax(0, 1fr) 110px 13.5rem 4.6rem; grid-template-areas: "name bar flags count"; align-items: center; gap: .75rem; }
  .ulink .bar { margin: 0; }
  .uflags { justify-content: flex-start; }
  .ucount { text-align: right; }
}
@media (min-width: 1000px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); grid-template-areas: "attn units" "act units" "mine units"; }
  .d-units { grid-row: 1 / span 3; }
}

/* ---- filters ------------------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filters input[type=search] { flex: 1 1 200px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.filters .count { margin-left: auto; color: var(--muted); font-size: .85rem; }

/* ---- board -------------------------------------------------------------------------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 85vw); gap: .75rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.col { background: #e9eef4; border-radius: var(--radius); padding: .6rem; scroll-snap-align: start; min-height: 200px; }
.col.drop { outline: 2px dashed var(--brand-2); outline-offset: -4px; background: #e0ecf7; }
.col-h { display: flex; align-items: center; justify-content: space-between; margin: 0 .2rem .6rem; }
.col-h .n { font-size: .8rem; color: var(--muted); font-weight: 600; }
.gcard { display: block; background: var(--card); border-radius: 8px; padding: .65rem .7rem; margin-bottom: .5rem; color: var(--ink);
  box-shadow: var(--shadow); border-left: 4px solid var(--line); }
.gcard:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(15, 31, 51, .15); }
.gcard[draggable=true] { cursor: grab; }
.gcard.dragging { opacity: .5; }
.gcard.c-not_started { border-left-color: var(--s-not_started); }
.gcard.c-on_track { border-left-color: var(--s-on_track); }
.gcard.c-at_risk { border-left-color: var(--s-at_risk); }
.gcard.c-behind { border-left-color: var(--s-behind); }
.gcard.c-done { border-left-color: var(--s-done); }
.gcard .t { font-weight: 500; font-size: .92rem; }
.gcard .chips { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .35rem; }
.gcard .meta { display: flex; gap: .6rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: .4rem; }
@media (min-width: 900px) { .board { grid-auto-columns: minmax(250px, 1fr); } }

/* ---- goal page ---------------------------------------------------------------------- */
.goal-head { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .5rem; }
.goal-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 900px) { .goal-grid { grid-template-columns: 2fr 1fr; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.facts dt { color: var(--muted); font-size: .85rem; }
dl.facts dd { margin: 0; }
.status-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .4rem; }
.status-pick label { margin: 0; font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: .4rem; padding: .5rem .6rem;
  border: 2px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff; }
.status-pick input { accent-color: var(--brand); }
.status-pick label:has(input:checked) { border-color: var(--brand); background: #eef5fb; }
.thread { list-style: none; margin: 0; padding: 0; }
.thread li { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.thread .by { font-size: .82rem; color: var(--muted); }
.thread .by b { color: var(--ink); }
.thread .body { white-space: pre-wrap; margin-top: .2rem; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.timeline li { padding: .4rem 0 .4rem .9rem; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .75rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-2); }
.timeline li.h-comment::before { background: var(--muted); }
.history-more summary { cursor: pointer; color: var(--brand-2); font-size: .85rem; font-weight: 500; padding: .5rem 0 .25rem; list-style: none; }
.history-more summary::-webkit-details-marker { display: none; }
.history-more summary::after { content: " ▾"; }
.history-more[open] summary::after { content: " ▴"; }
.history-more .opened, .history-more[open] .closed { display: none; }
.history-more[open] .opened { display: inline; }.note { background: #f6f9fc; border-left: 3px solid var(--brand-2); padding: .5rem .7rem; border-radius: 0 6px 6px 0; white-space: pre-wrap; }

/* ---- login (navy page, logo above a white card) ------------------------------------- */
body.login-page { background: var(--brand) linear-gradient(160deg, #263a75 0%, #1d2d5c 60%, #4c8ab1 140%); min-height: 100vh; padding-bottom: 0; }
body.login-page .site-foot { border-top-color: rgba(255, 255, 255, .15); color: #c9d3ea; }
body.login-page .site-foot a { color: #c9d3ea; }
.login { max-width: 420px; margin: 6vh auto 0; text-align: center; }
.login .logo { width: 150px; height: 150px; display: block; margin: 0 auto 1rem; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .25)); }
.login.wide { max-width: 720px; }
.login code { font-size: .82em; overflow-wrap: anywhere; }
.login .logo-wc { width: 240px; height: auto; display: block; margin: 0 auto 1.25rem; }
.people-h { margin: 1rem 0 .1rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.login .card { padding: 1.5rem; text-align: left; border: 0; }
.login h1 { margin-bottom: .1rem; }
.people { list-style: none; margin: .75rem 0 0; padding: 0; }
.people li + li { margin-top: .4rem; }
.people button { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem;
  font: inherit; cursor: pointer; }
.people button:hover { border-color: var(--brand-2); background: #f4f8fc; }
.people button b { color: var(--brand); font-weight: 600; }

/* ---- admin -------------------------------------------------------------------------- */
.subnav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.subnav a { padding: .35rem .8rem; border-radius: 999px; background: #e6eef6; color: var(--brand); font-size: .88rem; font-weight: 500; }
.subnav a.on { background: var(--brand); color: var(--on-brand); }
.issues { color: #8c2020; font-size: .85rem; }
.actions.fixed { flex: 0 0 auto; margin-top: 0; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.mt { margin-top: 1rem; }
.inline { display: inline; margin: 0; }

/* ---- Webcafe theme: sign-in, superadmin and "Connect Microsoft 365" pages ---------------- */
body.wc {
  --brand: #0e1b38; --brand-2: #00b2fe; --focus: #00b2fe; --on-brand: #ffffff; --on-brand-2: #0e1b38;
  --wc-lime: #86c53c; --wc-sky: #ebf8ff; --ink: #1e293b; --muted: #475569;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
body.wc h1, body.wc h2, body.wc h3, body.wc .brand b { font-family: "Montserrat", system-ui, sans-serif; color: var(--brand); }
body.wc .topbar h1, body.wc .brand b { color: var(--on-brand); }
body.wc .btn { background: var(--wc-lime); color: var(--brand); border-radius: 999px; font-family: "Montserrat", system-ui, sans-serif; }
body.wc .btn:hover { background: var(--brand-2); filter: none; }
body.wc .btn.ghost { background: transparent; border: 2px solid var(--brand); }
body.wc .btn.ms { background: #2f2f2f; color: #fff; }
body.wc .who .av { background: var(--brand-2); color: var(--brand); }
body.wc.login-page { background: var(--wc-sky) linear-gradient(180deg, #ebf8ff 0%, #e0f2fe 100%); }
body.wc.login-page .site-foot { border-top-color: #bae6fd; color: var(--muted); }
body.wc.login-page .site-foot a { color: var(--muted); }
body.wc .login .card { box-shadow: 0 10px 30px rgba(14, 27, 56, .08); border: 1px solid #bae6fd; }
/* Sign-in page: navy intro panel + sign-in card (stacked on phones) */
body.signin-page { background: #fff; padding-bottom: 0; }
body.signin-page main { max-width: none; padding: 0; display: flex; }
body.signin-page .site-foot { max-width: none; border-top: 1px solid #e2e8f0; background: #fff; }
.signin { flex: 1; display: grid; grid-template-columns: 1fr; align-content: start; }
.signin-intro { background: #0e1b38 radial-gradient(120% 90% at 0% 100%, rgba(0, 178, 254, .28) 0%, rgba(0, 178, 254, 0) 60%);
  color: #fff; padding: 2rem 16px 2.25rem; }
.signin-intro .eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #93c5fd; }
.signin-intro .eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: #86c53c; }
body.wc .signin-intro h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 .8rem; letter-spacing: -.01em; }
.signin-intro .lead { color: #cbd5e1; font-size: 1.02rem; max-width: 34rem; margin: 0; }
.points { list-style: none; margin: 1.6rem 0 0; padding: 0; display: none; gap: 1rem; max-width: 34rem; }
.points li { display: flex; gap: .85rem; align-items: flex-start; color: #cbd5e1; font-size: .95rem; }
.points b { color: #fff; font-weight: 600; }
.pt-icon { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(134, 197, 60, .16); color: #86c53c; font-size: 1rem; }
.signin-panel { display: flex; align-items: center; justify-content: center; padding: 2rem 16px 2.5rem; background: #fff; }
.signin-card { width: 100%; max-width: 400px; text-align: center; }
.signin-card .logo-wc { width: 200px; height: auto; display: block; margin: 0 auto 1.75rem; }
.signin-card .notice, .signin-card .dev-picker, .signin-card .flash { text-align: left; }
body.wc .signin-card h2 { font-size: 1.5rem; margin: 0 0 1.1rem; }
.btn.block { display: flex; width: fit-content; min-width: 280px; max-width: 100%; margin: 0 auto;
  justify-content: center; padding: .85rem 1.5rem; font-size: 1rem; gap: .6rem; }
body.wc .btn.ms { border-radius: 8px; font-family: "Inter", system-ui, sans-serif; font-weight: 600; background: #2f2f2f; color: #fff; }
body.wc .btn.ms:hover { background: #1f1f1f; }
.signin-card .hint { color: var(--muted); font-size: .85rem; margin: .8rem 0 0; }
.notice { display: grid; gap: .25rem; padding: .9rem 1rem; border-radius: 8px; background: #ebf8ff; border: 1px solid #bae6fd; color: #0e1b38; font-size: .9rem; }
.notice span { color: var(--muted); }
.dev-picker { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e2e8f0; }
.dev-picker h3 { margin: 0 0 .25rem; font-size: 1rem; }
.admin-link { margin: 2rem 0 0; font-size: .8rem; color: var(--muted); }
.admin-link a { color: var(--muted); text-decoration: underline; }
@media (min-width: 900px) {
  .signin { grid-template-columns: 1.1fr 1fr; align-content: stretch; }
  .signin-intro { display: flex; flex-direction: column; justify-content: center; padding: 4rem clamp(2rem, 6vw, 6rem); }
  .points { display: grid; }
  .signin-panel { padding: 3rem 2rem; }
}

.wc-logo { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; }
.topbar .brand img.wc-logo { width: auto; height: 40px; }

/* Support view: a superadmin inside a customer's workspace */
.supportbar { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: center;
  background: #0e1b38; color: #fff; font-size: .82rem; padding: .4rem 16px; }
.supportbar button { font: inherit; font-weight: 600; background: #86c53c; color: #0e1b38; border: 0; border-radius: 999px; padding: .2rem .8rem; cursor: pointer; }

/* A customer without a logo: their initials in a circle */
.brand-mark { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-2); color: var(--on-brand-2); font-weight: 700; flex: none; }

/* Setup checklist on a new workspace's dashboard */
.checklist { margin-bottom: 1rem; border-left: 4px solid var(--brand-2); }
.setup { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .4rem; }
.setup li { display: flex; gap: .6rem; align-items: center; }
.setup .tick { width: 1.6rem; height: 1.6rem; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; background: #e6eef6; color: var(--brand); }
.setup li.done .tick { background: #1f8f4e; color: #fff; }
.setup li.done span:not(.tick) { color: var(--muted); text-decoration: line-through; }

/* Settings */
.sub2 { margin-top: -.25rem; }
.sub2 a { background: transparent; border: 1px solid var(--line); }
.sub2 a.on { background: var(--brand-2); color: var(--on-brand-2); border-color: var(--brand-2); }
input.copy { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; background: #f8fafc; }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .7rem; }
.steps li { padding-left: .2rem; }
input[type=color] { width: 4rem; height: 2.4rem; padding: .15rem; border: 1px solid #c8d2dd; border-radius: 8px; background: #fff; cursor: pointer; }
.brand-preview { padding: 0; overflow: hidden; }
.bp-head { background: var(--brand); color: var(--on-brand); display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; }
.bp-head img { width: 44px; height: 44px; object-fit: contain; }
.bp-tile { background: var(--brand-2); color: var(--on-brand-2); margin: .9rem; padding: .5rem .8rem; border-radius: 4px; font-weight: 600; font-size: .85rem; }
.brand-preview p { margin: 0 .9rem .9rem; }
