/* public/css/auth.css — Premium WebSnug authentication screens */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #0067f0;
  --blue-dark: #0052c2;
  --blue-soft: #eaf3ff;
  --navy: #001b45;
  --navy-mid: #06245f;
  --green: #16a34a;
  --red: #dc2626;
  --gray: #64748b;
  --gray-strong: #334155;
  --border: rgba(226, 232, 240, 0.86);
  --bg: #f1f5f9;
  --text: #0f172a;
  --white: #ffffff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

html {
  min-height: 100%;
  background: var(--navy);
}

body {
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(0, 103, 240, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 82% 8%, rgba(22, 163, 74, 0.1) 0%, transparent 30%),
    linear-gradient(180deg, #151f30 0%, #001b45 38%, #eef4fb 76%, #f8fafc 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
  position: relative;
  overflow: hidden;
}

.auth-wrap::before {
  content: "";
  display: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: clamp(1.35rem, 4vw, 2.35rem);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
  box-shadow: var(--shadow);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(0, 103, 240, 0.08);
  border-radius: 22px;
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.65rem;
}

.auth-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.auth-logo > svg {
  width: 48px;
  height: 48px;
  padding: 11px 8px;
  flex: 0 0 auto;
  color: #ffffff;
  border-radius: 13px;
  background: linear-gradient(145deg, #1473f8, var(--blue));
  box-shadow:
    0 10px 26px rgba(0, 103, 240, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.auth-logo > svg path {
  fill: currentColor;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(145deg, #1473f8, #0067f0);
  box-shadow: 0 10px 24px rgba(0,103,240,0.34), inset 0 1px 0 rgba(255,255,255,0.24);
}
.auth-logo-mark img {
  width: 28px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.auth-logo-text {
  min-width: 0;
}

.auth-logo-text div {
  font-family: "Montserrat", sans-serif;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.auth-logo-text div span:first-child {
  color: var(--text);
}

.auth-logo-text div span:last-child {
  color: var(--blue);
}

.auth-logo-text .gs-logo-kicker {
  display: block;
  margin-top: 0.28rem;
  color: #64748b;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-sub {
  position: relative;
  z-index: 1;
  margin: 0 0 1.35rem;
  color: var(--gray);
  font-size: 0.94rem;
  line-height: 1.55;
}

.auth-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 1.55rem;
}

.auth-kicker {
  margin-bottom: 0.55rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-heading h1 {
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  font-size: clamp(1.9rem, 7vw, 2.55rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.055em;
}

.auth-heading p:not(.auth-kicker) {
  max-width: 33rem;
  margin-top: 0.82rem;
  color: var(--gray);
  font-size: 0.97rem;
}

.field {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
}

.field label,
.field-label {
  display: block;
  margin-bottom: 0.42rem;
  color: var(--gray-strong);
  font-size: 0.82rem;
  font-weight: 700;
}

.field input,
.auth-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.field input::placeholder,
.auth-card input::placeholder {
  color: #9aa8bb;
}

.field input:focus,
.auth-card input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(0, 103, 240, 0.12),
    0 10px 24px rgba(15, 23, 42, 0.08);
}

.field-hint {
  margin-top: 0.35rem;
  color: var(--gray);
  font-size: 0.78rem;
}

.btn-primary {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 50px;
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #1473f8, var(--blue));
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 16px 32px rgba(0, 103, 240, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    opacity 0.18s ease;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #1d7cff, var(--blue-dark));
  box-shadow: 0 18px 38px rgba(0, 103, 240, 0.34);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.auth-footer-link {
  position: relative;
  z-index: 1;
  margin-top: 1.15rem;
  text-align: center;
}

.link-muted {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.link-muted:hover {
  color: var(--blue-dark);
}

.auth-trust {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.45rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.auth-trust span {
  padding: 0.42rem 0.62rem;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #0f3f8f;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Portal sign-in: branded header over a calm, functional form panel. */
.auth-login-page .auth-wrap {
  align-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 17% 0%, rgba(0, 103, 240, 0.38), transparent 38%),
    radial-gradient(circle at 83% 5%, rgba(20, 147, 170, 0.12), transparent 31%),
    linear-gradient(180deg, #10243e 0%, #001b45 37%, #eaf2fb 75%, #f8fafc 100%);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}
.auth-login-page .auth-card {
  display: block;
  width: min(100%, 460px);
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(0, 103, 240, 0.2);
  border-radius: 24px;
  background: #f8fbff;
  box-shadow:
    0 30px 80px rgba(0, 21, 57, 0.26),
    0 8px 24px rgba(0, 103, 240, 0.08);
}
.auth-login-page .auth-card::before {
  display: none;
}
.auth-login-page .auth-card-header {
  position: relative;
  overflow: hidden;
  padding: 1.65rem 1.8rem 1.55rem;
  border-bottom: 3px solid #0876ff;
  color: #fff;
  background:
    radial-gradient(circle at 94% 6%, rgba(0, 119, 255, 0.28), transparent 33%),
    radial-gradient(circle at 6% 110%, rgba(21, 149, 170, 0.16), transparent 29%),
    linear-gradient(112deg, #0b2a4e, #071a31 58%, #061628);
}
.auth-login-page .auth-card-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(104, 176, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 176, 255, 0.1) 1px, transparent 1px);
  background-size: 34px 34px;
}
.auth-login-page .auth-card-header > * {
  position: relative;
  z-index: 1;
}
.auth-login-page .auth-brand {
  margin-bottom: 1.35rem;
}
.auth-login-page .auth-brand > img {
  display: block;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 3px;
  border: 1px solid rgba(143, 199, 255, 0.38);
  border-radius: 14px;
  background: rgba(0, 103, 240, 0.16);
  box-shadow:
    0 0 0 5px rgba(0, 103, 240, 0.1),
    0 12px 28px rgba(0, 103, 240, 0.3);
}
.auth-login-page .auth-logo-text div span:first-child {
  color: #fff;
}
.auth-login-page .auth-logo-text div span:last-child {
  color: #62afff;
}
.auth-login-page .auth-logo-text .gs-logo-kicker {
  color: #aebed2;
}
.auth-login-page .auth-heading {
  margin-bottom: 0;
}
.auth-login-page .auth-kicker {
  color: #72b7ff;
}
.auth-login-page .auth-heading h1 {
  color: #fff;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}
.auth-login-page .auth-heading p:not(.auth-kicker) {
  color: #b8c7d8;
}
.auth-login-page .auth-card-body {
  padding: 1.65rem 1.8rem 1.55rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 103, 240, 0.055), transparent 32%),
    linear-gradient(180deg, #fff, #f8fbff);
}
.auth-login-page .field input {
  border-color: #d8e4f2;
  background: #f1f6fd;
}
.auth-login-page .field input:focus {
  background: #fff;
}
.auth-login-page .auth-trust span {
  position: relative;
  padding-left: 1.45rem;
  background: #f2f7fd;
}
.auth-login-page .auth-trust span::before {
  content: "";
  position: absolute;
  left: 0.63rem;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 103, 240, 0.1);
  transform: translateY(-50%);
}

.err,
.success-msg {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.45;
}

.err {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: var(--red);
}

.success-msg {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

/* Shared setup-account states */
.status-icon {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 2.5rem;
}

.status-title {
  position: relative;
  z-index: 1;
  margin-bottom: 0.55rem;
  text-align: center;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.status-body {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  color: var(--gray);
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.6;
}

.spinner {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  margin: 0 auto 1rem;
  border: 3px solid #e2e8f0;
  border-top: 3px solid var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .auth-wrap {
    align-items: stretch;
    padding: 0.85rem;
  }

  .auth-card {
    width: 100%;
    min-height: calc(100vh - 1.7rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 24px;
    padding: 1.25rem;
  }

  .auth-card::before {
    inset: 7px;
    border-radius: 19px;
  }

  .auth-brand {
    margin-bottom: 1.35rem;
  }

  .auth-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .auth-logo-text div {
    font-size: 1.24rem;
  }

  .auth-logo-text .gs-logo-kicker {
    font-size: 0.52rem;
    letter-spacing: 0.18em;
  }

  .auth-heading h1 {
    font-size: clamp(1.8rem, 11vw, 2.35rem);
  }

  .auth-heading p:not(.auth-kicker) {
    font-size: 0.92rem;
  }

  .auth-trust {
    justify-content: flex-start;
  }

  .auth-login-page .auth-wrap {
    align-items: center;
    padding: 0.75rem;
  }

  .auth-login-page .auth-card {
    min-height: 0;
    border-radius: 21px;
  }

  .auth-login-page .auth-card-header,
  .auth-login-page .auth-card-body {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .auth-login-page .auth-card-header {
    padding-top: 1.35rem;
    padding-bottom: 1.3rem;
  }

  .auth-login-page .auth-card-body {
    padding-top: 1.35rem;
    padding-bottom: 1.25rem;
  }

  .auth-login-page .auth-trust {
    justify-content: center;
  }
}
