/* ============================================================
   MERION — AUTH PROTOTYPE
   Two layout shells (split / center) × light/dark, one flow.
   ============================================================ */

.auth-root { min-height: 100vh; background: var(--background); color: var(--foreground);
  font-family: var(--ui-font); display: flex; flex-direction: column; }

/* ---------- floating controls (theme + layout) ---------- */
.auth-controls { position: fixed; top: 18px; right: 18px; z-index: 50; display: flex; gap: 10px;
  background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px; box-shadow: var(--shadow-sm); }
.auth-seg { display: inline-flex; background: var(--secondary); border-radius: 999px; padding: 3px; }
.auth-seg button { border: none; background: transparent; cursor: pointer; font-family: var(--ui-font);
  font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); padding: 6px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; transition: .14s ease; }
.auth-seg button .ic { font-size: 15px; }
.auth-seg button[data-active="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }

/* ============================================================
   SPLIT SHELL — brand panel + form column
   ============================================================ */
.split-shell { flex: 1; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); min-height: 100vh; }
.split-form { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 40px; }
.split-form .auth-screen { width: 100%; max-width: 400px; }

/* brand panel — always deep gunmetal with cyan signature */
.split-brand { position: relative; overflow: hidden; background: #050F13; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 48px; isolation: isolate; }
.split-brand .bp-wordmark { position: relative; z-index: 2; }
.split-brand .bp-body { position: relative; z-index: 2; max-width: 460px; }
.split-brand .bp-kicker { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #00FFD4; margin-bottom: 18px; }
.split-brand .bp-tagline { font-size: 46px; font-weight: 700; line-height: 1.04; letter-spacing: -.02em; margin: 0 0 20px; }
.split-brand .bp-text { font-size: 16px; font-weight: 300; line-height: 1.8; letter-spacing: .02em;
  color: rgba(255,255,255,.72); margin: 0; }
.split-brand .bp-foot { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.split-brand .bp-foot .ic { font-size: 15px; color: #00FFD4; }

/* compass watermark + neon glow */
.split-brand .bp-mark { position: absolute; z-index: 1; right: -120px; top: 50%; transform: translateY(-50%);
  width: 620px; height: 620px; opacity: .5; }
.split-brand .bp-glow { position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%;
  right: -160px; top: 18%; background: radial-gradient(circle, rgba(0,255,212,.20), transparent 62%); filter: blur(8px); }
.split-brand .bp-rings { position: absolute; z-index: 0; inset: 0; opacity: .5;
  background-image: radial-gradient(circle at 78% 42%, transparent 0, transparent 158px, rgba(0,255,212,.10) 159px, transparent 161px),
    radial-gradient(circle at 78% 42%, transparent 0, transparent 238px, rgba(0,255,212,.07) 239px, transparent 241px),
    radial-gradient(circle at 78% 42%, transparent 0, transparent 318px, rgba(0,255,212,.05) 319px, transparent 321px); }

/* ============================================================
   CENTER SHELL — single focused card
   ============================================================ */
.center-shell { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px 24px; position: relative; overflow: hidden; }
.center-shell .cs-bg { position: absolute; inset: 0; z-index: 0; }
[data-theme="light"] .center-shell { background:
  radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--brand) 8%, var(--background)), var(--background) 60%); }
[data-theme="dark"] .center-shell { background:
  radial-gradient(110% 70% at 50% -8%, color-mix(in srgb, var(--brand) 14%, var(--background)), var(--background) 58%); }
.center-shell .cs-mark { position: absolute; z-index: 0; top: 50%; left: 50%; width: 760px; height: 760px;
  transform: translate(-50%, -50%); opacity: .04; pointer-events: none; }
.center-wordmark { position: relative; z-index: 2; margin-bottom: 26px; }
.center-card { position: relative; z-index: 2; width: 100%; max-width: 428px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px 36px;
  box-shadow: var(--shadow); }
.center-card .auth-screen { width: 100%; }
.center-foot { position: relative; z-index: 2; margin-top: 24px; font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted-foreground); }

/* ============================================================
   SCREEN CONTENT (shared by both shells)
   ============================================================ */
.auth-screen { animation: auth-in .32s cubic-bezier(.16,.84,.44,1) both; }
@keyframes auth-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.auth-head { margin-bottom: 26px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  font-family: var(--ui-font); font-size: 13px; font-weight: 500; color: var(--muted-foreground);
  padding: 0; margin-bottom: 18px; transition: color .14s ease; }
