:root {
    /* Paleta Wyspawany - Industrial */
    --bg-body: #1e1e24;       /* Bardzo ciemny szary (tło) */
    --bg-card: #2b2b33;       /* Jasniejszy szary (boxy) */
    --text-main: #e0e0e0;     /* Biały złamany */
    --text-muted: #a0a0a0;    /* Szary tekst */
    
    --accent-yellow: #ffbd00; /* Spawalniczy żółty */
    --accent-brown: #8d6e63;  /* Brąz (rdza/drewno) */
    --accent-hover: #e6a800;
    --accent-green: rgb(0,204,0);
    
    --border-color: #3e3e4a;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);

    /* Kolory statusów (tło) + kontrastowy tekst */
    --status-0-bg: #cfe8ff;   /* Nowe: niebieski */
    --status-0-text: #1a1a1a;
    --status-1-bg: #ffe5b5;   /* Realizacja: bursztyn */
    --status-1-text: #1a1a1a;
    --status-2-bg: #ffd6c9;   /* Piaskowanie: łosoś */
    --status-2-text: #1a1a1a;
    --status-3-bg: #d5f5c8;   /* Malowanie: zieleń */
    --status-3-text: #1a1a1a;
    --status-4-bg: #d9f2ff;   /* Do wysyłki: błękit */
    --status-4-text: #1a1a1a;
    --status-5-bg: #dff7e1;   /* Wysłane: mięta */
    --status-5-text: #1a1a1a;
    --status-6-bg: #ffc7c7;   /* Pilne: czerwony */
    --status-6-text: #1a1a1a;
    --status-7-bg: #ead7ff;   /* Pakowanie: fiolet */
    --status-7-text: #1a1a1a;
    --status-8-bg: #d2f2ea;   /* Dostawa: turkus */
    --status-8-text: #1a1a1a;
    --status-9-bg: #e7d5c3;   /* Do wykończenia: brąz */
    --status-9-text: #1a1a1a;
    --status-10-bg: #e3e7ef;  /* Inne: szaroniebieski */
    --status-10-text: #1a1a1a;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- UKŁAD GLÓWNY (GRID) --- */
.app-container {
    display: grid;
    /* Treść (auto) | Menu (300px) */
    grid-template-columns: 1fr 300px; 
    gap: 20px;
    padding: 20px;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

/* Mobilka: jeden pod drugim */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    /* Na mobilce menu wrzucamy na górę lub dół - tu zostawiam naturalny flow */
    .sidebar { order: -1; } 
}

/* --- LEWA STRONA: BOX GŁÓWNY --- */
.main-content {
    background: var(--bg-card);
    border-radius: 12px;
    border-left: 4px solid var(--accent-yellow); /* Żółty akcent po lewej */
    padding: 30px;
    box-shadow: var(--shadow);
    min-height: 80vh;
}

.page-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    justify_content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-yellow);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PRAWA STRONA: MENU --- */
.sidebar {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.logo-area {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-text a{
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-decoration: none;
}
.logo-text-a{
    text-decoration: none;
}

.logo-text span {
    color: var(--accent-yellow);
    display: block;
    font-size: 0.9em;
}

/* Style Menu */
.menu-category {
    margin-bottom: 15px;
}

.menu-toggle {
    background: #363640;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
    border: 1px solid transparent;
}

.menu-toggle:hover, .menu-toggle.active {
    background: #40404a;
    border-color: var(--accent-brown);
    color: var(--accent-yellow);
}

/* --- MENU ROZWIJANE (SIDEBAR) --- */
.link-group {
    display: none; /* Domyślnie ukryte */
    padding-left: 10px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.link-group.show {
    display: block; /* Pokaż gdy klasa .show jest dodana */
}

.link-group a {
    display: block;
    padding: 10px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    transition: 0.2s;
}
.link-szukaj a {
    padding: 10px 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    transition: 0.2s;
}

.link-group a:hover {
    color: #fff;
    background: rgba(255, 189, 0, 0.05);
    border-left-color: var(--accent-yellow);
    padding-left: 25px;
}

/* Przyciski w treści */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-brown);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #7a5e54;
}

.btn-primary {
    background: var(--accent-yellow);
    color: #1a1a1a;
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--accent-hover);
}
/* --- TABELA ZAMÓWIEŃ --- */
.table-container {
    overflow-x: auto; /* Przewijanie na telefonie */
}

