html, body { height: 100%; margin: 0; }
body { background: #f8f9fa; min-height: 100vh; }
.main-wrapper { display: flex; min-height: 100vh; width: 100vw; }
.sidebar {
    min-height: 100vh;
    /*background: #343a40;*/
    background-color:#8a9db0;
    color: #fff;
    padding-top: 10px;
    transition: width 0.2s, min-width 0.2s;
    flex: 0 0 200px;
    max-width: 200px;
    font-size:10px;
}
.sidebar.collapsed {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px;
    padding-top: 10px;
    flex: 0 0 60px;
}
.sidebar .nav-link {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5em;
    border-radius: 5px;
    white-space: nowrap;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    background: #495057;
    color: #ffd700;
}
.sidebar .nav-link.logout {
    color: #ff4d4f;
    font-weight: bold;
}
.sidebar .nav-link.logout:hover {
    background: #ff4d4f;
    color: #fff;
}
.sidebar .sidebar-toggle {
    position: absolute;
    top: 10px;
    right: -15px;
    /*background: #343a40;*/
    background-color:#65788a;
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    z-index: 2;
    box-shadow: 0 0 5px #0003;
    transition: right 0.2s;
}
.sidebar .sidebar-label {
    display: inline;
    margin-left: 10px;
    transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-label {
    opacity: 0;
    width: 0;
}
.main-content {
    flex: 1 1 auto;
    padding: 5px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 1.1em;
    width: 100%;
    /* Min-height hozzáadása, ha a tartalom kevés, de a main-content mégis kitöltse a rendelkezésre álló helyet */
    min-height: calc(100vh - 60px); /* Feltételezve, hogy a sidebar 60px magasságú összecsukva, és a header/footer magasságát levonjuk */
}

.mb-4 {
    width: 100%; /* Ez is 100% legyen a szűrőknél */
    /* max-width: 1300px; */ /* Ezt a sort töröld vagy kommenteld ki */
}

#orderForm {
    width: 100%; /* Az oszlopsorrend űrlap is 100% legyen */
    /* max-width: 1300px; */ /* Ezt a sort töröld vagy kommenteld ki */
}

@media (max-width: 991px) {
    .sidebar { min-height: auto; padding-top: 10px; }
    .main-content { padding: 10px; }
}
#myTable td, #myTable th {
    padding-top: 12px;
    padding-bottom: 12px;
    white-space: nowrap;
    font-size: 12px;
}
#myTable { font-size: 12px; }
.table-responsive {
    width: 100%;
    max-width: 1300px;
    border: 1px solid #ccc;
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
    white-space: nowrap;
    padding-bottom: 1px;
    background: #fff;
    max-height: calc(100vh - 150px); /* vagy amit szeretnél */
}
.table-responsive {
    width: 100%;
    max-width: 100%;
    border: 1px solid #ccc;
    overflow-x: auto !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
    white-space: nowrap;
    padding-bottom: 1px;
    background: #fff;
    /* Ezt a sort módosítjuk a dinamikusabb magasságért */
    max-height: calc(100vh - var(--header-height, 100px) - var(--filter-height, 100px) - var(--padding-bottom, 30px));
    /* A --header-height, --filter-height, --padding-bottom változókat JavaScript-tel kell beállítani */
    /* Vagy egy egyszerűbb, kísérletezésen alapuló érték: */
    /* max-height: calc(100vh - 220px); */ /* Kísérletezd ki ezt az értéket! */
    flex-grow: 1; /* Hogy a táblázat megpróbálja kitölteni a rendelkezésre álló függőleges helyet */
}

table {
    border-collapse: collapse;
    width: 100%;
}
::-webkit-scrollbar { height: 12px; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
#orderForm { display: none; }
/* Ne legyen scroll máshol! */

.icon-img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: contain;
    display: inline-block;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s;
    vertical-align: middle;
}
.icon-link {
    margin-right: 5px;
}
.icon-link:hover .icon-img {
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    background: #e8f0fe;
}

.table thead.thead-dark th,
.table thead th { /* Ez a generikus thead th */
    color: black !important;
}







.main-content {
            padding: 30px;
            transition: margin-left 0.2s;
            flex-grow: 1; /* Hogy kitöltse a maradék helyet */
        }
        .container-box {
            width: 100%;
            margin: 0 auto;
            background: white;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }
        th, td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        th {
            background: #6cacf1;
            color: white;
        }
        .btn {
            padding: 5px 10px;
            text-decoration: none;
            color: white;
            background: #28a745;
            border-radius: 5px;
            margin-right: 10px;
            display: inline-block;
        }
        .btn-danger {
            background: #dc3545;
        }
        @media (max-width: 991px) {
            .sidebar {
                min-height: auto;
                padding-top: 10px;
            }
            .main-content {
                padding: 10px;
            }
        }
        /* Bootstrap input-group fix */
        .input-group > .form-control {
            flex: 1 1 auto;
            width: 1%;
            min-width: 0;
        }