.auth-back:hover { color: var(--foreground); }
.auth-back .ic { font-size: 16px; }
.auth-kicker { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px; }
.auth-title { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 8px; }
.auth-sub { font-size: 14.5px; font-weight: 300; line-height: 1.6; letter-spacing: .01em;
  color: var(--muted-foreground); margin: 0; }
.auth-sub strong { color: var(--foreground); font-weight: 600; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-row-between .checkbox-row { white-space: nowrap; }
.auth-row-between .auth-link { white-space: nowrap; }
.auth-alt .auth-link { white-space: nowrap; }
.auth-link { background: none; border: none; cursor: pointer; font-family: var(--ui-font); padding: 0;
  font-size: 13.5px; font-weight: 600; color: var(--brand); transition: opacity .14s ease; }
.auth-link:hover { opacity: .78; }
.auth-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.auth-actions .btn { width: 100%; }
.auth-actions a.btn { text-decoration: none; }
.btn-xl { height: 50px; font-size: 15px; border-radius: var(--radius-md); }

.auth-alt { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--muted-foreground); }
.auth-alt .auth-link { font-size: 13.5px; }

/* divider with label */
.auth-divider { display: flex; align-items: center; gap: 14px; color: var(--muted-foreground);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* SSO provider button */
.sso-btn { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--card); border: var(--border-weight,1px) solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--ui-font); font-size: 14px; font-weight: 600; color: var(--foreground); cursor: pointer;
  transition: .14s ease; }
.sso-btn:hover { background: var(--accent); border-color: var(--brand); }
.sso-btn .ic { font-size: 19px; color: var(--brand); }

/* password field */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center; border: none; background: none; cursor: pointer;
  color: var(--muted-foreground); border-radius: var(--radius); }
.pw-toggle:hover { color: var(--foreground); background: var(--accent); }
.pw-toggle .ic { font-size: 17px; }

/* strength meter */
.strength { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.strength-track { display: flex; gap: 4px; }
.strength-seg { flex: 1; height: 4px; border-radius: 999px; background: var(--border); transition: background .2s ease; }
.strength-lbl { font-size: 12px; font-weight: 500; color: var(--muted-foreground); }

/* OTP input */
.otp-row { display: flex; gap: 10px; justify-content: space-between; }
.otp-box { width: 100%; aspect-ratio: 1 / 1.12; max-width: 56px; text-align: center; font-family: var(--ui-font);
  font-size: 24px; font-weight: 600; color: var(--foreground); background: var(--background);
  border: var(--border-weight,1px) solid var(--input); border-radius: var(--radius); outline: none;
  font-variant-numeric: tabular-nums; transition: border-color .14s ease, box-shadow .14s ease; }
.otp-box:focus { border-color: var(--brand); box-shadow: var(--focus-glow); }
.otp-box[data-filled="true"] { border-color: var(--brand); }

/* success mark */
.auth-success-mark { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); margin-bottom: 20px; }
.auth-success-mark .ic { font-size: 32px; }

/* resend countdown */
.otp-resend { text-align: center; font-size: 13px; color: var(--muted-foreground); margin-top: 16px; }

/* trust row under forms */
.auth-trust { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px;
  font-size: 12px; color: var(--muted-foreground); }
.auth-trust .ic { font-size: 15px; color: var(--brand); }

/* ============================================================
   MERION-SPECIFIC EXTRAS (não presentes no auth.css do DS mas
   necessários para as views Blade)
   ============================================================ */

/* alert inline (credenciais / link expirado) */
.auth-alert { border-radius: var(--radius); padding: 12px 16px; font-size: 14px; line-height: 1.5; }
.auth-alert--error {
  background: color-mix(in srgb, var(--destructive) 10%, var(--background));
  border: 1px solid color-mix(in srgb, var(--destructive) 35%, transparent);
  color: var(--destructive);
}
.auth-alert--warning {
  background: color-mix(in srgb, var(--warning) 10%, var(--background));
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  color: var(--warning);
}
.auth-alert--success {
  background: color-mix(in srgb, var(--success) 10%, var(--background));
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
  color: var(--success);
}

/* rodapé de auth (sem cadastro) */
.auth-foot {
  margin-top: 28px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.6;
}

/* requisitos de senha */
.auth-requirements {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.6;
}
.auth-requirements ul { margin: 8px 0 0; padding-left: 18px; }
.auth-requirements li { margin-bottom: 2px; }
.auth-requirements li.met { color: var(--success); }
.auth-requirements li.met::marker { content: "✓  "; }

