/*
 * Auth Pages Styles
 *
 * This stylesheet defines the look and feel for the standalone
 * login and registration pages. It borrows inspiration from
 * Kimi's proposed design while adhering to the MoschMedical
 * aesthetic: a light backdrop, clearly delineated cards and
 * accessible form controls. Colours are declared up front so
 * that adjustments can be made in a single place.
 */

/* Declare our own design tokens.  These values are independent
 * from those used on the landing page to avoid unwanted side
 * effects.  Should you wish to tune the palette later on,
 * adjust the colours here.
 */
:root {
  --primary: #1e3a5f;         /* deep blue for headings and accents */
  --accent: #ed8936;          /* warm orange for primary actions */
  --accent-hover: #dd6b20;    /* darker shade for hover states */
  --surface: #ffffff;         /* white card backgrounds */
  --border: #94a3b8;          /* subtle grey for card and input borders */
  --text: #0f172a;            /* near‑black text for maximum contrast */
  --text-light: #475569;      /* muted text for secondary labels */
}

/* Wrapper that centres the auth card on the viewport and
 * provides a neutral backdrop. The full height ensures the
 * content remains vertically centred on larger screens.
 */
.auth-page-wrapper {
  /* Use the dark navy background from the overall theme to blend with
   * the rest of the application.  The landing_kimi stylesheet defines
   * --navy, so we reference it here.  If unavailable, fallback to
   * the previous light grey. */
  min-height: 100vh;
  background: var(--navy, #0b1526);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Card container with a distinct border and drop shadow. A
 * gradient bar sits atop the card via a pseudo‑element; this
 * draws the eye and reinforces the brand accent.
 */
.auth-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  /* Multi‑layer shadow for depth */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
              0 0 0 1px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}

/* Accent bar across the top of the card */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 12px 12px 0 0;
}

/* Card header containing the logo and subtitle */
.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-header .auth-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.auth-card-header .auth-subtitle {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Form layout uses vertical stacking with consistent spacing */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

/* Inputs and selects with generous padding and visible borders */
.form-group input,
.form-group select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: var(--surface);
  color: var(--text);
}

/* Hover state for inputs and selects */
.form-group input:hover,
.form-group select:hover {
  border-color: #64748b;
}

/* Focus state emphasises the primary colour and adds a soft glow */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(30, 58, 95, 0.15);
}

/* Password field wrapper for toggling visibility */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 2.5rem;
}

.toggle-password {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  /*
   * Avoid using opacity to dim the password toggle icon.  A reduced
   * opacity can hurt contrast and is discouraged for interactive
   * controls.  Instead, set a muted colour on the icon and leave
   * opacity at the default 1.
   */
  color: var(--text-light);
  padding: 0.25rem;
  font-size: 1rem;
  transition: color 0.2s;
}

.toggle-password:hover {
  /* On hover, use the primary text colour for clarity */
  color: var(--text);
}

/* Button styling for primary actions */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(237, 137, 54, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(237, 137, 54, 0.3);
}

/* Alternative link below forms */
.auth-alternative {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-light);
}

.auth-alternative a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-alternative a:hover {
  text-decoration: underline;
}

/* Kleiner Hilfstext unter Eingabefeldern, z.B. für erlaubte Wertebereiche */
.help-text {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
  display: block;
}

/* Terms and conditions wrapper */
.terms-wrapper {
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.terms-wrapper input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  margin-top: 0.15rem;
}

/* Password strength indicator within registration form */
.password-strength {
  font-size: 0.85rem;
}

.password-strength.weak { color: #e05c4b; }
.password-strength.medium { color: #e8a03e; }
.password-strength.strong { color: #4caf87; }

/* Password criteria list for the standalone registration page.  Each
 * password rule is shown as a list item.  Use .valid/.invalid to
 * differentiate satisfied and unsatisfied rules via colour. */
.password-criteria {
  list-style: none;
  margin-top: 0.5rem;
  padding: 0;
  font-size: 0.85rem;
}

.password-criteria li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.3;
}

.password-criteria li.valid {
  color: #4caf87;
}

.password-criteria li.invalid {
  color: #e05c4b;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem;
    border-radius: 8px;
  }
  .auth-page-wrapper {
    padding: 1rem;
  }
}