:root {
  --caa-auth-primary: #6548e8;
  --caa-auth-primary-dark: #4e34c8;
  --caa-auth-text: #172033;
  --caa-auth-muted: #697287;
  --caa-auth-border: #dfe3ec;
  --caa-auth-danger: #b4233d;
  --caa-auth-success: #147a50;
}
* { box-sizing: border-box; }
html, body.caa-os-auth-page { min-height: 100%; }
body.caa-os-auth-page {
  margin: 0;
  background: #eef1f7;
  color: var(--caa-auth-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.caa-os-auth-page #wpadminbar { display: none !important; }
.caa-auth-main { min-height: 100vh; }
.caa-auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.04fr) minmax(480px, .96fr);
  overflow: hidden;
  background: #fff;
}
.caa-auth-visual {
  position: relative;
  min-height: 100vh;
  padding: clamp(48px, 7vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(11, 18, 45, .96), rgba(40, 26, 92, .94)),
    radial-gradient(circle at 20% 20%, #8269ff, transparent 40%);
}
.caa-auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image:
    linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
.caa-auth-orb { position: absolute; border-radius: 999px; filter: blur(2px); pointer-events: none; }
.caa-auth-orb-one { width: 340px; height: 340px; top: -120px; right: -90px; background: rgba(135, 107, 255, .3); }
.caa-auth-orb-two { width: 260px; height: 260px; bottom: 4%; left: -110px; background: rgba(255, 165, 98, .2); }
.caa-auth-brand, .caa-auth-feature-grid { position: relative; z-index: 1; }
.caa-auth-brand img {
  width: 76px;
  height: 76px;
  display: block;
  margin-bottom: 28px;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0,0,0,.26);
}
.caa-auth-brand > span {
  display: block;
  margin-bottom: 18px;
  color: #cfc6ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.caa-auth-brand h1 {
  max-width: 660px;
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.caa-auth-brand p {
  max-width: 600px;
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 17px;
  line-height: 1.75;
}
.caa-auth-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 620px; }
.caa-auth-feature-grid > div {
  min-height: 100px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(14px);
}
.caa-auth-feature-grid .dashicons { width: auto; height: auto; color: #bfaeff; font-size: 27px; }
.caa-auth-feature-grid strong { color: #fff; font-size: 14px; }
.caa-auth-panel {
  min-height: 100vh;
  padding: 42px clamp(24px, 6vw, 90px);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 100% 0, rgba(101,72,232,.08), transparent 30%),
    #fff;
}
.caa-auth-card { width: min(100%, 470px); }
.caa-auth-mobile-brand { display: none; }
.caa-auth-eyebrow {
  margin: 0 0 10px;
  color: var(--caa-auth-primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.caa-auth-card h2 {
  margin: 0;
  color: var(--caa-auth-text);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.caa-auth-description { margin: 14px 0 30px; color: var(--caa-auth-muted); font-size: 15px; line-height: 1.7; }
.caa-auth-form { display: grid; gap: 19px; }
.caa-auth-field { display: grid; gap: 8px; color: #354056; font-size: 13px; font-weight: 750; }
.caa-auth-field small { color: #828a9b; font-size: 11px; font-weight: 500; line-height: 1.5; }
.caa-auth-input-wrap { position: relative; display: flex; align-items: center; }
.caa-auth-input-wrap > .dashicons:first-child {
  position: absolute;
  left: 15px;
  z-index: 1;
  width: 20px;
  height: 20px;
  color: #929aad;
  font-size: 19px;
  pointer-events: none;
}
.caa-auth-input-wrap input {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 12px 48px 12px 46px;
  border: 1px solid var(--caa-auth-border);
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: var(--caa-auth-text);
  box-shadow: 0 2px 4px rgba(20,26,48,.02);
  font: inherit;
  font-weight: 550;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.caa-auth-input-wrap input:focus {
  border-color: #8a76ef;
  box-shadow: 0 0 0 4px rgba(101,72,232,.1), 0 8px 22px rgba(31,37,66,.06);
}
.caa-auth-password-toggle {
  position: absolute;
  right: 9px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7f8799;
  cursor: pointer;
}
.caa-auth-password-toggle:hover { background: #f1effc; color: var(--caa-auth-primary); }
.caa-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: -2px; }
.caa-auth-row a, .caa-auth-back { color: var(--caa-auth-primary); text-decoration: none; font-size: 13px; font-weight: 750; }
.caa-auth-row a:hover, .caa-auth-back:hover { color: var(--caa-auth-primary-dark); }
.caa-auth-check { display: inline-flex; align-items: center; gap: 9px; color: #687186; font-size: 13px; font-weight: 600; cursor: pointer; }
.caa-auth-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--caa-auth-primary); }
.caa-auth-submit {
  width: 100%;
  min-height: 54px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #7156ee, #5639d2);
  color: #fff;
  box-shadow: 0 15px 30px rgba(86,57,210,.22);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.caa-auth-submit:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 18px 35px rgba(86,57,210,.29); filter: saturate(1.08); }
.caa-auth-submit.is-loading { opacity: .78; pointer-events: none; }
.caa-auth-submit.is-loading .dashicons { animation: caa-auth-spin .7s linear infinite; }
.caa-auth-back { margin-top: 24px; display: inline-flex; align-items: center; gap: 5px; }
.caa-auth-notice {
  margin: 0 0 20px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}
.caa-auth-notice.is-error { border-color: #f1c2cb; background: #fff1f3; color: var(--caa-auth-danger); }
.caa-auth-notice.is-success { border-color: #b9e3d2; background: #effbf5; color: var(--caa-auth-success); }
.caa-auth-notice .dashicons { flex: 0 0 20px; }
.caa-auth-security {
  margin: 32px 0 0;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-top: 1px solid #edf0f5;
  color: #9198a8;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.caa-auth-security .dashicons { width: 16px; height: 16px; font-size: 15px; }
.caa-auth-invalid { padding: 22px; border: 1px solid #f0d9de; border-radius: 16px; background: #fff7f8; text-align: center; }
.caa-auth-invalid > .dashicons { width: 46px; height: 46px; color: #c14059; font-size: 46px; }
.caa-auth-invalid h3 { margin: 13px 0 8px; font-size: 20px; }
.caa-auth-invalid p { margin: 0 0 20px; color: var(--caa-auth-muted); line-height: 1.65; }
@keyframes caa-auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 980px) {
  .caa-auth-shell { grid-template-columns: 1fr; }
  .caa-auth-visual { display: none; }
  .caa-auth-panel { min-height: 100vh; padding: 32px 22px; background: radial-gradient(circle at 50% 0, rgba(101,72,232,.12), transparent 38%), #f5f6fa; }
  .caa-auth-card { padding: 34px; border: 1px solid rgba(221,225,235,.9); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 24px 70px rgba(29,34,58,.12); }
  .caa-auth-mobile-brand { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 30px; color: var(--caa-auth-text); text-decoration: none; font-weight: 850; }
  .caa-auth-mobile-brand img { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 10px 25px rgba(62,45,145,.18); }
}
@media (max-width: 560px) {
  .caa-auth-panel { padding: 0; place-items: stretch; }
  .caa-auth-card { width: 100%; min-height: 100vh; padding: 30px 22px calc(30px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .caa-auth-card h2 { font-size: 34px; }
  .caa-auth-description { margin-bottom: 26px; }
  .caa-auth-row { align-items: flex-start; }
}
