:root {
  --second-row-color: #E9EDFA;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f8f9fc;
}

.title {
  color: #3662AB;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
}

table thead {
  background-color: #f1f4f9;
  color: #3d3d3d;
}

.table-responsive {
    min-height: 400px; 
}

.table-responsive .table tbody tr:nth-child(2n) {
  background-color: var(--second-row-color) !important; /* Koristi varijablu za boju */
  --bs-table-bg: var(--second-row-color);  /* Postavljanje varijable za boju pozadine */
}

.action-btn {
  font-size: 20px;
  cursor: pointer;
}


/* Sidebar osnovni stilovi su već dobri */
.sidebar {
    width: 80px;
    background-color: #fff;
    height: 100vh;
    position: fixed;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    transition: width 0.3s ease;
    overflow-x: hidden;
    z-index: 1000;
}

.sidebar:hover {
    width: 220px;
    align-items: flex-start;
    padding-left: 20px; /* Dodaje unutrašnju levu marginu */
}

/* ... ostali sidebar stilovi (a, i, sidebar-text, logo, content) ... */
#main-a{
    display: flex;
    align-items: center;
    gap: 12px;
    color: #3d5af1;
    text-decoration: none;
    margin: 15px 0;
    width: 100%;
    padding-left: 10px;
    transition: background-color 0.2s ease;
}

#main-i {
    font-size: 24px;
    min-width: 24px;
}

.sidebar .sidebar-text {
    opacity: 0;
    white-space: nowrap;
    font-size: 16px;
    transition: opacity 0.3s ease;
    color: #3d5af1;
}

.sidebar:hover .sidebar-text {
    opacity: 1;
}

.logo {
    width: 60px;
    height: auto;
    margin-bottom: 40px;
}

.content {
    margin-left: 80px;
    padding: 30px;
}



.menu-group {
    position: relative;
    width: 100%;
}

.sidebar a.has-submenu {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.submenu {
    display: none; /* Po default-u sakriven podmeni */
    flex-direction: column;
    padding-left: 0; /* Nema dodatnog uvlačenja */
    background-color: #f9f9f9;
    /* border-left: 3px solid #3d5af1; */ /* UKLONITE OVO - liniju ćemo dodati na .submenu-item-container */
    margin-left: 40px;
    margin-top: 5px;
    width: calc(100% - 40px);
}

.sidebar:hover .menu-group:hover .submenu {
    display: flex;
}

.submenu-item-container {
    display: flex;
    align-items: stretch; /* Promena: neka se rastegne vertikalno */
    padding: 0; /* Uklonite padding ovde, prebacite ga na unutrašnji wrapper */
    border-bottom: 1px solid #eee;
    margin: 0;
    width: 100%;
    position: relative; /* Dodajemo relative za pozicioniranje linije */
}

.submenu-item-container::before { /* Pseudo-element za vertikalnu liniju */
    content: '';
    position: absolute;
    left: 0; /* Poravnajte liniju skroz levo unutar kontejnera */
    top: 0;
    bottom: 0;
    width: 3px; /* Debljina linije */
    background-color: #3d5af1; /* Boja linije */
}


.submenu-item-container:last-child {
    border-bottom: none;
}

.submenu-item-container:hover {
    background-color: #e9ecef;
}

.submenu-content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ovo bi trebalo da radi posao */
    padding: 8px 15px; /* Vratite padding ovde */
    padding-left: 15px; /* Ostavite malo prostora za liniju, ako je ne rešite pseudo-elementom */
}

.submenu-main-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    margin: 0;
    padding: 0;
}

.submenu-main-link:hover {
    color: #333;
}

.table-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3662AB;
    text-decoration: none;
    padding: 4px;
    /* margin-left: 8px; */ /* Ovo je nepotrebno sa space-between */
    border-radius: 4px;
    transition: background-color 0.2s ease;
    min-width: 24px;
    height: 24px;
}

.table-icon-link:hover {
    background-color: #dee2e6;
    color: #333;
}

/* Uklonite table-icon-placeholder ako ga više ne koristite */
.table-icon-placeholder {
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    display: none; /* Sakrijte ga ako je višak */
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0;
}

.sidebar:hover .dropdown-arrow {
    opacity: 1;
}

.sidebar:hover .menu-group:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.float-end {
    margin-left: auto;
}


/* -------------------- UNOS PRIHODA STILOVI -------------------- */

/* Kontejner forme */
.form-section {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  margin-top: 20px;
}

/* Naslov forme */
.form-title {
  text-align: center;
  font-size: 40px;
  font-weight: bold;
  color: #3662AB;
  margin-bottom: 30px;
}

