@charset "UTF-8";

.content-wrapper.w-90 {
    max-width: 1400px;
    margin: -40px auto 40px auto;
    padding: 15px; 
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.data-card {
    width: 100%;
    box-sizing: border-box;
}

.data-card > .row {
    margin-bottom: 20px;
}

.chart-c.cont {
    width: 100%;
    margin-top: 20px;
    position: relative;
    background: #fafafa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

#c-graf {
    width: 100% !important;
    height: auto !important;
    max-height: 500px;
}

.chart-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.table-c.cont {
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

#c-tbl {
    width: 100%;
    border-collapse: separate !important; 
    border-spacing: 0 !important;
    background-color: white;
}

#c-tbl th, .table th {
    background-color: #061e42 !important;
    color: #fff !important;
    text-align: center;
    vertical-align: middle;
    padding: 12px 15px;
    font-size: 14px;
    border-bottom: 2px solid #e2e8f0;
}

#c-tbl td, .table td {
    padding: 12px 15px;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
}

.station-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.canton-name {
    vertical-align: middle;
}

.flex-col-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.flex-col-container .icon-controls {
    flex: 0 0 100%; 
    margin-bottom: 10px; 
    display: flex;
    justify-content: flex-end; 
}

.flex-col-container label {
    flex: 0 0 calc(20% - 10px);
    box-sizing: border-box;
    display: flex;        
    align-items: center;   
    gap: 5px;   
    margin: 0;
    cursor: pointer;
}

.table-responsive.table-large {
    max-height: 70vh;
    overflow: auto;
    position: relative;
}

/* ==========================================
   MEDIA QUERIES
   ========================================== */

@media (max-width: 1200px) {
    .flex-col-container label {
        flex: 0 0 calc(25% - 10px); 
    }
}

@media (max-width: 992px) {
    .flex-col-container label {
        flex: 0 0 calc(33.333% - 10px);
    }
    
    .btn-group {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
        width: 100% !important;
        gap: 4px; 
    }

    .btn-group > .btn {
        border-radius: 6px !important;
        margin-right: 0 !important;
    }

    .col-12 .btn-group {
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .flex-col-container label {
        flex: 0 0 calc(50% - 10px); 
    }
    
    .content-wrapper.w-90 {
        padding: 10px;
        margin-top: -20px;
    }

    /* ----------------------------------------------------
       1. KARTIČNI PRIKAZ (Za jednostavne izvještaje)
       ---------------------------------------------------- */
    .mobile-cards-table table thead {
        display: none;
    }

    .mobile-cards-table table tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 6px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-cards-table table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
        text-align: right !important;
    }

    .mobile-cards-table table td:last-child {
        border-bottom: none !important;
    }

    .mobile-cards-table table td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: #061e42;
        text-align: left;
        padding-right: 10px;
        font-size: 13px;
    }

    .mobile-cards-table table td.canton-name {
        background-color: #061e42 !important;
        color: #ffffff !important;
        font-weight: 700;
        border-radius: 6px 6px 0 0;
        justify-content: center;
        text-align: center !important;
        font-size: 0.95rem;
    }

    .mobile-cards-table table td.canton-name::before {
        display: none !important;
    }

    .mobile-cards-table table td.station-name {
        background-color: #f8fafc;
        font-weight: 700;
        color: #1e293b;
        border-bottom: 2px solid #e2e8f0 !important;
    }

    /* ----------------------------------------------------
       2. MATRIČNI PRIKAZ (168h i Mjesečni izvještaji)
       ---------------------------------------------------- */
    .table-large {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .table-large #c-tbl {
        display: table !important;
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

    .table-large #c-tbl thead {
        display: table-header-group !important;
    }

    .table-large #c-tbl tbody {
        display: table-row-group !important;
    }

    .table-large #c-tbl tr {
        display: table-row !important;
    }

    .table-large #c-tbl th, 
    .table-large #c-tbl td {
        display: table-cell !important;
        padding: 8px 6px;
        box-sizing: border-box;
    }


    .table-large #c-tbl .col-sticky-header,
    .table-large #c-tbl .col-sticky-header-1 {
        position: sticky;
        left: 0;
        top: 0;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        z-index: 10 !important;
        background-color: #061e42 !important;
    }

    .table-large #c-tbl .col-sticky-header-2 {
        position: sticky;
        left: 90px;
        top: 0;
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        z-index: 10 !important;
        background-color: #061e42 !important;
        border-right: 2px solid #cbd5e1 !important;
    }


    .table-large #c-tbl .col-sticky-date,
    .table-large #c-tbl .col-sticky-canton {
        position: sticky;
        left: 0;
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        z-index: 8 !important;
        background-color: #061e42 !important;
        color: #ffffff !important;
        border-right: 1px solid #1e293b !important;
        
        white-space: normal !important; 
        word-break: break-word;
        overflow-wrap: break-word;
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .table-large #c-tbl .col-sticky-time,
    .table-large #c-tbl .col-sticky-station {
        position: sticky;
        left: 90px;
        width: 110px;
        min-width: 110px;
        max-width: 110px;
        z-index: 7 !important;
        background-color: #ffffff !important;
        color: #0f172a !important;
        box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.15);
        border-right: 2px solid #cbd5e1 !important;

        white-space: normal !important;
        word-break: break-word;
        font-size: 0.85rem;
        line-height: 1.25;
    }


    .table-large #c-tbl thead tr:first-child th:not([class*="col-sticky"]) {
        position: sticky;
        top: 0;
        z-index: 6;
        background-color: #061e42 !important;
    }

    .table-large #c-tbl thead tr:nth-child(2) th:not([class*="col-sticky"]) {
        position: sticky;
        top: 38px;
        z-index: 5;
        background-color: #061e42 !important;
    }

 
    .table-large #c-tbl td:not([class*="col-sticky"]),
    .table-large #c-tbl th:not([class*="col-sticky"]) {
        white-space: nowrap !important;
    }
}

@media (max-width: 576px) {
    .flex-col-container label {
        flex: 0 0 100%; 
    }
}

@media (min-width: 769px) {
    .content-wrapper.w-90 {
        padding: 30px;
    }
}