/* =========================================================
   AUTH PAGES (login / register / password / link sent)
========================================================= */

/* ---------------------------------------------------------
   Design tokens
--------------------------------------------------------- */
:root {
  --auth-font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --auth-text: #111111;
  --auth-muted: #666666;
  --auth-border: #e6e6e6;
  --auth-bg: #f4e8e8;
  --auth-primary: #5b57ff;
  --auth-primary-press: #4a46e6;
  --auth-input-bg: #f0f3ff;
}

/* ---------------------------------------------------------
   Base reset
--------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

.dialog-off-canvas-main-canvas {
  width: 100%;
}

/* ---------------------------------------------------------
   AUTH PAGE SCOPE
   (includes custom login-link-sent)
--------------------------------------------------------- */
body.path-user-login,
body.path-user-register,
body.path-user-pass,
body.path-login-link-sent {
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: var(--auth-bg);
  overflow-x: hidden;

  /* Drupal wrappers */
  .layout-container,
  main,
  .layout-content,
  .region-content {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  /* CENTER AUTH LAYOUT */
  .layout-content,
  .region-content {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 24px;
  }
}

/* ---------------------------------------------------------
   AUTH WRAP (two columns)
--------------------------------------------------------- */
.auth-wrap {
  width: 100%;
  min-height: 100dvh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  @media (min-width: 768px) {
    flex-direction: row;
  }
}

/* ---------------------------------------------------------
   LEFT COLUMN
--------------------------------------------------------- */
.auth-card {
  flex: 1 1 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
}

/* Inner container (form / message width) */
.auth-container {
  width: 100%;
  max-width: 520px;
}

/* ---------------------------------------------------------
   BRANDING
--------------------------------------------------------- */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;

  img {
    max-height: 50px;
    max-width: 100%;
  }

  &__link {
    display: inline-flex;
    text-decoration: none;
  }
}

/* ---------------------------------------------------------
   TITLES & TEXT
--------------------------------------------------------- */
.auth-title {
  font-size: 40px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 24px;
}

.auth-msg {
  font-size: 14px;
  color: var(--auth-muted);
  margin-bottom: 16px;
}

/* ---------------------------------------------------------
   MESSAGES
--------------------------------------------------------- */
.messages {
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 24px;
}

.messages--status {
  border: 1px solid #cfe9cf;
  background: #f4fff4;
  color: #1b6e1b;
}

.messages--error {
  border: 1px solid #f2c6c6;
  background: #fff5f5;
  color: #8a1f1f;
}

/* ---------------------------------------------------------
   FORMS
--------------------------------------------------------- */
form {
  width: 100%;
}

.form-item {
  margin-bottom: 16px;

  label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
  }

  .description {
    font-size: 12px;
    color: var(--auth-muted);
    margin-top: 6px;
  }
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
select,
textarea {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #d9d9e0;
  background: var(--auth-input-bg);

  &:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(91, 87, 255, 0.18);
  }
}

/* ---------------------------------------------------------
   ACTIONS
--------------------------------------------------------- */
.form-actions {
  margin-top: 24px;

  input[type="submit"],
  button[type="submit"] {
    width: 100%;
    height: 54px;
    border-radius: 10px;
    border: 0;
    background: var(--auth-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;

    &:hover {
      filter: brightness(0.97);
    }

    &:active {
      background: var(--auth-primary-press);
    }
  }
}

/* ---------------------------------------------------------
   LINKS
--------------------------------------------------------- */
.auth-links {
  margin-top: 16px;

  a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;

    &:hover {
      text-decoration: underline;
    }
  }
}

/* ---------------------------------------------------------
   RIGHT COLUMN (PHOTO)
--------------------------------------------------------- */
.auth-photo {
  flex: 0 0 50%;
  background-position: center;
  background-size: cover;
  position: relative;

  &::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom right,
      rgba(255, 255, 255, 0.65),
      rgba(255, 255, 255, 0.65)
    );
  }
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 1024px) {
  .auth-wrap {
    border-radius: 0;
  }

  .auth-photo {
    display: none;
  }

  .auth-title {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 16px;
  }

  .auth-title {
    font-size: 28px;
  }
}
