/* The shell, login and form tokens come from the shared console styles. */
#app:not(.auth-wrap) { max-width: 1440px; padding: 24px 32px 48px; }
#app h1 { font-size: 22px; margin-bottom: 18px; }
#app h2 { font-size: 16px; margin: 16px 0 10px; }
#app h3 { font-size: 16px; margin: 0; }
.panel, .metric { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.panel .row h2 { margin: 0; }
.panel + .panel { margin-top: 14px; }
.metrics, .cards { display: grid; gap: 14px; margin: 18px 0; }
.metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.cards { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.cards .panel { margin: 0; }
.metric strong { display: block; margin-top: 5px; font-size: 24px; }
small, .muted, .metric span, .empty { color: var(--c-text-secondary); }
.pill, .warn:not(:empty) { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-sm); font-size: 12px; }
.pill { background: var(--c-ok-bg); color: var(--c-ok); border: 1px solid var(--c-ok-border); }
.warn:not(:empty) { color: var(--c-warn); background: var(--c-warn-bg); }
.row, .filters, .days { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row { justify-content: space-between; }
.record { padding: 12px 0; border-bottom: 1px solid var(--c-divider); }
.record:last-child { border: 0; }
.record p { margin: 3px 0; }
#app:not(.auth-wrap) button, #app:not(.auth-wrap) select, #app:not(.auth-wrap) textarea, #app:not(.auth-wrap) input:not([type=checkbox]) {
  font: inherit; color: inherit; padding: 6px 10px; border: 1px solid var(--c-border-strong); border-radius: var(--r-md); background: var(--c-surface); max-width: 100%;
}
#app button { cursor: pointer; }
#app button.primary, #app [data-follow] { color: var(--c-surface); background: var(--c-primary); }
#app button:disabled { opacity: .6; cursor: default; }
.filters { margin: 10px 0; }
.filters label, .days label { display: inline-flex; align-items: center; gap: 5px; }
.stack { display: grid; gap: 8px; }
.window { min-width: 0; margin: 8px 0; border: 1px solid var(--c-border); border-radius: var(--r-md); }
.bot-grid .panel > * + * { margin-top: 10px; }
.quote { border-left: 3px solid var(--c-primary); background: var(--c-bg); padding: 8px 12px; }
.detail h1 { font-size: 18px; }
.detail .panel { padding: 10px 0; border: 0; }
.detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; }
.detail summary { color: var(--c-primary); cursor: pointer; }
#app .pick { display: grid; width: 100%; text-align: left; gap: 3px; border: 0; border-radius: 0; border-bottom: 1px solid var(--c-divider); padding: 12px; }
#app .pick[aria-current] { background: var(--c-selected); }
.pick .l2, .pick .l3 { color: var(--c-text-secondary); }
.turn { display: flex; width: 100%; margin: 5px 0; gap: 8px; text-align: left; }
audio, textarea { width: 100%; }
#notice:not([hidden]) { position: fixed; z-index: 45; right: 20px; bottom: 20px; background: var(--c-primary-active); color: var(--c-surface); border-radius: var(--r-md); padding: 10px 16px; }
@media (max-width: 800px) {
  #app:not(.auth-wrap) { padding: 16px 14px 40px; }
  .metrics, .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cards { grid-template-columns: 1fr; }
  .filters { gap: 6px; }
}
.followups { border-collapse: collapse; width: 100%; margin-top: 12px; text-align: left; }
.followups th, .followups td { border-bottom: 1px solid var(--c-divider); padding: 10px 8px; }
.followups th { color: var(--c-text-secondary); font-size: 13px; font-weight: 500; }
.followups tr:last-child td { border: 0; }
.followups td:first-child, .followups td:last-child { white-space: nowrap; }
@media(max-width:740px) {
  .followups, .followups tbody { display: block; }
  .followups thead { position: absolute; clip-path: inset(50%); }
  .followups tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-top: 1px solid var(--c-divider); }
  .followups td { border: 0; padding: 3px 0; }
  .followups td:nth-child(4) { grid-column: 1 / -1; }
}
