﻿body {
    margin: 0;
}

.main_div {
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ECF3FA;
    z-index: -1;
}
.container {
    padding-top: 5px;
    display: flex;
    flex-wrap: wrap; /* dozvoljava prelom u novi red kad nema mesta */
    gap: 10px;
    justify-content: center;
    padding-left: 352px; /* prostor za sidebar */
}

.div_bill {
    padding: 5px;
    box-shadow: 0 1.5px 1.5px rgba(0,0,0,0.1);
    background-color: white;
    position: relative;
    z-index: 1;
    width: 100%; /* neka na mobilnom bude fleksibilan */
    max-width: 730px; /* na desktopu neka ostane ograničen */
    overflow-x: auto; /* ako tabela štrči, dobija skrol */
    border: 1px solid #ddd;
    border-radius: 10px;
}
.tabela_kom {
    width: 725px;
    font-family: Arial, sans-serif;
    font-size: 12px;
}

.eps_logo {
    height: 52px;
    width: 210px;
    right: 0px;
    top: 0;
}
.sidebar {
    position: fixed;
    left: -1px;
    width: 350px;
    height: 100%;
    min-height: 100%;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    background: #ECF3FA;
    overflow-y: auto;
    padding: 15px;
}

    .sidebar header {
        font-size: 22px;
        font-weight: bolder;
        color: black;
        text-align: center;
        line-height: 30px;
        user-select: none;
    }

