/* relai-theme v1.0.1 sha256:5d926cfe2d2fd58ab1bf57accaae63c952a7be532a383f3198a09f1d691c0ca1 | Copied from RELAI/brand-assets. Needs relai-tokens.css. Every selector starts .rth-, so importing it changes nothing until you use a class. */
:where(.rth-btn,.rth-input,.rth-field,.rth-note,.rth-badge,.rth-card,.rth-menu,.rth-dialog,.rth-toast,.rth-login,.rth-login *,.rth-shell,.rth-side,.rth-bar) { box-sizing: border-box; }

/* Buttons */
.rth-btn { font: 600 var(--rth-fs-14)/1 var(--rth-font-body); height: 40px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: var(--rth-r-control); display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--rth-t-hover) var(--rth-ease), border-color var(--rth-t-hover) var(--rth-ease), transform var(--rth-t-press) var(--rth-ease); }
.rth-btn:active { transform: scale(.98); }
.rth-primary { background: var(--rth-blue-600); color: var(--rth-white); }
.rth-primary:hover { background: var(--rth-blue-700); }
.rth-second { background: var(--rth-white); color: var(--rth-blue-600); border-color: var(--rth-blue-400); }
.rth-second:hover { background: var(--rth-blue-50); border-color: var(--rth-blue-600); }
.rth-quiet { background: transparent; color: var(--rth-blue-600); }
.rth-quiet:hover { background: var(--rth-blue-50); }
.rth-danger { background: var(--rth-bad); color: var(--rth-white); }
.rth-danger:hover { background: #991B1B; }
.rth-google { background: var(--rth-white); color: var(--rth-ink); border-color: var(--rth-muted); }
.rth-google:hover { background: var(--rth-blue-50); border-color: var(--rth-blue-600); }
.rth-sm { height: 36px; padding: 0 12px; }
.rth-lg { height: 48px; width: 100%; font-size: var(--rth-fs-16); }
.rth-btn:disabled, .rth-btn[aria-disabled="true"] { background: var(--rth-ground); color: var(--rth-muted); border-color: var(--rth-line); cursor: not-allowed; transform: none; }
.rth-btn:focus-visible, .rth-input:focus-visible, .rth-tab:focus-visible, .rth-nav:focus-visible, .rth-sort:focus-visible { outline: 2px solid var(--rth-blue-600); outline-offset: 2px; }
.rth-on-blue:focus-visible { outline-color: var(--rth-white); }

/* Inputs, messages, badges */
.rth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body); color: var(--rth-ink); }
.rth-label { font-weight: 600; }
.rth-input { font: 400 var(--rth-fs-16)/1.2 var(--rth-font-body); color: var(--rth-ink); background: var(--rth-white); height: 44px; width: 100%; min-width: 0; padding: 0 12px; border: 1px solid var(--rth-input-line); border-radius: var(--rth-r-control); }
.rth-input::placeholder { color: var(--rth-muted); opacity: 1; }
.rth-input:hover { border-color: var(--rth-blue-600); }
.rth-input[aria-invalid="true"] { border-color: var(--rth-bad); }
.rth-err { color: var(--rth-bad-text); }
.rth-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--rth-r-control); font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body); }
.rth-note > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.rth-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: var(--rth-r-pill); font: 500 var(--rth-fs-12)/1 var(--rth-font-body); white-space: nowrap; }
.rth-badge > svg { width: 12px; height: 12px; flex: none; }
.rth-ok { background: var(--rth-ok-tint); color: var(--rth-ok-text); }
.rth-warn { background: var(--rth-warn-tint); color: var(--rth-warn-text); }
.rth-bad { background: var(--rth-bad-tint); color: var(--rth-bad-text); }
.rth-info { background: var(--rth-info-tint); color: var(--rth-info-text); }
.rth-neutral { background: var(--rth-ground); color: var(--rth-muted); }

/* Cards, tables, tabs, states */
.rth-card { padding: 16px; background: var(--rth-white); border: 1px solid var(--rth-line); border-radius: var(--rth-r-card); }
.rth-tablebox { background: var(--rth-white); border: 1px solid var(--rth-line); border-radius: var(--rth-r-card); overflow-x: auto; }
.rth-table { width: 100%; border-collapse: collapse; font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body); color: var(--rth-ink); }
.rth-table > * > tr > th, .rth-table > * > tr > td { height: 42px; padding: 0 12px; text-align: left; border-bottom: 1px solid var(--rth-line); }
.rth-table > * > tr > th { background: var(--rth-blue-50); font-weight: 600; }
.rth-table > tbody > tr:hover { background: var(--rth-blue-50); }
.rth-num { font-variant-numeric: tabular-nums; }
.rth-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; min-height: 42px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.rth-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body); color: var(--rth-ink); }
.rth-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--rth-line); }
.rth-tab { font: 500 var(--rth-fs-14)/1 var(--rth-font-body); min-height: 40px; padding: 0 12px; background: none; color: var(--rth-muted); border: 0; border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.rth-tab[aria-selected="true"] { color: var(--rth-blue-600); border-color: var(--rth-blue-600); font-weight: 600; }
.rth-tab:focus-visible { outline-offset: -3px; }
.rth-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; text-align: center; font: 400 var(--rth-fs-14)/1.5 var(--rth-font-body); color: var(--rth-muted); }
.rth-state > svg { width: 32px; height: 32px; color: var(--rth-blue-500); }
.rth-state > strong { font: 500 var(--rth-fs-18)/1.3 var(--rth-font-display); color: var(--rth-ink); }
.rth-skeleton { height: 12px; border-radius: 6px; background: var(--rth-ground); animation: rth-pulse 1.4s ease-in-out infinite alternate; }
.rth-spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--rth-line); border-top-color: var(--rth-blue-600); animation: rth-turn 800ms linear infinite; }

