
/* ==========================================
   MEDICAL SUL SAT — LOGIN
   Design profissional | Verde médico
   ========================================== */

:root {
  --primary: #12a866;
  --primary-dark: #087c4a;
  --primary-light: #e8f8ef;
  --text: #17352a;
  --text-muted: #71847b;
  --white: #ffffff;
  --border: #e5eee9;
  --shadow: 0 25px 80px rgba(16, 72, 46, 0.13);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;

  font-family: 'Inter', sans-serif;
  color: var(--text);

  background:
    radial-gradient(
      circle at 12% 15%,
      rgba(18, 168, 102, 0.12),
      transparent 35%
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(8, 124, 74, 0.09),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #f5fbf7 0%,
      #edf7f1 45%,
      #f8fbf9 100%
    );

  position: relative;
  overflow-x: hidden;
}

/* Fundo decorativo */

body.auth-body::before,
body.auth-body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body.auth-body::before {
  width: 400px;
  height: 400px;
  top: -180px;
  right: -100px;

  border: 1px solid rgba(18, 168, 102, 0.12);
  box-shadow:
    0 0 0 45px rgba(18, 168, 102, 0.025),
    0 0 0 90px rgba(18, 168, 102, 0.02);
}

body.auth-body::after {
  width: 300px;
  height: 300px;
  bottom: -150px;
  left: -100px;

  border: 1px solid rgba(8, 124, 74, 0.12);
  box-shadow:
    0 0 0 40px rgba(8, 124, 74, 0.025),
    0 0 0 80px rgba(8, 124, 74, 0.02);
}

/* Área principal */

.auth-shell {
  width: 100%;
  max-width: 470px;
  position: relative;
  z-index: 1;
}

/* Cartão de login */

.auth-card {
  position: relative;
  overflow: hidden;

  width: 100%;
  padding: 42px;

  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;

  box-shadow: var(--shadow);

  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  animation: card-enter 0.7s ease both;
}

/* Brilho decorativo */

.login-glow {
  position: absolute;
  top: -130px;
  right: -100px;

  width: 280px;
  height: 280px;

  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(18, 168, 102, 0.11),
    transparent 70%
  );

  pointer-events: none;
}

/* Identidade visual */

.brand-mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;

  margin-bottom: 42px;
}

.brand-mark__icon {
  width: 58px;
  height: 58px;
  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px;

  background: linear-gradient(
    145deg,
    #16b875,
    #087c4a
  );

  color: white;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;

  box-shadow: 0 8px 22px rgba(18, 168, 102, 0.25);
}

.brand-mark__name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #173d2c;
}

.brand-mark__sub {
  margin-top: 5px;

  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;

  color: #82948a;
}

/* Título */

.auth-hero {
  position: relative;
  margin-bottom: 28px;
}

.auth-hero h1 {
  font-size: clamp(26px, 5vw, 31px);
  font-weight: 800;
  letter-spacing: -1.3px;
  line-height: 1.25;

  color: #173d2c;
}

.auth-hero p {
  margin-top: 12px;

  font-size: 14px;
  line-height: 1.7;

  color: var(--text-muted);
}

/* Acesso demonstrativo */

.auth-demo {
  display: flex;
  flex-direction: column;
  gap: 7px;

  padding: 15px 18px;
  margin-bottom: 28px;

  background: linear-gradient(
    110deg,
    #f0faf4,
    #f7fcf9
  );

  border: 1px solid #dcefe3;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
}

.auth-demo span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  color: #789386;
}

.auth-demo strong {
  font-size: 14px;
  font-weight: 700;
  color: #087c4a;
}

/* Formulário */

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

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
  color: #294b3b;
}

/* Campos de entrada */

.field input {
  width: 100%;
  height: 54px;

  padding: 0 16px;

  font-family: inherit;
  font-size: 14px;
  font-weight: 500;

  color: #173d2c;
  background: #f9fbfa;

  border: 1px solid #dce8e0;
  border-radius: 12px;

  outline: none;

  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.field input::placeholder {
  color: #a2b1a9;
  font-weight: 400;
}

.field input:hover {
  border-color: #b7d9c5;
}

.field input:focus {
  background: #ffffff;
  border-color: var(--primary);

  box-shadow: 0 0 0 4px rgba(18, 168, 102, 0.10);
}

/* Campo de senha */

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  padding-right: 55px;
}

.icon-btn {
  position: absolute;
  right: 8px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 10px;

  background: transparent;
  color: #81958a;

  font-size: 17px;
  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.icon-btn:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.icon-btn:active {
  transform: scale(0.92);
}

/* Botão principal */

.primary-btn {
  position: relative;
  overflow: hidden;

  width: 100%;
  min-height: 56px;

  margin-top: 5px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 13px;

  background: linear-gradient(
    110deg,
    #12a866 0%,
    #087c4a 100%
  );

  color: #ffffff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1px;

  cursor: pointer;

  box-shadow: 0 8px 20px rgba(18, 168, 102, 0.23);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.primary-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;

  width: 60%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );

  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 168, 102, 0.32);
  filter: brightness(1.04);
}

.primary-btn:hover::before {
  left: 140%;
}

.primary-btn:active {
  transform: translateY(0);
  box-shadow: 0 5px 12px rgba(18, 168, 102, 0.2);
}

.primary-btn:focus-visible,
.icon-btn:focus-visible {
  outline: 3px solid rgba(18, 168, 102, 0.4);
  outline-offset: 4px;
}

/* Rodapé */

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  margin-top: 32px;
  padding-top: 22px;

  border-top: 1px solid #edf2ee;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 12px;
  font-weight: 600;
  color: #648071;
}

.dot {
  position: relative;

  width: 8px;
  height: 8px;
  flex-shrink: 0;

  background: #16b875;
  border-radius: 50%;
}

.dot::after {
  content: "";
  position: absolute;
  inset: -4px;

  border: 1px solid rgba(22, 184, 117, 0.35);
  border-radius: 50%;

  animation: status-pulse 2s ease-out infinite;
}

.login-footer small {
  font-size: 11px;
  font-weight: 500;
  color: #9aa9a0;
}

/* Animações */

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes status-pulse {
  0% {
    transform: scale(0.7);
    opacity: 1;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Responsividade */

@media (max-width: 520px) {
  body.auth-body {
    padding: 20px 14px;
  }

  .auth-card {
    padding: 30px 24px;
    border-radius: 23px;
  }

  .brand-mark {
    margin-bottom: 34px;
  }

  .brand-mark__icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 20px;
  }

  .brand-mark__name {
    font-size: 19px;
  }

  .auth-hero h1 {
    font-size: 27px;
  }

  .login-footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 26px 18px;
  }

  .brand-mark {
    gap: 10px;
  }

  .brand-mark__sub {
    font-size: 10px;
  }

  .login-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Acessibilidade: respeita a preferência
   do usuário por menos animações */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
