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

:root {
  /* Fallbacks overridden by config.public.js */
  --brand-primary: #0b5fff;
  --brand-accent: #1ec8a5;
  --brand-text: #0f172a;
  --brand-bg: #f2f2f2;
  --card-bg: #9e9e9e;

  --button-bg: #f8e437;
  --button-text: #1d2008;
  --button-radius: 4px;

  --card-text: #ffffff;
  --card-subtext: rgba(255, 255, 255, 0.8);
  --link-color: #ffffff;
  --input-text: rgba(255, 255, 255, 0.9);
  --label-muted: rgba(220, 220, 220, 0.85);
  --icon-color: #ffffff;

  --input-border: #cccccc;
  --error: rgba(255, 0, 0, 0.6);
  --error-focus: rgba(255, 0, 0, 0.85);

  --shadow-1: 0 0 10px rgba(0, 0, 0, 0.15);
  --shadow-2: 0 4px 8px rgba(0, 0, 0, 0.2);
  --shadow-2h: 0 4px 12px rgba(0, 0, 0, 0.3);
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background-color: var(--brand-bg);
  color: var(--brand-text);
}

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

/* =========================================================
   SHARED AUTH LAYOUT
   ========================================================= */

.form-container {
  width: 100%;
  min-height: 100%;
  padding: 24px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container {
  margin-bottom: 8px;
  text-align: center;
}

.logo-container img {
  width: 200px;
  max-width: 100%;
  height: auto;
}

.form-message {
  display: none;
  padding: 10px 12px;
  margin-bottom: 10px;

  border-radius: 6px;

  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}

.form-message.success {
  display: block;
  background: rgba(30, 200, 165, 0.12);
  border: 1px solid var(--brand-accent);
  color: var(--brand-accent);
}

.form-message.error {
  display: block;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--error-focus);
  color: var(--error-focus);
}

button[type="submit"] {
  width: 100%;
  padding: 12px;

  border: none;
  border-radius: var(--button-radius);

  background-color: var(--button-bg);
  color: var(--button-text);

  box-shadow: var(--shadow-2);

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  transition:
    box-shadow 0.25s ease,
    transform 0.02s ease;
}

button[type="submit"]:hover {
  box-shadow: var(--shadow-2h);
}

button[type="submit"]:active {
  transform: translateY(1px);
}

.login-link-container {
  margin-top: 18px;

  color: var(--card-subtext);
  font-size: 14px;
}

.login-link-container a,
.login-link-container a:visited {
  color: var(--link-color);
  font-weight: 700;
  text-decoration: none;
}

.login-link-container a:hover {
  text-decoration: underline;
}

.tos-link,
.tos-link:visited {
  color: var(--link-color);
  font-weight: 500;
  text-decoration: underline;
}

.tos-link:hover {
  opacity: 0.9;
}

/* =========================================================
   SIGN-IN / RESET / FORGOT / ACTIVATE
   ========================================================= */

#signin-form,
#forgot-form,
#reset-form,
#activate-form {
  width: 498px;
  padding: 48px 28px;

  display: flex;
  flex-direction: column;
  gap: 14px;

  background-color: var(--card-bg);
  color: var(--card-text);

  border-radius: 8px;
  box-shadow: var(--shadow-1);
}

#signin-heading,
.auth-title {
  margin-bottom: 4px;

  color: var(--card-text);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
}

.auth-subtitle {
  margin-bottom: 12px;

  color: var(--card-subtext);
  font-size: 13px;
}

/* Wrapper around each sign-in field */
.field-wrapper {
  position: relative;
}

/* Exact input area used by sign-in fields */
.input-row {
  position: relative;
  width: 100%;
  height: 48px;
}

.input-row input[type="email"],
.input-row input[type="password"],
.input-row input[type="text"] {
  display: block;

  width: 100%;
  height: 48px;

  padding: 0 48px 0 44px;

  border: none;
  border-bottom: 1px solid var(--input-border);
  border-radius: 0;

  background: transparent;
  background-image: none;

  color: var(--input-text);
  font-family: inherit;
  font-size: 18px;

  outline: none;
  appearance: none;
}

/* Envelope and lock icons */
.input-row .field-icon {
  position: absolute;
  left: 11px;
  top: 50%;

  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--icon-color);
  font-size: 17px;
  line-height: 1;

  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.input-row .field-icon::before {
  line-height: 1;
}

/* Sign-in floating labels */
.input-row .floating-label {
  position: absolute;
  left: 44px;
  top: 50%;

  color: var(--label-muted);
  font-size: 18px;
  line-height: 1;

  transform: translateY(-50%);
  pointer-events: none;

  transition:
    top 0.2s ease,
    left 0.2s ease,
    font-size 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.input-row input:focus + .floating-label,
.input-row input:not(:placeholder-shown) + .floating-label {
  top: -7px;
  left: 12px;

  color: var(--brand-primary);
  font-size: 12px;

  transform: none;
}

/* Password visibility button */
.input-row .password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  margin: 0;

  border: none;
  background: transparent;

  color: var(--icon-color);
  font-size: 18px;
  line-height: 1;

  transform: translateY(-50%);

  cursor: pointer;
  outline: none;
  box-shadow: none;

  z-index: 3;
}

.input-row .password-toggle i,
.input-row .password-toggle i::before {
  display: block;
  line-height: 1;
  pointer-events: none;
}

.input-row .password-toggle:hover {
  opacity: 0.8;
}