.main_menu {
    padding-top: 10px;
    text-align: center;
}
.info_table {
    width:400px;
    margin: 0 auto; /* centriranje block elementa */
    border-collapse: collapse; /* lepši izgled granica */
}
.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom th {
    background-color: #003366; /* tamnoplava pozadina */
    color: #ffffff; /* bela boja slova */
    text-align: left;
}

    .table-custom td {
        border-bottom: 1px solid #ccc; /* linija između redova */
        background-color: #fff;
    }
  .block_sp_ks  {
    padding: 5px;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    font-size: 13px;
    color: #003366; /* tamno teget/tamno plavo-siva */
    line-height: 1.5;
    letter-spacing: 0.3px;
    border: 1px black solid;
    border-radius: 10px;
    border-color: #b0b0b0;
    text-align: center;
}
.div_wellcome {
    margin-top: 40px;
    width: 900px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 1.5px 1.5px rgba(0,0,0,0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-align: center;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    font-size: 15px;
    color: #003366; /* tamno teget/tamno plavo-siva */
}
.dropdown_select {
    width: 240px;
    padding: 5px 10px;
    font-size: 13px;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    background-color: #fff;
    color: #003366;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.textbox_input {
    padding: 5px 10px;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    background-color: #fff;
    color: #003366;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textbox_input:focus {
    border-color: #4a90e2; /* diskretna plava na fokus */
    box-shadow: 0 0 4px rgba(74, 144, 226, 0.3);
}
.button-group {
    padding: 0px 7px;    
    display: flex;
    flex-direction: column; /* елементи иду један испод другог */
    gap: 2px;
}
.btn-primary {
    background-color: #005baa; /* EPS plava */
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
}
    .btn-primary:hover {
        background-color: #004080;
    }
.disabled-button {
    background-color: #a6c0d6; /* svetlija plava - ugašeno */
    color: #f2f2f2;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 16px;
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    cursor: not-allowed;
    opacity: 0.7;
}
.btn-primary_x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 45%;
    background: #f5f5f5;
    color: #005baa;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

    .btn-primary_x:hover {
        background: #005baa;
        color: #fff;
    }

.div_btn-primary_x {
    text-align: right;
}
.blue-bar {
    width: 100%;
    height: 10px; /* možeš promeniti visinu po potrebi */
    background: linear-gradient(to right, #003366, #0066cc); /* tamnija plava ka srednje plavoj */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* tekst bele boje */
    font-weight: bold;
    font-family: Arial, sans-serif;
    border-radius: 4px; /* blago zaobljenje ivica */
}
.headline {
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    font-size: 14px;
    color: #111111; /* tamno teget/tamno plavo-siva */
    line-height: 1.5;
    letter-spacing: 0.3px;
    font-weight: bold;
}
.tableheadgreen {
    background: #81c784;
    color: #000;    
    padding: 1px;
}
.tableheadblue {
    background: linear-gradient(to right, #64b5f6, #1e88e5);
    color: #fff;
    font-weight: bold;
    text-align: center;
}
.button-group button:last-child,
.button-group .btn-primary:last-child,
.button-group .disabled-button:last-child,
.button-group .btn-primary_x:last-child {
    margin-bottom: 40px;
}
.button-group > *:last-child {
    margin-bottom: 40px;
}
.warning_lb {
    text-align: center;
    padding: 3px;
}

.error-label {
    border: 1px solid red; /* crveni okvir */
    color: red; /* crveni tekst */
    background-color: #ffe6e6; /* blaga pozadinska boja za isticanje */
    padding: 3px 10px; /* unutrašnji razmak */
    border-radius: 4px; /* blago zaobljeni uglovi */
    display: inline-block; /* da labela dobije dimenzije */
    font-weight: bold; /* naglašen tekst */
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    font-size: 14px;
}

.panel_msg {
    width: auto;
    max-width: 850px;
    display: inline-block; /* širina prati sadržaj */
    font-family: "Segoe UI", "Roboto", "Open Sans", Arial, sans-serif;
    background: #fff;
    color: #003366;
    font-size: 15px;
    border-radius: 8px;
    padding: 12px 20px;
    margin: 10px;
    box-shadow: 0 1.5px 1.5px rgba(0,0,0,0.1);
    border: 1px #003366 solid;
    position: fixed;
    bottom: 50px;
    left: 380px;
    z-index: 11000;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeSlideIn 0.5s forwards;
}

@keyframes fadeSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}


.image-preview {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    background-color: white;
    border: 1px solid #ccc;
    padding: 5px;
    box-shadow: 0 1.5px 1.5px rgba(0,0,0,0.1);
}

    .image-preview img {
        max-width: 90vw; /* max širina 90% širine ekrana */
        max-height: 90vh; /* max visina 90% visine ekrana */
        width: auto; /* održava proporciju */
        height: auto; /* održava proporciju */
        display: block;
        border-radius: 6px;
    }

.info_icon {
    width: 16px;
    height: 16px;
}
/* === Responsive dodaci === */
/* Telefoni do 768px širine */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 96%;
        height: auto;
        min-height: auto;
        box-shadow: none;
        padding: 10px;
    }

    .container {
        width: 96%;
        padding-left: 0;
        flex-direction: column;
        align-items: center;
    }

    .div_bill {
        width: 96%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        box-sizing: border-box;
    }

    .tabela_kom {
        width: 96%;
        min-width: 715px;
    }

    .div_wellcome {
        margin-top: 10px;
        width: 96%;
        border-radius: 6px;
        padding: 15px;
    }

    .dropdown_select,
    .textbox_input,
    .btn-primary,
    .disabled-button {
        width: 96%;
        font-size: 14px;
    }

    .blue-bar {
        width: 96%;
        min-width: 715px;
    }

    .headline {
        font-size: 14px;
        text-align: left;
        margin: 5px 0;
        min-width: 715px;
    }

    .panel_msg {
        width: auto;
        max-width: 350px;
        left: 5px;
        bottom: auto;
        top: 20px;
        word-wrap: break-word;
        position: fixed;
    }

    .error-label {
        position: fixed;
        top: 40px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%; /* zauzima 90% širine ekrana */
        max-width: 350px; /* ali ne više od 350px na većim ekranima */
        word-wrap: break-word;
        z-index: 9999;
    }

    .table-custom {
        width: 100%;
        font-size: 12px;
    }

    .info_table {
        width: 96%;
    }

    .block_sp_ks {
        font-size: 12px;
        padding: 4px;
    }

    .button-group > *:last-child {
        margin-bottom: 20px;
    }
}

/* Tableti od 769px do 1024px */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        position: relative;
        width: 96%;
        height: auto;
        box-shadow: none;
        padding: 10px;
    }

    .container {
        padding-left: 0;
        flex-direction: column;
        align-items: center;
    }

    .div_bill {
        width: 96%;
        max-width: 800px;
        overflow-x: auto;
    }

    .tabela_kom {
        width: 96%;
        min-width: 715px;
    }

    .blue-bar {
        font-size: 15px;
        padding: 6px 12px;
        min-width: 715px;
    }

    .headline {
        font-size: 15px;
        text-align: left;
        min-width: 715px;
    }
}