/* erro de campo inline */
.auth-field-error { font-size: 12px; color: var(--destructive); margin: 0; font-weight: 500; }

/* lembrar-me checkbox row */
.auth-check-row { display: flex; align-items: center; gap: 8px; }
.auth-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }
.auth-check-row label { font-size: 13.5px; color: var(--muted-foreground); cursor: pointer; }

/* botão primário (alternativo ao btn btn-brand para compatibilidade Blade) */
.auth-btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 0 20px; height: 50px;
  background: var(--primary); color: var(--primary-foreground);
  border: none; border-radius: var(--radius-md);
  font-family: var(--ui-font); font-size: 14px; font-weight: 600;
  letter-spacing: .04em; cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}
.auth-btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--foreground)); }
.auth-btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.auth-btn-primary:disabled { opacity: .55; cursor: not-allowed; }

/* botões de consentimento */
.auth-btn-deny {
  flex: 1; padding: 0 16px; height: 50px;
  background: var(--secondary); color: var(--secondary-foreground);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  font-family: var(--ui-font); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .14s ease;
}
.auth-btn-deny:hover { background: color-mix(in srgb, var(--secondary) 80%, var(--foreground)); }
.auth-btn-deny:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }

.auth-btn-approve {
  flex: 1; padding: 0 16px; height: 50px;
  background: var(--primary); color: var(--primary-foreground);
  border: none; border-radius: var(--radius-md);
  font-family: var(--ui-font); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .14s ease;
}
.auth-btn-approve:hover { background: color-mix(in srgb, var(--primary) 88%, var(--foreground)); }
.auth-btn-approve:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }

/* consentimento: escopos */
.consent-app-name { color: var(--brand); }
.auth-user-info {
  background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13.5px; color: var(--muted-foreground); text-align: center; margin-bottom: 20px;
}
.auth-user-info strong { color: var(--foreground); }
.auth-scopes-label {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-foreground); margin: 0 0 10px;
}
.auth-scope-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.auth-scope-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.auth-scope-item:last-child { border-bottom: none; }
.auth-scope-icon { flex-shrink: 0; width: 18px; height: 18px; color: var(--brand); margin-top: 2px; }
.auth-scope-id { display: block; font-size: 13px; font-weight: 600; color: var(--foreground); font-variant-numeric: tabular-nums; }
.auth-scope-desc { font-size: 12.5px; color: var(--muted-foreground); margin: 2px 0 0; line-height: 1.4; }
.consent-foot { margin-top: 16px; font-size: 11.5px; color: var(--muted-foreground); text-align: center; line-height: 1.6; }

/* welcome page */
.welcome-root {
  min-height: 100vh; background: #081A1F; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; position: relative; overflow: hidden; isolation: isolate;
  font-family: var(--ui-font);
}
.welcome-glow {
  position: absolute; z-index: 0; width: 600px; height: 600px; border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%, -60%);
  background: radial-gradient(circle, rgba(0,255,212,.14), transparent 62%);
  filter: blur(12px); pointer-events: none;
}
.welcome-mark {
  position: absolute; z-index: 0; width: 520px; height: 520px;
  top: 50%; left: 50%; transform: translate(-10%, -50%);
  opacity: 0.06; pointer-events: none;
}
.welcome-content { position: relative; z-index: 2; text-align: center; max-width: 560px; }
.welcome-wordmark { height: 36px; color: #fff; margin-bottom: 32px; }
.welcome-kicker {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: #00FFD4; margin: 0 0 20px;
}
.welcome-headline { font-size: 48px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 20px; }
.welcome-desc {
  font-size: 16px; font-weight: 300; line-height: 1.8; letter-spacing: .02em;
  color: rgba(255,255,255,.65); margin: 0 0 40px;
}
.welcome-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; background: #00FFD4; color: #081A1F;
  border: none; border-radius: 8px;
  font-family: var(--ui-font); font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .15s, box-shadow .15s;
}
.welcome-btn:hover { background: #00e6bf; box-shadow: 0 0 24px rgba(0,255,212,0.5), 0 0 64px rgba(0,255,212,0.25); }
.welcome-btn:focus-visible { outline: 2px solid #00FFD4; outline-offset: 4px; }
.welcome-foot {
  position: relative; z-index: 2; margin-top: 64px;
  font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.28);
}

/* responsive: collapse split shell */
@media (max-width: 880px) {
  .split-shell { grid-template-columns: 1fr; }
  .split-brand { display: none; }
  .split-form { padding: 80px 24px 48px; }
}
