:root {
  /* Updated color variables for dark mode */
  --brand-blue: #4d89f9;
  --brand-blue-hover: #3474e0;
  --brand-black: #e4e8ef;    /* Main text color on dark */
  --brand-white: #232a33;    /* Card surface, not true white */
  --gray-100: #29313a;       /* Input borders, dividers */
  --gray-300: #b3b9c5;       /* Muted text */
  --gray-400: #7a8597;       /* More muted text */
  --shadow: 0 8px 32px #000a;
  --font: 'Work Sans', 'Segoe UI', Arial, sans-serif;
  --background-main: #1c232b;
  --background-alt: #222a33;
  --accent-yellow: #ffd33d;
}

html, body {
  height: 100%;
  background: var(--background-main);
  margin: 0;
  font-family: var(--font);
  color: var(--brand-black);
  font-size: 18px;
}

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: var(--brand-white);
  border-radius: 18px;
  box-shadow: 0 8px 32px #0012;
  padding: 2.7em 2.3em 2.1em 2.3em;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* SVG logo in .auth-logo */
.auth-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.2em;
}
.auth-logo svg {
  width: 164px;
  max-width: 92vw;
  height: auto;
  display: block;
}
@media (max-width: 500px) {
  .auth-logo svg {
    width: 110px;
  }
}

.auth-logo img {
  width: 150px;
  height: 75px;
  object-fit: contain;
  margin-bottom: 1.6em;
  margin-top: 0.3em;
}

.auth-tabs {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 1.7em;
  gap: 0.5em;
}

.auth-tab {
  font-size: 1.18em;
  font-weight: 600;
  color: var(--gray-300);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  padding: 0.15em 1.1em 0.55em 1.1em;
  cursor: pointer;
  transition: color 0.18s, border-bottom 0.18s;
}

.auth-tab.active {
  color: var(--brand-blue);
  border-bottom: 2.5px solid var(--brand-blue);
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1em;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  margin-bottom: 0.1em;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.1em;
  margin-top: 0.2em;
  width: 100%;
}

.align-center {
  align-items: center;
}

/* ---- NAME FIELDS SIDE BY SIDE ---- */
.form-row.two-cols {
  display: flex;
  gap: 1em;
}
.form-row.two-cols .form-group {
  flex: 1 1 0;
  margin-bottom: 0;
}
@media (max-width: 500px) {
  .form-row.two-cols {
    flex-direction: column;
    gap: 0.5em;
  }
}

/* ---- CUSTOM CHECKBOX ---- */
.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 1em;
  font-weight: 400;
  color: var(--gray-300);
  gap: 0.5em;
  cursor: pointer;
  margin-bottom: 0;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background: var(--background-main);
  border: 1.5px solid var(--gray-100);
  border-radius: 5px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0 0.25em 0 0;
  transition: border-color 0.18s, background 0.18s;
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.checkbox-label input[type="checkbox"]:hover,
.checkbox-label input[type="checkbox"]:focus,
.checkbox-label input[type="checkbox"]:focus-visible {
  border-color: var(--brand-blue);
  outline: none;
}

.checkbox-label input[type="checkbox"]:checked {
  border-color: var(--brand-blue);
  background: var(--background-main);
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 5px;
  border-left: 2.5px solid var(--brand-blue);
  border-bottom: 2.5px solid var(--brand-blue);
  transform: translate(-50%, -60%) rotate(-45deg); /* Center it and angle */
  pointer-events: none;
  box-sizing: border-box;
}

.checkbox-agree {
  align-items: flex-start;
  font-size: 0.97em;
  color: var(--gray-300);
  flex-wrap: wrap;
}
.checkbox-agree span {
  display: inline-block;
  line-height: 1.4;
}
.checkbox-agree a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
  margin: 0 1px;
}
.checkbox-agree a:hover {
  text-decoration: underline;
}

.auth-form label {
  font-size: 1em;
  font-weight: 500;
  color: var(--brand-black);
  margin-bottom: 0.1em;
}

/* ---- INPUT FIELD STYLES ---- */
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  padding: 0.72em 0.95em;
  font-size: 1em;
  border: 1.5px solid #1c232b91;
  border-radius: 8px;
  background: #1c232b91;
  color: var(--brand-black);
  transition: background 0.18s;
  margin-top: 0.1em;
  font-family: var(--font);
  outline: none;
  box-shadow: none;
}

/* Remove blue border/outline on focus/hover/active, background darkens */
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:active,
.auth-form input[type="password"]:active,
.auth-form input[type="text"]:active,
.auth-form input[type="email"]:hover,
.auth-form input[type="password"]:hover,
.auth-form input[type="text"]:hover {
  border-color: #1c232b91;
  background: #1c232b;
  color: var(--brand-black);
  outline: none;
  box-shadow: none;
}

/* ---- BUTTONS ---- */
.auth-btn {
  width: 100%;
  padding: 0.95em 0;
  background: var(--brand-blue);
  color: #1c232b;
  font-weight: 600;
  font-size: 1.09em;
  border: none;
  border-radius: 8px;
  margin-top: 0.1em;
  cursor: pointer;
  transition: background 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  position: relative;
  overflow: hidden;
}
.auth-btn:hover {
  background: var(--brand-blue-hover);
}

/* ---- GOOGLE BUTTON DARKEN EFFECT ---- */
.auth-btn-google {
  position: relative;
  background: var(--brand-white);
  color: var(--brand-black);
  border: 1.5px solid var(--brand-white);
  box-shadow: 0 8px 32px #0012;
  gap: 0.7em;
  margin-top: 0.1em;
  outline: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  overflow: hidden; /* Ensures overlay stays rounded */
  z-index: 1;
}
.auth-btn-google::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.08); /* BLACK overlay */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 2;
  border-radius: 8px;
}
.auth-btn-google:hover::after,
.auth-btn-google:focus::after,
.auth-btn-google:active::after {
  opacity: 1;
}
.auth-btn-google > * {
  position: relative;
  z-index: 3;
}

/* Override .auth-btn:hover for Google button */
.auth-btn-google:hover,
.auth-btn-google:focus,
.auth-btn-google:active {
  background: var(--brand-white) !important;
  color: var(--brand-black);
  border-color: var(--brand-white);
  outline: none !important;
  box-shadow: none !important;
}

/* Optional: if you want the text/icon to stay the same color on hover */
.auth-btn-google:hover,
.auth-btn-google:focus,
.auth-btn-google:active {
  color: var(--brand-black);
}

.google-svg {
  display: flex;
  align-items: center;
  margin-right: 0.2em;
}

.forgot-link {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.96em;
  margin-left: 1em;
  margin-right: 0.1em;
}
.forgot-link:hover {
  color: #4173d1;
}

.auth-or {
  text-align: center;
  color: var(--gray-400);
  font-size: 0.95em;
  margin: 0.9em 0 0.65em 0;
  position: relative;
  width: 100%;
}
.auth-or span {
  background: var(--brand-white);
  padding: 0 0.7em;
  position: relative;
  z-index: 1;
}
.auth-or:before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 49%;
  border-top: 1px solid var(--gray-100);
  z-index: 0;
}

@media (max-width: 500px) {
  .auth-card {
    padding: 1.1em 0.4em 1.1em 0.4em;
    max-width: 98vw;
  }
}
