/* DISTRI — Distri Tracker® prijava */
@font-face { font-family: "Newson"; src: url("../fonts/newson-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newson"; src: url("../fonts/newson-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newson"; src: url("../fonts/newson-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

:root {
  --green: #4a9d2b;
  --green-dark: #3f8a24;
  --ink: #000;
  --field: #f7f7f5;
  --line: #e2e2dd;
  --error: #c62828;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }

.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 44.8% 1fr;
  font-family: "Newson", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* zeleni panel */
.auth__brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: clamp(40px, 6.25vw, 120px);
  background: var(--green);
  color: #fff;
}
.auth__mark {
  position: absolute;
  left: 30%;
  top: 43%;
  width: 135%;
  max-width: none;
  opacity: .08;
  pointer-events: none;
  user-select: none;
}
.auth__logo { position: relative; display: inline-block; width: clamp(180px, 18.4vw, 354px); }
.auth__logo img { width: 100%; }
.auth__intro { position: relative; max-width: 560px; }
.auth__product {
  font-size: clamp(36px, 3.35vw, 64px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.auth__tagline {
  margin-top: clamp(14px, 1.6vw, 30px);
  font-size: clamp(17px, 1.36vw, 26px);
  font-weight: 500;
  line-height: 1.45;
}

/* obrazac */
.auth__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6.25vw, 120px) clamp(24px, 5vw, 96px);
}
.auth__panel { width: 100%; max-width: 600px; }
.auth__title {
  margin: 0;
  font-size: clamp(38px, 2.9vw, 56px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}
.auth__sub { margin-top: 14px; font-size: clamp(17px, 1.15vw, 22px); font-weight: 500; }
.auth__form { margin-top: clamp(32px, 3vw, 56px); }
.auth__field + .auth__field { margin-top: 22px; }
.auth__field label {
  display: block;
  margin: 0 0 10px 4px;
  font-size: clamp(15px, .95vw, 18px);
  font-weight: 500;
}
.auth__field input {
  width: 100%;
  height: clamp(54px, 4vw, 76px);
  padding: 0 clamp(18px, 1.4vw, 26px);
  font: inherit;
  font-size: clamp(17px, 1.2vw, 22px);
  font-weight: 500;
  color: var(--ink);
  background: var(--field);
  border: 2px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.auth__field input::placeholder { color: #9a9a95; opacity: 1; }
.auth__field input:focus {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 5px rgba(74, 157, 43, .14);
}
.auth__field input[aria-invalid="true"] { border-color: var(--error); background: #fff; }
.auth__error { margin: 8px 0 0 4px; font-size: 15px; color: var(--error); }

.auth__btn {
  display: block;
  width: 100%;
  height: clamp(56px, 4.35vw, 84px);
  margin-top: clamp(32px, 2.6vw, 48px);
  font: inherit;
  font-size: clamp(18px, 1.25vw, 24px);
  font-weight: 500;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color .15s;
}
.auth__btn:hover { background: var(--green-dark); }
.auth__btn:focus-visible { outline: 3px solid rgba(74, 157, 43, .45); outline-offset: 3px; }

.auth__notice {
  margin-top: 24px;
  padding: 18px 22px;
  font-size: 16px;
  line-height: 1.55;
  background: #eef6ea;
  border-left: 4px solid var(--green);
  border-radius: 8px;
}
.auth__notice p + p { margin-top: 6px; }
.auth__notice strong { font-weight: 600; }

.auth__help { margin-top: 28px; font-size: 16px; line-height: 1.5; }
.auth a { color: var(--green-dark); text-underline-offset: 3px; }
.auth__back {
  position: absolute;
  top: clamp(20px, 2.4vw, 40px);
  right: clamp(24px, 3vw, 56px);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.auth__back:hover { text-decoration: underline; }

/* mobitel: zeleni blok na vrhu, obrazac ispod */
@media (max-width: 760px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth__brand { justify-content: flex-start; gap: 22px; padding: 44px 24px 40px; }
  .auth__mark { left: 56%; top: -4%; width: 78%; }
  .auth__logo { width: 168px; }
  .auth__tagline { margin-top: 12px; max-width: 420px; }
  .auth__main { align-items: flex-start; padding: 44px 24px 72px; }
  .auth__back { top: auto; right: auto; bottom: 28px; left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
