/* ── ORGANIO AUTH PAGES — login.css + cadastro.css compartilhado ── */

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

body {
  min-height: 100vh;
  font-family: var(--font-body, 'Inter', sans-serif);
  background: var(--gray-50, #fafafa);
  display: flex;
}

/* ── LAYOUT SPLIT ── */
.auth-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── PAINEL ESQUERDO — branding ── */
.auth-panel {
  width: 42%;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 52px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Círculos decorativos */
.auth-panel::before,
.auth-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: .08;
}
.auth-panel::before {
  width: 460px; height: 460px;
  background: var(--primary, #c38822);
  top: -140px; right: -140px;
}
.auth-panel::after {
  width: 320px; height: 320px;
  background: var(--primary, #c38822);
  bottom: -100px; left: -80px;
}

.auth-panel-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.auth-panel-logo img { height: 36px; filter: brightness(0) invert(1); }
.auth-panel-logo-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}

.auth-panel-body {
  position: relative;
  z-index: 1;
}
.auth-panel-tag {
  display: inline-block;
  background: rgba(195, 136, 34, .25);
  color: var(--primary, #c38822);
  border: 1px solid rgba(195, 136, 34, .4);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.auth-panel-headline {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -.5px;
}
.auth-panel-headline span { color: var(--primary, #c38822); }
.auth-panel-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 340px;
}

/* Feature list */
.auth-features { display: flex; flex-direction: column; gap: 14px; }
.auth-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.auth-feature-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(195, 136, 34, .15);
  border: 1px solid rgba(195, 136, 34, .3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.auth-feature-text strong {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1px;
}
.auth-feature-text span {
  font-size: .77rem;
  color: rgba(255,255,255,.5);
  line-height: 1.4;
}

/* Testimonial */
.auth-testimonial {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(8px);
}
.auth-testimonial-text {
  font-size: .82rem;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  margin-bottom: 12px;
  font-style: italic;
}
.auth-testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-testimonial-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #c38822), #e8a930);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem; color: #fff;
  flex-shrink: 0;
}
.auth-testimonial-name { font-size: .78rem; font-weight: 700; color: #fff; }
.auth-testimonial-role { font-size: .7rem; color: rgba(255,255,255,.5); }
.auth-stars { color: #f59e0b; font-size: .75rem; margin-top: 1px; }

/* ── PAINEL DIREITO — formulário ── */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #fff;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header { margin-bottom: 28px; }
.auth-greeting {
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary, #c38822);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.auth-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text, #1a1a2e);
  line-height: 1.2;
  letter-spacing: -.4px;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: .875rem;
  color: var(--text-muted, #666655);
  line-height: 1.5;
}

/* Form elements */
.form-group { margin-bottom: 16px; }
.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text, #1a1a2e);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
}
.forgot-link {
  font-size: .75rem;
  color: var(--primary, #c38822);
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  transition: opacity .2s;
}
.forgot-link:hover { opacity: .75; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200, #e8e8e0);
  border-radius: 12px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text, #1a1a2e);
  background: var(--gray-50, #fafafa);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-input:focus {
  border-color: var(--primary, #c38822);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(195, 136, 34, .12);
}
.form-hint {
  font-size: .73rem;
  color: var(--text-muted, #666655);
  margin-top: 4px;
  line-height: 1.4;
}

.password-wrap, .input-group {
  position: relative;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #666655);
  font-size: 1rem;
  padding: 4px;
  transition: color .2s;
}
.password-toggle:hover { color: var(--text, #1a1a2e); }

/* Submit button */
.btn-auth {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--primary, #c38822), #e8a930);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 16px rgba(195, 136, 34, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.btn-auth:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(195, 136, 34, .45);
}
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Alert */
.auth-alert {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: .84rem;
  margin-bottom: 14px;
  display: none;
  line-height: 1.4;
}
.auth-alert.error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; display: block; }
.auth-alert.success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; display: block; }

/* Footer */
.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: .85rem;
  color: var(--text-muted, #666655);
}
.auth-footer a {
  color: var(--primary, #c38822);
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.auth-footer a:hover { opacity: .75; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted, #666655);
  font-size: .75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200, #e8e8e0);
}

/* Role tabs (cadastro) */
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
  background: var(--gray-50, #fafafa);
  border-radius: 12px;
  padding: 4px;
  border: 1.5px solid var(--gray-200, #e8e8e0);
}
.role-tab {
  padding: 9px;
  border: none;
  border-radius: 9px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  background: none;
  color: var(--text-muted, #666655);
  font-family: inherit;
  transition: all .2s;
}
.role-tab.active {
  background: #fff;
  color: var(--primary, #c38822);
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

/* Trial badge */
.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(195,136,34,.12), rgba(232,169,48,.08));
  border: 1px solid rgba(195,136,34,.3);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary, #c38822);
  margin-bottom: 18px;
}
.trial-badge::before { content: '🎁'; font-size: .85rem; }

/* Stats strip */
.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.1);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 32px;
}
.auth-stat {
  background: rgba(255,255,255,.05);
  padding: 14px 16px;
  text-align: center;
}
.auth-stat-num {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary, #c38822);
  line-height: 1;
  margin-bottom: 3px;
}
.auth-stat-label {
  font-size: .67rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* Entry animation */
.auth-card { animation: authCardIn .4s ease; }
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-panel-body { animation: authPanelIn .5s ease .1s both; }
.auth-panel-logo { animation: authPanelIn .4s ease both; }
@keyframes authPanelIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Pro fields (cadastro) — hidden until JS shows */
#pro-fields { display: none; }

/* Input error state */
.form-input.input-error {
  border-color: #ef4444;
  background: #fef2f2;
}
.form-input.input-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .auth-panel { width: 38%; padding: 40px 36px; }
  .auth-features { display: none; }
}
@media (max-width: 680px) {
  .auth-layout { flex-direction: column; }
  .auth-panel {
    width: 100%;
    padding: 28px 24px 32px;
    min-height: auto;
  }
  .auth-panel::before,
  .auth-panel::after { display: none; }
  .auth-panel-body { display: none; }
  .auth-testimonial { display: none; }
  .auth-stats { margin-top: 16px; }
  .auth-stat-num { font-size: 1rem; }
  .auth-form-side { padding: 28px 20px; align-items: flex-start; }
}
@media (max-width: 400px) {
  .auth-stats { grid-template-columns: repeat(3, 1fr); }
}
