/* Nexus design language, adapted to Themis's existing portal components. */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --control-height: 50px;
  --control-radius: 18px;
}
body, button, input, select, textarea { font-family: var(--font); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, textarea {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  border-color: #d6e0ed;
  font-size: 14px;
  background-color: #fff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(10,132,255,.10);
}
input[type="checkbox"], input[type="radio"] { min-height: auto; width: auto; accent-color: var(--accent); }
button:not(.arke-mobile-menu-btn):not(.arke-mobile-nav-backdrop), .btn {
  border-radius: 12px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 700;
}
button:not(.arke-mobile-menu-btn):not(.arke-mobile-nav-backdrop):not(.ghost):not(.secondary), .btn:not(.secondary):not(.ghost) {
  background: #0a84ff;
  border: 1px solid #0877bd;
  color: #fff;
  box-shadow: 0 8px 20px rgba(10,132,255,.22);
}
button:not(.arke-mobile-menu-btn):not(.arke-mobile-nav-backdrop):not(.ghost):not(.secondary):hover, .btn:not(.secondary):not(.ghost):hover { background: #0878dc; }
.btn.secondary { color: #fff; border-color: #202124; background: #202124; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.btn.secondary:hover { background: #000; color: #fff; }
.btn.ghost { color: var(--ink); background: #f0f2f5; border: 1px solid #e3e7ed; box-shadow: none; }
.btn.ghost:hover { background: #e7ebf0; color: var(--ink); }
:where(a, button):focus-visible { outline: 3px solid #0a84ff; outline-offset: 3px; }
.arke-sidebar { box-shadow: 12px 0 34px rgba(15,23,42,.08); }
.arke-sidebar-brand-text h3 { font-weight: 760; letter-spacing: -.04em; }
.arke-nav-item.active, .arke-nav-item:hover { background: rgba(15,23,42,.06); color: #111827; }
.arke-nav-item.active::before { background: #111827; }
.arke-sidebar-user { background: #f5f7fb; }
.themis-dashboard .topbar {
  position: relative;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid #bfd7f5;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eaf3ff;
  box-shadow: none;
}
.themis-dashboard .topbar h2 { color: #1d4ed8; max-width: 700px; }
.themis-dashboard .topbar span { color: #476b9d; }
.themis-dashboard .kpi-box { position: relative; overflow: hidden; padding: 21px 22px; min-height: 132px; border: 1px solid #e5ebf2; border-radius: 22px; }
.themis-dashboard .kpi-box::after { content: ''; position: absolute; width: 76px; height: 76px; right: -24px; top: -26px; border-radius: 50%; background: #edf6ff; pointer-events: none; }
.themis-dashboard .kpi-box h3, .themis-dashboard .kpi-box p { position: relative; z-index: 1; }
.themis-dashboard .kpi-box h3 { color: #6b7789; font-size: 11px; letter-spacing: .1em; }
.themis-dashboard .kpi-box p { color: #14243a; font-size: 35px; }
.card { min-width: 0; }
.public-body { min-height: 100dvh; }
.themis-auth-shell { width: min(482px, calc(100% - 32px)); padding: 42px 0; margin: auto; }
.themis-auth-card { padding: 30px; border-radius: 28px; }
.themis-login-brand { margin-bottom: 30px; }
.themis-auth-copy { margin-bottom: 24px; }
.themis-auth-copy h2 { font-size: clamp(31px, 5vw, 42px); }
.themis-auth-card form.stack { gap: 16px; }
.themis-signin-button { width: 100%; touch-action: manipulation; }
.themis-signin-button:hover, .themis-signin-button:active { transform: none; }
.themis-intake-entry { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px; border: 1px solid #cce8e3; border-radius: 18px; color: #145d54; background: #eefaf8; text-decoration: none; }
.themis-intake-entry:hover { background: #e2f6f2; color: #145d54; }
.themis-intake-entry strong, .themis-intake-entry small { display: block; }
.themis-intake-entry strong { color: var(--ink); font-size: 13.5px; }
.themis-intake-entry small { color: var(--muted); margin-top: 2px; font-size: 12.5px; }
.themis-intake-entry b { flex-shrink: 0; font-size: 13px; }
.public-footer { width: 100%; margin-top: auto; padding: 14px 18px 16px; border-top: 1px solid rgba(0,0,0,.08); background: #fff; text-align: center; }
.public-footer p { margin: 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 960px) {
  .themis-dashboard .topbar { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 26px; border-radius: 24px; }
  .themis-dashboard .topbar h2 { font-size: 28px; }
  .themis-portal .arke-content > .grid:not(.kpi) { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
  .themis-auth-shell { width: calc(100% - 24px); padding: 24px 0; }
  .themis-auth-card { padding: 22px; border-radius: 24px; }
  .themis-intake-entry { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