/* Naslovi sekcija (prihod, način plaćanja...) */
.section-title {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 12px;
  color: #3662AB;
}

/* Stil za inpute i textarea */
.form-control, select {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 10px;
  font-size: 15px;
}

/* Hover efekat na dugme */
.btn-primary {
  background-color: #3662AB;
  border-color: #3662AB;
  height: 70px;        
  width: 150px;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #2a3ecb;
  border-color: #2235b0;
}

/* Razmak između dugmadi */
.btn + .btn {
  margin-left: 10px;
}

/* Labela iznad svakog inputa */
label {
  font-weight: 500;
  margin-bottom: 5px;
  color: #212529;
}

/* -------------------- LOGIN STRANICA -------------------- */

/* Kontejner za login formu */
.login-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;  /* Zauzima celu širinu ekrana */
    height: 100vh;  /* Zauzima celu visinu ekrana */
    flex-direction: row;
    gap: 40px;
    box-sizing: border-box; /* Osigurava da padding ne povećava širinu */
}

/* Forma levo (inputi i dugme) */
.login-form-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    max-width: 400px; /* Maksimalna širina forme */
    width: 100%; /* Širina forme je 100% do max-width */
    box-sizing: border-box;
}

/* Labela */
.login-form-left label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px; /* Razmak između labela i inputa */
}

/* Inputi */
.login-form-left input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 15px;
    margin-top: 5px;
    margin-bottom: 15px;  /* Razmak između inputa */
    box-sizing: border-box;
}

/* Dugme */
.login-form-left button {
    background-color: #3662AB;
    color: white;
    padding: 15px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form-left button:hover {
    background-color: #2a3ecb;
}

/* Logo sa desne strane */
.login-form-right img {
    width: 250px;  /* Povecana slika 3 puta */
    height: auto;
}


/* -------------------- REGISTER STRANICA -------------------- */

/* Kontejner za register formu */
.register-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    width: 100%;  /* Zauzima celu širinu ekrana */
    height: 100vh;  /* Zauzima celu visinu ekrana */
    flex-direction: row;
    gap: 40px;
    box-sizing: border-box; /* Osigurava da padding ne povećava širinu */
}

/* Forma levo (inputi i dugme) */
.register-form-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
    max-width: 400px; /* Maksimalna širina forme */
    width: 100%; /* Širina forme je 100% do max-width */
    box-sizing: border-box;
}

/* Labela */
.register-form-left label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px; /* Razmak između labela i inputa */
}

/* Inputi */
.register-form-left input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    font-size: 15px;
    margin-top: 5px;
    margin-bottom: 15px;  /* Razmak između inputa */
    box-sizing: border-box;
}

/* Dugme */
.register-form-left button {
    background-color: #3662AB;
    color: white;
    padding: 15px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.register-form-left button:hover {
    background-color: #2a3ecb;
}

/* Logo sa desne strane */
.register-form-right img {
    width: 250px;  /* Povecana slika 3 puta */
    height: auto;
}

/* Linkovi između registracije i login stranica */
.form-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.form-link a {
    color: #3662AB;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.form-link a:hover {
    color: #2a3ecb;
}

/* Container for landing page */
.landing-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e6f0ff, #ffffff);
    padding: 20px;
}

/* Inner box */
.landing-page .landing-container {
    text-align: center;
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

/* Logo */
.landing-page .landing-logo {
    width: 100px;
    margin-bottom: 10px;
}

/* Title */
.landing-page .landing-title {
    font-size: 36px;
    color: #333;
    margin-bottom: 30px;
}


/* Buttons */
.landing-page .landing-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.landing-page .landing-btn {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.landing-page .landing-btn:hover {
    background-color: #0056b3;
}

.landing-page .landing-btn.secondary {
    background-color: #6c757d;
}

.landing-page .landing-btn.secondary:hover {
    background-color: #5a6268;
}

label[id^="label-"] {
    font-size: 1.25rem; /* ili bilo koja veličina koju želiš */
    font-weight: 600;
    color: #3662AB; /* neka zelena boja na primer */
}

/* kartica sredstva */ 
.info-box {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    margin: 0 auto 15px auto; /* centriranje po horizontali */
    width: 500px;             /* fiksna širina */
}

.info-label {
    background-color: #ffffff; /* sada bela */
    color: #000000; /* crni tekst */
    padding: 8px;
    border-radius: 5px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.info-value {
    background-color: #cfe2ff; /* sada plava */
    color: #084298;
    padding: 8px;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
}

.machine-image {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
}

/* Stil za cele tabove */
#nabavkaTabs .nav-link {
    color: #3662AB; /* plava boja za tekst */
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

#nabavkaTabs .nav-link:hover {
    color: #25457a;
    background-color: #d6e1f4;
    border-color: #3662AB;
}

#nabavkaTabs .nav-link.active {
    color: #fff;
    background-color: #3662AB;
    border-color: #3662AB #3662AB transparent;
    box-shadow: 0 4px 6px rgba(54, 98, 171, 0.4);
}

/* Tab content stilizacija */
.tab-content {
    border: 2px solid #3662AB;
    padding: 20px;
    border-radius: 8px 8px 8px 8px;
    background-color: #f3f7ff;
    box-shadow: 0 4px 10px rgba(54, 98, 171, 0.1);
}

#kartica-sredstva-title {
   color: #3662AB; /* plava boja za tekst */
}

