

/* Osnovna paleta i pozadina stranice */
body:has(#loginForms) {
  --eds-navy: #052b50;
  --eds-blue: #004a8e;
  --eds-blue-light: #0878c4;
  --eds-cyan: #4ac3ed;
  --eds-text: #173451;
  --eds-muted: #718299;
  --eds-border: #e4eaf3;
  background: #06284b !important;
  color: var(--eds-text);
}

body:has(#loginForms) section.vh-100 {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  height: auto !important;
  padding: clamp(24px, 5vh, 54px) 0;
  background:
    radial-gradient(ellipse at 7% 12%, rgba(58, 153, 240, .31), transparent 34%),
    radial-gradient(ellipse at 94% 86%, rgba(14, 134, 211, .27), transparent 41%),
    linear-gradient(125deg, #031c37 0%, #06457e 55%, #062a4e 100%) !important;
}

/* Perspektivna energetska mreza — u potpunosti dekorativna */
body:has(#loginForms) section.vh-100::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: -45% -25% -55%;
  opacity: .19;
  background-image:
    linear-gradient(rgba(144, 205, 252, .48) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 205, 252, .48) 1px, transparent 1px);
  background-size: 65px 65px;
  transform: perspective(730px) rotateX(61deg) translateY(18%);
  transform-origin: center 65%;
  animation: eds-grid-drift 18s ease-in-out infinite alternate;
}

body:has(#loginForms) section.vh-100::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  width: 530px;
  height: 530px;
  right: -270px;
  top: -245px;
  border: 1px solid rgba(189, 231, 255, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(189, 231, 255, .025),
              0 0 0 145px rgba(189, 231, 255, .018);
}

body:has(#loginForms) section.vh-100 > .container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
}

body:has(#loginForms) section.vh-100 .card {
  position: relative;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .56) !important;
  border-radius: 28px !important;
  background: #fff;
  box-shadow: 0 30px 95px rgba(0, 17, 44, .35),
              0 5px 22px rgba(0, 26, 65, .10);
  animation: eds-card-enter .75s cubic-bezier(.18, .82, .25, 1) both;
}

/* Leva strana — 3D svetlosni prstenovi iza originalne EDS ilustracije */
body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 {
  position: relative;
  isolation: isolate;
  min-height: 590px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  perspective: 950px;
  background:
    radial-gradient(circle at 50% 44%, rgba(42, 191, 255, .29), transparent 37%),
    radial-gradient(circle at 12% 12%, rgba(80, 166, 235, .27), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(182, 228, 255, .045) 40px 41px),
    repeating-linear-gradient(0deg, transparent 0 39px, rgba(182, 228, 255, .045) 40px 41px),
    linear-gradient(145deg, #0a5792, #052a51 65%, #061e3e);
}

@media (min-width: 768px) {
  body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 {
    display: flex !important;
  }
}

body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: 47%;
  left: 50%;
  width: min(87%, 405px);
  aspect-ratio: 1;
  border: 2px solid rgba(153, 223, 255, .55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 23%, rgba(153, 236, 255, .28), transparent 30%),
    repeating-radial-gradient(circle, transparent 0 38px, rgba(152, 223, 255, .14) 39px 40px, transparent 41px 79px),
    conic-gradient(from 15deg,
      transparent, rgba(65, 209, 255, .30), transparent 28%,
      rgba(112, 221, 255, .46), transparent 54%,
      rgba(17, 139, 227, .35), transparent 86%);
  box-shadow: 0 0 55px rgba(55, 192, 255, .20),
              inset 0 0 34px rgba(73, 176, 245, .23),
              0 0 0 35px rgba(115, 208, 255, .045),
              0 0 0 77px rgba(115, 208, 255, .035);
  animation: eds-energy-orbit 18s linear infinite;
}

