/* ============================================================
   Auth stranice (login / register / recovery) — LIGHT stil usklađen
   s landing stranicom (index.html).
   Paleta: svijetla podloga, tamno-navy paneli, plava #2563EB,
   narančasta #E95D2C.
   ============================================================ */

:root {
  --auth-bg: #E9EDF4;
  --auth-dark: #060B14;
  --auth-dark-2: #0A1524;
  --auth-text: #0B1120;
  --auth-muted: #5A6B85;
  --auth-border: #D5DEEA;
  --auth-blue: #2563EB;
  --auth-orange: #E95D2C;
  --auth-card: #FFFFFF;
}

body.login-page,
.auth-page {
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

body.recovery-page { min-height: 100vh; }
body.recovery-page.reset-password-page { min-height: 100vh; }
.recovery-card { width: 100%; }
.recovery-page .login-presentation { justify-content: center; }

/* ---------- LOGIN SHELL ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--auth-bg);
}

.login-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--auth-border);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--auth-text);
}
.login-brand-mark img { width: 30px; height: 30px; display: block; }
.login-brand-copy { display: grid; line-height: 1.1; }
.login-brand-copy strong { font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }
.login-brand-copy span { font-size: 12px; color: var(--auth-muted); }

.login-menu-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding: 8px;
  color: var(--auth-text);
  cursor: pointer;
}

.login-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.login-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  color: #33415C;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.login-nav a:hover { background: rgba(37, 99, 235, 0.08); color: var(--auth-blue); }
.login-nav svg { width: 16px; height: 16px; }

.login-header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
}
.system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #15803D;
  font-size: 12.5px;
  font-weight: 700;
}
.system-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}
.security-mark { color: var(--auth-muted); display: grid; place-items: center; }
.security-mark svg { width: 18px; height: 18px; }

/* ---------- MAIN SPLIT ---------- */
.login-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr);
  gap: 26px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 28px 40px;
}

/* ---------- PREZENTACIJSKA STRANA (tamni panel kao landing hero) ---------- */
.login-presentation {
  border-radius: 20px;
  padding: 42px 40px;
  color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, #123A8A 0%, transparent 60%),
    linear-gradient(180deg, var(--auth-dark-2) 0%, var(--auth-dark) 100%);
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: hidden;
}

.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #7DE8A4;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.login-eyebrow span {
  width: 22px;
  height: 2px;
  background: var(--auth-orange);
  display: inline-block;
}

.login-copy h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.login-copy h1 span { display: block; }
.login-copy h1 strong { color: var(--auth-orange); }

.login-title-rule {
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--auth-blue), var(--auth-orange));
  margin: 16px 0;
}

.login-copy h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #C9D5E8;
}

.login-description {
  margin: 10px 0 0;
  max-width: 460px;
  color: #8FA0BD;
  font-size: 15px;
  line-height: 1.6;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13.5px;
  font-weight: 600;
  color: #D7E1F2;
}
.login-feature-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.25);
  color: #9DC0FF;
}
.login-feature-icon svg { width: 16px; height: 16px; }

