/* Workbench: dense by design. Staff read queues all day; the home page is the sparse one. */
body { font-size: .9rem; }
.loading { padding: 4rem 1.25rem; text-align: center; color: var(--ink-3); }
.dim { color: var(--ink-3); }
.small { font-size: .82rem; }
.num { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.file { font-family: var(--mono); font-size: .82rem; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--action); cursor: pointer; text-decoration: underline; }

/* sign-in */
.signin { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.25rem; }
.signin h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 2rem 0 .6rem; }
.signin .sub { color: var(--ink-2); font-size: 1rem; margin-bottom: 1.5rem; }
.signin .sub.small { font-size: .9rem; margin-top: 2rem; }
.desks { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 34rem) { .desks { grid-template-columns: 1fr; } }
.desk { text-align: left; font: inherit; cursor: pointer; background: var(--surface); color: var(--ink);
        border: 1px solid var(--line); border-radius: .6rem; padding: 1.1rem 1.2rem; }
.desk:hover { border-color: var(--action); box-shadow: var(--shadow); }
.desk b { display: block; font-family: var(--serif); font-size: 1.25rem; }
.desk span { display: block; color: var(--ink-2); font-size: .92rem; margin: .15rem 0 .7rem; }
.desk i { font-style: normal; font-weight: 600; font-size: .88rem; color: var(--action); }
.signin details { margin-top: 1.5rem; color: var(--ink-2); }
.signin summary { cursor: pointer; }
.manual { display: flex; gap: .75rem; flex-wrap: wrap; align-items: end; margin-top: .9rem; }
.manual label { display: grid; gap: .25rem; font-size: .85rem; }

input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--ink-3);
                          border-radius: .35rem; padding: .45rem .6rem; }
textarea { width: 100%; resize: vertical; }

