:root {
  --grims-bg: #242424;
  --grims-text: rgba(255, 255, 255, 0.87);
  --grims-heading: #b9c2f5;
  --grims-accent: #646cff;
  --grims-accent-hover: #8b9cf7;
  --grims-btn-bg: #c2cdff;
  --grims-btn-text: #043677;
  --grims-btn-border: #9eb0e8;
  --grims-primary: #1043b1;
  --grims-primary-hover: #1d4ed8;
  --grims-coral: #ff948f;
  --grims-panel: rgba(30, 41, 59, 0.55);
  --grims-input-bg: #1e293b;
  --grims-input-border: #475569;
  --grims-muted: #94a3b8;
  --grims-subtle: #cbd5e1;
  --grims-error-bg: rgba(127, 29, 29, 0.45);
  --grims-error-text: #fecaca;
  --grims-error-border: #991b1b;

  color-scheme: dark;
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--grims-bg);
  color: var(--grims-text);
}

a {
  color: var(--grims-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--grims-accent-hover);
}

.auth-header {
  border-bottom: 0.35rem groove var(--grims-accent);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.65) 0%, rgba(36, 36, 36, 0.9) 100%);
}

.auth-nav {
  max-width: 32rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--grims-heading);
}

.auth-brand:hover {
  color: var(--grims-btn-bg);
}

.auth-logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 0.35rem;
}

.auth-logo--hero {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 0.75rem;
  display: block;
  filter: drop-shadow(0 0 0.75rem rgba(100, 108, 255, 0.35));
}

.auth-menu {
  list-style: none;
  display: flex;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  align-items: center;
  font-size: 0.9rem;
}

.auth-menu a {
  color: var(--grims-btn-bg);
  font-weight: 600;
}

.auth-menu a:hover {
  color: var(--grims-text);
}

.auth-menu li:first-child {
  color: var(--grims-muted);
  font-size: 0.82rem;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-main {
  max-width: 32rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.auth-card {
  padding: 1.5rem 1.25rem 1.75rem;
  border: 0.35rem groove var(--grims-coral);
  border-radius: 1rem;
  background: var(--grims-panel);
  box-shadow: 0 0 1.5rem rgba(100, 108, 255, 0.12);
}

.auth-card header h1,
.auth-card header p:first-child {
  color: var(--grims-heading);
}

.auth-card .text-sm {
  color: var(--grims-muted);
}

.text-brand {
  color: var(--grims-btn-bg) !important;
  font-weight: 600;
}

.text-brand:hover {
  color: var(--grims-text) !important;
  text-decoration: underline;
}

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-sm { max-width: 24rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.size-6 { width: 1.5rem; height: 1.5rem; }
.shrink-0 { flex-shrink: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--grims-muted);
  margin: 1rem 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--grims-input-border);
}

.fieldset { margin-bottom: 0.85rem; }

.label,
.fieldset .label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--grims-subtle);
}

.input,
.textarea,
.select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--grims-input-border);
  border-radius: 8px;
  background: var(--grims-input-bg);
  color: var(--grims-text);
  font: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--grims-accent);
  box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.35);
}

.input-error,
.textarea-error,
.select-error {
  border-color: var(--grims-error-border);
}

.text-error {
  color: var(--grims-error-text);
  font-size: 0.875rem;
}

.text-sm { font-size: 0.875rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.items-center { align-items: center; }
.underline { text-decoration: underline; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    filter 0.15s ease;
}

.btn-primary {
  background: var(--grims-btn-bg);
  color: var(--grims-btn-text);
  border-color: var(--grims-btn-border);
}

.btn-primary:hover {
  background: #b4c3ff;
  border-color: var(--grims-accent);
  filter: drop-shadow(0 0 0.75em rgba(100, 108, 255, 0.45));
}

.btn-soft {
  background: transparent;
  color: var(--grims-heading);
  border-color: var(--grims-input-border);
}

.btn-soft:hover {
  color: var(--grims-text);
  border-color: var(--grims-accent);
}

.alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-info {
  background: rgba(100, 108, 255, 0.15);
  color: var(--grims-subtle);
  border-color: var(--grims-accent);
}

.alert-error {
  background: var(--grims-error-bg);
  color: var(--grims-error-text);
  border-color: var(--grims-error-border);
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
}

.landing-nav {
  max-width: 56rem;
}

.landing-main {
  max-width: 56rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}

.landing-hero {
  text-align: center;
  padding: 1rem 0 2.5rem;
}

.landing-logo {
  width: min(100%, 16rem);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain;
}

.landing-title {
  margin: 0 0 0.75rem;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--grims-heading);
}

.landing-tagline {
  margin: 0 auto 1.75rem;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--grims-muted);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.landing-btn {
  min-width: 10rem;
  text-decoration: none;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}

.landing-feature {
  padding: 1.1rem 1.15rem;
  border: 0.35rem groove var(--grims-accent);
  border-radius: 1rem;
  background: var(--grims-panel);
}

.landing-feature h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--grims-heading);
}

.landing-feature p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--grims-subtle);
}
