body {
  margin: 0;
  padding: 0;
  width: 100%;
}

.main-wrapper {
  max-width: none; /* 🚫 ukloni limitaciju */
  width: 100%;
}


.firma-detail-container {
  width: 100%;
  max-width: 1200px;
  margin: 60px auto 80px auto;
  background-color: #ffffff; /* čisto bijela */
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.firma-detail-container {
  width: 100%;
  max-width: 1000px;
  margin: 60px auto 80px auto;
  background-color: #ffffff; /* čisto bijela */
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover efekt */
.firma-detail-container:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* HEADER */
.firma-header {
  text-align: center;
  margin-bottom: 25px;
}
.firma-header h2 {
  color: #034a9b;
  margin-top: 10px;
  font-size: 28px;
}
.firma-header .subtitle {
  font-size: 15px;
  color: #666;
  margin-top: 6px;
}

/* INFO */
.firma-info p {
  margin: 6px 0;
  font-size: 15px;
}
.firma-info strong {
  color: #000;
}

.section-divider {
  margin: 30px 0;
  border-top: 1px solid #ccc;
}

.section-title {
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 18px;
  color: #034a9b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title i {
  color: #034a9b;
}

/* PREDMET I ROCISTA */
.predmet-info p,
.predmet-info strong {
  font-size: 15px;
}

.rocista-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.rocista-table th,
.rocista-table td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 14px;
}
.rocista-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

/* UPLOAD */
.upload-section {
  margin-top: 30px;
}
.upload-section label {
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
}
.upload-form input[type="file"] {
  margin-bottom: 10px;
}
.upload-form button {
  background-color: #056ad6;
  color: white;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.upload-form button:hover {
  background-color: #034a9b;
}

/* FAJLOVI */
.fajlovi-lista {
  margin-top: 15px;
  list-style: none;
  padding: 0;
}
.fajlovi-lista li {
  margin-bottom: 6px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fajlovi-lista a {
  color: #056ad6;
  text-decoration: none;
  margin-right: 10px;
}
.fajlovi-lista a:hover {
  text-decoration: underline;
}
.fajlovi-lista form {
  display: inline;
}
.fajlovi-lista button {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 16px;
}





.btn-back {
  display: inline-block;
  background-color: #034a9b;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-back:hover {
  background-color: #022f6b;
}










.firma-nav {
  max-width: 1045px;
  margin: 40px auto -20px auto; /* -20px da smanji razmak prema kartici */
  padding: 0 25px;
  display: flex;
  justify-content: flex-start;
}

.btn-back {
  background-color: #034a9b;
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-back:hover {
  background-color: #022e6b;
}








/* Modal background */
.modal {
  display: none; /* sakriven po defaultu */
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

/* Modal box */
.modal-content {
  background-color: #fff;
  margin: 80px auto;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-family: 'Segoe UI', sans-serif;
}

/* Close button */
.modal .close {
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  margin-top: -10px;
}

.modal .close:hover {
  color: #000;
}

/* Form inputs */
.modal-content input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
}

/* Save button */
.btn-save {
  background-color: #056ad6;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-save:hover {
  background-color: #034a9b;
}






.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 30px;
  border-radius: 12px;
  width: 600px;
  max-width: 95%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  color: #aaa;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}






.rociste-blok {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.rociste-blok label {
  margin-top: 8px;
  font-weight: 500;
}

.rociste-blok input {
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}








.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 60px auto;
  padding: 25px;
  border-radius: 10px;
  max-width: 600px;
  width: 95%;
  max-height: 90vh;         /* 👈 ograniči visinu */
  overflow-y: auto;         /* 👈 omogući skrolovanje */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}





/* ✅ RESPONSIVE */
@media screen and (max-width: 992px) {
  .firma-detail-container {
    max-width: 95%;
    padding: 25px 20px;
    margin: 30px auto;
  }
  .firma-header h2 {
    font-size: 24px;
  }
  .section-title {
    font-size: 16px;
  }
  .rocista-table th,
  .rocista-table td {
    font-size: 13px;
    padding: 6px 8px;
  }
}



 .styled-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
  }

  .styled-table th, .styled-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
  }

  .styled-table th {
    background-color: #f4f4f4;
  }

  .styled-table tr:hover {
    background-color: #f9f9f9;
  }




.pagination {
  margin-top: 20px;
  text-align: center;
  padding: 10px 0;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  background-color: #056ad6;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span:hover {
  background-color: white;
  color: #056ad6;
  border: 1px solid #056ad6;
}

.pagination a.active,
.pagination span.active {
  background-color: #034a9b;
  color: white;
}


 .form-textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}







/* 🎯 Responzivnost za modal */
@media screen and (max-width: 768px) {
  .modal-content {
    width: 95%;
    padding: 20px 15px;
    font-size: 14px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content input,
  .modal-content button {
    width: 100%;
    margin-bottom: 12px;
  }

  .modal-content h3 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .modal-content label {
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 3px;
    display: block;
  }

  .close {
    font-size: 22px;
    top: 12px;
    right: 18px;
  }
}



@media screen and (max-width: 600px) {
  .modal-content {
    max-height: 85vh;
    padding: 20px;
  }
}