:root {
  color-scheme: dark;
  /* Index theme palette (see assets/css/style.css). */
  --bg: #030b15;
  --panel: #040e18;
  --text: #ffffff;
  --muted: #a4b4c3;
  --primary: #00c4f4;
  --primary-dark: #0072ac;
  --primary-soft: #26fffb;
  --accent: var(--primary);
  --border: rgba(0, 196, 244, 0.45);
  --surface: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top left, rgba(0, 196, 244, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(38, 255, 251, 0.12), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, #020812 100%);
  color: var(--text);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-soft);
  text-decoration: none;
}

.auth-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
  padding: clamp(1.5rem, 5vh, 3rem) clamp(1rem, 5vw, 2rem);
  align-items: center;
  justify-items: center;
}

@media (min-width: 1024px) {
  .auth-page {
    /*grid-template-columns: repeat(2, minmax(0, 520px));*/
    gap: clamp(2.5rem, 7vw, 7rem);
    padding: clamp(2rem, 7vh, 4rem) clamp(2rem, 5vw, 5rem);
    justify-content: center;
  }
}

.auth-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(1.8rem, 2.6vw, 2.5rem) clamp(1.5rem, 2.4vw, 2rem) 2rem;
  border: 1px solid rgba(0, 196, 244, 0.22);
  border-radius: 28px;
  background: rgba(4, 14, 24, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px rgba(3, 6, 17, 0.42);
}

@media (min-width: 1024px) {
  .auth-card {
    min-height: 520px;
  }
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  text-shadow: 0 0 14px rgba(0, 196, 244, 0.22);
  position: relative;
}

.auth-topbar .auth-brand {
  margin-bottom: 0;
  flex: 0 0 auto;
  justify-content: center;
}

.auth-brand::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(380px, 82vw);
    height: min(160px, 26vw);
    transform: translate(-50%, -50%);
    background: black;
    border-radius: 24px;
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.auth-brand img {
  height: clamp(88px, 10vw, 120px);
  width: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 26px rgba(0, 196, 244, 0.18));
}

.auth-brand span {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-weight: 800;
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 196, 244, 0.1);
  border: 1px solid rgba(0, 196, 244, 0.22);
  color: var(--primary-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-card h1,
.auth-title {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 2.4vw, 2.3rem);
  letter-spacing: 0;
}

.auth-subtitle,
.auth-card p {
  margin: 0 0 1.9rem;
  line-height: 1.75;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 1.1rem;
}

.auth-form > label {
  color: #dce8f5;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: -0.45rem;
}

.auth-form > input {
  width: 100%;
  min-height: 54px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 196, 244, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.auth-form > input::placeholder {
  color: rgba(158, 178, 201, 0.7);
}

.auth-form > input:focus {
  border-color: rgba(0, 196, 244, 0.95);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(0, 196, 244, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-field {
  display: grid;
  gap: 0.45rem;
  margin: 10px 0 18px 0;
}

.field-with-icon {
  position: relative;
}

.field-with-icon .input-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 8px;
  color: rgba(88, 106, 132, 0.95);
  background: rgba(235, 242, 250, 0.95);
  border: 1px solid rgba(0, 196, 244, 0.16);
  pointer-events: none;
  opacity: 0.9;
}

.field-with-icon input {
  padding-left: 54px;
}

.auth-field label {
  color: rgba(164, 180, 195, 0.95);
  font-size: 0.9rem;
  font-weight: 600;
}
.text-center{
	text-align:center;
}
.auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 196, 244, 0.18);
  background: #ffffff;
  color: #0b1d33;
  outline: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, background 0.25s ease;
}

/* Ensure placeholder/text never goes under the icon (overrides base input padding). */
.auth-field .field-with-icon input {
  padding-left: 54px;
}
.auth-field input:hover {
  /* Keep icon + input perfectly aligned (no vertical shift on hover). */
  transform: none;
  border-color: rgba(0, 196, 244, 0.28);
}

.auth-field input::placeholder {
  color: rgba(88, 106, 132, 0.62);
}

.auth-field input:focus {
  border-color: rgba(0, 196, 244, 0.8);
  box-shadow: 0 0 0 4px rgba(0, 196, 244, 0.18), 0 12px 26px rgba(0, 0, 0, 0.18);
  background: #ffffff;
}

.auth-field input[disabled] {
  opacity:;
  cursor: not-allowed;
}

