/* =============================================================================
   Auth UI — RxPlantão site público (login + cadastro)
   ============================================================================= */

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  background: #fff;
  z-index: 9999;
  overflow: hidden;
}

/* ---- Painel ESQUERDO (decorativo) ---- */
.auth-side {
  flex: 1.1;
  background:
    radial-gradient(1200px 600px at -10% 110%, hsla(225, 70%, 60%, 0.35) 0%, transparent 60%),
    radial-gradient(900px 500px at 110% -20%, hsla(265, 80%, 65%, 0.32) 0%, transparent 55%),
    linear-gradient(135deg, #0b1437 0%, #131b4d 50%, #1a2566 100%);
  color: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 2;
}
.auth-brand-mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #fff;
  color: hsl(225, 80%, 35%);
  font-weight: 800;
  font-size: 20px;
  display: grid; place-items: center;
  letter-spacing: -.02em;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.auth-brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.auth-brand-sub {
  font-size: 12px;
  font-weight: 500;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-top: 2px;
}
.auth-hero {
  position: relative;
  z-index: 2;
  max-width: 480px;
}
.auth-hero h2 {
  font-family: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.auth-hero p {
  font-size: 16px;
  line-height: 1.55;
  opacity: .8;
  margin: 0;
  max-width: 420px;
}
.auth-features {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.auth-feature-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  display: grid; place-items: center;
  flex: none;
  font-size: 12px;
}
.auth-foot {
  position: relative;
  z-index: 2;
  font-size: 12px;
  opacity: .55;
}

/* ---- Painel DIREITO (formulário) ---- */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 32px;
  background: #fafbff;
  overflow-y: auto;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.auth-tabs {
  display: flex;
  background: #eef0f7;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 28px;
  position: relative;
}
.auth-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7393;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s ease;
}
.auth-tab.active {
  background: #fff;
  color: hsl(225, 80%, 30%);
  box-shadow: 0 2px 8px rgba(15,22,40,.08);
}
.auth-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 6px;
  color: #0f1628;
}
.auth-sub {
  font-size: 14px;
  color: #6b7393;
  margin: 0 0 28px;
}
.auth-field { margin-bottom: 16px; }
.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5474;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
}
.auth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0bd;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  height: 46px;
  border: 1px solid #dde0ec;
  border-radius: 12px;
  padding: 0 14px 0 44px;
  font-size: 15px;
  background: #fff;
  font-family: inherit;
  color: #0f1628;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.auth-input:focus {
  border-color: hsl(225, 75%, 55%);
  box-shadow: 0 0 0 4px hsla(225, 75%, 55%, .12);
}
.auth-input::placeholder { color: #b6bbd2; }

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-error {
  background: #fef0f0;
  border: 1px solid #ffd5d5;
  color: #b91c1c;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-submit {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, hsl(225, 80%, 45%), hsl(245, 80%, 55%));
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: transform .12s ease, box-shadow .15s ease, opacity .15s;
  box-shadow: 0 6px 20px hsla(225, 80%, 45%, .35);
  letter-spacing: .01em;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px hsla(225, 80%, 45%, .45);
}
.auth-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.auth-strength {
  font-size: 12px;
  color: #6b7393;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e8f1;
  border-radius: 999px;
  overflow: hidden;
}
.auth-strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .25s, background .25s;
}

.auth-help {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: #6b7393;
}
.auth-help a {
  color: hsl(225, 75%, 50%);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.auth-help a:hover { text-decoration: underline; }

@media (max-width: 880px) {
  .auth-side { display: none; }
  .auth-main { background: #fff; padding: 32px 20px; }
}

/* Avatar/menu do usuário no header */
.user-menu {
  position: relative;
}
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e8f1;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0f1628;
  transition: all .15s;
}
.user-pill:hover { background: #f4f6fb; }
.user-pill-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(225, 75%, 55%), hsl(265, 70%, 60%));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e5e8f1;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15,22,40,.12);
  min-width: 240px;
  padding: 8px;
  z-index: 50;
  animation: dd-pop .14s ease;
}
@keyframes dd-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-dd-head {
  padding: 12px 12px 10px;
  border-bottom: 1px solid #f0f2f8;
  margin-bottom: 6px;
}
.user-dd-name {
  font-weight: 700;
  font-size: 14px;
  color: #0f1628;
}
.user-dd-email {
  font-size: 12px;
  color: #6b7393;
  margin-top: 2px;
  word-break: break-all;
}
.user-dd-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #4b5474;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
}
.user-dd-item:hover { background: #f4f6fb; color: #0f1628; }
.user-dd-item.danger { color: #b91c1c; }
.user-dd-item.danger:hover { background: #fef0f0; }