/* dashboard mockup (svijetli "screenshot" na tamnom panelu) */
.dashboard-preview {
  margin-top: auto;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #F4F7FB;
  color: var(--auth-text);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.preview-sidebar {
  background: #0E1B30;
  color: #AEBAD1;
  padding: 14px 10px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.preview-sidebar-title { display: grid; place-items: center; padding: 6px; color: #fff; }
.preview-sidebar-title svg { width: 20px; height: 20px; }
.preview-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.preview-nav-item svg { width: 14px; height: 14px; }
.preview-nav-item.active { background: rgba(37, 99, 235, 0.22); color: #9DC0FF; }

.preview-content { padding: 14px 16px; display: grid; gap: 12px; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 800; }
.preview-heading small { display: flex; align-items: center; gap: 6px; color: #15803D; font-size: 11.5px; font-weight: 700; }
.preview-heading small span { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; }
.preview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview-metrics div {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--auth-border);
  font-size: 11.5px;
  font-weight: 700;
  color: #33415C;
}
.preview-metrics svg { width: 16px; height: 16px; color: var(--auth-blue); }
.preview-data { display: grid; grid-template-columns: 1.2fr 1fr; gap: 10px; }
.preview-section-title { font-size: 11.5px; font-weight: 800; color: #5A6B85; text-transform: uppercase; letter-spacing: 0.8px; }
.preview-chart, .preview-activity {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--auth-border);
}
.preview-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.preview-bars span { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #3B82F6, #1D4ED8); }
.preview-bars .bar-a { height: 40%; }
.preview-bars .bar-b { height: 70%; }
.preview-bars .bar-c { height: 55%; }
.preview-bars .bar-d { height: 85%; }
.preview-bars .bar-e { height: 62%; }
.preview-bars .bar-f { height: 92%; }
.preview-bars .bar-g { height: 74%; }
.preview-activity div { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #33415C; }
.preview-activity svg { width: 14px; height: 14px; color: #22C55E; }

/* ---------- PRISTUPNA KARTICA (svijetla) ---------- */
.login-access {
  display: grid;
  place-items: center;
  padding: 10px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  padding: 30px 30px 26px;
  box-shadow: 0 18px 44px rgba(11, 17, 32, 0.08);
  display: grid;
  gap: 14px;
}
.login-card-heading { display: grid; gap: 4px; }
.login-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(233, 93, 44, 0.14));
  color: var(--auth-blue);
}
.login-card-icon svg { width: 22px; height: 22px; }
.login-card-heading h2 { margin: 0; font-size: 24px; font-weight: 800; }
.login-card-heading p { margin: 0; color: var(--auth-muted); font-size: 14px; }

.auth-card .field { display: grid; gap: 6px; }
.auth-card label { font-size: 13px; font-weight: 700; color: #33415C; }
.auth-card input,
.auth-card select,
.auth-card textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--auth-border);
  border-radius: 11px;
  background: #FBFCFE;
  color: var(--auth-text);
  font-size: 14.5px;
  font-family: inherit;
}
.auth-card input:focus,
.auth-card select:focus,
.auth-card textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  border-color: var(--auth-blue);
}

.login-input-wrap { position: relative; }
.login-input-wrap > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--auth-muted);
  pointer-events: none;
}
.login-input-wrap input { padding-left: 38px; }
.login-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  color: var(--auth-muted);
  cursor: pointer;
}
.login-password-toggle svg { width: 17px; height: 17px; }

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
}
.remember-control { display: flex; align-items: center; gap: 8px; color: #33415C; cursor: pointer; }
.login-options a { color: var(--auth-blue); font-weight: 600; text-decoration: none; }
.login-options a:hover { text-decoration: underline; }

.auth-card .button.primary,
.login-submit,
.recovery-card .button.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--auth-blue);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.auth-card .button.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.login-secondary,
.recovery-header-actions .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  color: #33415C;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.login-secondary:hover { border-color: var(--auth-blue); color: var(--auth-blue); }

.login-resend { width: 100%; min-height: 42px; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.error-state {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.07);
  color: #B91C1C;
  font-size: 13.5px;
  font-weight: 600;
}
.error-state p { margin: 0; }
.success-state {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  color: #15803D;
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- FOOTER ---------- */
.login-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 28px;
  border-top: 1px solid var(--auth-border);
  background: #F0F3F8;
  color: var(--auth-muted);
  font-size: 13px;
}
.login-footer nav { display: flex; gap: 18px; }
.login-footer a { color: var(--auth-muted); text-decoration: none; font-weight: 600; }
.login-footer a:hover { color: var(--auth-blue); }

