@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,400..850;1,14..32,400..850&display=swap");

/* =========================================================
   AdProfit Premium Auth UI
   login.html + signup.html
   ========================================================= */

.auth-page {
  --auth-bg: #050816;
  --auth-bg-2: #07111f;
  --auth-panel: rgba(8, 13, 28, 0.72);
  --auth-panel-strong: rgba(12, 19, 38, 0.84);
  --auth-border: rgba(255, 255, 255, 0.12);
  --auth-border-strong: rgba(255, 255, 255, 0.2);
  --auth-text: #f8fafc;
  --auth-muted: #9aa7bb;
  --auth-soft: #66758d;
  --auth-blue: #5b8cff;
  --auth-cyan: #31d8c4;
  --auth-violet: #8b5cf6;
  --auth-green: #69e99d;
  --auth-danger: #ff8a8a;
  --auth-radius: 30px;
  --auth-shadow: 0 40px 120px rgba(0, 0, 0, 0.58);

  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(91, 140, 255, 0.18), transparent 30%),
    radial-gradient(circle at 78% 12%, rgba(49, 216, 196, 0.14), transparent 26%),
    radial-gradient(circle at 50% 95%, rgba(139, 92, 246, 0.18), transparent 32%),
    linear-gradient(135deg, var(--auth-bg), var(--auth-bg-2));
  overflow-x: hidden;
}

/* Background */

.auth-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(22px, 4vw, 58px);
  isolation: isolate;
}

.auth-grid,
.auth-orb {
  position: fixed;
  pointer-events: none;
  z-index: -2;
}

.auth-grid {
  inset: 0;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 42%, black 0%, transparent 74%);
}

.auth-orb {
  width: 380px;
  height: 380px;
  border-radius: 999px;
  filter: blur(46px);
  opacity: 0.42;
}

.auth-orb--one {
  top: 8%;
  left: 5%;
  background: #496cff;
}

.auth-orb--two {
  right: 4%;
  bottom: 7%;
  background: #25d9c2;
}

.auth-orb--three {
  left: 42%;
  bottom: -10%;
  background: #7c3aed;
  opacity: 0.26;
}

/* Shell */

.auth-shell--premium {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(350px, 0.86fr) minmax(460px, 1.14fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: stretch;
}

.auth-panel {
  position: relative;
  border: 1px solid var(--auth-border);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025) 42%, rgba(255,255,255,0.045)),
    var(--auth-panel);
  box-shadow:
    var(--auth-shadow),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.11), transparent 30%),
    linear-gradient(90deg, rgba(255,255,255,0.04), transparent 28%);
}

