:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #20242b;
  background: #26334d;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }

.login-page,
.dashboard-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #25324c 0%, #1f2b42 100%);
}

.login-page { padding: 28px 24px 60px; }
.brand {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 24px;
}
.brand-mark { width: 52px; height: 42px; position: relative; }
.brand-mark span {
  position: absolute;
  width: 29px;
  height: 29px;
  border-radius: 6px;
  transform: skew(-18deg);
  background: linear-gradient(135deg, #6b42f4, #12d0d5);
}
.brand-mark span:nth-child(1) { left: 4px; top: 0; }
.brand-mark span:nth-child(2) { left: 0; top: 13px; }
.brand-mark span:nth-child(3) { left: 21px; top: 13px; }

.login-card {
  width: min(100%, 560px);
  margin: 12vh auto 0;
  padding: 38px 42px 42px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.login-card h1 { margin: 0; text-align: center; font-size: 38px; }
.subtitle { margin: 8px 0 28px; text-align: center; color: #667085; }
label { display: block; margin: 18px 0 8px; font-weight: 650; }
input {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  border: 1px solid #ccd1d9;
  border-radius: 8px;
  outline: none;
  background: #fff;
}
input:focus { border-color: #176cc4; box-shadow: 0 0 0 3px rgba(23, 108, 196, .12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.icon-button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.captcha-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.captcha-button {
  min-width: 0;
  height: 54px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}
.captcha-button img { display: block; width: 100%; height: 54px; object-fit: contain; object-position: left center; }
small { display: block; margin-top: 6px; color: #7c8491; }
.login-button {
  width: 100%;
  min-height: 54px;
  margin-top: 30px;
  border: 0;
  border-radius: 7px;
  background: #176cc4;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.login-button:hover { filter: brightness(.95); }
.alert {
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid #e6a8a8;
  border-radius: 8px;
  background: #fff2f2;
  color: #a52929;
}

.dashboard-page { display: grid; place-items: center; padding: 24px; }
.dashboard-card {
  width: min(100%, 560px);
  padding: 38px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.dashboard-card h1 { margin: 12px 0 24px; }
.success-badge {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  background: #e8f8ef;
  color: #117a43;
  font-weight: 700;
  font-size: 14px;
}
.muted { color: #6d7480; line-height: 1.5; }

@media (max-width: 640px) {
  .login-page { padding: 22px 16px 40px; }
  .brand { font-size: 20px; }
  .login-card { margin-top: 12vh; padding: 30px 24px 32px; border-radius: 14px; }
  .login-card h1 { font-size: 31px; }
  .captcha-row { grid-template-columns: 92px 1fr; gap: 10px; }
}

/* v0.4 - verificação de dispositivo */
.verification-card {
  max-width: 700px;
}

.verification-user {
  margin: 0 0 24px;
  color: #4b5563;
  text-align: center;
}

.verification-section {
  margin-top: 24px;
}

.verification-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.verification-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #d5dbe5;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
}

.verification-option input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.verification-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.verification-option small {
  color: #64748b;
  overflow-wrap: anywhere;
}

.secondary-button {
  width: 100%;
  margin-top: 16px;
  min-height: 52px;
  border: 1px solid #1f73c9;
  border-radius: 9px;
  background: #fff;
  color: #1668b8;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-section {
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.confirm-section input {
  width: 100%;
  box-sizing: border-box;
}

.login-button:disabled,
.confirm-section input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.alert-success {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}

.back-link {
  display: block;
  margin-top: 22px;
  text-align: center;
  color: #1668b8;
  text-decoration: none;
}

@media (max-width: 600px) {
  .verification-options {
    grid-template-columns: 1fr;
  }
}

/* v0.31 — UniPanel: nova identidade visual */
:root {
  --uni-navy: #071226;
  --uni-navy-2: #0c1b38;
  --uni-blue: #2563eb;
  --uni-cyan: #06b6d4;
  --uni-purple: #7c3aed;
  --uni-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 48%, #7c3aed 100%);
  color: #152238;
  background: var(--uni-navy);
}
body { background: var(--uni-navy); }
.login-page,
.dashboard-page {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 15%, rgba(37,99,235,.27), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(6,182,212,.16), transparent 26%),
    radial-gradient(circle at 72% 88%, rgba(124,58,237,.17), transparent 30%),
    linear-gradient(145deg, #061022 0%, #0b1831 50%, #071226 100%);
}
.login-page::before,
.dashboard-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 72%);
}
.login-page { padding: 26px 24px 60px; }
.brand {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  gap: 12px;
}
.brand-logo {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(37,99,235,.35);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { color: #fff; font-size: 24px; letter-spacing: -.025em; }
.brand-copy small { margin-top: 5px; color: #8fa2bf; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.brand-mark { display: none; }
.login-card {
  position: relative;
  z-index: 2;
  width: min(100%, 540px);
  margin: 9vh auto 0;
  padding: 38px 42px 42px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 32px 85px rgba(1, 8, 22, .42);
}
.login-card::before {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  top: 0;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: var(--uni-gradient);
}
.login-eyebrow {
  width: max-content;
  margin: 0 auto 9px;
  padding: 6px 9px;
  display: block;
  border-radius: 999px;
  color: #315edc;
  background: #edf3ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .095em;
}
.login-card h1 { color: #0e1b30; font-size: 36px; letter-spacing: -.035em; }
.subtitle { max-width: 430px; margin: 9px auto 28px; color: #6c788c; line-height: 1.5; }
label { color: #45546b; font-size: 13px; font-weight: 800; }
input {
  height: 52px;
  border-color: #dce3ed;
  border-radius: 11px;
  color: #132238;
  background: #fbfcff;
}
input:focus { border-color: #4b74f4; box-shadow: 0 0 0 4px rgba(37,99,235,.10); background: #fff; }
.icon-button { color: #506078; }
.captcha-button { border-radius: 10px; background: #f5f7fb; }
.login-button {
  min-height: 52px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #4f46e5 58%, #7c3aed);
  box-shadow: 0 11px 25px rgba(37,99,235,.22);
}
.secondary-button {
  border-color: #cbd9ff;
  border-radius: 11px;
  color: #315edc;
  background: #f8faff;
}
.verification-option { border-color: #dfe5ef; border-radius: 13px; background: #fbfcff; }
.verification-option:has(input:checked) { border-color: #9fb7ff; background: #f2f6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.back-link { color: #315edc; font-weight: 750; }

@media (max-width: 640px) {
  .login-page { padding: 18px 14px 34px; }
  .brand-logo { width: 43px; height: 43px; flex-basis: 43px; border-radius: 12px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small { font-size: 8px; }
  .login-card { margin-top: 8vh; padding: 31px 22px 30px; border-radius: 19px; }
  .login-card h1 { font-size: 30px; }
}

/* v0.64 — controles com mais contraste */
input {
  border-color: #aebbd0;
  border-radius: 10px;
  color: #172033;
}
input:hover { border-color: #8fa1ba; }
input:focus { border-color: #2f6fed; box-shadow: 0 0 0 3px rgba(47,111,237,.16); }
.login-button {
  border-radius: 10px;
  background: #2f6fed;
  box-shadow: 0 8px 20px rgba(47,111,237,.22);
}
.login-button:hover { background: #245fd3; filter: none; }
.secondary-button {
  border-color: #aebdd3;
  color: #2f4768;
  background: #f1f5fa;
}
.secondary-button:hover { border-color: #8fa7c8; background: #e8eef7; }
.verification-option { border-color: #b9c5d6; }

/* v0.86 - login administrativo independente */
.admin-login-page {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background: linear-gradient(160deg, #172236 0%, #223451 55%, #152033 100%);
}
.admin-login-shell { width: min(100%, 450px); }
.admin-login-card {
  padding: 34px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(5, 14, 29, .32);
}
.admin-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.admin-login-brand img { width: 42px; height: 42px; border-radius: 11px; }
.admin-login-brand div { display: flex; flex-direction: column; }
.admin-login-brand strong { font-size: 18px; color: #182235; }
.admin-login-brand span { margin-top: 2px; color: #7a8494; font-size: 12px; }
.admin-login-heading { margin-bottom: 22px; }
.admin-login-heading h1 { margin: 10px 0 6px; font-size: 30px; color: #172236; }
.admin-login-heading p { margin: 0; color: #697386; line-height: 1.5; }
.admin-login-badge {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf3ff;
  color: #285da7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.admin-login-help { margin: 18px 0 0; color: #7b8493; font-size: 12px; text-align: center; }
@media (max-width: 520px) {
  .admin-login-card { padding: 28px 22px; border-radius: 16px; }
  .admin-login-heading h1 { font-size: 26px; }
}

.reconnect-box {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #b7cdf8;
  border-radius: 12px;
  background: #f3f7ff;
  color: #18345f;
  text-align: left;
}
.reconnect-box strong { display: block; margin-bottom: 5px; color: #174ea6; }
.reconnect-box p { margin: 0; font-size: 14px; line-height: 1.45; }

.reconnect-manual-link { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: #1d5fd1; text-decoration: none; }
.reconnect-manual-link:hover { text-decoration: underline; }

/* v1.13.2 — retry seguro do CAPTCHA sem perder as credenciais digitadas */
.alert[hidden] { display: none !important; }
#loginLiveAlert { margin-top: 14px; margin-bottom: 18px; }
.captcha-button img { user-select: none; -webkit-user-drag: none; }
.login-button:disabled { opacity: .58; cursor: wait; box-shadow: none; }


/* v1.14.32 — CTA de criação de conta pelo WhatsApp */
.create-account-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e4e9f1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #6b778c;
  font-size: 13px;
  font-weight: 650;
}
.create-account-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #b8c8e8;
  border-radius: 10px;
  color: #265fcf;
  background: #f7faff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
.create-account-button:hover {
  border-color: #7fa2ef;
  color: #1f55bf;
  background: #edf4ff;
  transform: translateY(-1px);
}
.create-account-button:focus-visible {
  outline: 3px solid rgba(47,111,237,.18);
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .create-account-block {
    flex-direction: column;
    gap: 8px;
  }
  .create-account-button {
    width: 100%;
  }
}
