/*
  Style strony-zaślepki — odwzorowanie motywu i layoutu okna logowania BK
  (paleta, czcionka Inter, split-layout, pola/zakładki/przyciski w stylu MUI).
  © Aurea Enterprises z o.o. | Autor: Paweł Gościcki
*/

/* ============================ THEME TOKENS ============================ */
/* Values mirror the apps/frontend theme (colorSchemes.ts, primaryColorConfig.ts). */
:root {
  --primary-main: #7340e0;
  --primary-light: #8c5ff0;
  --primary-dark: #5e2ec7;
  --error-main: #ff4c51;
  --radius: 6px;
  --font: 'Inter', sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Light mode. */
html[data-theme='light'] {
  --bg-default: #f4f5fa;
  --bg-paper: #ffffff;
  --text-base: 46 38 61; /* mainColorChannels.light */
  --text-primary: rgb(var(--text-base) / 0.9);
  --text-secondary: rgb(var(--text-base) / 0.75);
  --text-disabled: rgb(var(--text-base) / 0.4);
  --divider: rgb(var(--text-base) / 0.12);
  --field-border: rgb(var(--text-base) / 0.22);
  --shadow-card: 0 4px 10px rgb(46 38 61 / 0.2);
}

/* Dark mode. */
html[data-theme='dark'] {
  --bg-default: #28243d;
  --bg-paper: #312d4b;
  --text-base: 231 227 252; /* mainColorChannels.dark */
  --text-primary: rgb(var(--text-base) / 0.9);
  --text-secondary: rgb(var(--text-base) / 0.7);
  --text-disabled: rgb(var(--text-base) / 0.4);
  --divider: rgb(var(--text-base) / 0.12);
  --field-border: rgb(var(--text-base) / 0.22);
  --shadow-card: 0 4px 10px rgb(19 17 32 / 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  /* The full-bleed diagonal banner is decorative — it must never cause horizontal scroll. */
  overflow-x: hidden;
}

body {
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background-color: var(--bg-default);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ============================ TOP BAR ============================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  padding-inline: 1.5rem;
  background-color: var(--bg-paper);
  border-block-end: 1px solid var(--divider);
  z-index: 20;
}

/* Header brand lockup — shield logo + wordmark. */
.logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-img {
  block-size: 38px;
  inline-size: auto;
}

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Header buttons — the only clickable area of the page. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  background-color: rgb(var(--text-base) / 0.06);
  color: var(--text-primary);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--primary-main);
  outline-offset: 2px;
}

.locale-btn {
  border-radius: 999px;
  padding-inline: 0.7rem;
}

.locale-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Theme icons — only one is visible depending on data-theme. */
.icon-moon {
  display: none;
}

html[data-theme='dark'] .icon-sun {
  display: none;
}

html[data-theme='dark'] .icon-moon {
  display: inline;
}

/* ============================ MAIN / SPLIT ============================ */
.main {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-block-size: 0;
  /* Dead window: nothing below the header reacts to pointer/keyboard. */
  pointer-events: none;
  user-select: none;
}

/* Left column — illustration + mask + tree object. */
.illustration-col {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

.illustration-col .mask {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  z-index: -1;
}

.illustration-col .character {
  max-inline-size: 100%;
  block-size: auto;
  /* Matches the login screen: base 500px scaled by 150% (--bk-login-illustration-percent). */
  max-block-size: 750px;
}

/* Right column — login card (480px on md+). */
.form-col {
  flex: 0 0 auto;
  inline-size: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--bg-paper);
  transition: background-color 0.25s ease;
}