/* shell */
.shell { display: grid; grid-template-columns: 14.5rem 1fr; min-height: calc(100vh - 2.2rem); }
aside { background: var(--navy); color: var(--navy-ink); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; align-self: start; }
aside .mark svg rect { fill: #f2efe8; }
aside .mark svg path { stroke: #1b2a41; }
aside nav { display: grid; gap: .2rem; }
aside nav a { color: inherit; text-decoration: none; padding: .5rem .7rem; border-radius: .4rem; opacity: .8; font-size: .95rem; }
aside nav a:hover { opacity: 1; background: rgba(255, 255, 255, .07); }
aside nav a.on { opacity: 1; background: rgba(255, 255, 255, .13); font-weight: 600; box-shadow: inset .2rem 0 0 var(--amber); }
.me { margin-top: auto; display: grid; gap: .3rem; font-size: .85rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1rem; }
.me b { font-family: var(--serif); font-size: 1.05rem; }
.me span { opacity: .7; font-family: var(--mono); font-size: .8rem; }
.me .switch { display: grid; gap: .25rem; margin-top: .6rem; opacity: .9; }
.me select { width: 100%; padding: .35rem .4rem; font-size: .85rem; }
.me .linkish { color: inherit; opacity: .75; justify-self: start; margin-top: .4rem; }
main { padding: 1.75rem 2rem 4rem; min-width: 0; max-width: 78rem; }
@media (max-width: 52rem) {
  .shell { grid-template-columns: 1fr; }
  aside { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .75rem 1rem; position: static; height: auto; }
  aside nav { display: flex; }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; align-items: center; gap: .75rem; }
  .me b, .me .switch { display: none; }
  main { padding: 1.25rem 1rem 3rem; }
}

header.page { margin-bottom: 1.25rem; }
header.page h1 { font-size: 1.7rem; display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
header.page h1 .chip { font-family: var(--sans); font-size: .8rem; }
header.page p { color: var(--ink-2); margin-top: .3rem; font-size: 1rem; max-width: 52rem; }
.crumb { margin-bottom: .75rem; }
.crumb a { text-decoration: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; margin-bottom: 1.1rem; overflow: hidden; }
.card-head { padding: .85rem 1rem .7rem; }
.card-head h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: 0; display: flex; align-items: center; gap: .5rem; }
.card-head p { color: var(--ink-3); font-size: .85rem; margin-top: .15rem; }
.count { font-size: .75rem; font-weight: 700; background: var(--sunk); color: var(--ink-2); border-radius: 999px; padding: .1rem .5rem; }
.empty { padding: .2rem 1rem 1rem; color: var(--ink-3); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
     font-weight: 700; padding: .45rem 1rem; background: var(--sunk); border-block: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .6rem 1rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-open] { cursor: pointer; }
tr[data-open]:hover td { background: var(--action-soft); }
.note { color: var(--ink-2); font-size: .85rem; margin-top: .25rem; max-width: 34rem; }
p.note { padding: 0 1rem .9rem; }

.stages { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.stages a { text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
            border-radius: .5rem; padding: .5rem .85rem; font-size: .82rem; min-width: 5.2rem; }
.stages a b { display: block; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); line-height: 1.1; }
.stages a.on { border-color: var(--ink); box-shadow: inset 0 -.2rem 0 var(--amber); }

/* application page */
.stepper { list-style: none; display: flex; margin: 0 0 1.1rem; padding: 0; counter-reset: s; font-size: .82rem; overflow-x: auto; }
.stepper li { flex: 1; min-width: 5.5rem; padding-top: .9rem; border-top: .25rem solid var(--line); color: var(--ink-3); position: relative; }
.stepper li.past { border-color: var(--green); color: var(--ink-2); }
.stepper li.now { border-color: var(--amber); color: var(--ink); font-weight: 700; }
.side { margin: -.4rem 0 1.1rem; color: var(--ink-2); }
.next { border-left: .3rem solid var(--amber); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.next .actions { padding: 0 1rem 1rem; }
td .actions { justify-content: flex-end; min-width: 11rem; }
.inline { flex-basis: 100%; display: grid; gap: .6rem; background: var(--sunk); border-radius: .5rem; padding: .8rem; margin-top: .3rem; max-width: 34rem; text-align: left; }
.inline label { display: grid; gap: .25rem; font-size: .85rem; font-weight: 600; }
.inline .row { display: flex; gap: .5rem; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
         border-radius: .6rem; overflow: hidden; margin: 0 0 1.1rem; }
@media (max-width: 60rem) { .facts { grid-template-columns: 1fr 1fr; } }
.facts div { background: var(--surface); padding: .8rem 1rem; }
.facts dt { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.facts dd { margin: .2rem 0 0; font-size: 1rem; font-weight: 600; }
.facts small { display: block; font-weight: 400; color: var(--ink-2); font-size: .82rem; margin-top: .15rem; }
.cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.1rem; align-items: start; }
@media (max-width: 72rem) { .cols { grid-template-columns: 1fr; } }

.ai { margin: 0 1rem 1rem; border: 1px solid var(--line); border-left: .3rem solid var(--amber); border-radius: var(--radius); padding: .85rem 1rem; background: var(--paper); }
.ai.confirmed { border-left-color: var(--green); }
.ai.overridden { border-left-color: var(--red); }
.ai-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ai-head strong { font-size: 1.05rem; margin-right: .2rem; }
.ai small { color: var(--ink-3); display: block; }
.ai .missing { margin: .6rem 0 .3rem; }
.ai .actions { margin-top: .8rem; }
.meter { height: .4rem; border-radius: 999px; background: var(--line-2); margin: .7rem 0 .3rem; overflow: hidden; max-width: 22rem; }
.meter i { display: block; height: 100%; background: var(--amber); border-radius: inherit; }

.timeline { list-style: none; margin: 0; padding: 0 1rem 1rem 1.1rem; }
.timeline li { position: relative; padding: 0 0 .9rem 1.1rem; border-left: 2px solid var(--line); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -.4rem; top: .3rem; width: .65rem; height: .65rem; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 .2rem var(--surface); }
.timeline li.success::before { background: var(--green); }
.timeline li.warning::before { background: var(--amber); }
.timeline li.error::before { background: var(--red); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--ink-3); font-size: .82rem; }

.done, .refused { border-radius: .5rem; padding: .7rem 1rem; margin-bottom: 1.1rem; }
.done { background: var(--green-soft); color: var(--green); font-weight: 600; }
.refused { background: var(--red-soft); color: var(--ink); border-left: .3rem solid var(--red); }
.refused b { color: var(--red); }
.refused .rule { display: block; font-family: var(--mono); font-size: .78rem; color: var(--ink-2); margin-top: .25rem; }

.legal-bar { border-top: 1px solid var(--line); background: var(--surface); padding: 1rem 1.25rem; font-size: .78rem; color: var(--ink-3); position: relative; z-index: 1; }
.legal-bar p { max-width: 70rem; margin: 0 auto; }
