/* ---------- RESET & GLOBALNE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ciemne tło poza stroną */
body {
    background-color: #1a1a2e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding: 20px 0;
}

/* Główny kontener - szerokość 1300px, wyśrodkowany */
.container {
    width: 1300px;
    margin: 0 auto;
    background-color: #f5f5f0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* ---------- BLOK a: NAGŁÓWEK ---------- */
.header {
    background: linear-gradient(135deg, #e8e8e0, #f0f0e8);
    padding: 15px 20px;
    text-align: center;
    border-bottom: 2px solid #ddd8c8;
}
.header-logo {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* ---------- BLOK b: MENU ---------- */
.menu {
    background-color: #ffffff;
    border-bottom: 1px solid #e0dcd0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.menu-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
}

.menu-item {
    width: 280px;
    text-align: center;
}

.menu-link {
    display: inline-block;
    padding: 14px 24px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    color: #3a4a3c;
    background-color: transparent;
    border-radius: 0;
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 100%;
    box-sizing: border-box;
}

.menu-link:hover {
    background-color: #2b4a6a;
    color: #ffffff;
    transform: none;
    box-shadow: 0 4px 8px rgba(43, 74, 106, 0.2);
}

/* ---------- BLOK c: RESZTA STRONY (TREŚĆ) ---------- */
.content {
    padding: 40px 40px 30px 40px;
    min-height: 400px;
}

.content-section {
    max-width: 100%;
}

.section-title {
    font-size: 32px;
    color: #2c3e2f;
    margin-bottom: 20px;
    margin-top: 20px;
    border-left: 5px solid #4a7c59;
    padding-left: 20px;
}

.section-text {
    font-size: 24px;
    color: #2d3e2a;
    margin-bottom: 0px;
    line-height: 1.7;
}

/* ---------- STOPKA ---------- */
.footer {
    background-color: #e8e4d8;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    color: #5a6e52;
    border-top: 1px solid #d6d0c0;
}

/* ---------- RESPONSYWNOŚĆ ---------- */
@media (max-width: 1320px) {
    .container {
        width: 95%;
        margin: 0 auto;
    }
    
    .menu-list {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-title {
        font-size: 36px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .menu-link {
        padding: 10px 16px;
        font-size: 16px;
    }
    
    .menu-item {
        width: 100%;
        max-width: 180px;
    }
}

/* ---------- PRZYCISK "DO GÓRY" ---------- */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #2b4a6a;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

#scrollToTopBtn:hover {
    background-color: #1e3a54;
    transform: scale(1.1);
}

#scrollToTopBtn.visible {
    opacity: 1;
    visibility: visible;
}

/* ---------- NAGŁÓWEK Z UŻYTKOWNIKIEM ---------- */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8e4d8;
    padding: 8px 30px;
    border-bottom: 1px solid #d6d0c0;
    font-size: 15px;
}

.user-info {
    color: #2c3e2f;
    font-weight: 500;
}

.user-logout {
    background: #c0392b;
    color: white;
    border: none;
    padding: 6px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

.user-logout:hover {
    background: #a93226;
}

/* ---------- TABELKA ---------- */
.table-wrapper {
    overflow-x: auto;
    margin: 30px 20px 20px 20px;
    border-radius: 4px;
    border: 1px solid #c0b8a8;
    background-color: #ffffff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    min-width: 900px;
}

.data-table thead tr {
    background: linear-gradient(135deg, #2b4a6a, #1e3a54);
    color: #ffffff;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

.data-table th {
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    border-right: 2px solid #4a6a8a;
    border-bottom: 2px solid #4a6a8a;
    vertical-align: middle;
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: 14px 12px;
    border-right: 1px solid #aaa090;
    border-bottom: 1px solid #aaa090;
    color: #2d3e2a;
    vertical-align: middle;
    text-align: left;
    background-color: #ffffff;
}

.data-table td:nth-child(1) {
    text-align: center;
}

.data-table td:nth-child(8) {
    text-align: center;
}

.table-link {
    color: #2b4a6a;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    background-color: #eef2f5;
    border: 1px solid #2b4a6a;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 15px;
}

.table-link:hover {
    background-color: #2b4a6a;
    color: #ffffff;
    border-color: #1e3a54;
    transform: translateY(-1px);
}

.data-table td:last-child {
    border-right: none;
}

.data-table tbody tr:hover td {
    background-color: #d6e6f5;
    box-shadow: inset 0 2px 0 0 #2b4a6a, inset 0 -2px 0 0 #2b4a6a;
    transition: all 0.2s ease;
}

.data-table tbody tr:first-child:hover td {
    box-shadow: inset 0 -2px 0 0 #2b4a6a;
}

/* Kolory dla wierszy */
.data-table tbody tr.zdemontowany td {
    background-color: #d9c8b3 !important;
    color: #3a2a1a !important;
}

.data-table tbody tr.zdemontowany:hover td {
    background-color: #c9b8a3 !important;
    box-shadow: inset 0 2px 0 0 #5a4a3a, inset 0 -2px 0 0 #5a4a3a;
}

.data-table tbody tr.prs td {
    background-color: #e8d9f3 !important;
}

.data-table tbody tr.prs:hover td {
    background-color: #d5c0e8 !important;
}

.data-table tbody tr.lw td {
    background-color: #d4edda !important;
}

.data-table tbody tr.lw:hover td {
    background-color: #c3e6cb !important;
}

.data-table tbody tr.krzg td {
    background-color: #fff3cd !important;
}

.data-table tbody tr.krzg:hover td {
    background-color: #ffe69c !important;
}

/* Responsywność tabelki */
@media (max-width: 768px) {
    .table-wrapper {
        margin: 20px 15px 20px 15px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .data-table th {
        font-size: 14px;
    }
    
    .table-link {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Legenda */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 20px -10px 20px;
    padding: 10px 15px;
    background-color: #f5f5f0;
    border-radius: 8px;
    border: 1px solid #e0dcd0;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #aaa090;
}

.legend-light {
    background-color: #ffffff;
}

.legend-dark {
    background-color: #d9c8b3;
}

.legend-odbiór {
    background-color: #d4edda;
}

.legend-prs {
    background-color: #e8d9f3;
}

.legend-krzg {
    background-color: #fff3cd;
}