:root {
    --primary: #4a221b;
    --accent: #80625d;
    --bg: #fcf4ec;
    --white: #ffffff;
    --radius: 1.5rem;
    --shadow: rgba(0, 0, 0, 0.08) 0 0.75rem 2.25rem;
    --font: 'Poppins', sans-serif;
  }

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

  body {
    font-family: var(--font);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 75rem;
    margin: auto;
  }

  .form-panel {
    flex: 1 1 30rem;
    background: var(--white);
    padding: 4vw 3vw;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-top-left-radius: var(--radius);
    border-bottom-left-radius: var(--radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    animation: fadeSlideIn 1s ease-out forwards;
    opacity: 0;
    transform: translateX(-2rem);
    z-index: 2;
  }

  @keyframes fadeSlideIn {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  .logo {
    display: block;
    margin: 0 auto 2rem auto;
    max-width: 10rem;
    width: 100%;
  }

  h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: black;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
  }

  .subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--accent);
    margin-bottom: 2rem;
    text-align: center;
  }

  .field {
    position: relative;
    margin-bottom: 2rem;
    width: 90%;
    max-width: 25rem;
  }

  label {
    color: var(--accent);
    font-size: 0.9rem;
  }

  .field input {
    width: 100%;
    background: #f2f4f7;
    border: none;
    border-radius: var(--radius);
    padding: 1.7rem 3rem 0.8rem 1.2rem;
    font-size: 1rem;
    box-shadow: inset 0 0.063rem 0.125rem rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, border-color 0.2s;
  }

  .field label {
    position: absolute;
    left: 1.2rem;
    top: 1.2rem;
    font-size: 0.9rem;
    color: #80625d;
    pointer-events: none;
    transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
    transform-origin: left top;
  }

  .field input:focus,
  .field input:not(:placeholder-shown) {
    outline: none;
    box-shadow: inset 0 0.063rem 0.125rem rgba(0,0,0,0.05),
    0 0 0 0.188rem rgba(128, 98, 93, 0.2);
  }

  .field input:focus + label,
  .field input:not(:placeholder-shown) + label {
    transform: translateY(-0.6rem) scale(0.85);
    color: var(--accent);
  }

  .field-icon,
  .code-field .toggle-icon,
  .toggle-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .toggle-icon:hover {
    opacity: 1;
  }

  .glow-button {
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem;
    width: 60%;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    z-index: 1;
    margin: 0 auto 2rem auto;
    display: block;
  }

  .glow-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(252, 244, 236, 0.25), transparent);
    z-index: 0;
    transform: translateX(-100%);
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .glow-button:hover::before {
    opacity: 1;
    animation: slow-glow 2.5s linear infinite;
  }

  .glow-button span {
    position: relative;
    z-index: 1;
  }

  @keyframes slow-glow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
  }

  .forgot-text {
    font-size: 0.85rem;
    color: black;
    margin-top: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    display: block;
    cursor: pointer;
  }

.image-panel {
  flex: 1 1 20rem;
  background: url('/static/assets/img/image-panel.jpg') center/cover no-repeat;
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Only hide image on small screens (mobile) */
@media (max-width: 800px) {
  .container {
    flex-direction: column;
    align-items: center;
  }

  .form-panel {
    width: 100%;
    border-radius: var(--radius);
  }

  .image-panel {
    display: none;
  }
}