/* Overlays */
.rth-menu { padding: 6px; min-width: 200px; background: var(--rth-white); border-radius: var(--rth-r-card); box-shadow: var(--rth-shadow); transform-origin: top right; animation: rth-menu var(--rth-t-menu) var(--rth-ease); }
.rth-dialog { width: 100%; max-width: 400px; padding: 24px; color: var(--rth-ink); background: var(--rth-white); border: 0; border-radius: var(--rth-r-panel); box-shadow: var(--rth-shadow); animation: rth-rise var(--rth-t-dialog) var(--rth-ease); }
.rth-dialog::backdrop { background: rgba(14, 27, 65, .5); }
.rth-toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--rth-blue-900); color: var(--rth-white); border-radius: var(--rth-r-control); box-shadow: var(--rth-shadow); font: 400 var(--rth-fs-14)/1.4 var(--rth-font-body); animation: rth-rise var(--rth-t-dialog) var(--rth-ease); }

/* Page shell: white sidebar 232px, top bar 56px */
.rth-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--rth-blue-50); }
.rth-side { display: flex; flex-direction: column; background: var(--rth-white); border-right: 1px solid var(--rth-line); }
.rth-brand { display: flex; align-items: center; gap: 12px; height: 72px; padding: 0 15px; border-bottom: 1px solid var(--rth-line); font: 500 var(--rth-fs-16)/1 var(--rth-font-display); color: var(--rth-muted); }
.rth-brand > img, .rth-brand > svg { width: 119px; height: auto; flex: none; }
.rth-nav { display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0 12px 2px; padding: 0 12px; border-radius: var(--rth-r-control); font: 500 var(--rth-fs-14)/1.2 var(--rth-font-body); color: var(--rth-ink); text-decoration: none; }
.rth-nav:hover { background: var(--rth-blue-50); }
.rth-nav[aria-current="page"] { background: var(--rth-blue-100); color: var(--rth-blue-700); font-weight: 600; }
.rth-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; background: var(--rth-white); border-bottom: 1px solid var(--rth-line); }
@media (max-width: 720px) { .rth-shell { grid-template-columns: minmax(0, 1fr); } .rth-side { display: none; } .rth-bar { padding: 0 16px; } }

/* Login: direction A */
.rth-login { display: grid; grid-template-columns: 44% minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--rth-white); color: var(--rth-ink); font: 400 var(--rth-fs-16)/1.5 var(--rth-font-body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.rth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 40px; background: var(--rth-blue-600); color: var(--rth-white); }
.rth-tool { position: relative; padding: 8px 12px; border-radius: var(--rth-r-control); background: var(--rth-yellow); color: var(--rth-blue-700); font: 600 var(--rth-fs-14)/1 var(--rth-font-display); }
.rth-say { position: relative; max-width: 18ch; margin: 16px 0 0; font: 400 var(--rth-fs-24)/1.3 var(--rth-font-display); text-wrap: balance; }
.rth-motif { position: absolute; pointer-events: none; width: min(150%, 88vh); max-width: none; height: auto; right: -22%; top: -17vh; }
.rth-ring { --w: calc(var(--i) * 68px); stroke-linejoin: round; transform-origin: 40% 45%; }
.rth-ring > .rth-l { fill: var(--rth-blue-400); stroke: var(--rth-blue-400); stroke-width: calc(var(--w) + 4px); }
.rth-ring > .rth-g { fill: var(--rth-blue-600); stroke: var(--rth-blue-600); stroke-width: max(0px, calc(var(--w) - 1px)); }
.rth-open .rth-ring { animation: rth-ring var(--rth-t-ring) var(--rth-ease) both; animation-delay: calc(var(--i) * var(--rth-t-ring-step)); }
.rth-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px; min-width: 0; }
.rth-box { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.rth-logo { width: 150px; height: auto; margin-bottom: 24px; }
.rth-login .rth-title, .rth-title { margin: 0; color: var(--rth-ink); font: 500 var(--rth-fs-24)/1.2 var(--rth-font-display); }
.rth-text { margin: 0; color: var(--rth-muted); overflow-wrap: anywhere; }
.rth-foot { margin: 0; color: var(--rth-muted); font-size: var(--rth-fs-14); }
@media (max-width: 720px) {
  .rth-login { grid-template-columns: minmax(0, 1fr); grid-template-rows: 190px minmax(0, 1fr); }
  .rth-art { padding: 20px 24px; }
  .rth-motif { width: min(100%, 420px); right: -44%; top: -120px; }
  .rth-say { margin-top: 12px; font-size: var(--rth-fs-18); }
  .rth-form { padding: 24px; justify-content: flex-start; }
  .rth-box { max-width: 420px; }
  .rth-logo { width: 128px; margin-bottom: 12px; }
}

@keyframes rth-ring { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rth-menu { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
@keyframes rth-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes rth-turn { to { transform: rotate(1turn); } }
@keyframes rth-pulse { to { opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  .rth-btn, .rth-open .rth-ring, .rth-menu, .rth-dialog, .rth-toast, .rth-skeleton, .rth-spin { animation: none; transition: none; }
  .rth-btn:active { transform: none; }
  .rth-spin { display: none; }
}