.form-stack {
  inline-size: 100%;
  max-inline-size: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ============================ TABS ============================ */
.tabs {
  display: flex;
  border-block-end: 1px solid var(--divider);
}

.tab {
  position: relative;
  flex: 1;
  text-align: center;
  padding-block: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.tab-active {
  color: var(--primary-main);
}

.tab-active::after {
  content: '';
  position: absolute;
  inset-block-end: -1px;
  inset-inline: 0;
  block-size: 2px;
  background-color: var(--primary-main);
}

/* ============================ FORM FIELDS ============================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
}

.field {
  position: relative;
}

.field-input {
  inline-size: 100%;
  padding: 15px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: transparent;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
}

/* Floating label — notch on the top border (MUI outlined pattern). */
.field-label {
  position: absolute;
  inset-block-start: -0.55rem;
  inset-inline-start: 0.6rem;
  padding-inline: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background-color: var(--bg-paper);
}

.field-adornment {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 0.75rem;
  transform: translateY(-50%);
  color: var(--text-secondary);
  display: inline-flex;
}

/* "Remember me" checkbox. */
.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 4px;
  background-color: var(--primary-main);
  color: #fff;
}

/* ============================ BUTTONS ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  inline-size: 100%;
  padding: 0.6rem 1.4rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.btn-contained {
  background-color: var(--primary-main);
  color: #fff;
  box-shadow: 0 2px 6px rgb(115 64 224 / 0.3);
}

.btn-outlined {
  background-color: transparent;
  color: var(--primary-main);
  border-color: rgb(115 64 224 / 0.5);
}

/* ============================ BOTTOM LINKS ============================ */
.bottom-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.link {
  font-size: 0.9rem;
}

.link-text {
  color: var(--primary-main);
}

.no-account {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.link-primary {
  color: var(--primary-main);
}

/* ===================== „COMING SOON" OVERLAY ===================== */
.coming-soon {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none; /* never intercepts clicks — purely decorative text */
  z-index: 50;
  overflow: hidden;
}

.coming-soon-text {
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 0.12em;
  /* Semi-transparent theme red — non-aggressive, readable in both modes. */
  color: rgb(255 76 81 / 0.18);
  /* Responsive size — large and diagonal, yet the full phrase stays readable. */
  font-size: clamp(1.75rem, 9vw, 7.5rem);
  transform: rotate(-32deg);
  text-transform: uppercase;
  user-select: none;
}

/* ===================== TEASER FOOTER ===================== */
/* Discreet bottom link to the product page (/o-systemie/) — sits above the fixed COMING SOON overlay. */
.site-footer {
  position: relative;
  z-index: 60;
  padding-block: 1rem;
  text-align: center;
}

.site-footer-link {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-block-end: 1px solid var(--divider);
  padding-block-end: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer-link:hover {
  color: var(--primary-main);
  border-color: var(--primary-main);
}

.site-footer-link:focus-visible {
  outline: 2px solid var(--primary-main);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============= PRODUCT INTRO — visible SEO copy on /o-systemie/ ============= */
/* Subtle, elegant copy rendered as normal HTML — equally readable by users and crawlers. */
.intro {
  inline-size: 100%;
  max-inline-size: 760px;
  margin-inline: auto;
  padding: 2.5rem 1.5rem 3.25rem;
  text-align: center;
  border-block-start: 1px solid var(--divider);
}

.intro-heading {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.intro-tagline {
  margin: 0.4rem 0 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--primary-main);
}

.intro-lead {
  max-inline-size: 640px;
  margin: 0 auto 1.5rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.intro-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.intro-features li {
  padding: 0.32rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: rgb(var(--text-base) / 0.05);
  border: 1px solid var(--divider);
  border-radius: 999px;
}

.intro-claim {
  max-inline-size: 640px;
  margin: 0 auto;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-disabled);
}

/* ============================ RESPONSIVE ============================ */
/* < 900px — left column disappears, form goes full-width (like AuthV2Layout). */
@media (max-width: 899px) {
  .illustration-col {
    display: none;
  }
}

/* md+ — right column is a fixed 480px, left column fills the rest. */
@media (min-width: 900px) {
  .form-col {
    inline-size: 480px;
    padding: 3rem;
  }

  .form-stack {
    max-inline-size: none;
  }
}
