/* =========================================================
   GLOBAL - przepisane z home.css
========================================================= */

:root {
  --bg-main: #222;
  --bg-black: #000;
  --bg-dark: #111;
  --bg-icon: #202020;
  --bg-icon-hover: #303030;
  --bg-card: #1a1a1a;
  --border-dark: #333;

  --yellow: #f5c107;
  --yellow-hover: #e0b000;

  --purple: #8b2c91;
  --purple-dark: #4b1152;
  --purple-icon: #8b2c91;
  --purple-icon-hover: #cc09da;

  --text-white: #fff;
  --text-light: #eee;
  --text-muted: #999;

  --header-height: 112px;
  --logo-width: 190px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  min-height: 100vh;
  display: block;

  background:
    linear-gradient(
      rgba(0, 0, 0, 0.25),
      rgba(0, 0, 0, 0.55)
    ),
    url("/static/appSCADA/tlologin.webp");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  color: var(--yellow);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


/* =========================================================
   HEADER DESKTOP - 1:1 z home.css
========================================================= */

.top-header {
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-black);
  display: flex;
  align-items: stretch;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 5000;
  border-bottom: 1px solid var(--border-dark);
}

.header-logo-section {
  width: var(--logo-width);
  height: 100%;
  flex-shrink: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.navbar-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.header-banner {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.78) 0%,
      rgba(255,255,255,0.50) 38%,
      rgba(255,255,255,0.28) 70%,
      rgba(255,255,255,0.40) 100%
    ),
    url("/static/appSCADA/header-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0 16px 0 28px;
  gap: 18px;
}

.header-title-section {
  height: 100%;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.scada-main-title {
  color: var(--purple-dark);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
}

.scada-subtitle {
  margin-top: 8px;
  color: #111;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.header-divider {
  width: 2px;
  height: 72%;
  background: rgba(75, 17, 82, 0.75);
  flex-shrink: 0;
}


/* =========================================================
   KONTAKT - 1:1 z home.css
========================================================= */

.header-contact-section {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-box {
  width: 100%;
  min-height: 38px;
  background-color: var(--purple-dark);
  color: var(--text-white);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  user-select: text;
  white-space: nowrap;

  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  column-gap: 8px;
}

.contact-box svg {
  width: 20px;
  height: 20px;
  justify-self: center;
  flex-shrink: 0;
}

.contact-box span {
  justify-self: center;
  white-space: nowrap;
}


/* =========================================================
   LOGIN - 1:1 układ, zmieniona tylko przezroczystość
========================================================= */

.login-header {
  height: 82px;
  background: #000;
  display: flex;
  align-items: center;
  padding: 6px 16px;
  gap: 12px;
  border-bottom: 1px solid #333;
}

.login-top-header {
  position: fixed;
}

.login-header-banner {
  justify-content: flex-start;
}

.login-contact-section {
  margin-left: 40px;
}

/* nadpisuje inline style z HTML */
body > div[style*="max-width:500px"] {
  background: rgba(18, 18, 22, 0.78) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px solid rgba(245, 193, 7, 0.28) !important;
  border-radius: 18px !important;

  box-shadow:
    0 0 35px rgba(0, 0, 0, 0.55),
    0 0 22px rgba(139, 44, 145, 0.18) !important;
}

body > div[style*="max-width:500px"] h2 {
  color: var(--yellow) !important;
}

body > div[style*="max-width:500px"] label {
  color: #eee;
  font-weight: bold;
}

body > div[style*="max-width:500px"] input {
  width: 100%;
  height: 44px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(245, 193, 7, 0.25);
  border-radius: 8px;
  padding: 0 12px;
}

body > div[style*="max-width:500px"] input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 12px rgba(245, 193, 7, 0.25);
}

body > div[style*="max-width:500px"] button {
  background: var(--yellow) !important;
  color: #000 !important;
}


/* =========================================================
   MOBILE - przepisane z home.css
========================================================= */

@media screen and (max-width: 900px) {

  :root {
    --header-height: 116px;
    --logo-width: 95px;
  }

  .top-header {
    height: var(--header-height) !important;
    overflow: visible !important;
  }

  .header-logo-section {
    width: var(--logo-width) !important;
    padding: 5px !important;
  }

  .header-banner {
    position: relative !important;
    padding: 8px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
  }

  .header-title-section {
    min-width: 105px !important;
    max-width: 115px !important;
  }

  .scada-main-title {
    font-size: 27px !important;
  }

  .scada-subtitle {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  .header-divider {
    display: none !important;
  }

  .header-contact-section {
    display: none !important;
  }
}