/* Sign-in page only. Loaded via content_for(:head) from layouts/login. Every rule is namespaced
   under .login-page (the wrapper in that layout) to keep it away from the rest of the app's
   Bootstrap-era styles.

   The provider buttons are NOT here — they live in
   app/components/devise/shared/links.html.erb, because that component also
   renders on devise/passwords/edit, which never loads this file. */

/* Everything this page was getting from new_site.css, now that it is gone. Measured, not guessed:
   with that 222KB stylesheet disabled in the browser, the design held completely — panel widths,
   button colours and radii, the brand gradient, heading sizes — and exactly this much broke.

   Not a full reset. Nothing on this page needed one; adding normalize "just in case" would be
   reintroducing the problem at a smaller size. */
body {
    margin: 0;
    font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

:root {
    --blue-900: #1a3a5c;
    --blue-800: #1e3a6e;
    --blue-700: #2563eb;
    --blue-600: #3b82f6;
    --blue-500: #4A90D9;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --green-500: #48B979;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --red-50: #fef2f2;
    --red-500: #ef4444;
  }

  *, *::before, *::after { box-sizing: border-box; }
  .login-page { min-height: 100%; }
  .login-page {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--gray-900);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
  }

  .login-page .layout { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

  /* ---------- Left: brand panel ---------- */
  .login-page .brand {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue-900) 0%, #1e40af 50%, var(--blue-700) 100%);
    color: var(--white);
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  /* Faint blueprint grid, echoing the marketing site's hero texture. */
  .login-page .brand::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
  }
  .login-page .brand > * { position: relative; }

  .login-page .brand-logo img { display: block; height: 42px; width: auto; }

  .login-page .brand-copy { max-width: 30ch; }
  .login-page .brand-copy h1 {
    font-size: 44px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
  }
  .login-page .brand-copy h1 em { font-style: normal; color: #93c5fd; }
  .login-page .brand-copy p { font-size: 17px; color: rgba(255,255,255,0.75); margin: 0; }

  .login-page .brand-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
  .login-page .brand-points li {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 15px; color: rgba(255,255,255,0.85);
  }
  .login-page .brand-points svg { flex: none; margin-top: 3px; }

  /* ---------- Right: form panel ---------- */
  .login-page .panel {
    display: flex; align-items: center; justify-content: center;
    padding: 56px 40px;
    background: var(--white);
  }
  .login-page .form-wrap { width: 100%; max-width: 400px; }

  .login-page .form-wrap h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
  .login-page .form-wrap .sub { color: var(--gray-500); font-size: 15px; margin: 0 0 32px; }

  .login-page .field { margin-bottom: 18px; }
  .login-page .field label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--gray-700); margin-bottom: 7px;
  }
  .field input[type="email"],
  .login-page .field input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--gray-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
  }
  .login-page .field input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px var(--blue-100);
  }

  .login-page .row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 26px; }
  .login-page .remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-700); cursor: pointer; }
  .login-page .remember input { width: 16px; height: 16px; accent-color: var(--blue-700); cursor: pointer; }
  .login-page a.link { color: var(--blue-700); text-decoration: none; font-size: 14px; font-weight: 500; }
  .login-page a.link:hover { text-decoration: underline; }

  .login-page .btn-submit {
    width: 100%;
    padding: 13px 20px;
    font: inherit; font-size: 15px; font-weight: 700;
    color: var(--white);
    background: var(--blue-700);
    border: 1px solid var(--blue-700);
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .05s;
  }
  .login-page .btn-submit:hover { background: #1d4ed8; }
  .login-page .btn-submit:active { transform: translateY(1px); }
  .login-page .btn-submit:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 2px; }

  .login-page .divider {
    display: flex; align-items: center; gap: 14px;
    margin: 26px 0 18px;
    color: var(--gray-500); font-size: 13px;
  }
  .login-page .divider::before, .login-page .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--gray-300);
  }


  .login-page .foot { margin-top: 30px; font-size: 13px; color: var(--gray-500); text-align: center; }
  .login-page .foot a { color: var(--gray-700); }

  /* Devise flash messages */
  .login-page .flash {
    padding: 11px 14px; border-radius: 8px; font-size: 14px;
    margin-bottom: 22px; border: 1px solid transparent;
  }
  .login-page .flash--alert { background: var(--red-50); border-color: #fecaca; color: #991b1b; }
  .login-page .flash--notice { background: var(--blue-50); border-color: var(--blue-100); color: #1e40af; }

  /* ---------- Responsive ---------- */
  @media (max-width: 900px) {
    .login-page .layout { grid-template-columns: 1fr; min-height: auto; }
    .login-page .brand { padding: 32px 28px; gap: 28px; }
    .login-page .brand-copy h1 { font-size: 30px; }
    .login-page .brand-points { display: none; }
    .login-page .panel { padding: 40px 28px 56px; }
  }
  @media (max-width: 420px) {
    .login-page .brand { padding: 26px 20px; }
    .login-page .panel { padding: 32px 20px 44px; }
    .login-page .form-wrap h2 { font-size: 26px; }
  }
