/* u89-alice-ui — the "Alice" section. Cobalt Paper: hairline cards, tabular
   numerals, cobalt for anything clickable, burnt orange only to say "look at
   this", green/red for money and outcomes. .al-* only; nothing here restyles
   another view. */
#view-alice { --al-teal: #0E6B67; --al-teal-soft: #DDF1EF; }
.main > #alTabs, .main > #alNotices, .main > #alPanel { max-width: 1240px; }
#alTabs { margin: -6px 0 18px; flex-wrap: wrap; }
.al-tabcount { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: var(--r-pill); background: var(--amber-soft); color: var(--amber); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
#alSub { display: inline-flex; align-items: center; gap: 8px; }
.al-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: 0 0 auto; }
.al-dot.green { background: var(--green); } .al-dot.red { background: var(--red); } .al-dot.amber { background: var(--amber); }
#alPanel { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
#alPanel > * { min-width: 0; }

/* answers from Alice */
#alNotices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
#alNotices:empty { display: none; }
.al-notice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.al-notice > span { flex: 1; min-width: 0; }
.al-notice.ok { background: var(--green-soft); border-color: transparent; color: var(--green); }
.al-notice.bad { background: var(--red-soft); border-color: transparent; color: var(--red); }
.al-notice .ti { margin-top: 2px; }
.al-notice-msg { color: var(--text); margin-left: 6px; }
.al-x { background: none; border: 0; cursor: pointer; color: inherit; padding: 2px; border-radius: 6px; display: inline-flex; opacity: .7; }
.al-x:hover { opacity: 1; background: rgba(0, 0, 0, .06); }

