html {
    overflow-y: scroll;
}

body {
    font-family: Arial;
    font-size: 12px;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: #497da4;
}

a:hover {
    color: #284670;
}

a img {
    border: 0;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    display: inline;
}

#wrapper {
    margin: 20px auto;
    position: relative;
    max-width: 1600px;
    height: auto;
    overflow: hidden;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#menu {
    width: 100%;
    height: auto;
    min-height: 40px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

#menu ul li a {
    height: 22px;
    padding: 5px 8px 0 8px;
    background: #ededed;
    display: block;
    float: left;
    margin-right: 1px;
    color: #333333;
    text-decoration: none;
}

#menu ul li a:hover {
    background: #e1e1e1;
}

#menu .active {
    background-color: #e0e0e0 !important;
}

#logoutBtn {
    background: #c30808;
    color: #fff;
    text-decoration: none;
    margin-left: auto;
}

#logoutBtn:hover {
    background: #e80f0f;
}

#content {
    width: 100%;
}

#content form ul li {
    width: 100%;
    margin-bottom: 12px;
    float: left;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

#content form label {
    width: 15%;
    float: left;
    display: block;
    padding-top: 5px;
}

#content form .field-container {
    width: 85%;
    float: left;
    display: block;
    box-sizing: border-box;
}

#content form .full-width-container {
    width: 100%;
    float: left;
    display: block;
    margin-top: 5px;
}

#activeOrders {
    width: 100%;
    height: calc((100vh - 340px) * 0.7);
    overflow-y: scroll;
    float: left;
    border: 0px solid #e7e7e7;
    border-radius: 4px;
}

#finishedOrders {
    width: 100%;
    height: calc((100vh - 340px) * 0.3);
    overflow-y: scroll;
    float: left;
    border: 0px solid #e7e7e7;
    border-radius: 4px;
}

#archiveOrders {
    width: 100%;
    height: calc(100vh - 240px);
    overflow-y: scroll;
    float: left;
    border: 0px solid #e7e7e7;
    border-radius: 4px;
}

#addOrderContainer {
    width: 100%;
    height: calc(100vh - 240px);
    overflow-y: scroll;
    float: left;
    border: 0px solid #e7e7e7;
    border-radius: 4px;
}

#order_types {
    width: 693px;
    float: left;
    display: block;
}

#order_types span {
    width: 295px;
    float: left;
    height: 20px;
    display: block;
    text-align: left;
}

#orderDescription {
    height: 750px !important;
}

#printList li {
    display: block;
    width: 100%;
    margin: 5px 0 0 0;
    float: left;
    padding-top: 5px;
    border-top: 1px solid #e1e1e1;
}

#printList label {
    display: block;
    width: 200px;
    float: left;
    font-weight: bold;
    color: #ff0000;
}

#printList .printTxtContainer {
    display: block;
    float: left;
}

.inputText {
    width: 100%;
    float: left;
    border: 1px solid #cccccc;
    box-sizing: border-box;
    min-height: 23px;
    border-radius: 4px;
}

.selectCategory {
    width: 100%;
    float: left;
    height: 100px;
    box-sizing: border-box;
}

.separator {
    width: 100%;
    height: 2px;
    border-bottom: 1px solid #cccccc;
    float: left;
    margin: 8px 0;
}

