/* Dashboard overrides: brand tokens and base controls come from /brand.css. */
body { background: var(--rt-surface); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn { box-shadow: none; min-height: 44px; padding: .65rem 1.15rem; font-size: .875rem; }
.btn:hover { transform: none; }
.skip { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: white; padding: 1rem; }
.skip:focus { top: 1rem; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 2rem 1rem; border-right: 1px solid var(--rt-border); background: var(--rt-white); }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--font-heading); font-weight: 700; font-size: 1rem; }
.brand img { width: 32px; height: 32px; }
.sidebar nav { display: grid; gap: .35rem; margin-top: 2.5rem; }
.sidebar nav a { padding: .8rem 1rem; border-radius: var(--radius-md); color: var(--rt-text-muted); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: var(--rt-primary-soft); color: var(--rt-primary-hover); }
.main-area { min-width: 0; }
.topbar { min-height: 88px; padding: 1rem 2rem; border-bottom: 1px solid var(--rt-border); background: var(--rt-white); display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; }
.account { margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.account small { display: block; color: var(--rt-text-muted); }
.badge { padding: .5rem .8rem; border-radius: var(--radius-pill); background: var(--rt-primary-soft); color: var(--rt-primary-hover); font-size: .875rem; font-weight: 600; }
#content { padding: 2rem; max-width: 1440px; margin: auto; }
h1 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); line-height: 1.3; margin-bottom: .5rem; }
h2 { font-size: 1.05rem; line-height: 1.4; margin-bottom: 1rem; }
.lead, .muted { color: var(--rt-text-muted); }
.lead { margin-bottom: 1.75rem; }
.card { background: var(--rt-white); border: 1px solid var(--rt-border); border-radius: var(--radius-lg); padding: 1.5rem; margin-top: 1.25rem; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.stat { padding: 1.5rem; border: 1px solid var(--rt-border); border-radius: var(--radius-lg); background: var(--rt-white); }
.stat strong { display: block; font-family: var(--font-heading); font-size: clamp(1.2rem, 2vw, 1.8rem); margin: .55rem 0; font-variant-numeric: tabular-nums; }
.stat:first-child { background: var(--rt-primary); color: white; border-color: var(--rt-primary); }
.stat span, .stat small { font-size: .8rem; }
.form-grid { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
.field { display: grid; gap: .4rem; flex: 1 1 180px; font-size: .875rem; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--rt-border); background: var(--rt-white); border-radius: 10px; padding: .7rem .8rem; color: var(--rt-text); min-height: 44px; }
textarea { min-height: 120px; resize: vertical; }
input[type=number] { font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.stack { display: grid; gap: 1rem; }
.table-scroll { margin-top: 1rem; }
.table-scroll th, .table-scroll td { padding: .9rem .8rem; }
.table-scroll th:first-child, .table-scroll td:first-child { padding-left: 0; }
.table-scroll td { font-variant-numeric: tabular-nums; vertical-align: middle; }
.table-scroll caption { text-align: left; color: var(--rt-text-muted); margin-bottom: .5rem; }
.table-scroll .actions { min-width: 210px; }
.table-scroll input { width: 130px; }
.token { display: block; max-width: 260px; overflow-wrap: anywhere; white-space: normal; margin: .5rem 0; }
.danger { color: #a32020; }
.notice, .form-error { padding: .85rem 1rem; border-radius: 12px; background: var(--rt-primary-soft); margin: 1rem 0; overflow-wrap: anywhere; }
.form-error { background: #fff0f0; color: #982121; }
.form-error:empty, .notice:empty { display: none; }
.empty { padding: 1rem 0; color: var(--rt-text-muted); }
.pagination { margin-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.login-card { background: white; border: 1px solid var(--rt-border); border-radius: var(--radius-xl); width: min(460px, calc(100% - 2rem)); padding: 2.5rem; margin: 12vh auto; }
.login-card .brand { margin-bottom: 2rem; }
.login-card h1 { font-size: 1.6rem; }
.login-card .stack { margin-top: 1.5rem; }
.provider-mark { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 6px; font-weight: 700; }
.message { padding: 1rem; background: var(--rt-surface); border-radius: var(--radius-md); white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { background: var(--rt-primary-soft); }
.message strong { display: block; margin-bottom: .35rem; }
.chat { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
a.text-link { color: var(--rt-primary-hover); text-decoration: underline; }
.fine { font-size: .8rem; margin-top: .75rem; color: var(--rt-text-muted); }
@media (max-width: 720px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 1rem; border-right: 0; border-bottom: 1px solid var(--rt-border); }
  .sidebar nav { display: flex; overflow-x: auto; margin-top: 1rem; gap: .25rem; }
  .sidebar nav a { padding: .7rem .9rem; }
  .topbar { min-height: auto; padding: 1rem; gap: .65rem; }
  #content { padding: 1.5rem 1rem; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .stat { padding: 1rem 1.25rem; }
  .card { padding: 1.1rem; }
  .login-card { padding: 1.75rem; margin-top: 7vh; }
}
