/* Njuškalo Najam — odvojeni portal za prijavu kodom */

:root {
  --nj-yellow: #fdcd00;
  --nj-yellow-deep: #e6b800;
  --nj-ink: #221f1f;
  --nj-muted: #6b6b6b;
  --nj-line: #e6e6e6;
  --nj-link: #0066a1;
  --nj-font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--nj-font);
  color: var(--nj-ink);
  background: #ececec;
  -webkit-font-smoothing: antialiased;
}

body.njn-land {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.njn-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #ebebeb;
  background-image: url("/logos/njuskalo-help-pattern.png?v=6");
  background-repeat: repeat;
  background-position: 0 0;
  background-size: auto;
  opacity: 1;
}

.njn-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(253, 205, 0, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(236, 236, 236, 0.55) 45%, rgba(236, 236, 236, 0.85) 100%);
  pointer-events: none;
}

/* —— top bar: samo brand, kao poddomena —— */
.njn-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--nj-yellow);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.njn-top__logo {
  display: block;
  width: 148px;
  height: 36px;
  overflow: hidden;
  color: transparent;
  text-indent: 120%;
  white-space: nowrap;
  background: url("/logos/njuskalo-header-logo-1x.png") 0 50% / contain no-repeat;
  text-decoration: none !important;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .njn-top__logo {
    background-image: url("/logos/njuskalo-header-logo-2x.png");
  }
}

.njn-top__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nj-ink);
}

.njn-top__chip::before {
  content: "";
  width: 14px;
  height: 14px;
  background: url("/logos/njuskalo-house-icon.svg") center / contain no-repeat;
}

/* —— stage —— */
.njn-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 20px;
}

.njn-portal {
  width: min(420px, 100%);
  padding: 32px 28px 28px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 50px rgba(34, 31, 31, 0.12);
  text-align: center;
  animation: njnIn 0.45s ease both;
}

@keyframes njnIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.njn-portal__brand {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a7400;
}

.njn-portal h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--nj-ink);
}

.njn-portal__lead {
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--nj-muted);
}

/* —— gate form —— */
.njn-gate {
  margin: 0;
  text-align: left;
}

.njn-gate__label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.njn-gate__input {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 16px 14px;
  border: 2px solid #e2e2e2;
  border-radius: 10px;
  background: #fafafa;
  font: 800 26px/1.1 var(--nj-font);
  letter-spacing: 0.28em;
  text-align: center;
  color: var(--nj-ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.njn-gate__input::placeholder {
  color: #c5c5c5;
  letter-spacing: 0.35em;
  font-weight: 700;
}

.njn-gate__input:focus {
  border-color: var(--nj-yellow);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(253, 205, 0, 0.28);
}

.njn-gate__btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe14a 0%, var(--nj-yellow) 55%, var(--nj-yellow-deep) 100%);
  color: var(--nj-ink);
  font: 800 14px/1.2 var(--nj-font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(200, 160, 0, 0.28);
  transition: filter 0.15s, transform 0.15s;
}

.njn-gate__btn:hover {
  filter: brightness(0.98);
}

.njn-gate__btn:active {
  transform: translateY(1px);
}

.njn-gate__btn:disabled {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

.njn-gate__err {
  margin: 12px 0 0;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.njn-gate__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #999;
  text-align: center;
}

.njn-portal__how {
  display: inline-block;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--nj-link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.njn-portal__how:hover {
  border-bottom-color: currentColor;
}

/* —— foot —— */
.njn-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 16px 18px 22px;
  font-size: 12px;
  color: #777;
  text-align: center;
}

.njn-foot a {
  color: #8a7400;
  font-weight: 700;
  text-decoration: none;
}

.njn-foot a:hover {
  text-decoration: underline;
}

/* FAB */
.njn-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #009fe3;
  color: #fff;
  font: 700 12px/1 var(--nj-font);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 159, 227, 0.35);
}

.njn-fab:hover {
  filter: brightness(1.05);
}

.njn-fab--pulse {
  animation: njnFabPulse 0.9s ease;
}

@keyframes njnFabPulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.06); }
}

.njn-tp-panel.hidden {
  display: none !important;
}

@media (max-width: 480px) {
  .njn-top {
    padding: 12px 14px;
  }
  .njn-top__logo {
    width: 128px;
    height: 32px;
  }
  .njn-stage {
    padding: 18px 12px 12px;
    align-items: flex-end;
  }
  .njn-portal {
    width: 100%;
    border-radius: 18px 18px 14px 14px;
    padding: 28px 20px 24px;
    margin-bottom: 4px;
  }
  .njn-portal h1 {
    font-size: 24px;
  }
  .njn-gate__input {
    font-size: 24px;
    padding: 15px 12px;
  }
  .njn-foot {
    padding-bottom: 70px;
  }
}

@media (min-width: 481px) {
  .njn-portal {
    padding: 36px 34px 32px;
  }
}