/* korisnicki profil naslov i th */
#kp-naslov, #kp-th {
  color: #3662AB;
}

/* Stilovi za sve akcione ikonice */
.action-icons .icon-action {
    font-size: 1.5rem; /* Povećava veličinu ikonice JOŠ VIŠE. Možete podesiti vrednost. */
    cursor: pointer; /* Menja kursor u pointer kada se pređe preko ikonice */
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out; /* Dodata tranzicija i za transform */
}

/* Stil za hover efekat na svim ikonicama */
.action-icons .icon-action:hover {
    color: #0056b3; /* Tamnija Bootstrap plava za hover, za jači kontrast. Prilagodite boju. */
    transform: scale(1.1); /* Blago povećava ikonicu pri hoveru za dodatni vizuelni efekat */
}

/* Stil za link omotač ikonice, ako želite da uklonite podvlačenje */
.icon-action-link {
    text-decoration: none; /* Uklanja podvlačenje linka */
    color: inherit; /* Nasleđuje boju teksta roditelja (ikone) */
    display: inline-block; /* Omogućava transformaciju na link omotaču ako je potrebno */
}

/* Osigurajte da hover radi i kada se pređe preko celog link elementa */
.icon-action-link:hover .icon-action {
    color: #0056b3; /* Ponovo primenjujemo boju na ikonu unutar linka */
    transform: scale(1.1); /* I ovde primenjujemo transform */
}
/* textare no resize*/
.form-control.no-resize {
        resize: none !important;
}

/* filteri */

.filter-sort-controls {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee; /* Opciono: vizuelni separator */
}
.filter-sort-controls .form-control-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    height: auto; /* Da omogući Bootstrap-u da podesi visinu na osnovu paddiga */
}
.sort-buttons .btn-sm {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    margin-right: 5px; /* Razmak između dugmadi */
}
/* Stil za aktivno dugme za sortiranje */
.active-sort {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Import Modal Styles */
.import-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    animation: fadeIn 0.3s ease;
}

.import-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.import-modal-small {
    max-width: 350px;
}

.import-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.import-modal-header.success {
    background-color: #d4edda;
    color: #155724;
    border-bottom-color: #c3e6cb;
}

.import-modal-header.error {
    background-color: #f8d7da;
    color: #721c24;
    border-bottom-color: #f5c6cb;
}

.import-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    flex: 1;
}

.import-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.import-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.import-modal-body {
    padding: 20px;
}

.import-modal-body.text-center {
    text-align: center;
}

.import-modal-section {
    margin-bottom: 20px;
}

.import-modal-section h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #333;
}

.import-modal-section p {
    margin: 0 0 10px 0;
    color: #666;
}

.import-modal-warning {
    padding: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    margin-bottom: 15px;
}

.import-modal-info {
    padding: 12px;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    color: #0c5460;
    margin-bottom: 15px;
}

.import-radio-option {
    display: block;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.import-radio-option:hover {
    border-color: #007bff;
}

.import-radio-option input {
    margin-right: 10px;
}

.radio-content strong {
    display: block;
    margin-bottom: 4px;
}

.radio-content small {
    color: #666;
}

.radio-content .text-danger {
    color: #dc3545 !important;
}

.import-file-input {
    width: 100%;
    padding: 8px;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

.import-file-input:focus {
    outline: none;
    border-color: #007bff;
}

.import-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.warnings-list {
    max-height: 150px;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.warnings-list ul {
    margin: 0;
    padding-left: 20px;
}

.warnings-list li {
    margin-bottom: 5px;
    font-size: 14px;
}

.text-warning {
    color: #856404 !important;
}
