:root {
  --bg: #080b11;
  --surface: #10151f;
  --surface-2: #151c28;
  --surface-3: #1b2432;
  --line: #263142;
  --line-soft: #1d2634;
  --text: #f5f7fb;
  --muted: #93a0b3;
  --muted-2: #6f7c8e;
  --brand: #5775b7;
  --brand-strong: #6e8bd0;
  --brand-soft: rgba(87, 117, 183, 0.16);
  --whatsapp: #25d366;
  --whatsapp-dark: #16a34a;
  --danger: #fb7185;
  --warning: #fbbf24;
  --success: #34d399;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --font-body: 'DM Sans', sans-serif;
  --font-display: 'Manrope', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.auth-body {
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  min-height: 100vh;
}

.auth-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 24%, rgba(87, 117, 183, 0.24), transparent 31%),
    linear-gradient(145deg, #0d1420 0%, #080b11 62%);
}

.auth-intro::before {
  content: '';
  position: absolute;
  right: -180px;
  bottom: -220px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(110, 139, 208, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(110, 139, 208, 0.035),
    0 0 0 140px rgba(110, 139, 208, 0.025);
  pointer-events: none;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.brand strong {
  color: var(--brand-strong);
}

.brand-large {
  font-size: 1.05rem;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(110, 139, 208, 0.45);
  border-radius: 11px;
  background: linear-gradient(145deg, #5574b5, #31466f);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.auth-copy {
  position: relative;
  z-index: 1;
  width: min(660px, 100%);
  margin: auto 0;
  padding: 56px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a9bce7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: #718ed0;
}

.auth-copy h1 {
  max-width: 720px;
  margin: 22px 0 18px;
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.auth-copy > p {
  max-width: 580px;
  margin: 0;
  color: #a5b0c0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.feature-list {
  display: grid;
  gap: 0;
  max-width: 570px;
  margin: 42px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: #dce3ee;
  font-weight: 500;
}

.feature-list span {
  color: var(--brand-strong);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted-2);
  font-size: 0.85rem;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px;
  border-left: 1px solid var(--line-soft);
  background: #0b0f16;
}

.auth-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(16, 21, 31, 0.92);
  box-shadow: var(--shadow);
}

.auth-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.1);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: -0.035em;
}

.auth-card > p:not(.terms) {
  margin: 0 0 26px;
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #0b0f16;
}

.segmented-button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
}

.segmented-button.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.24);
}

.field-group {
  margin-bottom: 18px;
}

.field-group label,
.editor-field label {
  display: block;
  margin-bottom: 7px;
  color: #c9d1de;
  font-size: 0.88rem;
  font-weight: 600;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-group input,
.editor-field input,
.editor-field textarea,
.editor-field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: #0b0f16;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-group input:focus,
.editor-field input:focus,
.editor-field textarea:focus,
.editor-field select:focus {
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 3px rgba(110, 139, 208, 0.12);
}

.field-group input::placeholder,
.editor-field input::placeholder,
.editor-field textarea::placeholder {
  color: #5e6978;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 78px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 11px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  transform: translateY(-50%);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #94ace2;
  cursor: pointer;
  font-size: 0.78rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.button-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px rgba(50, 72, 116, 0.3);
}

.button-primary:hover:not(:disabled) {
  background: var(--brand-strong);
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.button-danger {
  border-color: rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.09);
  color: #fda4af;
}

.button-full {
  width: 100%;
  min-height: 49px;
}

.button-arrow {
  font-size: 1.2rem;
  transition: transform 160ms ease;
}

.button:hover .button-arrow {
  transform: translateX(2px);
}

.message {
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid rgba(251, 113, 133, 0.22);
  border-radius: 8px;
  background: rgba(251, 113, 133, 0.08);
  color: #fda4af;
  font-size: 0.86rem;
}

.message-success {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
}

.terms {
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 0.76rem;
  text-align: center;
}

/* Public-page preview: deliberately independent of the workspace theme. */
.phone-frame {
  width: min(100%, 390px);
  margin: 0 auto;
  padding: 9px;
  border: 1px solid #2d3747;
  border-radius: 31px;
  background: #07090d;
  box-shadow: var(--shadow);
}

.phone-speaker {
  width: 76px;
  height: 18px;
  margin: 0 auto -18px;
  border-radius: 0 0 12px 12px;
  background: #07090d;
}

.preview-screen {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding: 22px 14px 20px;
  border-radius: 23px;
  background: linear-gradient(135deg, #fadadd, #fff1e6);
}

.preview-content {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.15);
  text-align: center;
}

.preview-logo {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  color: #9a7474;
  font-size: 0.74rem;
}

.preview-logo img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.preview-content h2 {
  margin: 0 0 10px;
  color: #3a2e2e;
  font-family: 'Montserrat', var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.preview-content > p {
  margin: 0 0 16px;
  color: #5a4a4a;
  font-size: 0.86rem;
  line-height: 1.5;
}

.preview-benefits {
  display: grid;
  width: 100%;
  gap: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #fff5f7;
  list-style: none;
  text-align: left;
}

.preview-benefits li {
  margin: 5px 0;
  color: #4a3a3a;
  font-size: 0.79rem;
  line-height: 1.4;
}

.preview-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff4d6d, #ff758f);
  box-shadow: 0 0 18px rgba(255, 77, 109, 0.38);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  animation: previewPulse 1.6s infinite;
}

.preview-button::before {
  content: '';
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' d='M16.05 3A12.9 12.9 0 0 0 5 22.55L3.3 29l6.6-1.73A12.96 12.96 0 1 0 16.05 3Zm0 23.55c-2.1 0-4.15-.56-5.93-1.62l-.43-.25-3.92 1.03 1.05-3.82-.28-.44a10.52 10.52 0 1 1 9.51 5.1Zm5.77-7.88c-.32-.16-1.87-.92-2.16-1.03-.29-.11-.5-.16-.71.16-.21.31-.82 1.03-1 1.24-.18.21-.37.24-.69.08-.31-.16-1.33-.49-2.54-1.57a9.5 9.5 0 0 1-1.76-2.19c-.18-.31-.02-.48.14-.64.14-.14.31-.37.47-.55.16-.19.21-.32.32-.53.1-.21.05-.39-.03-.55-.08-.16-.71-1.71-.98-2.34-.26-.62-.52-.54-.71-.55h-.61c-.21 0-.55.08-.84.39-.29.32-1.11 1.08-1.11 2.64 0 1.55 1.13 3.06 1.29 3.27.16.21 2.23 3.4 5.4 4.77.75.32 1.34.52 1.8.67.76.24 1.45.21 1.99.13.61-.09 1.87-.77 2.13-1.51.27-.74.27-1.37.19-1.51-.08-.13-.29-.21-.61-.37Z'/%3E%3C/svg%3E");
}

.preview-qr {
  display: none;
  margin-top: 20px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.preview-footer {
  margin-top: 14px;
  color: #8b6868;
  font-size: 0.68rem;
}

@keyframes previewPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