/* Style dla edytora Summernote */
.note-editor {
    border: 1px solid #cccccc !important;
    margin-bottom: 12px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.note-editor .note-editing-area {
    background-color: white;
}

.note-editor.note-frame .note-editing-area .note-editable {
    font-family: Arial, Verdana;
    font-size: 12px;
    color: #333;
    padding: 10px;
    min-height: 100px;
}

.note-editor .note-toolbar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.note-editor.note-frame.error-frame {
    border: 1px solid #f44336 !important;
    background-color: #fff8f8;
}

.saveButton,
.addButton,
.printButton,
.endButton,
.moveBackButton,
.archiveButton,
.duplicateButton {
    float: right;
    background-color: #ededed !important;
    border: 1px solid #ccc;
    display: block;
    padding: 4px 6px 4px 22px;
    cursor: pointer;
    color: #666;
    margin: 10px 0 0 5px;
    line-height: 16px;
    background-position: 4px center;
    background-size: 16px 16px;
}

.saveButton:hover,
.addButton:hover,
.printButton:hover,
.endButton:hover,
.moveBackButton:hover,
.archiveButton:hover,
.duplicateButton:hover {
    color: #000000 !important;
}

.saveButton {
    background: url(../images/save.png) no-repeat left;
}

.addButton {
    background: url(../images/add.png) no-repeat left;
}

.printButton {
    background: url(../images/print.png) no-repeat left;
}

.endButton {
    background: url(../images/confirm.png) no-repeat left;
}

.moveBackButton {
    background: url(../images/moveBack.png) no-repeat left;
}

.archiveButton {
    background: url(../images/archive.png) no-repeat left;
}

.duplicateButton {
    background-image: url('../images/duplicate.png');
}

.goBackLink {
    float: right;
    line-height: 25px;
    margin: 0 8px;
}

.blueIt {
    font-style: italic;
    color: #377ca0;
}

.redIt {
    font-style: italic;
    color: #377ca0;
}

.grey {
    color: #8e8e8e;
}

.infoMsg {
    background-color: #e3f2fd;
    color: #0d47a1;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

.errMsg {
    background-color: #ffebee;
    color: #c62828;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid #f44336;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    display: block;
    clear: both;
    overflow: hidden;
}

.errMsg h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #d32f2f;
}

.errMsg ul {
    margin: 5px 0 5px 20px;
    padding: 0;
    list-style-type: disc;
    width: 100%;
    display: block;
}

.errMsg ul li {
    display: list-item !important;
    margin-bottom: 5px;
    line-height: 1.4;
    text-align: left;
    width: 100%;
    float: none;
}

/* Nowa definicja klasy error zastępująca starą */
.error {
    border: 1px solid #f44336 !important;
    background-color: #fff8f8 !important;
}

.error-container {
    position: relative;
}

/* Usuwam ikonę trójkąta
.error-container::after {
    content: "⚠️";
    position: absolute;
    right: 10px;
    top: 8px;
    color: #f44336;
    font-size: 16px;
    z-index: 10;
}
*/

.note-editor.note-frame.error-frame {
    border: 1px solid #f44336 !important;
    background-color: #fff8f8;
}

.bold {
    font-weight: bold;
}

.left {
    float: left;
}

.right {
    float: right;
}

.hide {
    display: none;
}

label.error {
    display: none !important;
}

.withBgColor {
    background-color: #eef2f4;
}

.withBgColor1 {
    background-color: #dfe9f1;
}

.promotion {
    background-color: #efe4c7;
}

.alert1 {
    color: #db390e;
}

.legend {
    width: 100%;
    float: left;
    margin: 5px 0 10px 0;
}

.legendItem {
    display: block;
    float: left;
    width: 20px;
    height: 15px;
    margin-right: 4px;
}

.orders_list_item {
    position: relative;
    width: 100%;
    padding: 8px 0;
    float: left;
    margin-bottom: 4px;
    border-radius: 4px;
}

.orders_list_item ul,
.categoriesListItem ul {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
}

.orders_list_item ul li,
.categoriesListItem ul li {
    display: inline;
    text-align: center;
    float: left;
}

.listNumber {
    color: #666666;
    margin-left: 8px;
    width: 30px;
    display: block;
    float: left;
}

.col0 {
    width: 8%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.col1 {
    width: 9%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.col2 {
    width: 6%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.col3 {
    width: 6%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.col4 {
    width: 6%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.colName {
    width: 15%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    overflow: hidden;
}

.colAssignment {
    width: 10%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    font-size: 13px;
}

.colManager {
    width: 5%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.colType {
    width: 7%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    font-size: 13px;
}

.colProductionType {
    width: 4%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    text-align: center;
}

.colStatusIcon {
    width: 4%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    text-align: center;
}

.colShipping {
    width: 4%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    text-align: center;
}

.colPerson {
    width: 4%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    text-align: center;
}

.colProduction {
    width: 4%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
    text-align: center;
}

.colStatus {
    width: 11%;
    min-height: 20px;
    display: block;
    float: left;
    padding: 0 7px;
}

.colEdit,
.colDel,
.colFV {
    width: 30px;
    display: block;
    float: left;
}

/* Style dla ikon */
.colEdit a,
.colEdit span,
.colDel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
}

.colEdit a img,
.colEdit span img,
.colDel a img {
    width: 16px;
    height: 16px;
    filter: brightness(0);
}

/* Style dla ikon w kolumnach (realizacja, status, wysyłka) */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 4px;
    border: 1px solid #cccccc;
}

.icon-box i {
    font-size: 18px;
    color: #000000;
}

/* Style dla formularza wyszukiwania */
.js-filter-form {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.js-filter-form input[type="text"] {
    margin-right: 10px;
    padding: 6.5px 10px;
    width: 220px;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

.js-filter-form select {
    margin-right: 10px;
    padding: 6px 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #ffffff;
}

.js-filter-form input[type="submit"] {
    padding: 6px 15px;
    background-color: #ededed;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.js-filter-form input[type="submit"]:hover {
    background-color: #e1e1e1;
    color: #000000;
}

.topMargin1 {
    margin-top: 30px;
    display: block;
    float: left;
}

.categoryName,
.unclassified {
    text-align: center;
    font-weight: bold;
    line-height: 30px;
    background-color: #333333;
    width: 99%;
    float: left;
    margin-bottom: 5px;
    color: #efefef;
}

.headerBold {
    font-weight: bold;
}

.turnoverIcon {
    position: absolute;
    top: 94px;
    right: 12px;
    z-index: 100;
}

/* Style dla walidacji formularzy */
.error-frame {
    border: 2px solid #ff0000 !important;
}

/* Styl dla czerwonej gwiazdki */
.redIt {
    color: #ff0000;
    font-weight: bold;
}

/* Style dla przycisków formularzy */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-right: 0;
    text-decoration: none !important;
    height: 32px;
    box-sizing: border-box;
}

a.button {
    color: inherit;
}

.button i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.button-primary {
    background-color: #4CAF50;
    color: white !important;
}

.button-secondary {
    background-color: #4e95d4;
    color: white !important;
}

.button-back {
    background-color: #f0f0f0;
    color: #333;
}

.form-buttons {
    text-align: right;
    padding: 10px 0;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-buttons .saveButton,
.form-buttons .addButton,
.form-buttons .printButton,
.form-buttons .endButton,
.form-buttons .moveBackButton,
.form-buttons .archiveButton,
.form-buttons .duplicateButton {
    float: none;
    display: inline-block;
    margin-left: 10px;
}

/* Zmiana stylu dla ostatniego elementu listy */
#content form ul li:last-child {
    justify-content: flex-end;
}

/* Modal dialog */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 1.5px 8px rgba(73, 125, 164, 0.10);
    max-width: 410px;
    width: 100%;
    transition: box-shadow 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

.modal-body {
    line-height: 1.7;
}

.modal-body p {
    margin: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 18px;
}

.modal-footer button {
    margin-left: 10px;
    padding: 6px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel {
    background-color: #f1f1f1;
    color: #555;
    border: 0px !important;
    border-radius: 7px;
    font-weight: 500;
    padding: 8px 22px;
    font-size: 14px;
}

.btn-confirm {
    background-color: #e53935;
    color: #fff;
    border: 0px !important;
    border-radius: 7px;
    font-weight: 600;
    padding: 8px 22px;
    font-size: 14px;
}

/* ===== RESPONSYWNOŚĆ DLA URZĄDZEŃ MOBILNYCH ===== */
@media only screen and (max-width: 768px) {

    /* Ogólne style */
    body {
        font-size: 14px;
    }

    #wrapper {
        padding: 5px;
        max-width: 100%;
        box-sizing: border-box;
        border-width: 0;
    }

    /* Menu nawigacyjne */
    #menu {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
        height: auto;
    }

    #menu a,
    #menu .menu-item {
        width: 100%;
        box-sizing: border-box;
        justify-content: flex-start;
        display: flex !important;
        float: none;
        height: auto;
        margin-bottom: 5px;
    }

    #logoutBtn {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-top: 5px;
        box-sizing: border-box;
    }

    /* Formularze */
    #content form label {
        width: 100%;
        margin-bottom: 5px;
        padding-top: 0;
    }

    #content form .field-container {
        width: 100%;
    }

    #content form ul li {
        margin-bottom: 15px;
    }

    .inputText {
        width: 100%;
    }

    /* Przyciski */
    .saveButton,
    .addButton,
    .printButton,
    .endButton,
    .moveBackButton,
    .archiveButton,
    .duplicateButton {
        margin: 5px 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .form-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .form-buttons button {
        width: 100%;
    }

    /* Tabele i listy zleceń */
    .orders_list_item {
        position: relative;
        padding: 10px 0;
        display: flex;
        flex-wrap: wrap;
    }

    .listNumber {
        width: 100%;
        margin-left: 0;
        margin-bottom: 5px;
    }

    .col0,
    .col1,
    .col2,
    .col3,
    .col4,
    .colName,
    .colPerson,
    .colStatus {
        width: 100%;
        padding: 3px 5px;
        min-height: auto;
    }

    .colEdit,
    .colDel,
    .colFV {
        width: auto;
        margin: 5px 5px 0 0;
    }

    /* Ukrywanie elementów na mobilnych urządzeniach */
    .mobile-hide {
        display: none !important;
    }

    /* Style dla nagłówka tabeli na urządzeniach mobilnych */
    .orders-header {
        display: none;
    }

    /* Wyszukiwarka */
    .js-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .js-filter-form input[type="text"],
    .js-filter-form select,
    .js-filter-form button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }

    /* Paginacja */
    .pagination {
        flex-wrap: wrap;
    }

    /* Modalne okna */
    .modal-container {
        width: 95%;
        max-width: 95%;
        padding: 15px;
    }

    /* Wysokości kontenerów */
    #activeOrders,
    #finishedOrders,
    #archiveOrders {
        height: auto;
        max-height: 70vh;
    }

    /* Etykiety dla mobilnych urządzeń */
    .orders_list_item .col1:before {
        content: "Nr zlecenia: ";
        font-weight: bold;
    }

    .orders_list_item .col0:before {
        content: "Klient: ";
        font-weight: bold;
    }

    .orders_list_item .colName:before {
        content: "Nazwa zlecenia: ";
        font-weight: bold;
    }

    .orders_list_item .col3:before {
        content: "Data realizacji: ";
        font-weight: bold;
    }

    /* Poprawka dla nagłówków h3 z formularzami */
    h3 {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    h3 .right {
        width: 100%;
        margin-top: 10px;
    }
}