/* ---------- REGISTER (auth-page split) ---------- */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.15fr);
}
.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 56px 52px;
  color: #fff;
  background:
    radial-gradient(800px 400px at 90% -10%, #123A8A 0%, transparent 60%),
    linear-gradient(180deg, var(--auth-dark-2), var(--auth-dark));
}
.auth-logo { width: 52px; height: 52px; }
.auth-aside h1 { margin: 0; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.18; font-weight: 800; }
.auth-aside p { margin: 0; max-width: 420px; color: #AEBAD1; font-size: 15.5px; line-height: 1.6; }

.auth-main {
  display: grid;
  place-items: center;
  padding: 40px 30px;
  background: var(--auth-bg);
}
.auth-main .auth-card { max-width: 470px; }
.auth-card h2 { margin: 0; font-size: 24px; font-weight: 800; }

.auth-links {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
}
.auth-links a { color: var(--auth-blue); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* register tip (founder/member) — kartice s ikonama */
.register-type {
  display: grid;
  gap: 8px;
  padding: 0;
  border: none;
}
.register-type legend {
  color: #33415C;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.account-type-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.account-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--auth-border);
  border-radius: 13px;
  background: #FBFCFE;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.account-type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.account-type-card:has(input:checked) {
  border-color: var(--auth-blue);
  background: rgba(37, 99, 235, 0.07);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.account-type-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--auth-blue);
}
.account-type-icon svg { width: 18px; height: 18px; }
.account-type-copy { display: grid; gap: 2px; }
.account-type-copy strong { font-size: 14px; color: var(--auth-text); }
.account-type-copy small { font-size: 12px; color: var(--auth-muted); line-height: 1.35; }

/* ---------- RECOVERY stranice ---------- */
.recovery-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.recovery-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.recovery-back-link:hover { text-decoration: underline; }
.recovery-main .login-presentation { justify-content: center; }
.recovery-introduction h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
}
.recovery-introduction p { margin: 0; color: var(--auth-muted); font-size: 14.5px; }
.recovery-success,
.recovery-state {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
}
.recovery-success { border: 1px solid rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.08); color: #15803D; }
.reset-password-requirements { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #F1F5FB; border: 1px solid var(--auth-border); font-size: 12.5px; color: #33415C; }
.reset-checking { color: var(--auth-muted); font-size: 13.5px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .login-main { grid-template-columns: 1fr; padding: 18px 16px 30px; }
  .login-presentation { padding: 30px 26px; }
  .login-nav { display: none; }
  .login-menu-toggle { display: block; }
  .login-header { padding: 10px 16px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { padding: 40px 28px; }
  .login-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .login-feature-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-preview { grid-template-columns: 1fr; }
  .preview-sidebar { display: none; }
  .login-header-status .system-status span:last-child { display: none; }
  .auth-card { padding: 24px 20px; }
  body.recovery-page .recovery-back-link span { display: none; }
  .account-type-cards { grid-template-columns: 1fr; }
}

.system-status.down {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #B91C1C;
}

.auth-footer {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 470px;
  color: var(--auth-muted);
  font-size: 12.5px;
}
.auth-footer p { margin: 0; }
.auth-footer a { color: var(--auth-blue); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ---------- REGISTER: aside perks + kartica ---------- */
.aside-perks {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
}
.aside-perks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aside-perks li > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 2px;
  color: #7DE8A4;
}
.aside-perks span { display: grid; gap: 2px; }
.aside-perks strong { color: #fff; font-size: 14.5px; }
.aside-perks small { color: #8FA0BD; font-size: 12.5px; }

.auth-main { align-content: center; }
.auth-perks {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 470px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--auth-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.auth-perks li { display: flex; align-items: center; gap: 6px; }
.auth-perks svg { width: 15px; height: 15px; color: #22C55E; }

.login-options { flex-wrap: nowrap; }
.remember-control { white-space: nowrap; }

.login-presentation { padding: 42px 40px; }
.auth-aside { padding: 56px 52px; }
@media (max-width: 900px) {
  .login-presentation { padding: 30px 26px; }
  .auth-aside { padding: 40px 28px; }
}

/* ---------- REGISTER: header + raspored ---------- */
body.register-shell-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--auth-bg);
}
body.register-shell-page .auth-page { flex: 1; min-height: 0; }

.login-options { justify-content: space-between; }
