* { box-sizing: border-box; }

body.goknowing-auth-page {
  min-height: 100vh;
  margin: 0;
  display: block;
  padding: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 5% 5%, color-mix(in srgb, var(--ui-brand) 10%, transparent), transparent 26%),
    var(--ui-bg) !important;
}

.auth-topbar {
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ui-nav);
  font: 800 19px "Manrope", sans-serif;
  text-decoration: none;
}

html[data-theme="dark"] .auth-logo { color: var(--ui-text); }

.auth-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ui-brand);
  background: color-mix(in srgb, var(--ui-nav) 8%, var(--ui-surface));
}

.auth-logo-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.auth-topbar .topbar-actions { margin-left: auto; }

.auth-home-link {
  padding: 10px 13px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  color: var(--ui-text);
  background: var(--ui-surface);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.auth-workspace {
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  padding: 28px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
  align-items: center;
  gap: clamp(45px, 8vw, 110px);
}

.auth-intro { max-width: 540px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--ui-success); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.auth-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--ui-success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ui-success) 12%, transparent); }

.auth-intro h1 {
  margin: 18px 0 15px;
  color: var(--ui-text);
  font: 700 clamp(2.7rem, 5vw, 4.65rem)/1.02 "Manrope", sans-serif;
  letter-spacing: -3.6px;
}

.auth-intro h1 span { color: var(--ui-brand); }
.auth-intro > p { max-width: 500px; margin: 0; color: var(--ui-muted); font-size: 15px; line-height: 1.7; }

.auth-benefits { margin-top: 30px; display: grid; gap: 10px; }
.auth-benefits article { padding: 12px; border: 1px solid var(--ui-border); border-radius: 13px; display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--ui-surface) 72%, transparent); }
.benefit-icon { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; }
.benefit-icon svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.benefit-icon.coral { color: #d95c44; background: #fff0ec; }
.benefit-icon.green { color: #338362; background: #ecf7f1; }
.benefit-icon.blue { color: #4f74b8; background: #edf3ff; }
html[data-theme="dark"] .benefit-icon.coral { background: rgba(255,122,95,.12); }
html[data-theme="dark"] .benefit-icon.green { background: rgba(102,196,149,.12); }
html[data-theme="dark"] .benefit-icon.blue { background: rgba(116,157,225,.12); }
.auth-benefits strong, .auth-benefits small { display: block; }
.auth-benefits strong { color: var(--ui-text); font-size: 11px; }
.auth-benefits small { margin-top: 3px; color: var(--ui-muted); font-size: 9px; line-height: 1.5; }

.auth-privacy-note { margin-top: 20px !important; display: flex; align-items: center; gap: 8px; font-size: 10px !important; }
.auth-privacy-note svg { width: 15px; flex: 0 0 auto; fill: none; stroke: var(--ui-success); stroke-width: 1.8; stroke-linejoin: round; }

.auth-card {
  padding: clamp(25px, 4vw, 38px);
  border: 1px solid var(--ui-border);
  border-radius: 22px;
  color: var(--ui-text);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow);
}

.auth-card-heading .eyebrow { margin: 0; color: var(--ui-brand); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.auth-card-heading h2 { margin: 8px 0 6px; color: var(--ui-text); font: 700 25px "Manrope", sans-serif; letter-spacing: -.8px; }
.auth-card-heading > p:last-child { margin: 0; color: var(--ui-muted); font-size: 11px; }

.auth-alerts { margin-bottom: 18px; display: grid; gap: 7px; }
.auth-alerts p { margin: 0; padding: 10px 12px; border: 1px solid #f1ccc5; border-radius: 10px; color: #a84432; background: #fff4f1; font-size: 10px; }
html[data-theme="dark"] .auth-alerts p { color: #ffb8aa; border-color: rgba(255,122,95,.28); background: rgba(255,122,95,.08); }

.auth-tabs { margin: 24px 0 22px; padding: 4px; border: 1px solid var(--ui-border); border-radius: 11px; display: grid; grid-template-columns: 1fr 1fr; background: var(--ui-surface-soft); }
.auth-tabs button { min-height: 38px; border: 0; border-radius: 8px; color: var(--ui-muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.auth-tabs button[aria-selected="true"] { color: var(--ui-text); background: var(--ui-surface); box-shadow: 0 5px 15px rgba(19,51,41,.08); }

.auth-panel[hidden] { display: none !important; }
.auth-form { display: grid; gap: 15px; }
.auth-field { display: grid; gap: 7px; color: var(--ui-text); font-size: 10px; font-weight: 700; }
.auth-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  outline: 0;
  color: var(--ui-text) !important;
  caret-color: var(--ui-brand);
  background: var(--ui-surface-soft) !important;
  font: 500 11px "DM Sans", sans-serif;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-field input::placeholder { color: var(--ui-faint) !important; opacity: 1; }
.auth-field input:focus { color: var(--ui-text) !important; border-color: var(--ui-brand); background: var(--ui-surface) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-brand) 12%, transparent); }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 65px; }
.password-field button { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 6px 8px; border: 0; border-radius: 7px; color: var(--ui-muted); background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.password-field button:hover { color: var(--ui-brand); background: var(--accent-soft); }

.auth-form-row { margin-top: -2px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-form-row a { color: var(--ui-brand); font-size: 9px; font-weight: 700; text-decoration: none; }
.secure-signin { color: var(--ui-muted); font-size: 9px; }
.password-hint { margin: -7px 0 0; color: var(--ui-muted); font-size: 9px; line-height: 1.5; }

.auth-submit { min-height: 46px; margin-top: 2px; padding: 0 15px; border: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff !important; background: var(--ui-brand) !important; box-shadow: 0 12px 26px color-mix(in srgb, var(--ui-brand) 20%, transparent); cursor: pointer; font: 700 10px "DM Sans", sans-serif; }
.auth-submit:hover { background: var(--ui-brand-hover) !important; transform: translateY(-1px); }
.auth-terms { margin: 20px 0 0; color: var(--ui-faint); text-align: center; font-size: 8px; }

@media (max-width: 880px) {
  .auth-workspace { width: min(650px, calc(100% - 32px)); grid-template-columns: 1fr; gap: 28px; }
  .auth-intro { max-width: none; text-align: center; }
  .auth-intro h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
  .auth-intro > p { margin-inline: auto; }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); text-align: left; }
  .auth-benefits article { align-items: flex-start; }
  .auth-privacy-note { justify-content: center; }
}

@media (max-width: 600px) {
  .auth-topbar { width: calc(100% - 24px); }
  .auth-home-link { display: none; }
  .auth-workspace { width: calc(100% - 24px); padding-top: 14px; }
  .auth-intro h1 { margin-top: 13px; letter-spacing: -2.4px; }
  .auth-benefits { grid-template-columns: 1fr; }
  .auth-benefits article:nth-child(n+2) { display: none; }
  .auth-card { padding: 22px 17px; border-radius: 17px; }
  .auth-form-row { align-items: flex-start; }
}
