/* ===============================
   RESET BÁSICO
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ===============================
   VARIÁVEIS – TEMA CLARO
================================ */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #5b6475;
  --border: #d6dbe6;
  --link: #0155a7;
  --accent-blue: #0155a7;
  --accent-blue-light: #01baf0;
  --accent-green: #388b62;

  --input-bg: #ffffff;
  --input-text: #0b1220;

  --btn-bg: #0155a7;
  --btn-text: #ffffff;

  --danger: #b00020;
}

/* ===============================
   VARIÁVEIS – TEMA ESCURO
================================ */
[data-theme="dark"] {
  --bg: #181818;
  --card: #1f1f1f;
  --text: #f4f6fb;
  --muted: #b7bec9;
  --border: #313131;
  --link: #8fd9f6;

  --input-bg: #181818;
  --input-text: #f4f6fb;

  --btn-bg: #0155a7;
  --btn-text: #ffffff;

  --danger: #ff6b6b;
}

/* ===============================
   BODY
================================ */
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===============================
   CONTAINER PRINCIPAL
================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ===============================
   CARD
================================ */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

/* ===============================
   HEADER
================================ */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 50px;
  margin-left: -15px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.auth-brand-logo {
  display: block;
  height: 50px;
  width: auto;
  max-width: min(240px, 62vw);
}

.auth-brand-fallback {
  line-height: 1;
}

/* ===============================
   SWITCH DE TEMA (DISJUNTOR)
================================ */
.theme-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label {
  font-size: 12px;
  color: var(--muted);
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-blue);
  transition: transform 0.2s ease;
}

[data-theme="dark"] .switch::after {
  transform: translateX(24px);
}

/* ===============================
   TÍTULOS E TEXTOS
================================ */
h1 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
}

p {
  margin: 0 0 14px 0;
  font-size: 14px;
  color: var(--muted);
}

/* ===============================
   FORMULÁRIO
================================ */
.label {
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  padding: 12px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border);
  outline: none;
  border-radius: 10px;
  font-size: 15px;
}

input::placeholder {
  color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus {
  border-color: var(--accent-blue-light);
  box-shadow: 0 0 0 2px rgba(1, 186, 240, 0.2);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--input-bg);
  accent-color: var(--accent-blue);
  flex: 0 0 auto;
  cursor: pointer;
}

.row label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.2;
  cursor: pointer;
}

/* ===============================
   BOTÕES
================================ */
.btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-bg);
  font-size: 14px;
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ===============================
   LINKS
================================ */
.links {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

a {
  font-size: 13px;
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===============================
   MENSAGENS
================================ */
.notice {
  border: 1px solid var(--border);
  padding: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

.error {
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

[data-theme="dark"] .btn.secondary {
  color: #ffffff;
  border-color: #3a3a3a;
}

@media (max-width: 900px) {
  input:not([type="checkbox"]):not([type="radio"]) {
    font-size: 16px !important;
  }

  select {
    padding: 8px 10px;
    font-size: 12px !important;
  }
}