/* Dodatkowe style dla bardzo małych ekranów */
@media only screen and (max-width: 480px) {

    /* Jeszcze mniejsze fonty */
    body {
        font-size: 13px;
    }

    /* Zmniejsz padding dla przycisków */
    #menu a {
        padding: 6px 12px;
    }

    /* Zmniejsz rozmiar ikon */
    .colEdit a,
    .colEdit span,
    .colDel a {
        width: 20px;
        height: 20px;
    }

    .colEdit a img,
    .colEdit span img,
    .colDel a img {
        width: 14px;
        height: 14px;
    }
}

/* Style dla formularza logowania */
.login-body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.login-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 400px;
    max-width: 90%;
    overflow: hidden;
    text-align: center;
}

.login-logo {
    padding: 30px 0 10px;
}

.login-logo img {
    max-width: 120px;
    height: auto;
}

.login-form-container {
    padding: 20px 30px;
}

.login-form-container h2 {
    margin: 0 0 20px;
    color: #444444;
    font-size: 24px;
    font-weight: 500;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666666;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    width: 18px;
    height: 18px;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.input-with-icon input:focus {
    border-color: #666666;
    outline: none;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background-color: #444444;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #333333;
}

.login-button svg {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

.login-error {
    background-color: #ffebee;
    color: #f44336;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.login-footer {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    color: #666666;
    font-size: 12px;
}

/* Media queries dla responsywności */
@media (max-width: 480px) {
    .login-form-container {
        padding: 20px 15px;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
}

/* Form validation styles */
.form-field-error {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 1px #ff4444 !important;
    border-radius: 4px !important;
}

.form-field-error:focus {
    border-color: #ff4444 !important;
    box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.25) !important;
    border-radius: 4px !important;
}

.note-editor.form-field-error {
    border: 1px solid #ff4444 !important;
}

/* Hide duplicate textarea created by Summernote */
.note-editor+textarea {
    display: none !important;
}

/* Style dla wydruku */
@media print {
    body {
        background: none;
        margin: 0;
        padding: 0;
    }

    #wrapper {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        background: none;
        max-width: none;
    }

    #menu,
    #logoutBtn,
    .saveButton,
    .addButton,
    .printButton,
    .endButton,
    .moveBackButton,
    .archiveButton,
    .duplicateButton,
    .goBackLink {
        display: none !important;
    }

    #content {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .note-editor {
        border: none !important;
    }

    .note-editor .note-toolbar {
        display: none;
    }

    /* Style dla tabel w Summernote */
    .note-editable table,
    .printTxtContainer table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .note-editable table td,
    .note-editable table th,
    .printTxtContainer table td,
    .printTxtContainer table th {
        border: 1px solid #000 !important;
        padding: 6px !important;
        background-color: transparent !important;
        color: #000 !important;
    }

    /* Zachowanie kolorów tła, jeśli zostały ustawione */
    .note-editable table td[style*="background-color"],
    .printTxtContainer table td[style*="background-color"] {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Poprawka dla szerokości kolumn */
    .note-editable table td[width],
    .printTxtContainer table td[width] {
        width: auto !important;
    }

    /* Wsparcie dla łączonych komórek */
    .note-editable table td[colspan],
    .printTxtContainer table td[colspan] {
        text-align: center !important;
    }

    /* Dbamy o to, aby tabele nie były zbyt szerokie */
    .printTxtContainer {
        width: 100% !important;
        overflow-x: hidden !important;
    }
}

.bold-date {
    font-weight: bold;
}

/* ============================================= */
/* Dashboard Styles */
/* ============================================= */

.dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4CAF50;
}

