:root {
  --sp-blue: #2b6afd;
  --sp-blue-hover: #1f5ae6;
  --sp-blue-soft: #eef3ff;
  --sp-blue-border: #9fbcff;
  --sp-ink: #0a2540;
  --sp-muted: #425466;
  --sp-label: #3c4257;
  --sp-border: #e3e8ee;
  --sp-border-strong: #c1c9d2;
  --sp-surface: #ffffff;
  --sp-page: #ffffff;
  --sp-footer-bg: #f7fafc;
  --sp-shadow: 0 2px 5px rgba(60, 66, 87, 0.08), 0 1px 1.5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(60, 66, 87, 0.06);
  --sp-radius: 8px;
  --sp-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sp-font);
  color: var(--sp-ink);
  background: var(--sp-page);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sp-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.auth-logo {
  position: absolute;
  top: 28px;
  left: 32px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
}

.auth-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.auth-page-footer {
  position: absolute;
  left: 32px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #697386;
}

.auth-page-footer a {
  color: #697386;
}

.auth-page-footer .dot {
  color: #c1c9d2;
}

/* Login layout */
.login-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.login-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 72px;
  position: relative;
  z-index: 2;
}

.auth-card {
  width: 100%;
  max-width: 448px;
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  overflow: hidden;
}

.auth-card__body {
  padding: 40px 48px 28px;
}

.auth-card__title {
  margin: 0 0 28px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sp-ink);
}

.field {
  margin-bottom: 18px;
}

.field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.field label,
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sp-label);
}

.field__row .field__label {
  margin-bottom: 0;
}

.field__hint {
  font-size: 13px;
}

.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--sp-border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--sp-ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus {
  border-color: var(--sp-blue);
  box-shadow: 0 0 0 3px rgba(43, 106, 253, 0.18);
}

.auth-message {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}
.auth-message[hidden] {
  display: none !important;
}
.auth-message.is-error {
  background: #fff0f0;
  color: #b42318;
  border: 1px solid #f3c1c1;
}
.auth-message.is-success {
  background: #effaf3;
  color: #0f7b3a;
  border: 1px solid #b7e4c7;
}
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23697386' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 22px;
  font-size: 14px;
  color: var(--sp-muted);
  line-height: 1.45;
}

.check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--sp-blue);
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--sp-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--sp-blue-hover);
}

.btn-primary:disabled {
  background: #a8c0ff;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  border-color: var(--sp-border-strong);
  color: var(--sp-ink);
  font-weight: 500;
}

.btn-secondary:hover {
  background: #f6f9fc;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #697386;
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--sp-border);
}

.alt-actions {
  display: grid;
  gap: 10px;
}

.alt-actions.row {
  grid-template-columns: repeat(3, 1fr);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-card__footer {
  background: var(--sp-footer-bg);
  border-top: 1px solid var(--sp-border);
  padding: 18px 48px;
  text-align: center;
  font-size: 14px;
  color: var(--sp-muted);
}

/* Ribbon art (login) */
.login-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.login-art__ribbon {
  position: absolute;
  right: -8%;
  top: -12%;
  width: min(58vw, 820px);
  height: 130%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 140, 66, 0.95), transparent 55%),
    radial-gradient(ellipse at 70% 35%, rgba(255, 82, 145, 0.95), transparent 50%),
    radial-gradient(ellipse at 45% 70%, rgba(120, 72, 255, 0.95), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(43, 106, 253, 0.85), transparent 45%),
    linear-gradient(160deg, #ff8a3d 0%, #ff4d8d 35%, #7b4dff 68%, #2b6afd 100%);
  border-radius: 46% 54% 48% 52% / 42% 38% 62% 58%;
  filter: blur(0.2px) saturate(1.05);
  transform: rotate(18deg) skewX(-8deg);
  box-shadow: inset 0 0 80px rgba(255, 255, 255, 0.18);
  opacity: 0.95;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
}

.login-art__ribbon::before,
.login-art__ribbon::after {
  content: "";
  position: absolute;
  inset: 8% 12%;
  border-radius: inherit;
  background: repeating-linear-gradient(
    -32deg,
    rgba(255, 255, 255, 0.14) 0 2px,
    transparent 2px 10px
  );
  mix-blend-mode: soft-light;
  opacity: 0.55;
}

.login-art__ribbon::after {
  inset: 18% 22%;
  background: radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.35), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

/* Signup layout */
.signup-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #eef2f7;
}