body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5::after {
  content: "ЕД СРБИЈЕ  ·  ДИГИТАЛНА ПЛАТФОРМА";
  pointer-events: none;
  position: absolute;
  z-index: 4;
  left: 12%;
  right: 12%;
  bottom: 39px;
  color: rgba(223, 245, 255, .76);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .17em;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* Zadrzava se originalni <img src=".../edsrbije.webp"> */
body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 > img {
  position: relative;
  z-index: 3;
  display: block;
  width: min(72%, 330px);
  max-width: 330px;
  max-height: 380px;
  height: auto;
  object-fit: contain;
  border-radius: 21px !important;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(215, 242, 255, .23);
  padding: 13px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 26px 65px rgba(0, 12, 35, .40),
              inset 0 1px rgba(255, 255, 255, .18);
  animation: eds-illustration-float 7s ease-in-out infinite;
}

/* Desna strana: tipografija, forma, CTA */
body:has(#loginForms) section.vh-100 .col-md-6.col-lg-7 {
  background:
    radial-gradient(ellipse at 110% -20%, rgba(69, 166, 243, .09), transparent 60%),
    #fff;
}

body:has(#loginForms) section.vh-100 .card-body {
  width: 100%;
  padding: clamp(35px, 5.2vw, 70px) clamp(28px, 5.1vw, 68px) !important;
}

body:has(#loginForms) #loginForms > .d-flex.align-items-center {
  margin-bottom: 30px !important;
  padding-bottom: 0 !important;
  animation: eds-fade-up .65s .12s both;
}

/* Koristi originalni EDS logo iz postojece PHP stranice, bez zamene i bez menjanja velicine */
body:has(#loginForms) #loginForms > .d-flex.align-items-center img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

body:has(#loginForms) #loginForms h5 {
  margin-bottom: 8px;
  padding-bottom: 0 !important;
  color: #123451;
  font-size: clamp(25px, 2.45vw, 32px);
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: -.035em !important;
  animation: eds-fade-up .65s .19s both;
}

body:has(#loginForms) #loginForms > p.small {
  margin-bottom: 29px;
  padding-bottom: 0 !important;
  color: var(--eds-muted);
  font-size: 14px;
  line-height: 1.6;
  animation: eds-fade-up .65s .24s both;
}

body:has(#loginForms) #loginForms .form-floating {
  margin-bottom: 17px !important;
  animation: eds-fade-up .65s .31s both;
}

body:has(#loginForms) #loginForms .form-floating + .form-floating {
  animation-delay: .37s;
}

body:has(#loginForms) #loginForms .form-control {
  min-height: 59px;
  background: #f7faff;
  border: 1px solid var(--eds-border);
  border-radius: 14px !important;
  color: var(--eds-text);
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}

body:has(#loginForms) #loginForms .form-floating > label {
  color: #7b8ca3;
  font-size: 14px;
  padding-left: 18px;
}

body:has(#loginForms) #loginForms .form-control:hover {
  border-color: #bdcee2;
}

body:has(#loginForms) #loginForms .form-control:focus {
  background: #fff;
  border-color: #2c8ed4;
  box-shadow: 0 0 0 4px rgba(15, 128, 212, .11);
}

body:has(#loginForms) #loginForms .pt-1.mb-4 {
  padding-top: 9px !important;
  margin-bottom: 27px !important;
  animation: eds-fade-up .65s .43s both;
}

body:has(#loginForms) #loginBtn,
body:has(#loginForms) #verificationBtn {
  position: relative;
  overflow: hidden;
  min-height: 53px;
  border: 1px solid #004a8e !important;
  border-radius: 14px !important;
  background: linear-gradient(110deg, #004a8e, #087bc0) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 11px 24px rgba(0, 74, 142, .23);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

body:has(#loginForms) #loginBtn:hover,
body:has(#loginForms) #verificationBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 15px 26px rgba(0, 74, 142, .30);
}

body:has(#loginForms) #loginBtn:active,
body:has(#loginForms) #verificationBtn:active {
  transform: translateY(0);
}

body:has(#loginForms) #loginBtn:focus-visible,
body:has(#loginForms) #verificationBtn:focus-visible {
  outline: 3px solid #8edbff;
  outline-offset: 3px;
}

body:has(#loginForms) #loginForms > a.small {
  display: inline-block;
  margin-right: 18px;
  margin-bottom: 7px;
  color: #647c95 !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  transition: color .2s ease;
}

body:has(#loginForms) #loginForms > a.small:hover {
  color: #004a8e !important;
  text-decoration: underline;
}

/* Modal za verifikaciju: samo vizuelne izmene, ista polja i ID-jevi */
body:has(#loginForms) #verificationModal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 25px 75px rgba(0, 30, 65, .27);
}

body:has(#loginForms) #verificationModal .modal-header {
  padding: 25px 28px 14px;
  border: 0;
}

body:has(#loginForms) #verificationModal .modal-title {
  font-size: 21px;
  font-weight: 700;
  color: #163c5e;
}

body:has(#loginForms) #verificationModal .modal-body {
  padding: 12px 28px 8px;
  color: #435c77;
}

body:has(#loginForms) #verificationModal .form-control {
  border: 1px solid var(--eds-border);
  border-radius: 13px !important;
  background: #f7faff;
}

body:has(#loginForms) #verificationModal .form-control:focus {
  border-color: #2c8ed4;
  box-shadow: 0 0 0 4px rgba(15, 128, 212, .11);
}

body:has(#loginForms) #verificationModal .modal-footer {
  padding: 8px 28px 27px;
  border: 0;
}

/* Ne prikazuj globalno dugme za povratak na vrh na ekranu prijave */
body:has(#loginForms) .back-to-top { display: none !important; }

.eds-phone-hint {
    display: none !important;
}

/* Responsivnost */
@media (max-width: 991.98px) {
  body:has(#loginForms) section.vh-100 .card-body {
    padding: 38px 30px !important;
  }
  body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 {
    min-height: 550px;
  }
  body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 > img {
    width: 78%;
  }
}

@media (max-width: 767.98px) {
  body:has(#loginForms) section.vh-100 {
    padding: 22px 0;
  }
  body:has(#loginForms) section.vh-100 > .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  body:has(#loginForms) section.vh-100 .card {
    max-width: 490px;
    margin: auto;
    border-radius: 23px !important;
  }
  body:has(#loginForms) section.vh-100 .card-body {
    padding: 36px 27px 33px !important;
  }
  body:has(#loginForms) #loginForms > .d-flex.align-items-center {
    margin-bottom: 27px !important;
  }
  body:has(#loginForms) #loginForms h5 { font-size: 27px; }
  body:has(#loginForms) #loginForms > p.small { margin-bottom: 25px; }
}

@media (max-width: 400px) {
  body:has(#loginForms) section.vh-100 > .container {
    padding-left: 14px;
    padding-right: 14px;
  }
  body:has(#loginForms) section.vh-100 .card-body {
    padding: 28px 20px !important;
  }
  body:has(#loginForms) #loginForms h5 { font-size: 24px; }
}

/* Animacije — samo transform / opacity, bez opterecujucih biblioteka */
@keyframes eds-card-enter {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes eds-fade-up {
  from { opacity: 0; transform: translateY(11px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes eds-grid-drift {
  from { transform: perspective(730px) rotateX(61deg) translateY(18%) translateX(-3%); }
  to   { transform: perspective(730px) rotateX(61deg) translateY(13%) translateX(3%); }
}
@keyframes eds-energy-orbit {
  from { transform: translate(-50%, -50%) rotateX(62deg) rotateZ(0deg); }
  to   { transform: translate(-50%, -50%) rotateX(62deg) rotateZ(360deg); }
}
@keyframes eds-illustration-float {
  0%, 100% { transform: translateY(0) rotateY(-7deg) rotateX(3deg); }
  50%      { transform: translateY(-14px) rotateY(6deg) rotateX(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  body:has(#loginForms) section.vh-100::before,
  body:has(#loginForms) section.vh-100 .card,
  body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5::before,
  body:has(#loginForms) section.vh-100 .col-md-6.col-lg-5 > img,
  body:has(#loginForms) #loginForms > *,
  body:has(#loginForms) #loginForms .form-floating {
    animation: none !important;
    transform: none !important;
  }
  body:has(#loginForms) #loginBtn,
  body:has(#loginForms) #verificationBtn { transition: none !important; }
}