.data-table {
    width: 100%;
    border-collapse: separate; /* Umożliwia border-radius */
    border-spacing: 0 8px; /* Odstęp między wierszami */
    font-size: 0.95rem;
}

.data-table thead th {
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 0 15px 10px 15px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.data-table tbody tr {
    background: #25252b;
    transition: transform 0.2s, box-shadow 0.2s;
}

.data-table tbody tr:hover {
    transform: translateY(-2px);
    background: #2a2a30;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.data-table td {
    padding: 15px;
    vertical-align: middle;
}

/* --- KOLOROWANIE WIERSZY I STATUSÓW --- */

/* Badge Styles */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}
.badge-new { background: rgb(135,206,235); color: #3498db; }    /* Niebieski */
.badge-sand { background: rgba(255, 189, 0, 0.15); color: #ffbd00; }    /* Żółty */
.badge-paint { background: rgba(230, 126, 34, 0.15); color: #e67e22; }  /* Pomarańcz */
.badge-ship { background: rgb(255,204,102); color: rgb(255,0,204); }   /* Fiolet */
.badge-done { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }   /* Zielony */
.badge-urgent { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid #e74c3c; } /* CZERWONY PILNE */
.badge-pack { background: rgba(156, 39, 176, 0.15); color: #d05ce3; }   /* Róż/Fiolet */
.badge-wip { background: rgba(121, 85, 72, 0.2); color: #bcaaa4; }      /* Brąz/Beż */
.badge-wip3{ background: rgb(192,192,192); color: rgb(85,85,85); }      /* Brąz/Beż */

/* Kolorowe paski na dole wiersza */
.data-table tr[class^="row-status-"] td { border-bottom-width: 2px; border-bottom-style: solid; }

.row-status-0 td { border-bottom-color: #3498db; } /* Nowe */
.row-status-1 td { border-bottom-color: rgb(255,204,51); } /* Realizacja */
.row-status-2 td { border-bottom-color: #ffbd00; } /* Piaskowanie */
.row-status-3 td { border-bottom-color: #e67e22; } /* Malowanie */
.row-status-4 td { border-bottom-color: rgb(51,204,51); } /* Wysyłka */
.row-status-5 td { border-bottom-color: #2ecc71; opacity: 0.7; } /* Wysłane (przygaszone) */
.row-status-6 td { border-bottom-color: #e74c3c; } /* !!! PILNE !!! */
.row-status-7 td { border-bottom-color: #d05ce3; } /* Do pakowania */
.row-status-8 td { border-bottom-color: #1abc9c; } /* Dostawa */
.row-status-9 td { border-bottom-color: #795548; } /* Do wykończenia */
.row-status-10 td { border-bottom-color: #95a5a6; } /* Inne */

.data-table tbody tr:hover td {
    border-bottom-width: 3px;
    filter: brightness(1.2);
}


.client-name { font-weight: 600; color: #fff; display: block; }
.client-details { font-size: 0.85rem; color: var(--text-muted); }

.product-list { font-size: 0.9rem; color: #ddd; max-width: 300px; }
.price { font-weight: 700; color: var(--accent-yellow); }

.action-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0 5px;
    transition: 0.2s;
}
.action-icon:hover { color: #fff; }
.btn-delete:hover { color: #ff4757; }
/* --- STRONICOWANIE (PAGINATION) --- */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    padding-bottom: 20px;
}

.pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #25252b;
    border: 1px solid #444;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: var(--accent-yellow);
    color: #fff;
    background: #2a2a32;
}

.page-btn.active {
    background: var(--accent-yellow);
    color: #000;
    border-color: var(--accent-yellow);
    font-weight: 700;
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}
/* --- SZCZEGÓŁY ZAMÓWIENIA --- */
.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Lewa szersza, prawa węższa */
    gap: 25px;
}

.detail-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border-top: 4px solid transparent;
}

.card-product { border-top-color: var(--accent-yellow); }
.card-client { border-top-color: #3498db; }
.card-date { border-top-color: rgb(0,204,0); }
.card-actions { border-top-color: var(--accent-brown); position: sticky; top: 20px; }

.detail-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid #3e3e4a;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #333;
    font-size: 0.95rem;
}
.info-row:last-child { border-bottom: none; }

.info-label { color: var(--text-muted); }
.info-value { color: #eee; font-weight: 500; text-align: right; }
.info-value.highlight { color: var(--accent-yellow); font-weight: 700; font-size: 1.1em; }

.big-data-box {
    background: #1e1e24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    font-family: monospace;
    color: #ccc;
    margin-top: 10px;
    white-space: pre-wrap; /* Zachowuje entery */
}

/* Responsywność */
@media (max-width: 900px) {
    .details-grid { grid-template-columns: 1fr; }
    .card-actions { position: static; }
}
/* --- SEKCJA KURIER I SMS --- */
.courier-box {
    background: #25252b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.courier-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.tracking-group {
    display: flex;
    gap: 10px;
}

.btn-sms {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-sms:hover { background: #2980b9; }

.sms-sent-info {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #2ecc71;
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- DANE ADRESOWE I FAKTURY --- */
.address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
.address-item label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}
.address-item div {
    font-size: 1rem;
    color: #eee;
    font-weight: 500;
}

.invoice-box {
    background: rgba(255, 189, 0, 0.05);
    border: 1px dashed var(--accent-yellow);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.invoice-link {
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}
.invoice-link:hover { text-decoration: underline; }
/* --- NOWOCZESNE FORMULARZE --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: #1a1a1e; /* Bardzo ciemne tło */
    border: 1px solid #444;
    color: #eee;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 189, 0, 0.1);
    background: #202026;
}

/* Pole tekstowe z autodopasowaniem */
textarea.auto-resize {
    min-height: 100px;
    resize: none; /* Wyłączamy ręczne rozciąganie */
    overflow-y: hidden; /* Ukrywamy scrollbar */
    line-height: 1.5;
}

/* Wygląd listy rozwijanej (Select) */
select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23AAAAAA%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right .7em top 50%;
    background-size: .65em auto;
    appearance: none; /* Usuwamy domyślną strzałkę systemową */
    padding-right: 25px;
}
/* --- ZAŁĄCZNIKI (PLIKI) --- */
.files-box {
    margin-top: 15px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1e24;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    transition: 0.2s;
}

.file-item:hover {
    border-color: var(--accent-yellow);
    background: #25252b;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.file-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
}
.file-name {
    color: #eee;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.file-name a {
    color: inherit;
    text-decoration: none;
}
.file-name a:hover {
    text-decoration: underline;
}

.btn-file-delete {
    color: #e74c3c;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: 0.2s;
}
.btn-file-delete:hover {
    opacity: 1;
    transform: scale(1.1);
}

.upload-area {
    border: 2px dashed #444;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    transition: 0.2s;
    background: rgba(255,255,255,0.02);
}
.upload-area:hover {
    border-color: var(--accent-yellow);
    background: rgba(255, 189, 0, 0.05);
}

.custom-file-input {
    display: none;
}
.custom-file-label {
    display: inline-block;
    padding: 8px 15px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 5px;
}
.custom-file-label:hover { background: #444; }
    .orders-header {
        background: var(--bg-card); padding: 20px; border-radius: 12px; margin-bottom: 25px;
        border-left: 4px solid var(--accent-yellow); display: flex; justify-content: space-between;
        align-items: center; flex-wrap: wrap; gap: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    .tools-wrapper { display: flex; align-items: center; gap: 10px; }
    .control-input {
        background: #1e1e24; color: #fff; border: 1px solid #444; padding: 0 15px; height: 42px;
        border-radius: 6px; font-size: 0.9rem; outline: none; transition: border 0.2s;
    }
    .control-input:focus { border-color: var(--accent-yellow); }
    .search-box { position: relative; }
    .search-box input { padding-left: 38px; width: 220px; }
    .search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #666; pointer-events: none; }
    .btn-add {
        height: 42px; padding: 0 20px; background: var(--accent-yellow); color: #111; font-weight: 700;
        border-radius: 6px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: none;
    }
    .btn-edit {
        height: 35px; padding: 0 20px; background: var(--accent-green); color: #111; font-weight: 700;
        border-radius: 6px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border: none;
    }
    .btn-add:hover { background: var(--accent-hover); }
    .btn-details {
        background: transparent; color: var(--text-muted); border: 1px solid #444; width: 36px; height: 36px;
        display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.2s; text-decoration: none;
    }
    .btn-details:hover { background: var(--accent-yellow); color: #000; border-color: var(--accent-yellow); }
    
    @media (max-width: 850px) {
        .orders-header { flex-direction: column; align-items: stretch; }
        .tools-wrapper { flex-direction: column; align-items: stretch; }
        .search-box input, .control-input { width: 100%; }
        .btn-add { justify-content: center; }
    }
    
    /* Styl dymka powiadomienia */
        .toast-notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: #1e1e24;
            border-left: 5px solid #2ecc71; /* Zielony pasek */
            box-shadow: 0 5px 15px rgba(0,0,0,0.5);
            border-radius: 4px;
            padding: 15px 20px;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 9999;
            min-width: 300px;
            transform: translateX(120%); /* Domyślnie schowane poza ekranem */
            transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        }
        
        .toast-notification.show {
            transform: translateX(0);
        }

        .toast-content {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .toast-icon {
            font-size: 1.5rem;
            color: #2ecc71;
        }

        .toast-title {
            font-weight: bold;
            font-size: 1rem;
            margin-bottom: 2px;
        }

        .toast-message {
            font-size: 0.85rem;
            color: #aaa;
        }

        .toast-close {
            background: none;
            border: none;
            color: #666;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .toast-close:hover { color: #fff; }
        
        /* --- TRYB JASNY (LIGHT MODE OVERRIDES) --- */
[data-theme="light"] {
    /* Nadpisujemy zmienne kolorystyczne */
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #e0e4e8;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Specyficzne poprawki dla trybu jasnego (żeby elementy były czytelne) */
[data-theme="light"] .logo-text a { color: #2c3e50; }
[data-theme="light"] .form-input { background: #fff; border-color: #ccc; color: #333; }
[data-theme="light"] .form-input:focus { background: #fff; }
[data-theme="light"] .data-table tbody tr:not([class^="row-status-"]) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
[data-theme="light"] .data-table tbody tr:not([class^="row-status-"]):hover { background: #f1f1f1; }
[data-theme="light"] .page-btn { background: #fff; color: #333; }
[data-theme="light"] .page-btn:hover { background: #eee; }
[data-theme="light"] .detail-title { color: #2c3e50; }
[data-theme="light"] .info-value { color: #333; }
[data-theme="light"] .courier-box, 
[data-theme="light"] .big-data-box,
[data-theme="light"] .file-item { background: #f8f9fa; color: #333; }

/* Poprawka kolorów badge'y (pigułek) w trybie jasnym dla lepszego kontrastu */
[data-theme="light"] .badge-new { background: rgba(52, 152, 219, 0.2); color: #2980b9; }
[data-theme="light"] .badge-sand { color: #d35400; }
[data-theme="light"] .badge-done { color: #27ae60; }
[data-theme="light"] .price { color: #d35400; }
/* --- POPRAWKI MENU DLA TRYBU JASNEGO --- */
[data-theme="light"] .menu-toggle {
    background: #f1f3f5;       /* Jasne tło przycisku */
    color: #2c3e50;            /* Ciemny tekst */
    border: 1px solid #e0e4e8; /* Delikatna ramka */
}

[data-theme="light"] .menu-toggle i {
    color: #7f8c8d;            /* Kolor ikon w menu */
}

[data-theme="light"] .menu-toggle:hover,
[data-theme="light"] .menu-toggle.active {
    background: #ffffff;       /* Białe tło po najechaniu */
    color: #d35400;            /* Akcent kolorystyczny (brąz/pomarańcz) */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-color: #d35400;
}

[data-theme="light"] .link-group {
    background: rgba(0,0,0,0.03); /* Bardzo jasne tło rozwiniętego menu */
    border-bottom: 1px solid #e0e4e8;
}

[data-theme="light"] .link-group a {
    color: #555;               /* Ciemne linki */
}

[data-theme="light"] .link-group a:hover {
    color: #000;
    background: rgba(255, 189, 0, 0.15); /* Żółte podświetlenie po najechaniu */
}

/* Sidebar tło */
[data-theme="light"] .sidebar {
    background: #ffffff;
    border: 1px solid #e0e4e8;
}
/* --- KOLOROWANIE CAŁYCH WIERSZY - STAŁE DLA WSZYSTKICH TRYBÓW --- */
.data-table tbody tr.row-status-0 { --row-bg: var(--status-0-bg); background-color: var(--row-bg) !important; --row-text: var(--status-0-text); color: var(--row-text); }  /* Nowe */
.data-table tbody tr.row-status-1 { --row-bg: var(--status-1-bg); background-color: var(--row-bg) !important; --row-text: var(--status-1-text); color: var(--row-text); }  /* Realizacja */
.data-table tbody tr.row-status-2 { --row-bg: var(--status-2-bg); background-color: var(--row-bg) !important; --row-text: var(--status-2-text); color: var(--row-text); }  /* Piaskowanie */
.data-table tbody tr.row-status-3 { --row-bg: var(--status-3-bg); background-color: var(--row-bg) !important; --row-text: var(--status-3-text); color: var(--row-text); }  /* Malowanie */
.data-table tbody tr.row-status-4 { --row-bg: var(--status-4-bg); background-color: var(--row-bg) !important; --row-text: var(--status-4-text); color: var(--row-text); }  /* Wysyłka */
.data-table tbody tr.row-status-5 { --row-bg: var(--status-5-bg); background-color: var(--row-bg) !important; --row-text: var(--status-5-text); color: var(--row-text); opacity: 0.8; } /* Wysłane */
.data-table tbody tr.row-status-6 { --row-bg: var(--status-6-bg); background-color: var(--row-bg) !important; --row-text: var(--status-6-text); color: var(--row-text); }  /* PILNE */
.data-table tbody tr.row-status-7 { --row-bg: var(--status-7-bg); background-color: var(--row-bg) !important; --row-text: var(--status-7-text); color: var(--row-text); } /* Pakowanie */
.data-table tbody tr.row-status-8 { --row-bg: var(--status-8-bg); background-color: var(--row-bg) !important; --row-text: var(--status-8-text); color: var(--row-text); } /* Dostawa */
.data-table tbody tr.row-status-9 { --row-bg: var(--status-9-bg); background-color: var(--row-bg) !important; --row-text: var(--status-9-text); color: var(--row-text); } /* Do wykończenia */
.data-table tbody tr.row-status-10 { --row-bg: var(--status-10-bg); background-color: var(--row-bg) !important; --row-text: var(--status-10-text); color: var(--row-text); } /* Inne */

/* Kontrast w kolumnach: Ilość / Profil / Kolor */
.data-table tbody tr[class^="row-status-"] td:nth-child(3),
.data-table tbody tr[class^="row-status-"] td:nth-child(4),
.data-table tbody tr[class^="row-status-"] td:nth-child(5) {
    color: var(--row-text) !important;
}

.data-table tbody tr[class^="row-status-"] td:nth-child(3) strong,
.data-table tbody tr[class^="row-status-"] td:nth-child(4) span,
.data-table tbody tr[class^="row-status-"] td:nth-child(5) span,
.data-table tbody tr[class^="row-status-"] td:nth-child(5) .color-tag {
    color: var(--row-text) !important;
}

/* Kontrast dla pozostałych kolumn (bez Status i Opcje) */
.data-table tbody tr[class^="row-status-"] td:nth-child(1),
.data-table tbody tr[class^="row-status-"] td:nth-child(2),
.data-table tbody tr[class^="row-status-"] td:nth-child(6) {
    color: var(--row-text) !important;
}

.data-table tbody tr[class^="row-status-"] td:nth-child(1) *,
.data-table tbody tr[class^="row-status-"] td:nth-child(2) *,
.data-table tbody tr[class^="row-status-"] td:nth-child(6) * {
    color: var(--row-text) !important;
}

/* Efekt najechania dla trybu ciemnego */
.data-table tbody tr[class^="row-status-"]:hover {
    filter: none;
    color: inherit;
    background-color: var(--row-bg) !important;
}

/* Tryb jasny: nie rozjaśniaj tekstu przy hover (czytelność Uwagi) */
[data-theme="light"] .data-table tbody tr[class^="row-status-"]:hover {
    filter: none;
}

[data-theme="light"] .data-table tbody tr[class^="row-status-"] td:nth-child(6),
[data-theme="light"] .data-table tbody tr[class^="row-status-"] td:nth-child(6) * {
    color: var(--row-text) !important;
}