/* ─────────────────────────────────────────────────────────────
   Login — fits one viewport, no scroll (desktop)
───────────────────────────────────────────────────────────── */
:root {
  --ink:        #1A1F2E;
  --ink-soft:   #4B5563;
  --brand:      #C23A14;
  --accent:     #1B4F8A;
  --paper:      #F7F2EB;
  --surface:    #FFFDF9;
  --hero-bg:    #EDE5D8;
  --line:       #D9D0C3;
  --muted:      #8A7F72;
  --chip-bg:    rgba(255, 253, 249, 0.94);
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

/* ── Shell: exactly one screen ── */
.login-scene {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.login-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: hidden;
}

/* ── LEFT hero ── */
.login-hero {
  background: var(--hero-bg);
  border-right: 1px solid var(--line);
  padding: 20px 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #BFB4A4 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
}

.login-hero > * { position: relative; z-index: 1; flex-shrink: 0; }

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-logo {
  height: 34px;
  background: var(--surface);
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hero-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,253,249,0.75);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-body { flex-shrink: 0; }

.hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink);
}

/* Image block — grows to fill remaining space */
.hero-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a2030;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.hero-event-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-image-chip {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--chip-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  max-width: calc(100% - 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-icon { font-size: 12px; line-height: 1; }

/* Stats — slim row, no extra block below image */
.hero-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.hero-stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  text-align: center;
}

.hero-stat-num {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.hero-stat-label {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1px;
}

/* ── RIGHT login panel ── */
.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 28px;
  background: var(--paper);
  min-height: 0;
  overflow: hidden;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px 22px;
  box-shadow: 0 8px 32px rgba(26,31,46,0.08);
}

.login-card-head {
  text-align: center;
  margin-bottom: 20px;
}

.login-card-logo {
  height: 30px;
  background: #fff;
  padding: 4px 9px;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 14px;
  display: inline-block;
}

.login-card-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.login-card-head p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FAF5EE;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  padding: 0 13px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(27,79,138,0.09);
}

.input-icon {
  color: var(--muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  min-width: 0;
}

.input-wrap input::placeholder { color: #C0B8AE; }

.toggle-pass {
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.toggle-pass:hover { color: var(--ink-soft); }

.login-error {
  padding: 9px 12px;
  background: #FEF2EC;
  border: 1px solid #F5C9B5;
  border-radius: 9px;
  color: #9E2E0F;
  font-size: 13px;
  font-weight: 500;
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 13px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #1B4F8A 0%, #1E6EC8 100%);
  box-shadow: 0 4px 14px rgba(27,79,138,0.22);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27,79,138,0.28);
}

.login-submit:active:not(:disabled) { transform: translateY(0); }
.login-submit:disabled { opacity: 0.62; cursor: wait; }

.login-submit-arrow { font-size: 16px; transition: transform 0.2s; }
.login-submit:hover:not(:disabled) .login-submit-arrow { transform: translateX(3px); }

.login-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.login-legal {
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
}

/* Short screens — tighten further */
@media (max-height: 720px) {
  .login-hero { padding: 14px 22px 12px; gap: 10px; }
  .hero-title { font-size: 1.45rem; }
  .hero-stat { padding: 6px 8px; }
  .hero-stat-num { font-size: 14px; }
  .login-card { padding: 22px 22px 18px; }
  .login-card-head { margin-bottom: 16px; }
  .login-card-head h2 { font-size: 20px; }
}

/* ── Mobile: allow scroll, stack layout ── */
@media (max-width: 720px) {
  html, body { overflow: auto; height: auto; }

  .login-scene {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .login-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .login-hero {
    padding: 0;
    gap: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    min-height: auto;
  }

  .hero-top,
  .hero-body,
  .hero-stats { display: none; }

  .hero-image-wrap {
    border-radius: 0;
    flex: none;
    height: 180px;
    box-shadow: none;
  }

  .hero-event-img {
    object-fit: cover;
    object-position: center 30%;
  }

  .hero-image-wrap::after {
    content: 'HRV @ CPHI Milan 2026';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26,31,46,0.7) 0%, transparent 55%);
    display: flex;
    align-items: flex-end;
    padding: 14px 16px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
  }

  .hero-image-chip {
    bottom: 12px;
    left: auto;
    right: 10px;
    font-size: 10px;
    padding: 4px 8px;
  }

  .login-panel {
    padding: 24px 18px 32px;
    overflow: visible;
    justify-content: flex-start;
  }

  .login-card {
    max-width: 100%;
    border-radius: 14px;
    padding: 24px 20px 20px;
  }
}

@media (max-width: 400px) {
  .hero-image-wrap { height: 150px; }
  .input-wrap input { font-size: 16px; }
}