/* Hide password floating label once focused or populated */
.password-wrapper input:not(:placeholder-shown) + .floating-label,
.password-wrapper input:valid + .floating-label,
.password-wrapper input:-webkit-autofill + .floating-label,
.password-wrapper input:focus + .floating-label {
  opacity: 0;
  visibility: hidden;
}

.error-message {
  height: 14px;
  margin-top: 5px;

  color: var(--error);
  font-size: 12px;

  visibility: hidden;
}

.input-row input:invalid:focus {
  border-bottom-color: var(--error-focus);
}

.forgot-password {
  margin-top: -12px;
  margin-bottom: 12px;
  text-align: right;
}

.forgot-password a,
.forgot-password a:visited {
  color: var(--link-color);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.terms-label {
  color: var(--card-subtext);
  font-size: 14px;
  line-height: 1.4;
}

/* =========================================================
   SIGNUP PAGE
   ========================================================= */

#signup-form,
#signup-success {
  width: 720px;
  padding: 32px 38px;

  display: flex;
  flex-direction: column;
  gap: 16px;

  background-color: var(--card-bg);
  color: var(--card-text);

  border-radius: 8px;
  box-shadow: var(--shadow-1);
}

#signup-form .logo-container,
#signup-success .logo-container {
  margin-bottom: 4px;
}

#signup-form .welcome-text {
  margin-bottom: 16px;

  color: var(--card-text);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
}

/* Signup rows */
#signup-form .row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

#signup-form .column {
  flex: 1 1 0;
  min-width: 0;
}

/* Signup fields */
#signup-form .field-wrapper {
  position: relative;
  margin-bottom: 18px;
}

#signup-form input[type="text"],
#signup-form input[type="email"],
#signup-form input[type="tel"],
#signup-form input[type="url"] {
  display: block;

  width: 100%;
  height: 48px;

  padding: 0 8px;

  border: none;
  border-bottom: 1px solid var(--input-border);
  border-radius: 0;

  background: transparent;

  color: var(--input-text);
  font-family: inherit;
  font-size: 16px;

  outline: none;
  appearance: none;
}

/* Signup floating labels */
#signup-form .floating-label {
  position: absolute;

  left: 8px;
  top: 24px;

  color: var(--label-muted);
  font-size: 16px;
  line-height: 1;

  transform: translateY(-50%);
  pointer-events: none;

  transition:
    top 0.2s ease,
    left 0.2s ease,
    font-size 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

#signup-form .floating-label::after {
  content: " *";
  color: var(--label-muted);
}

#signup-form input:not([required]) + .floating-label::after {
  content: "";
}

#signup-form input:focus + .floating-label,
#signup-form input:not(:placeholder-shown) + .floating-label {
  top: -6px;
  left: 8px;

  color: var(--brand-primary);
  font-size: 12px;

  transform: none;
}

/* Region field */
#signup-form .static-label {
  display: block;
  margin-bottom: 6px;

  color: var(--label-muted);
  font-size: 16px;
}

#signup-form .elementor-select-wrapper {
  position: relative;
  width: 100%;
}

#signup-form .custom-select {
  width: 100%;
  height: 48px;

  padding: 0 38px 0 10px;

  border: 1px solid var(--input-border);
  border-radius: 4px;

  background-color: transparent;
  color: var(--input-text);

  font-family: inherit;
  font-size: 16px;

  outline: none;
  appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--icon-color) 50%),
    linear-gradient(135deg, var(--icon-color) 50%, transparent 50%);

  background-position:
    calc(100% - 17px) 21px,
    calc(100% - 12px) 21px;

  background-size:
    5px 5px,
    5px 5px;

  background-repeat: no-repeat;
}

#signup-form .custom-select option {
  background-color: var(--card-bg);
  color: var(--input-text);
}

/* Consent rows */
#signup-form .consent-wrapper {
  margin-bottom: 2px;
}

#signup-form .consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  color: var(--card-subtext);
  font-size: 14px;
  line-height: 1.4;

  cursor: pointer;
}

#signup-form .consent-checkbox {
  flex: 0 0 auto;

  width: 16px;
  height: 16px;
  margin-top: 2px;

  accent-color: var(--brand-primary);
}

/* CAPTCHA */
#signup-form .captcha {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Signup button */
#signup-form #signup-button {
  margin-top: 4px;
}

/* Sign-in row below signup */
#signup-form .login-link-container {
  margin-top: 4px;
  text-align: center;
}

/* Signup success panel */
#signup-success h4 {
  color: var(--card-text);
  font-size: 20px;
}

#signup-success p {
  color: var(--card-subtext);
  font-size: 14px;
  line-height: 1.5;
}

/* =========================================================
   AUTOFILL
   ========================================================= */

input:-webkit-autofill {
  -webkit-box-shadow:
    0 0 0 50px var(--card-bg) inset !important;

  -webkit-text-fill-color:
    var(--input-text) !important;

  caret-color: var(--input-text);

  transition:
    background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  -webkit-box-shadow:
    0 0 0 50px var(--card-bg) inset !important;

  -webkit-text-fill-color:
    var(--input-text) !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 760px) {
  body {
    align-items: flex-start;
  }

  .form-container {
    padding: 12px;
  }

  #signin-form,
  #forgot-form,
  #reset-form,
  #activate-form {
    width: 100%;
    padding: 28px 18px;
  }

  #signup-form,
  #signup-success {
    width: 100%;
    padding: 28px 18px;
  }

  #signup-form .row {
    flex-direction: column;
    gap: 0;
  }

  #signup-form .column {
    width: 100%;
  }
}
