/* ==========================================================================
   SETTORA — auth & public (light theme)

   Hand-written CSS for the marketing/auth surface. The dashboards are a
   committed dark product surface; these pages use the .theme-light token set
   from tokens.css. No framework, no build step — this file is loaded directly.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout scaffolding
   -------------------------------------------------------------------------- */

.public-body,
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.site-footer {
  margin-top: auto;
  padding: var(--s-6);
  text-align: center;
  color: var(--text-3);
  font-size: var(--step--1);
}
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}
.brand .brand-dot { color: var(--brand-deep); }

/* --------------------------------------------------------------------------
   Auth card
   -------------------------------------------------------------------------- */

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6) var(--s-4) var(--s-8);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--s-7);
}

.auth-card .auth-brand {
  display: block;
  text-align: center;
  margin-bottom: var(--s-5);
}

.auth-card h1 {
  font-size: var(--step-3);
  margin-bottom: var(--s-2);
}
.auth-lead {
  color: var(--text-2);
  font-size: var(--step-0);
  margin: 0 0 var(--s-5);
}

.auth-alt {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--step--1);
  color: var(--text-2);
}
.auth-alt a { color: var(--brand-deep); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { display: grid; gap: var(--s-4); }

.field { display: grid; gap: 6px; }
.field > label {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--text-2);
}
.field .hint { font-size: 12px; color: var(--text-3); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-size: var(--step-0);
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgba(14, 124, 134, .15);
}
.field input.has-error,
.field textarea.has-error { border-color: var(--exposure); }

.field-error {
  font-size: 12px;
  color: var(--exposure);
}

/* Checkbox row (accept terms) */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  font-size: var(--step--1);
  color: var(--text-2);
}
.check input { margin-top: 3px; }
.check a { color: var(--brand-deep); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn-block { width: 100%; }

.btn-primary {
  background: var(--brand-deep);
  color: #fff;
}
.btn-primary:hover { background: #0b636b; }

.btn-ghost {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-2); }

.link-muted {
  font-size: var(--step--1);
  color: var(--text-3);
  text-decoration: none;
}
.link-muted:hover { color: var(--text-2); text-decoration: underline; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }

/* --------------------------------------------------------------------------
   Flash / notices (light variants — dashboard.css is not loaded here)
   -------------------------------------------------------------------------- */

.flash {
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  font-size: var(--step--1);
  border: 1px solid;
}
.flash.success { color: var(--advantage); border-color: rgba(15, 118, 110, .4);  background: rgba(15, 118, 110, .08); }
.flash.error   { color: var(--exposure);  border-color: rgba(190, 18, 60, .4);   background: rgba(190, 18, 60, .06); }
.flash.info    { color: var(--watch);     border-color: rgba(161, 98, 7, .4);    background: rgba(161, 98, 7, .07); }
.flash.warning { color: var(--watch);     border-color: rgba(161, 98, 7, .4);    background: rgba(161, 98, 7, .07); }

.notice {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  color: var(--text-2);
  font-size: var(--step--1);
}
.notice strong { display: block; color: var(--text); margin-bottom: 4px; }

/* --------------------------------------------------------------------------
   Error pages
   -------------------------------------------------------------------------- */

.error-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-8) var(--s-4);
  gap: var(--s-3);
}
.error-code {
  font-family: var(--font-mono);
  font-size: var(--step-1);
  color: var(--text-3);
  letter-spacing: .1em;
}
.error-wrap h1 { font-size: var(--step-4); }
.error-wrap p { color: var(--text-2); max-width: 46ch; }
.error-detail {
  margin-top: var(--s-4);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--exposure);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  max-width: 640px;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 480px) {
  .auth-card { padding: var(--s-6) var(--s-5); }
}
