:root {
  --m-red: #b5121b;
  --m-red-dark: #870b13;
  --m-ink: #111827;
  --m-muted: #64748b;
  --m-line: #e2e8f0;
  --m-bg: #f5f7fa;
  --m-surface: #ffffff;
  --m-success: #087443;
  --m-warning: #b45309;
  --m-danger: #b42318;
  --m-radius-sm: 10px;
  --m-radius: 16px;
  --m-radius-lg: 22px;
  --m-shadow: 0 12px 32px rgba(15, 23, 42, .08);
  --m-shadow-soft: 0 6px 18px rgba(15, 23, 42, .055);
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.motauros-ui {
  background-color: var(--m-bg);
  color: var(--m-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.motauros-ui::selection {
  background: rgba(181, 18, 27, .2);
}

.motauros-ui :where(a, button, input, select, textarea, summary) {
  -webkit-tap-highlight-color: transparent;
}

.motauros-ui :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(181, 18, 27, .28);
  outline-offset: 2px;
}

.motauros-ui :where(button, .btn, [role="button"]) {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease;
}

.motauros-ui :where(button, .btn, [role="button"]):not(:disabled):active {
  transform: translateY(1px);
}

.motauros-ui :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 44px;
  border-radius: 12px;
  border-color: var(--m-line);
}

.motauros-ui :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
  border-color: var(--m-red);
  box-shadow: 0 0 0 3px rgba(181, 18, 27, .12);
}

.motauros-ui :where(.card, .panel, .surface) {
  border-color: var(--m-line);
  border-radius: var(--m-radius);
  box-shadow: var(--m-shadow-soft);
}

.motauros-ui :where(.muted, .help, .hint) {
  color: var(--m-muted);
}

.motauros-ui :where(.badge, .chip, .pill) {
  border-radius: 999px;
  font-weight: 700;
}

.motauros-ui.admin-ui {
  --accent: var(--m-ink);
  --bg: var(--m-bg);
  --ink: var(--m-ink);
  --muted: var(--m-muted);
  --line: var(--m-line);
}

.admin-ui .top {
  border-bottom-color: var(--m-line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .055);
}

.admin-ui :where(nav a.active, .dd > summary.active, .dd .menu a.active) {
  background: var(--m-red);
  color: #fff;
}

.admin-ui .btn:not(.outline):not(.gray):not(.danger) {
  background: var(--m-ink);
  color: #fff;
}

.admin-ui .btn:not(.outline):not(.gray):not(.danger):hover {
  background: #020617;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .2);
}

.motauros-ui.public-ui {
  background:
    radial-gradient(circle at 8% -10%, rgba(181, 18, 27, .1), transparent 28rem),
    var(--m-bg);
}

.public-ui :where(.primary, .btn-primary, button[type="submit"]):not(:disabled) {
  background-color: var(--m-red);
  border-color: var(--m-red);
  color: #fff;
}

.public-ui :where(.primary, .btn-primary, button[type="submit"]):not(:disabled):hover {
  background-color: var(--m-red-dark);
  border-color: var(--m-red-dark);
  box-shadow: 0 10px 22px rgba(181, 18, 27, .22);
}

.motauros-ui.scanner-ui {
  --m-bg: #070a10;
  --m-surface: #111722;
  --m-ink: #f8fafc;
  --m-muted: #b7c0ce;
  --m-line: #283244;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  .motauros-ui *,
  .motauros-ui *::before,