.auth-field input[disabled]::placeholder {
  color: rgba(88, 106, 132, 0.5);
}

.auth-btn {
  width: 100%;
  min-height: 54px;
  padding: 0.95rem 1.25rem;
  border: 1px solid rgba(0, 196, 244, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 16px 34px rgba(0, 196, 244, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.auth-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  border-color: rgba(38, 255, 251, 0.85);
  box-shadow: 0 20px 42px rgba(0, 196, 244, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 196, 244, 0.22), 0 20px 42px rgba(0, 196, 244, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.auth-switch {
  width: 100%;
  display: flex;
  justify-content: center;
}

.auth-switch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.auth-switch-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 196, 244, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #e6f8ff;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.auth-switch-actions a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(38, 255, 251, 0.42);
}

.auth-switch-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.auth-visual {
  width: 100%;
  max-width: 444px;
  display: grid;
  place-items: center;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.auth-visual .visual-card {
  width: 100%;
}

@media (min-width: 1024px) {
  .auth-visual {
    align-self: stretch;
  }

  .auth-visual .visual-card {
    min-height: 520px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.auth-visual .visual-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-links a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 196, 244, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #e6f8ff;
  font-weight: 800;
  font-size: 0.92rem;
}

.auth-links.is-icon {
  gap: 0.5rem;
  margin-top: 1rem;
}

.auth-links.is-icon a {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(0, 196, 244, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-links.is-icon a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(38, 255, 251, 0.45);
  box-shadow: 0 10px 20px rgba(0, 196, 244, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-links.is-icon a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 196, 244, 0.22), 0 10px 20px rgba(0, 196, 244, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.input-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.visual-card {
  width: 100%;
  border-radius: 28px;
  border: 1px solid rgba(0, 196, 244, 0.18);
  background: rgba(4, 14, 24, 0.55);
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.35);
  padding: clamp(1.5rem, 2.8vw, 2.4rem);
}

.loader {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 9999;
}

.loader.is-active {
  display: grid;
}

.loader-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 24% 18%, rgba(0, 196, 244, 0.16), transparent 34%),
    rgba(1, 8, 18, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.loader-main {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px);
  border-radius: 28px;
  border: 1px solid rgba(0, 196, 244, 0.34);
  background: linear-gradient(180deg, rgba(4, 14, 24, 0.98), rgba(2, 8, 18, 0.98));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 2rem 1.8rem;
  text-align: center;
}

.loader-text {
  position: relative;
  z-index: 1;
  margin: 1.25rem auto 0;
  max-width: 315px;
  color: #f7fbff;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.55;
}

.logo-loader {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(38, 255, 251, 0.14) 0 36%, transparent 37%),
    conic-gradient(from 0deg, var(--primary), var(--primary-soft), rgba(0, 196, 244, 0.2), var(--primary));
  box-shadow: 0 0 34px rgba(0, 196, 244, 0.26);
  animation: loader-spin 1s linear infinite;
}

.logo-loader::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #020812;
  box-shadow: inset 0 0 0 1px rgba(0, 196, 244, 0.18);
}

.logo-loader::after {
  content: "CA";
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #030b15;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 0 22px rgba(0, 196, 244, 0.22);
  animation: loader-counter-spin 1s linear infinite;
}

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

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

/* Minimal utility classes already used by these pages (so we don't depend on bootstrap). */
.d-flex {
  display: flex !important;
}
.align-items-center {
  align-items: center !important;
}
.gap-2 {
  gap: 0.5rem !important;
}
.mt-0 {
  margin-top: 0 !important;
}
.text-muted {
  color: var(--muted) !important;
}
.text-primary {
  color: var(--primary) !important;
}
.text-decoration-none {
  text-decoration: none !important;
}
.fw-semibold {
  font-weight: 600 !important;
}
.text-danger {
  color: #ff6b6b !important;
}
.small {
  font-size: 0.9rem !important;
}

.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  vertical-align: middle;
}

@media (max-width: 767px) {
  .auth-page {
    padding: 1.5rem;
  }
  .auth-card {
    padding: 1.8rem 1.5rem;
  }
  .auth-topbar {
    align-items: center;
    flex-direction: column;
    gap: 1rem;
  }
  .auth-topbar .auth-switch {
    width: 100%;
  }
  .auth-topbar .auth-switch-actions {
    justify-content: center;
  }
  .visual-card {
    padding: 1.5rem;
  }
}