.al-sent { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.al-spin { animation: al-spin 1.1s linear infinite; }
@keyframes al-spin { to { transform: rotate(360deg); } }

/* banner */
.al-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); }
.al-banner > .ti { font-size: 24px; }
.al-banner > div:first-of-type { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-banner b { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.02em; }
.al-banner span { font-size: 13px; color: var(--text-2); }
.al-banner.green { background: var(--green-soft); border-color: transparent; } .al-banner.green > .ti, .al-banner.green b { color: var(--green); }
.al-banner.red { background: var(--red-soft); border-color: transparent; } .al-banner.red > .ti, .al-banner.red b { color: var(--red); }
.al-banner.amber { background: var(--amber-soft); border-color: transparent; } .al-banner.amber > .ti, .al-banner.amber b { color: var(--amber); }
.al-banner.muted > .ti { color: var(--ink-3); }
.al-banner code { font-family: var(--font-mono); font-size: 12px; }
.al-banner-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.al-big { height: 40px; padding: 0 18px; font-size: 14px; font-weight: 600; }

/* tiles */
.al-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.al-tile { padding: 14px 16px; border-right: 1px solid var(--border); min-width: 0; }
.al-tile:last-child { border-right: 0; }
.al-k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; margin-bottom: 4px; }
.al-v { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.al-tiles.small .al-v { font-size: 16px; letter-spacing: -0.01em; }
.al-note { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.al-tile.attn .al-v { color: var(--amber); } .al-tile.bad .al-v { color: var(--red); }
@media (max-width: 1100px) { .al-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .al-tile:nth-child(3n) { border-right: 0; } .al-tile:nth-child(n+4) { border-top: 1px solid var(--border); } }

/* cards, lists, tables */
.al-card { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.al-card > h3 { margin: 0; padding: 11px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.al-hint { font-family: var(--font-body); font-weight: 400; font-size: 12.5px; color: var(--ink-3); letter-spacing: 0; }
.al-right { margin-left: auto; }
.al-card-foot { padding: 10px 16px; border-top: 1px solid var(--border); }
.al-list { list-style: none; margin: 0; padding: 0; }
.al-list > li { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.al-list > li:last-child { border-bottom: 0; }
.al-grow { flex: 1; min-width: 0; }
.al-meta { font-size: 12px; color: var(--ink-3); }
.al-nowrap { white-space: nowrap; }
.al-code { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); background: var(--sunken); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.al-list b + .al-code { margin-left: 8px; }
.al-empty { padding: 18px 16px; color: var(--ink-3); font-size: 13px; }
.al-scroll { overflow-x: auto; }
table.al-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.al-table th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.al-table th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; color: var(--ink-3); max-width: 190px; }
.al-table td { padding: 9px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.al-table tr:last-child td { border-bottom: 0; }
.al-tick { text-align: left; }
.al-yes { color: var(--green); } .al-no { color: var(--red); }
.pill.al-ok { background: var(--green-soft); color: var(--green); }
.pill.al-bad { background: var(--red-soft); color: var(--red); }
.pill.al-warn { background: var(--amber-soft); color: var(--amber); }
.pill.al-info { background: var(--accent-soft); color: var(--accent-ink); }
.pill.al-muted { background: var(--sunken); color: var(--ink-3); }
.al-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.al-toggle { font-size: 12.5px; }
.btn-ghost.danger { color: var(--red); }
.btn-ghost.danger:hover { border-color: var(--red); }

/* approvals */
.al-group { display: flex; flex-direction: column; gap: 12px; }
.al-group > h2 { margin: 0; }
.al-job { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.al-job-h { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.al-batch { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.al-batch-head { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.al-batch-head > div:first-child { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.al-batch-head b { font-size: 14px; }
.al-routine { width: 100%; border: 1px solid var(--border); border-radius: var(--r); }
.al-routine > li { padding: 7px 12px; font-size: 12.5px; }
.al-narr { font-size: 12.5px; color: var(--ink-3); }
.al-props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; }
@media (max-width: 1100px) { .al-props { grid-template-columns: 1fr; } }
.al-prop { border: 1px solid var(--border); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.al-prop-top { display: flex; align-items: flex-start; gap: 12px; }
.al-amt { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 96px; }
.al-amt.neg { color: var(--red); } .al-amt.pos { color: var(--green); }
.al-prop-main { flex: 1; min-width: 0; }
.al-payee { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.al-prop-to { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.al-prop-to .ti { color: var(--ink-4); }
.pill.al-vat { background: var(--sunken); color: var(--text-2); }
.pill.al-class.c1 { background: var(--green-soft); color: var(--green); }
.pill.al-class.c2 { background: var(--al-teal-soft); color: var(--al-teal); }
.pill.al-class.c3 { background: var(--accent-soft); color: var(--accent-ink); }
.pill.al-class.c4 { background: var(--amber-soft); color: var(--amber); }
.pill.al-class.c5 { background: var(--red-soft); color: var(--red); }
.al-pnote, .al-query { font-size: 13px; color: var(--text-2); background: var(--bg); border-radius: var(--r); padding: 8px 10px; }
.al-query { background: var(--amber-soft); color: var(--text); }
.al-query .al-k { color: var(--amber); display: block; }
.al-why { font-size: 12px; color: var(--ink-3); }
.al-lines { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.al-lines td { padding: 3px 0; border-bottom: 1px solid var(--border); } .al-lines td.num { text-align: right; font-variant-numeric: tabular-nums; }
.al-prop-act { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.al-prop-act textarea { flex: 1; min-height: 32px; height: 32px; padding: 6px 10px; resize: vertical; }
.al-gate { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.al-err { color: var(--red); }
.al-err:empty { display: none; }
.al-pack { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); }
.al-pack > .ti { font-size: 20px; color: var(--ink-3); }
.al-pack .al-grow { display: flex; flex-direction: column; gap: 2px; }

/* clients, people */
.al-clients { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .al-clients { grid-template-columns: 1fr; } }
.al-client { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; min-width: 0; }
.al-client-h { display: flex; justify-content: space-between; gap: 12px; width: 100%; }
.al-client-h h3, .al-person h3 { margin: 0 0 2px; font-size: 15px; }
.al-tags { display: flex; gap: 6px; flex: 0 0 auto; }
.al-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; width: 100%; }
.al-facts.wide { padding: 14px 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.al-facts .al-span { grid-column: 1 / -1; }
.al-facts dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); font-weight: 600; }
.al-facts dd { margin: 2px 0 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.al-facts small { color: var(--ink-3); font-size: 12px; }
.al-missing { color: var(--amber); }
.al-jobs { display: flex; gap: 6px; flex-wrap: wrap; }
.al-fields { width: 100%; border: 1px solid var(--border); border-radius: var(--r); }
.al-fields > li { padding: 6px 12px; font-size: 12.5px; }
.al-client-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; padding-top: 12px; border-top: 1px solid var(--border); margin-top: auto; }
.al-client-act .btn-small { margin-left: 0; }
.al-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .al-people { grid-template-columns: 1fr; } }
.al-person { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.al-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.al-contact { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.al-contact .ti { color: var(--ink-4); font-size: 14px; }

/* passwords, updates */
.al-restart { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.al-restart .al-grow { display: flex; flex-direction: column; gap: 2px; }
.al-secrets .al-grow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.al-upload { display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
.al-upload + .al-list { border-top: 1px solid var(--border); }
.al-tests { font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; display: block; background: var(--bg); padding: 8px 10px; border-radius: var(--r); }

/* dialogs */
.al-modal .modal.al-modal-narrow { width: min(520px, 100%); }
.al-modal .modal.al-modal-wide { width: min(880px, 100%); }
.al-modal .modal-header { align-items: center; }
.al-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.al-modal-foot .form-msg { margin-right: auto; }
.al-form { display: flex; flex-direction: column; gap: 12px; }
.al-form h4 { margin: 8px 0 0; font-family: var(--font-display); font-size: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.al-form h4:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.al-form p { margin: 0; }
.al-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 720px) { .al-grid2 { grid-template-columns: 1fr; } }
.al-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--text-2); min-width: 0; }
.al-field input, .al-field select { width: 100%; }
.al-field small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.al-check { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.al-rep { display: flex; flex-direction: column; gap: 6px; }
.al-rep-h { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.al-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.al-row input, .al-row select { flex: 1; min-width: 0; }
.al-row .al-x { color: var(--ink-3); }

.al-field input[type="month"] { height: 32px; padding: 0 10px; font-family: var(--font-body); font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); }

/* u107-alice-auto-ui — what Update 107 adds to the Alice section: the wizard, signed updates, the audit mirror and the alarms */
.al-stale { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; margin-left: 8px; border-radius: var(--r-pill); background: var(--amber-soft); color: var(--amber); font-size: 12px; font-weight: 600; }
.al-sent.al-late { background: var(--amber-soft); color: var(--amber); }
.al-soon { opacity: .6; cursor: not-allowed; display: inline-flex; flex-direction: column; align-items: flex-start; height: auto; padding: 4px 10px; line-height: 1.2; }
.al-soon small { font-size: 10.5px; font-weight: 400; }
.al-onb { margin-bottom: 14px; }
.al-orgs { display: flex; flex-direction: column; gap: 6px; }
.al-org { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-size: 13.5px; }
.al-org:hover { border-color: var(--accent-line); }
.al-org input { margin-top: 3px; flex: 0 0 auto; }
.al-org span { min-width: 0; overflow-wrap: anywhere; }
.al-org small { display: block; color: var(--ink-3); font-size: 12px; font-weight: 400; }
.al-q { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 14px 0 4px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.al-q legend { font-family: var(--font-display); font-size: 15px; font-weight: 700; padding: 0; float: left; width: 100%; margin-bottom: 4px; overflow-wrap: anywhere; }
.al-q > * { clear: both; }
.al-qtext { width: 100%; box-sizing: border-box; margin-top: 2px; }
.al-effect { margin-top: 6px; font-size: 12.5px; color: var(--amber); background: var(--amber-soft); border-radius: var(--r); padding: 5px 9px; display: inline-flex; gap: 6px; align-items: center; overflow-wrap: anywhere; }
.al-upload2 label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.al-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.al-card-body + .al-scroll, .al-card-body + .al-empty { border-top: 1px solid var(--border); }
@media (max-width: 520px) {
  .al-banner { flex-wrap: wrap; } .al-banner-actions { width: 100%; }
  .al-upload2 { flex-direction: column; align-items: stretch; } .al-upload2 input[type="file"] { max-width: 100%; }
}