.auth-panel--form {
  border-radius: var(--auth-radius);
  padding: clamp(30px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-panel--visual {
  min-height: 610px;
  border-radius: calc(var(--auth-radius) + 10px);
  padding: clamp(26px, 4vw, 46px);
  background:
    radial-gradient(circle at 42% 20%, rgba(91, 140, 255, 0.24), transparent 30%),
    radial-gradient(circle at 80% 75%, rgba(49, 216, 196, 0.17), transparent 28%),
    linear-gradient(145deg, rgba(9, 14, 30, 0.94), rgba(6, 10, 22, 0.84));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Brand */

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  color: var(--auth-text);
  text-decoration: none;
  margin-bottom: 34px;
}

.auth-brand__mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  background:
    linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
  color: #04111d;
  font-weight: 850;
  letter-spacing: -0.07em;
  box-shadow:
    0 18px 42px rgba(49, 216, 196, 0.25),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

.auth-brand__copy strong,
.auth-brand__copy small {
  display: block;
}

.auth-brand__copy strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.auth-brand__copy small {
  margin-top: 2px;
  font-size: 12px;
  color: var(--auth-muted);
}

/* Copy */

.auth-copy {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px solid rgba(49, 216, 196, 0.24);
  background: rgba(49, 216, 196, 0.08);
  color: #9ff7ea;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--auth-cyan);
  box-shadow: 0 0 16px var(--auth-cyan);
}

.auth-title {
  margin: 0;
  max-width: 440px;
  color: var(--auth-text);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.94;
  letter-spacing: -0.075em;
  font-weight: 840;
}

.auth-lead {
  max-width: 440px;
  margin: 18px 0 0;
  color: var(--auth-muted);
  font-size: 15.5px;
  line-height: 1.65;
}

/* Form */

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.auth-field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 8px;
  color: #d7deea;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 19px;
  height: 19px;
  color: var(--auth-soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-field input {
  width: 100%;
  min-height: 55px;
  padding: 0 16px 0 46px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: var(--auth-text);
  font-size: 15px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 12px 24px rgba(0,0,0,0.15);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.auth-field input::placeholder {
  color: rgba(154, 167, 187, 0.55);
}

.auth-field input:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.055);
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(49,216,196,0.65);
  box-shadow:
    0 0 0 4px rgba(49,216,196,0.12),
    0 18px 38px rgba(0,0,0,0.28);
  transform: translateY(-1px);
}

.auth-field input[aria-invalid="true"] {
  border-color: rgba(255,138,138,0.75);
  box-shadow: 0 0 0 4px rgba(255,138,138,0.14);
}

.auth-hint {
  margin: 9px 0 0;
  color: var(--auth-soft);
  font-size: 12.5px;
  line-height: 1.45;
}

.auth-error {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffd7d7;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid rgba(255,138,138,0.22);
  background: rgba(122, 25, 35, 0.34);
}

.auth-error:not(:empty) {
  display: block;
}

.auth-btn {
  position: relative;
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 17px;
  cursor: pointer;
  color: #03101a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.auth-btn--primary {
  background:
    linear-gradient(135deg, #ffffff 0%, #bffdf3 38%, #5b8cff 100%);
  box-shadow:
    0 18px 44px rgba(91,140,255,0.28),
    0 10px 24px rgba(49,216,196,0.16),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.auth-btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  transition: transform 550ms ease;
}

.auth-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 24px 54px rgba(91,140,255,0.34),
    0 12px 30px rgba(49,216,196,0.18);
}

.auth-btn--primary:hover::before {
  transform: translateX(110%);
}

.auth-btn--primary:active {
  transform: translateY(0) scale(0.99);
}

.auth-btn__icon {
  position: relative;
  z-index: 1;
}

.auth-btn span {
  position: relative;
  z-index: 1;
}

/* Bottom */

.auth-security-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.auth-security-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  color: var(--auth-muted);
  background: rgba(255,255,255,0.035);
  font-size: 11.5px;
}

.auth-security-row span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--auth-green);
  box-shadow: 0 0 12px rgba(105,233,157,0.72);
}

.auth-footer {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  color: var(--auth-muted);
  font-size: 13.5px;
  text-align: center;
}

.auth-footer a {
  color: #bffdf3;
  font-weight: 750;
  text-decoration: none;
  border-bottom: 1px solid rgba(191,253,243,0.35);
}

.auth-footer a:hover {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.65);
}

/* Visual side */

.visual-topline {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin-bottom: 24px;
  padding: 8px 12px;
  color: #c7d5e8;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
}

.visual-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--auth-green);
  box-shadow: 0 0 18px rgba(105,233,157,0.8);
}

.auth-hero-visual {
  position: relative;
  min-height: 430px;
  perspective: 1400px;
}

.mock-window {
  position: relative;
  z-index: 1;
  transform:
    rotateX(8deg)
    rotateY(-12deg)
    rotateZ(1deg);
  transform-style: preserve-3d;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(4, 8, 18, 0.82);
  box-shadow:
    0 70px 130px rgba(0,0,0,0.62),
    0 0 90px rgba(91,140,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 450ms ease;
}

.auth-panel--visual:hover .mock-window {
  transform:
    rotateX(5deg)
    rotateY(-8deg)
    rotateZ(0deg)
    translateY(-4px);
}

.mock-window__bar {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025));
}