.dash-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: blur(5px) saturate(0.9);
  transform: scale(1.02);
  opacity: 0.9;
  background: linear-gradient(180deg, #f5f7fb 0%, #e8eef6 100%);
  pointer-events: none;
}

.dash-bg__frame {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  padding: 18px;
  gap: 14px;
}

.dash-side {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dde3ec;
  padding: 18px 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.dash-side__brand {
  height: 18px;
  width: 96px;
  border-radius: 4px;
  background: #d7dee8;
  margin-bottom: 10px;
}

.dash-side__item {
  height: 12px;
  border-radius: 4px;
  background: #e6ebf2;
}

.dash-side__item:nth-child(3) {
  width: 72%;
  background: #dce6ff;
}

.dash-main {
  display: grid;
  grid-template-rows: 48px 1fr;
  gap: 14px;
  min-width: 0;
}

.dash-top {
  background: #fff;
  border: 1px solid #dde3ec;
  border-radius: 12px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  min-height: 0;
}

.dash-card {
  background: #fff;
  border: 1px solid #dde3ec;
  border-radius: 12px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.dash-card__title {
  height: 10px;
  width: 40%;
  border-radius: 4px;
  background: #e6ebf2;
  margin-bottom: 16px;
}

.dash-card__chart {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  top: 48px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(43, 106, 253, 0.08) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0 28px,
      rgba(148, 163, 184, 0.12) 28px 29px
    );
}

.dash-card__chart::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18%;
  height: 42%;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #9fbcff, #2b6afd, #7b4dff);
  opacity: 0.35;
  clip-path: polygon(0 70%, 12% 55%, 28% 62%, 44% 30%, 60% 48%, 76% 22%, 100% 40%, 100% 100%, 0 100%);
}

.signup-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px 64px;
  position: relative;
  z-index: 2;
}

.signup-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(49, 49, 93, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
  padding: 32px 36px 28px;
}

.signup-card__title {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sp-ink);
}

.signup-meta {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--sp-muted);
}

.signup-shell .auth-page-footer {
  left: auto;
  right: 32px;
  color: #697386;
}

.country-field {
  position: relative;
  margin-bottom: 18px;
}

.country-trigger {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--sp-border-strong);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  color: var(--sp-ink);
  text-align: left;
}

.country-trigger.is-pending {
  color: #697386;
  cursor: wait;
}

.country-trigger.is-pending .country-trigger__chevron {
  opacity: 0.25;
}

.country-trigger:disabled {
  opacity: 1;
}

.country-trigger__value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.country-trigger__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-trigger__chevron {
  width: 10px;
  height: 16px;
  position: relative;
  flex: 0 0 auto;
  opacity: 0.55;
}

.country-trigger__chevron::before,
.country-trigger__chevron::after {
  content: "";
  position: absolute;
  left: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.country-trigger__chevron::before {
  top: 1px;
  border-bottom: 5px solid #697386;
}

.country-trigger__chevron::after {
  bottom: 1px;
  border-top: 5px solid #697386;
}

.country-flag {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.country-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(49, 49, 93, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.country-search {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--sp-border);
}

.country-search__input {
  width: 100%;
  height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--sp-border-strong);
  border-radius: 6px;
  font: inherit;
  font-size: 14px;
  outline: none;
}

.country-search__input:focus {
  border-color: var(--sp-blue);
  box-shadow: 0 0 0 3px rgba(43, 106, 253, 0.15);
}

.country-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 240px;
  overflow: auto;
}

.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--sp-ink);
}

.country-option:hover,
.country-option.is-active {
  background: var(--sp-blue-soft);
}

@media (max-width: 900px) {
  .login-art__ribbon {
    opacity: 0.35;
    right: -30%;
    width: 90vw;
  }

  .dash-bg__frame {
    grid-template-columns: 1fr;
  }

  .dash-side {
    display: none;
  }
}

@media (max-width: 560px) {
  .auth-logo {
    left: 20px;
    top: 20px;
  }

  .auth-card__body,
  .auth-card__footer {
    padding-left: 22px;
    padding-right: 22px;
  }

  .signup-card {
    padding: 28px 22px 22px;
  }

  .alt-actions.row {
    grid-template-columns: 1fr;
  }

  .auth-page-footer {
    left: 20px;
    right: 20px;
    bottom: 16px;
  }

  .signup-shell .auth-page-footer {
    right: 20px;
  }
}

/* Signup background: the real dashboard (static demo page), blurred behind the card */
.dash-bg__demo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  background: #f5f7fb;
}

.dash-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(238, 242, 247, 0.35);
  pointer-events: none;
}
