/*
 * Estilos do Cobrança CRC-RO (auth + flash) — copiados do portal-crcro.
 * Tokens do design system em ds_tokens.css / componentes em ds_components.css.
 */

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ---------- Auth — full-screen background + floating glass card ---------- */

/* Background via fixed pseudo-element — cobre 100% da viewport
   independente de qualquer flex/grid no body ou em elementos pai */
.auth-body {
  min-height: 100vh;
  background: transparent;
  position: relative;
}

.auth-body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(160deg, rgba(4,10,24,.88) 0%, rgba(8,18,48,.82) 50%, rgba(4,10,24,.90) 100%),
    url("/image/crcro-35anos.jpeg") center / cover no-repeat;
}

.auth-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
}

/* Full-screen background — 35 anos image with dark overlay */
.auth-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 6vw, 6rem);
  width: 100%;
  min-height: 100vh;
  padding: 2rem clamp(2rem, 6vw, 5rem);
  background: transparent;
}

/* Left brand — floating, transparent */
.auth-brand-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.auth-brand-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 360px;
}

.auth-brand-logo {
  width: 240px;
  height: auto;
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.auth-brand-divider {
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #b8941f, transparent);
  border: none;
  margin: 0;
}

.auth-brand-text {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,.68);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* Right — clean light card (matches admin panel aesthetic) */
.auth-form-panel {
  width: 100%;
  max-width: 420px;
  flex-shrink: 0;
  padding: 2.5rem 2.5rem 2.25rem;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.55), 0 4px 20px rgba(0,0,0,.22);
  font-family: 'Inter', system-ui, sans-serif;
}

.auth-form-inner { width: 100%; }

.auth-title {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0d1b5e;
  letter-spacing: -.02em;
}

.auth-subtitle {
  margin: 0 0 1.75rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.4rem; }

.auth-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #b8941f;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-input {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid #e2e5ec;
  background: #f8f9fb;
  color: #1a1a2e;
  font-size: 0.95rem;
  font-family: 'Inter', system-ui, sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-input::placeholder { color: #9ca3af; }
.auth-input:focus {
  outline: none;
  border-color: #1f3f70;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(31,63,112,.1);
}

.auth-submit {
  margin-top: 0.25rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d1b5e 0%, #1f3f70 100%);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: filter 0.15s, box-shadow 0.15s;
  width: 100%;
  box-shadow: 0 4px 14px rgba(13,27,94,.28);
}

.auth-submit:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgba(13,27,94,.38);
}

.auth-flash {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-flash-alert { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }
.auth-flash-notice { background: #f0fdf4; color: #16a34a; border: 1px solid #86efac; }

.auth-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.auth-link { color: #1f3f70; text-decoration: none; font-size: 0.82rem; font-weight: 500; }
.auth-link:hover { color: #b8941f; text-decoration: underline; }

@media (max-width: 860px) {
  .auth-split { flex-direction: column; justify-content: center; padding: 2rem 1.5rem; gap: 2rem; }
  .auth-brand-panel { display: none; }
  .auth-form-panel { max-width: 100%; }
}

/* ---------- Flash do app ---------- */

.app-flash-notice,
.app-flash-alert {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.app-flash-notice { background: var(--primitive-success); color: #04100a; }
.app-flash-alert { background: var(--primitive-error); color: #fff; }
