:root {
  --blue-dark: #001b29;
  --mint: #21cfa0;
  --green-dark: #0b7f59;
  --white: #ffffff;
  --bg-page: #f3f5f6;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== TEMA GLOBAL (DESKTOP/BASE) ===== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: var(--bg-page);
  color: var(--blue-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Corpo em tema escuro */
body.dark-theme {
  background-color: var(--blue-dark);
  color: var(--white);
}

/* CONTAINER */
.page {
  display: flex;
  padding: 0;
  max-width: 1280px;
  width: 100%;
  justify-content: center;
}

/* ===== CARD ÚNICO ===== */
.login-card {
  width: 100%;
  max-width: 520px;
  min-height: 420px;
  border-radius: 16px;
  padding: 40px 56px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  background-color: var(--white);
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
    transform 0.2s ease;
}

/* Card em tema escuro */
body.dark-theme .login-card {
  background-color: var(--blue-dark);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ================= LOGO SEM CÍRCULO ================= */

.logo-area {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.logo-circle {
  border: none;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  padding: 0;
}

/* Logo em SVG ou IMG */
.logo-icon-img {
  width: 220px;              /* TAMANHO DESKTOP */
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================= TÍTULOS ================= */

.title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.subtitle {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 30px;
}

/* ================= FORM ================= */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ================= CAMPOS ================= */

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 10px;
  border: 2px solid var(--green-dark);
  padding: 0 12px;
  height: 46px;
  background-color: transparent;
}

/* Borda dos campos no tema escuro */
body.dark-theme .field-wrapper {
  border-color: var(--mint);
}

.field-icon {
  font-size: 1rem;
  margin-right: 8px;
  opacity: 0.9;
}

.field-wrapper input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 0.95rem;
  color: inherit;
}

.field-wrapper input::placeholder {
  opacity: 0.7;
}

/* ================= FOCUS ================= */

.field-wrapper:focus-within {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px rgba(33, 207, 160, 0.3);
}

/* ================= BOTÃO ================= */

.btn.primary {
  margin-top: 18px;
  height: 48px;
  border-radius: 8px;
  border: none;
  background-color: var(--green-dark);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.15s ease;
}

.btn.primary:hover {
  background-color: #075d42;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(11, 127, 89, 0.3);
}

/* Botão no tema escuro */
body.dark-theme .btn.primary {
  background-color: var(--mint);
  color: var(--blue-dark);
}

body.dark-theme .btn.primary:hover {
  background-color: #1ac396;
  box-shadow: 0 10px 24px rgba(33, 207, 160, 0.4);
}

/* ================= SUPORTE ================= */

.support {
  margin-top: 14px;
  padding-top: 20px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-theme .support {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.support-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.support-phone {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ================= BOTÃO DE TEMA ================= */

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #21cfa0;
  color: #001b29;
  border: none;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s ease, background-color 0.2s ease;
  z-index: 10;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background-color: #1ac396;
}

/* ===================== RESPONSIVO ===================== */

/* Telas grandes */
@media (min-width: 1440px) {
  .login-card {
    transform: scale(1.05);
  }
}

/* Tablets e notebooks */
@media (max-width: 1024px) {
  body {
    padding: 16px;
  }

  .login-card {
    max-width: 480px;
    padding: 32px 40px 28px;
  }

  .logo-icon-img {
    width: 200px;
  }
}

/* Mobile (FULL SCREEN) */
@media (max-width: 768px) {
  html,
  body {
    height: 100%;
  }

  body {
    padding: 0;
    display: block;
  }

  .page {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-card {
    width: 100vw;
    max-width: none;
    min-height: 100dvh;
    border-radius: 0;
    padding: 28px 20px 24px;
    box-shadow: none;
  }

  .logo-icon-img {
    width: 190px;
  }

  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .field-wrapper {
    height: 44px;
  }

  .btn.primary {
    height: 48px;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
    font-size: 18px;
  }
  .support {
    margin-top: auto;
  }
}

/* Mobile pequeno */
@media (max-width: 400px) {
  .login-card {
    padding: 24px 16px 20px;
  }

  .logo-icon-img {
    width: 180px;
  }

  .title {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 0.8rem;
  }

  .btn.primary {
    height: 44px;
    font-size: 0.8rem;
  }

  .support-phone {
    font-size: 0.8rem;
  }
}