.dashboard-header h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: #333;
}

.dashboard-date {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-content h3 {
    margin: 0 0 5px 0;
    font-size: 32px;
    color: #333;
    font-weight: bold;
}

.card-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.dashboard-alerts {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.dashboard-alerts h3 {
    margin: 0 0 15px 0;
    color: #856404;
}

.alerts-grid {
    display: grid;
    gap: 10px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #cc5e6a;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.dashboard-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-four-charts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.dashboard-four-charts .dashboard-section h3 {
    font-size: 14px;
    text-align: center;
}

.dashboard-four-charts .dashboard-section h3 small {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
}

@media (max-width: 1200px) {
    .dashboard-four-charts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-four-charts {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.dashboard-section h4 {
    margin: 15px 0 10px 0;
    font-size: 16px;
    color: #555;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stats-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.stats-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.stats-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.stats-text {
    color: #555;
}

.stats-count {
    font-weight: bold;
    color: #333;
}

.user-stats-table {
    overflow-x: auto;
}

.user-stats-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-stats-table thead {
    background: #f8f9fa;
}

.user-stats-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #dee2e6;
}

.user-stats-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.user-stats-table tbody tr:hover {
    background: #f8f9fa;
}

.user-stats-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    position: relative;
}

.user-stats-table th.sortable:hover {
    background: #e9ecef;
}

.user-stats-table th.sortable.active {
    background: #dee2e6;
    font-weight: 700;
}

.user-stats-table .sort-arrow {
    margin-left: 5px;
    font-size: 10px;
    color: #999;
}

.user-stats-table th.sortable.active .sort-arrow {
    color: #333;
}

.time-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.time-stat-item {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.time-stat-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.time-stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.chart-container {
    position: relative;
    height: 200px;
    margin-top: 15px;
}

.simple-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.simple-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.simple-stat-label {
    color: #555;
    font-size: 14px;
}

.simple-stat-value {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .time-stats {
        flex-direction: column;
    }
}

/* ============================================= */
/* Analytics Filters */
/* ============================================= */

.analytics-filters {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group input[type="text"],
.filter-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.filter-submit {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: background 0.2s;
}

.filter-submit:hover {
    background: #45a049;
}

.filter-reset {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
}

.filter-reset:hover {
    background: #da190b;
    color: white;
}

.quick-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.quick-filters span {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.quick-filter-btn {
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-filter-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.active-filters-info {
    background: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #0d47a1;
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .quick-filters {
        flex-direction: column;
        align-items: flex-start;
    }
}