﻿/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
                 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #F2F2F7;
    color: #1C1C1E;
    font-size: 14px;
}

/* ===== HEADER ===== */
.header-bar {
    width: 100%;
    background: linear-gradient(to bottom, #3372DF, #1565C0);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 20px;
    position: fixed;
    top: 0;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.header-left img {
    height: 34px;
}

.header-menu {
    display: flex;
    gap: 18px;
}

.header-menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-menu a:hover {
    opacity: 1;
    text-decoration: underline;
}

.material-icons {
    font-size: 20px;
    vertical-align: middle;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 90px 16px 24px;
}

/* ===== ROW ===== */
.row {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.08),
        inset 0 0 0 1px rgba(0,0,0,0.04);
}

.row-center {
    text-align: center;
    font-size: 12px;
    color: #8E8E93;
}

/* ===== FORM ===== */
.search-form {
    width: 100%;
}

/* ===== FORM ROWS ===== */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 26px;
}

/* ===== MATERIAL INPUT ===== */
.md-field {
    position: relative;
    width: 100%;
}

.md-field input {
    width: 100%;
    padding: 14px 4px 6px;
    font-size: 14px;
    border: none;
    border-bottom: 2px solid #BFBFBF;
    background: transparent;
    color: ##e0e0eb;
}

.md-field input:focus {
    outline: none;
    border-bottom-color: #1E88E5;
}

.md-field label {
    position: absolute;
    left: 4px;
    top: 14px;
    font-size: 14px;
    color: #BFBFBF;
    pointer-events: none;
    transition: 0.25s ease;
}

/* FLOATING LABEL */
.md-field input:focus + label,
.md-field input:not(:placeholder-shown) + label {
    top: -6px;
    font-size: 11px;
    color: #1E88E5;
}

/* ===== SORT ROW ===== */
.sort-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.sortowanie {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.sortowanie label {
    font-size: 13px;
    color: #3A3A3C;
}

.sortowanie input[type="radio"] {
    margin-right: 4px;
}

/* ===== BUTTON ===== */
button {
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(to bottom, #1E88E5, #1565C0);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(30,136,229,0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(30,136,229,0.45);
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #E5E5EA;
    text-align: left;
}

th {
    background: #93CCCE;
    font-weight: 600;
}

tr:hover td {
    background: #FAFAFC;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .sort-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .header-menu {
        gap: 10px;
        font-size: 12px;
    }
}

.etka-wrapper {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.etka-wrapper.open {
    max-height: 800px; /* wystarczająco dużo */
}

.etka-toggle {
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    background: #D2D2D2; /* nowe tło */
    padding: 10px;       /* żeby wyglądało lepiej */
    border-radius: 4px;
}

.etka-toggle i {
    transition: transform 0.3s ease;
}

.etka-toggle.open i {
    transform: rotate(90deg);
}

.md-field,
.md-select-field {
    position: relative;
    width: 100%;
}


.md-select {
    width: 100%;
    padding: 10px 0 8px;
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #9e9e9e;
    background: transparent;
    appearance: none;
    outline: none;
    cursor: pointer;
}

/* Strzałka */
.md-select-field::after {
    content: "▼";
    position: absolute;
    right: 0;
    top: 14px;
    font-size: 12px;
    color: #666;
    pointer-events: none;
}

.info-box {
    padding: 10px 0 8px;
    font-size: 22px;
    color: #009985;
    border: none;
    background: transparent;

}

.logout-btn {
    margin-left: 15px;
    color: #ffdddd;
    text-decoration: none;
    font-weight: bold;
}

.logout-btn:hover {
    color: #ffffff;
    text-decoration: underline;
}

.btn-danger {
    display: inline-block;
    background-color: #d9534f; /* czerwony */
    color: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.btn-danger i {
    vertical-align: middle;
    margin-right: 5px;
}

.btn-danger:hover {
    background-color: #c9302c; /* ciemniejszy czerwony */
    color: #fff;
}

.btn-danger:active {
    background-color: #ac2925;
}

.error-info {
    font-size: 20px;
    color: #D9534F;
    font-weight: bold;
    margin-top: 10px;
}


.btn-cancel-link {
    color: #FFFFFF;
    font-size: 18px;
}

.btn-cancel-link:hover {
    color: #e57368;
}

.btn-cancel-link:active {
    transform: scale(0.97);
}

@media (max-width: 900px) {
    .header-bar {
        flex-wrap: wrap;
        text-align: center;
        padding: 10px;
    }

    .header-left img {
        height: 28px;
    }

    .header-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-user {
        width: 100%;
        justify-content: center;
        margin-top: 30px;
        display: flex;
        gap: 6px;
    }

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 90px 16px 24px;
    margin-top: 100px;
}

}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-mag {
    min-width: 900px; /* tabela może być szeroka, ale przewijalna */
}

 .calc-box {
            background: #fff;
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 20px;
            box-shadow: 0 4px 14px rgba(0,0,0,0.1);
        }
        .calc-box input, .calc-box select {
            padding: 8px;
            width: 150px;
            margin-right: 10px;
        }
        .result {
            margin-top: 15px;
        }
        .result table {
            border-collapse: collapse;
            width: 100%;
            max-width: 500px;
        }
        .result th, .result td {
            border: 1px solid #ccc;
            padding: 6px 10px;
            text-align: left;
        }
        .result th {
            background: #f5f5f5;
        }
        .clear-btn {
            background: #c62828;
            color: #fff;
            padding: 10px 18px;
            border-radius: 8px;
            cursor: pointer;
            border: none;
            margin-top: 20px;
	    margin-bottom: 20px;
        }
        .clear-btn:hover {
            background: #b71c1c;
        }



