/* SP Tech Services — Auth screens
   Colors/type/spacing taken directly from the Penpot "Auth" page
   (Login / Forgot Password — Desktop & Mobile — Light & Dark). */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800&family=Inter+Tight:wght@400;500;600;700&display=swap');

:root {
  --page-bg: #f1f5f9;
  --panel-gradient: linear-gradient(135deg, #5b21b6 0%, #7c3aed 45%, #15803d 78%, #22c55e 100%);
  --mobile-gradient: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #22c55e 100%);

  --card-bg: #ffffff;
  --card-border: #e2e8f0;

  --heading: #0f172a;
  --muted: #64748b;
  --label: #334155;
  --placeholder: #94a3b8;

  --input-bg: #ffffff;
  --input-bg-mobile: #f8fafc;
  --input-border: #e2e8f0;

  --accent: #7c3aed;
  --accent-soft: #a78bfa;
  --button-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);

  --divider: #e2e8f0;
  --bullet: #a3e635;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0b1120;
    --panel-gradient: linear-gradient(135deg, #2e1065 0%, #0b1120 52%, #052e16 100%);
    --mobile-gradient: linear-gradient(135deg, #2e1065 0%, #0b1120 55%, #052e16 100%);

    --card-bg: #0f172a;
    --card-border: #334155;

    --heading: #f8fafc;
    --muted: #94a3b8;
    --label: #cbd5e1;
    --placeholder: #64748b;

    --input-bg: #1e293b;
    --input-bg-mobile: #1e293b;
    --input-border: #334155;

    --accent: #a78bfa;
    --accent-soft: #a78bfa;

    --divider: #334155;
  }
}

* { box-sizing: border-box; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: var(--heading);
}

.auth-shell {
  display: flex;
  min-height: 100vh;
}

/* ---------- Brand panel (left, desktop) ---------- */
.auth-brand {
  position: relative;
  flex: 0 0 39%;
  min-width: 420px;
  background: var(--panel-gradient);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 64px 56px;
}

.auth-brand__dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
.auth-brand__dot:nth-child(1) { top: 90px;  left: 60%; }
.auth-brand__dot:nth-child(2) { top: 120px; left: 68%; }
.auth-brand__dot:nth-child(3) { top: 90px;  left: 76%; }
.auth-brand__dot:nth-child(4) { top: 150px; left: 63%; }

.auth-brand__headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 20px;
  max-width: 430px;
}

.auth-brand__subtext {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 34px;
  max-width: 420px;
}

.auth-brand__features {
  list-style: none;
  margin: 0 0 60px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-brand__features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}
.auth-brand__features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bullet);
  flex: none;
}

.auth-brand__copyright {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Card column (right, desktop) ---------- */
.auth-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px;
}

.auth-card__logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto 24px;
}

.auth-card__back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 18px;
}
.auth-card__back:hover { text-decoration: underline; }

.auth-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--heading);
  margin: 0 0 8px;
}
.auth-card__title--sm { font-size: 23px; }

.auth-card__lede {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ---------- Form ---------- */
.auth-field { margin-bottom: 20px; }

.auth-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.auth-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--label);
}

.auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px;
  color: var(--heading);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease;
}
.auth-input::placeholder { color: var(--placeholder); }
.auth-input:focus { border-color: var(--accent-soft); }

.auth-error {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #ef4444;
}

.auth-status {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(163, 230, 53, 0.12);
  border: 1px solid rgba(163, 230, 53, 0.4);
  font-size: 13px;
  color: #4d7c0f;
}
@media (prefers-color-scheme: dark) {
  .auth-status { color: #bef264; }
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.auth-button {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 10px;
  background: var(--button-gradient);
  color: #ffffff;
  font-family: 'Inter Tight', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.auth-button:hover { filter: brightness(1.05); }
.auth-button:disabled { opacity: .6; cursor: not-allowed; }
.auth-button.is-loading {
  color: transparent !important;
  opacity: 1;
  position: relative;
}
.auth-button.is-loading::before,
.auth-button.is-loading::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px;
  border-radius: 50%;
}
.auth-button.is-loading::before {
  background: rgba(255, 255, 255, .2);
}
.auth-button.is-loading::after {
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 255, 255, .55) 120deg, #fff 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  animation: auth-spin .85s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}
.auth-divider__line { flex: 1; height: 1px; background: var(--divider); }
.auth-divider__label { font-size: 12px; font-weight: 600; color: var(--placeholder); }

.auth-footer {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  margin: 0;
}
.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ---------- Mobile (bottom-sheet) ---------- */
@media (max-width: 899px) {
  .auth-shell {
    flex-direction: column;
    background: var(--mobile-gradient);
  }

  .auth-brand { display: none; }

  .auth-mobile-hero {
    position: relative;
    height: 260px;
    flex: none;
    background: var(--mobile-gradient);
    overflow: hidden;
  }
  .auth-mobile-hero .auth-brand__dot {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.7);
  }

  .auth-stage {
    padding: 0;
    align-items: stretch;
    flex: 1;
  }

  .auth-card {
    max-width: none;
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 28px 28px 0 0;
    border: none;
    box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.12);
    padding: 32px 24px 40px;
    position: relative;
  }

  .auth-card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
  }

  .auth-input { background: var(--input-bg-mobile); border-radius: 12px; }
  .auth-button { border-radius: 12px; height: 50px; }
}

@media (min-width: 900px) {
  .auth-mobile-hero { display: none; }
}