.mock-window__bar span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.mock-window__bar span:nth-child(1) { background: #ff6b6b; }
.mock-window__bar span:nth-child(2) { background: #ffd166; }
.mock-window__bar span:nth-child(3) { background: #69e99d; }

.mock-window__bar em {
  margin-left: auto;
  color: var(--auth-soft);
  font-style: normal;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mock-window__body {
  display: grid;
  grid-template-columns: 62px 1fr;
  min-height: 330px;
}

.mock-sidebar {
  padding: 22px 14px;
  display: grid;
  align-content: start;
  gap: 13px;
  border-right: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
}

.mock-sidebar i {
  display: block;
  height: 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
}

.mock-sidebar i:first-child {
  background: linear-gradient(90deg, var(--auth-cyan), var(--auth-blue));
  box-shadow: 0 0 18px rgba(49,216,196,0.4);
}

.mock-content {
  padding: 22px;
}

.mock-metrics {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 14px;
  margin-bottom: 16px;
}

.mock-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.095);
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.mock-card small,
.floating-card small {
  display: block;
  color: var(--auth-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mock-card strong,
.floating-card strong {
  display: block;
  margin-top: 8px;
  color: var(--auth-text);
  font-size: 27px;
  letter-spacing: -0.06em;
  line-height: 1;
}

.mock-card span {
  display: block;
  margin-top: 8px;
  color: var(--auth-green);
  font-size: 12px;
  font-weight: 700;
}

.mock-chart {
  height: 132px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 20px;
  border: 1px solid rgba(91,140,255,0.2);
  background:
    radial-gradient(circle at 20% 0%, rgba(91,140,255,0.18), transparent 44%),
    rgba(255,255,255,0.035);
}

.mock-chart span {
  flex: 1;
  height: var(--h);
  min-height: 18px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #bffdf3, #5b8cff);
  box-shadow: 0 0 22px rgba(91,140,255,0.28);
}

.mock-chart--cyan span {
  background: linear-gradient(180deg, #bffdf3, #31d8c4);
}

.mock-row {
  display: grid;
  grid-template-columns: 32px 1fr 54px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.mock-row b {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
}

.mock-row span {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
}

.mock-row em {
  height: 10px;
  border-radius: 999px;
  background: rgba(105,233,157,0.42);
}

.mock-row--short span {
  width: 72%;
}

/* Floating elements */

.floating-pill,
.floating-card {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8, 13, 28, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.44),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.floating-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 999px;
  color: #e7f4ff;
  font-size: 12.5px;
  font-weight: 760;
  animation: auth-float 5.5s ease-in-out infinite;
}

.floating-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--auth-green);
  box-shadow: 0 0 16px rgba(105,233,157,0.85);
}

.floating-pill--meta {
  left: -18px;
  top: 86px;
}

.floating-pill--insight {
  right: -12px;
  bottom: 90px;
  animation-delay: -1.4s;
}

.floating-card {
  min-width: 128px;
  padding: 14px 15px;
  border-radius: 20px;
  animation: auth-float 6s ease-in-out infinite;
}

.floating-card--profit {
  right: 12px;
  top: 32px;
  animation-delay: -0.8s;
}

.floating-card--revenue {
  left: 26px;
  bottom: 28px;
  animation-delay: -2s;
}

@keyframes auth-float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Responsive */

@media (max-width: 1020px) {
  .auth-shell--premium {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .auth-panel--visual {
    min-height: 500px;
    order: 2;
  }

  .auth-panel--form {
    order: 1;
  }

  .auth-title {
    font-size: clamp(34px, 8vw, 48px);
  }
}

@media (max-width: 640px) {
  .auth-stage {
    padding: 18px;
    place-items: start center;
  }

  .auth-shell--premium {
    gap: 16px;
  }

  .auth-panel--form {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .auth-panel--visual {
    min-height: 0;
    padding: 18px;
    border-radius: 24px;
  }

  .auth-brand {
    margin-bottom: 24px;
  }

  .auth-title {
    font-size: 34px;
    letter-spacing: -0.065em;
  }

  .auth-lead {
    font-size: 14px;
  }

  .auth-security-row {
    flex-direction: column;
  }

  .auth-security-row span {
    justify-content: center;
  }

  .auth-hero-visual {
    min-height: 310px;
  }

  .mock-window {
    transform: none;
  }

  .auth-panel--visual:hover .mock-window {
    transform: translateY(-2px);
  }

  .mock-window__body {
    grid-template-columns: 42px 1fr;
    min-height: 240px;
  }

  .mock-sidebar {
    padding: 16px 10px;
  }

  .mock-content {
    padding: 15px;
  }

  .mock-metrics {
    grid-template-columns: 1fr;
  }

  .mock-card {
    min-height: 78px;
  }

  .mock-card strong {
    font-size: 23px;
  }

  .mock-chart {
    height: 94px;
    padding: 12px;
  }

  .floating-pill,
  .floating-card {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-pill,
  .floating-card {
    animation: none;
  }

  .mock-window,
  .auth-panel--visual:hover .mock-window,
  .auth-btn,
  .auth-field input {
    transition: none;
    transform: none;
  }
}

/* Settings compatibility */
.settings-page .auth-title {
  font-size: 1.5rem;
}

.settings-page .auth-lead {
  color: var(--color-text-muted, #a1a1aa);
}