/* ============================================================
   ✨ MODERN FORM STYLES — koristi se i za novi_spis_pravno i novi_spis_fizicko
   (oba templejta linkuju ovaj CSS).  HTML strukture nisu mijenjane.
   ============================================================ */

.form-container {
  position: relative;
  max-width: 920px;
  margin: 30px auto 60px;
  background: linear-gradient(160deg, #ffffff 0%, #f6faff 100%);
  padding: 36px 44px 32px;
  border-radius: 20px;
  border: 1px solid rgba(5, 106, 214, 0.10);
  box-shadow:
    0 18px 40px rgba(5, 106, 214, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

.form-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #056ad6, #4aa3ff, #056ad6);
  background-size: 200% 100%;
  animation: gradient-slide 6s ease-in-out infinite;
}

@keyframes gradient-slide {
  0%   { background-position: 0% 0; }
  50%  { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

.form-container h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0 0 26px;
  color: #034a9b;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(5, 106, 214, 0.10);
}

.form-container hr {
  border: none;
  border-top: 1px dashed rgba(5, 106, 214, 0.22);
  margin: 28px 0 18px;
}

.form-container h4 {
  font-size: 18px;
  font-weight: 700;
  color: #1f3a5f;
  margin: 18px 0 14px;
  padding-left: 14px;
  position: relative;
  letter-spacing: 0.2px;
}

.form-container h4::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #056ad6, #4aa3ff);
}

/* === GRID === */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 26px;
  align-items: center;
}

.form-grid label {
  font-weight: 600;
  font-size: 14px;
  color: #1f3a5f;
  margin-bottom: 0;
  letter-spacing: 0.2px;
}

/* === INPUTI === */
.form-grid input,
.form-grid textarea,
.form-container input[type="text"],
.form-container input[type="date"],
.form-container input[type="time"],
.form-container textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(5, 106, 214, 0.20);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: #1f2d3d;
  box-sizing: border-box;
  box-shadow: 0 2px 6px rgba(5, 106, 214, 0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  outline: none;
}

.form-grid input::placeholder,
.form-grid textarea::placeholder {
  color: #94a3b8;
}

.form-grid input:hover,
.form-grid textarea:hover {
  border-color: rgba(5, 106, 214, 0.40);
}

.form-grid input:focus,
.form-grid textarea:focus {
  border-color: #056ad6;
  background: #fbfdff;
  box-shadow: 0 0 0 4px rgba(5, 106, 214, 0.14);
}

textarea {
  resize: vertical;
  min-height: 70px;
}

/* === DUGMAD === */
.btn-create {
  margin-top: 28px;
  padding: 13px 26px;
  background: linear-gradient(135deg, #056ad6, #2f8eea);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 106, 214, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.btn-create:hover {
  background: linear-gradient(135deg, #0466cc, #1e7fe0);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(5, 106, 214, 0.38);
}

.btn-create:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(5, 106, 214, 0.25);
}

/* === SUCCESS POPUP === */
.popup {
  display: none;
  margin-top: 22px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #e6f9ec, #d4f4dd);
  color: #1f6f3f;
  border: 1px solid rgba(56, 161, 105, 0.35);
  border-radius: 12px;
  font-weight: 600;
  animation: fadein 0.3s ease-in-out;
  box-shadow: 0 6px 16px rgba(56, 161, 105, 0.15);
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === TOP CONTROLS / BACK BUTTON === */
.top-controls-container {
  max-width: 920px;
  margin: 24px auto 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
}

.top-controls-container .btn-dashboard-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #2d3748, #1a202c);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  margin: 0;
  width: fit-content;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.top-controls-container .btn-dashboard-top-right:hover {
  background: linear-gradient(135deg, #1a202c, #000);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.btn-dashboard-top {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: white;
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.20);
  display: inline-block;
  margin-bottom: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.btn-dashboard-top:hover {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.30);
}

/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 6px 0;
  }

  .form-grid label {
    margin-top: 6px;
  }

  .form-container {
    padding: 24px 22px 24px;
    margin: 16px 12px 40px;
    border-radius: 16px;
  }

  .form-container h2 {
    font-size: 22px;
  }

  .top-controls-container {
    padding: 0 14px;
  }
}
