/* HUN-REN login – v4 (approved main style). Brand tokens from the HUN-REN arculati kézikönyv. */
:root {
  --navy: #000f9d;
  --digital: #2831e8;
  --sky: #138fff;
  --grey: #9499a4;
  --orange: #f7981c;
  --turq: #5cf2d8;
  --black: #020203;
  --white: #ffffff;
  --footer: #e9eaec;
  --bar-red: #d32f2f;
  --bar-green: #3fb24c;
  --danger-bg: #fdecec; --danger-border: #c62828; --danger-text: #8a1c1c;
  --warning-bg: #fff4e0; --warning-border: #f7981c; --warning-text: #7a4a00;
  --info-bg: #e8f3ff; --info-border: #138fff; --info-text: #000f9d;
  --success-bg: #e8f5ec; --success-border: #2e7d32; --success-text: #1b5e20;
  --font: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--black);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 2fr 1fr;
  overflow: hidden;
  background: var(--navy);
}

/* ---------- Brand background (whole page) ---------- */
.brand-panel {
  position: absolute;
  inset: 0 0 56px 0;
  color: var(--white);
  overflow: hidden;
  z-index: 0;
}

.watermark {
  position: absolute;
  left: -40px;
  top: 12%;
  font-weight: 700;
  line-height: 0.745;
  color: rgba(255, 255, 255, 0.10);
  pointer-events: none;
  user-select: none;
}
.watermark span {
  display: block;
  font-size: clamp(260px, 36vw, 560px);
  white-space: nowrap;
}

.brand-band {
  position: absolute;
  left: -30%;
  width: 160%;
  top: 58%;
  height: 42%;
  background: var(--digital);
  transform: rotate(-9deg);
  transform-origin: left top;
  opacity: 0.9;
}

.brand-logo {
  position: absolute;
  left: 80px;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wordmark {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark-sub {
  font-size: 22px;
  font-weight: 600;
}

.brand-copy {
  position: absolute;
  left: 80px;
  bottom: 110px;
  max-width: 640px;
}
.slogan {
  margin: 0 0 24px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.22;
}
.slogan-line {
  display: block;
  padding-left: 28px;
  position: relative;
}
.bar {
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 36px;
  border-radius: 1px;
}
.bar-red { background: var(--bar-red); }
.bar-white { background: var(--white); }
.bar-green { background: var(--bar-green); }

.tagline {
  margin: 0 0 32px;
  font-size: 18px;
  font-weight: 400;
}
.accent {
  display: block;
  width: 64px;
  height: 4px;
  background: var(--turq);
  border-radius: 2px;
}

/* ---------- Floating login card ---------- */
.form-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 96px;
  grid-column: 2;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--footer);
  box-shadow: 0 12px 32px rgba(0, 15, 157, 0.18);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lang-form { margin: 0; }
.lang-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.lang-switch button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--black);
  cursor: pointer;
}
.lang-switch button.is-active { color: var(--navy); font-weight: 700; }
.lang-switch span { color: var(--grey); }

.eyebrow {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.card-title {
  margin: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
}
.title-accent {
  display: block;
  width: 48px;
  height: 4px;
  margin: 0 auto;
  background: var(--turq);
  border-radius: 2px;
}
.card-subtitle {
  margin: 0;
  text-align: center;
  font-size: 16px;
}

.alert {
  border-radius: 8px;
  border: 1px solid;
  padding: 16px;
  text-align: left;
}
.alert-title { margin: 0 0 4px; font-weight: 700; font-size: 16px; }
.alert-text { margin: 0; font-size: 16px; }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger-text); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.alert-info { background: var(--info-bg); border-color: var(--info-border); color: var(--info-text); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success-text); }

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login-actions form { margin: 0; }

.btn {
  width: 100%;
  padding: 14px 24px;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn-primary { background: var(--orange); color: var(--black); border: 0; }
.btn-primary:hover:not(:disabled) { filter: brightness(0.96); }
.btn-outline { background: var(--white); color: var(--navy); border: 2px solid var(--navy); }
.btn-outline:hover:not(:disabled) { background: #f3f5ff; }

.card-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 16px;
}

/* ---------- Footer band ---------- */
.site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--footer);
  color: var(--black);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 2;
}

/* ---------- Small screens: stacked, card floats over the header ---------- */
@media (max-width: 900px) {
  .login-page { display: block; }
  .brand-panel { inset: 0 0 56px 0; }
  .brand-logo { left: 24px; top: 40px; }
  .wordmark { font-size: 36px; }
  .wordmark-sub { font-size: 16px; }
  .brand-copy { left: 24px; right: 24px; bottom: auto; top: 200px; max-width: none; }
  .slogan { font-size: 24px; margin-bottom: 8px; }
  .slogan-line { padding-left: 20px; }
  .bar { top: 4px; height: 22px; }
  .tagline { font-size: 16px; margin-bottom: 0; }
  .watermark { top: 0; left: -20px; }
  .watermark span { font-size: 220px; }
  .brand-band { top: 52%; height: 48%; }
  .form-side {
    position: relative;
    padding: 0 16px 96px;
    margin-top: 300px;
    justify-content: stretch;
  }
  .login-card { max-width: none; margin-top: -96px; padding: 32px 24px; }
}

/* Language switch: each button sits in its own form; the form must not break the row. */
.lang-switch form { display: contents; margin: 0; }

/* Signed-in details list */
.signed-in-details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 1.25rem 0 0; }
.signed-in-details dt { font-weight: 600; }
.signed-in-details dd { margin: 0; word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
