:root {
    --bg-color: #e0e5ec;
    --text-main: #3d4468;
    --text-muted: #6c7293;
    --shadow-light: #ffffff;
    --shadow-dark: #bec3cf;
    --color-blue: #4a90e2;
    --color-green: #00c896;
    --color-red: #ff3b5c;
    --color-orange: #ff9f43;
    --color-purple: #9b59b6;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.page-wrapper {
    background: var(--bg-color);
    min-height: 100vh;
    width: 100%;
    padding: 40px;
    color: var(--text-main);
    box-sizing: border-box;
}

    .page-wrapper.center-content {
        display: flex;
        justify-content: center;
        align-items: center;
    }

.header-container {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.back-btn {
    background: var(--bg-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    cursor: pointer;
    margin-right: 10px;
    color: var(--text-main);
    text-decoration: none;
    border: none;
    flex-shrink: 0;
    transition: transform 2.2s ease-out, opacity 2.2s ease-out;
}

    .back-btn:hover {
        color: var(--color-blue);
        transform: scale(1.05);
    }

.neu-card {
    background: var(--bg-color);
    border-radius: 30px;
    padding: 30px;
    /* Zredukowano z 24px na 15px */
    box-shadow: 8px 8px 15px var(--shadow-dark), -8px -8px 15px var(--shadow-light);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transform: translateZ(0); /* Chrome zacznie używać karty graficznej */
}

.neu-card-form {
    background: var(--bg-color);
    border-radius: 40px;
    padding: 50px;
    width: 100%;
    max-width: 800px;
    box-shadow: 15px 15px 30px var(--shadow-dark), -15px -15px 30px var(--shadow-light);
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
}

.neu-card-compact {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.neu-input {
    background: var(--bg-color);
    border: 2px solid transparent;
    border-radius: 12px; /* Zaktualizowano na 12px z nowych widoków */
    padding: 10px 15px; /* Kompaktowy padding z nowych widoków */
    font-size: 0.9rem;
    color: var(--text-main);
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

    .neu-input:focus {
        box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

    .neu-input.invalid {
        border-color: var(--color-red);
    }

    .neu-input.modified.valid {
        border-color: var(--color-green);
    }

.search-input {
    background: var(--bg-color);
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    color: var(--text-main);
    outline: none;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    width: 250px;
    margin-right: auto;
}

.neu-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 20px; /* Zunifikowane wypełnienie */
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
    background: var(--bg-color);
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-main);
    height: 40px;
}

    .neu-btn:hover {
        transform: translateY(-2px);
        box-shadow: 7px 7px 14px var(--shadow-dark), -7px -7px 14px var(--shadow-light);
    }

    .neu-btn:active {
        transform: translateY(0);
        box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

.neu-btn-small {
    background: var(--bg-color);
    border: none;
    border-radius: 15px;
    padding: 10px 20px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

    .neu-btn-small:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    }

    .neu-btn-small:active {
        transform: translateY(0);
        box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

.neu-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9499b7;
    cursor: pointer;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
    margin-right: 8px;
    flex-shrink: 0;
}

    .neu-btn-icon:hover {
        transform: scale(1.1);
        color: var(--color-blue);
        box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    }

    .neu-btn-icon.delete {
        color: var(--color-red);
    }

    .neu-btn-icon.edit:hover {
        color: var(--color-blue);
    }

.form-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(190, 195, 207, 0.3);
}

.header-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    color: var(--color-blue);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 10px;
    display: block;
    margin-bottom: 5px;
}

.full-width {
    grid-column: span 2;
}

.form-actions {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.validation-errors {
    color: var(--color-red);
    background: rgba(255, 59, 92, 0.1);
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--color-red);
    font-size: 0.9rem;
}

.neu-table-container {
    background: var(--bg-color);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.55);
    overflow: hidden;
    overflow-x: auto;
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    table-layout: fixed;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(190, 195, 207, 0.5);
}

td {
    padding: 15px;
    border-bottom: 1px solid rgba(190, 195, 207, 0.3);
    vertical-align: middle;
    font-size: 0.95rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: rgba(255,255,255,0.4);
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.font-bold {
    font-weight: 600;
    color: var(--text-main);
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.2); 
    border: none;
    box-shadow: none;
}

.status-archive {
    color: #9499b7;
    background: transparent;
    border: none;
}

.status-occupied {
    color: var(--color-red);
    background: transparent;
    border: none;
}

.status-year-round {
    color: #f39c12;
    background: transparent;
    border: none;
}


.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.pagination-arrow {
    cursor: pointer;
    color: #9499b7;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

    .pagination-arrow:hover {
        color: var(--text-main);
        transform: scale(1.1);
    }

    .pagination-arrow.disabled {
        color: #d1d5db;
        cursor: default;
        pointer-events: none;
        box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 30px;
    width: 100%;
    max-width: 500px;
    box-shadow: 20px 20px 60px var(--shadow-dark), -20px -20px 60px var(--shadow-light);
    display: flex;
    flex-direction: column;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 0;
    gap: 15px;
    user-select: none;
    transition: opacity 0.2s ease;
}

    .toggle-wrapper:hover {
        opacity: 0.9;
    }

.neu-toggle {
    width: 60px;
    height: 30px;
    border-radius: 30px;
    background: var(--bg-color);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.toggle-knob {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-color);
    position: absolute;
    top: 3px;
    left: 3px;
    box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.toggle-wrapper.active-fire .toggle-knob {
    transform: translateX(30px);
    background: var(--color-red);
    box-shadow: 0 0 10px var(--color-red), inset 1px 1px 2px rgba(255,255,255,0.4);
}

.toggle-wrapper.active-escort .toggle-knob {
    transform: translateX(30px);
    background: var(--color-blue);
    box-shadow: 0 0 10px var(--color-blue), inset 1px 1px 2px rgba(255,255,255,0.4);
}

/* Całoroczne */
.toggle-wrapper.active-year .toggle-knob {
    transform: translateX(30px);
    background: #f1c40f;
    box-shadow: 0 0 10px #f1c40f, inset 1px 1px 2px rgba(255,255,255,0.4);
}

.date-picker {
    background: var(--bg-color);
    border: none;
    padding: 10px;
    border-radius: 10px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    color: var(--text-main);
    outline: none;
}

.col-time {
    width: 150px;
}

.col-data {
    width: auto;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    box-sizing: border-box;
}

.admin-card-item {
    background: var(--bg-color);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s ease;
    min-height: 250px;
    box-sizing: border-box;
}

    .admin-card-item:hover {
        transform: translateY(-5px);
        box-shadow: 16px 16px 32px var(--shadow-dark), -16px -16px 32px var(--shadow-light);
    }

.admin-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    margin-bottom: 20px;
    color: var(--text-main);
    font-size: 2rem;
}

.admin-scroll-list {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 10px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    font-size: 0.9rem;
}

.admin-add-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(190, 195, 207, 0.3);
}

.header-title-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.main-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
}

.building-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 25px;
    min-height: 40px;
    border-radius: 15px;
    background: var(--bg-color);
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    transition: all 0.3s ease;
    user-select: none;
}

    .building-badge:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    }

.badge-icon {
    margin-right: 10px;
    display: flex;
    align-items: center;
    color: var(--color-blue);
}

/* =========================================
   DODATKOWE STYLE - ADMIN BUILDINGS
   ========================================= */

.creation-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Utrzymujemy dotychczasową formę form-row (dla np. budynków, logowania itd) */
.form-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.groups-container {
    display: flex;
    flex-wrap: wrap; /* Pozwala grupom przechodzić do nowej linii, gdy zabraknie miejsca */
    align-items: flex-start; /* Sprawia, że karty grup dopasowują się do swojej zawartości zamiast rozciągać */
    gap: 30px;
}

.group-card {
    background: var(--bg-color);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    border: 1px solid rgba(255,255,255,0.4);
    flex: 0 1 auto;
    min-width: 320px; /* Zapewnia, że pusta karta nie będzie nienaturalnie wąska */
    max-width: 100%; /* Zabezpieczenie przed wyjściem za krawędź ekranu */
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(190, 195, 207, 0.3);
    margin-bottom: 15px;
}

.group-title {
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.count-badge {
    background: rgba(108, 114, 147, 0.1);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.buildings-list {
    display: flex; /* Zmiana z grid na flex */
    flex-wrap: wrap; /* Nowe budynki utworzą nowy wiersz wewnątrz karty, jeśli karta osiągnie max ekranu */
    gap: 20px;
}

.building-item {
    background: var(--bg-color);
    border-radius: 15px;
    padding: 15px 20px;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
    flex: 0 0 280px; /* Sztywna szerokość elementu. Z każdym nowym budynkiem karta powiększy się o @ok. 280px + gap */
    max-width: 100%;
}

    .building-item:hover {
        transform: scale(1.02);
    }

.building-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-main);
    font-size: 1rem;
}

.building-info span {
    font-size: 0.8rem;
    color: #9499b7;
    display: block;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* =========================================
   DODATKOWE STYLE - ADMIN USERS / TECHNICAL
   ========================================= */

.compact-form-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.card-title-small {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Kolor tytułu wprost pod ten konkretny formularz */
.compact-form-card .card-title-small {
    color: var(--color-green);
    margin-bottom: 20px;
}

/* Rozwiązanie konfliktu flex/grid dla .form-row bez dotykania HTML */
.compact-form-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
    align-items: stretch;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.user-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    position: relative;
    overflow: hidden;
    border-left: 5px solid transparent;
    height: 100%;
    box-sizing: border-box;
}

    .user-card:hover {
        transform: translateY(-3px);
    }

.border-admin {
    border-left-color: var(--color-red);
}

.border-head {
    border-left-color: var(--color-purple);
}

.border-reception {
    border-left-color: var(--color-green);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(190, 195, 207, 0.3);
    gap: 15px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

    .user-info h3 {
        margin: 0 0 5px 0;
        color: var(--text-main);
        font-size: 1.2rem;
        font-weight: 700;
        word-break: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }

.card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.role-badge {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
}

.role-admin {
    color: var(--color-red);
    background: rgba(255, 59, 92, 0.1);
}

.role-head {
    color: var(--color-purple);
    background: rgba(155, 89, 182, 0.1);
}

.role-reception {
    color: var(--color-green);
    background: rgba(0, 200, 150, 0.1);
}

.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

/* =========================================
   RWD (MEDIA QUERIES)
   ========================================= */

@media (max-width: 900px) {
    .creation-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 15px !important;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        width: 100% !important;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .neu-btn-small {
        width: 100%;
        justify-content: center;
        padding: 15px;
    }

    .neu-table-container {
        padding: 10px;
        margin: 0 -10px;
        width: 100%;
        border-radius: 20px;
        display: block;
    }

    .neu-card-form {
        padding: 20px !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .full-width {
        grid-column: span 1 !important;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .neu-btn {
        width: 100%;
    }

    .buildings-list {
        flex-direction: column; /* Zamiast grid-template-columns: 1fr; */
    }

    /* Nadpisanie z AdminUsers (zamiana grid 1fr 1fr na pojedynczą kolumnę) */
    .compact-form-card .form-row {
        grid-template-columns: 1fr;
    }
    .building-item {
        flex-basis: auto;
        width: 100%;
    }
    .group-card {
        width: 100%;
    }
}
/* =========================================
   DODATKOWE STYLE - ADMIN TECHNICAL
   ========================================= */

/* Wybór Ikony */
.icon-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 5px;
}

.icon-option {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    background: var(--bg-color);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    transition: all 0.2s ease;
    border: 2px solid transparent;
    color: var(--text-main);
}

    .icon-option:hover {
        transform: translateY(-2px);
    }

    .icon-option.selected {
        box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
        border-color: var(--color-orange);
        color: var(--color-orange);
    }

/* KARTY FIRM TECHNICZNYCH */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.company-card {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    position: relative;
}

    .company-card:hover {
        transform: translateY(-3px);
    }

.company-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.company-emoji {
    font-size: 1.8rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    color: var(--text-main);
}

.company-details h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ROZWIĄZANIE KONFLIKTU: Mały badge tylko wewnątrz karty firmy */
.company-card .building-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(108, 114, 147, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
    box-shadow: none; /* Resetuje duży cień z globalnego stylu */
    min-height: auto;
}

/* PRACOWNICY (CHIPY) */
.employees-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    flex-grow: 1;
    align-content: flex-start;
}

.employee-chip {
    font-size: 0.85rem;
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 10px;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
}

.remove-emp {
    color: var(--color-red);
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.6;
    transition: 0.2s;
}

    .remove-emp:hover {
        opacity: 1;
        transform: scale(1.2);
    }

.add-employee-row {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

/* Mały input dla techników */
.neu-input-small {
    background: var(--bg-color);
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    width: 100%;
}

/* POPRAWKI ELEMENTÓW FORMULARZA */
optgroup {
    font-style: normal;
    font-weight: 700;
    color: var(--text-muted);
}

input.neu-input, select.neu-input {
    width: 100% !important;
    box-sizing: border-box !important;
    display: block;
    min-height: 42px;
    max-width: 100%;
}
/* Układ główny */
.logs-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Prawy panel (Tabela) */
.table-area {
    flex-grow: 1;
    min-width: 0; /* Zabezpieczenie flexboxa przed wylewaniem zawartości */
}

.neu-table-container {
    margin-bottom: 0; /* Nadpisanie marginesu z theme.css pod ten layout */
}

/* Lewy panel (Filtry) */
.filters-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #e0e5ec;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 12px 12px 24px #bec3cf, -12px -12px 24px #ffffff;
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px; /* Przyklejenie panelu podczas przewijania w dół */
}

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

.filter-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c7293;
    margin-left: 5px;
}

.action-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .action-filters .neu-btn-small {
        justify-content: center;
        width: 100%;
        color: #9499b7;
    }

        /* Aktywne stany filtrów */
        .action-filters .neu-btn-small.active {
            color: #3d4468;
            box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
        }

        .action-filters .neu-btn-small.active-create {
            color: #00c896;
            box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
        }

        .action-filters .neu-btn-small.active-update {
            color: #f39c12;
            box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
        }

        .action-filters .neu-btn-small.active-delete {
            color: #ff3b5c;
            box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
        }
        .action-filters .neu-btn-small.active-blue {
            color: var(--color-blue);
            box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
        }

/* Animacja ładowania */
.spin-anim {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* RWD */
@media (max-width: 1100px) {
    .logs-layout {
        flex-direction: column;
    }

    .filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        padding: 20px;
    }

    .table-area {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-area .neu-table-container {
        min-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-area table {
        min-width: 1150px;
    }

    .action-filters {
        flex-direction: row;
        flex-wrap: wrap;
    }

        .action-filters .neu-btn-small {
            width: auto;
            flex: 1;
            min-width: 120px;
        }
}

@media (max-width: 768px) {
    .search-container {
        width: 100%;
    }

        .search-container input {
            width: 100% !important;
        }
}

/* Kolory akcji w tabeli (Matowe, naturalne i żywe kolory - bez efektu plastiku) */
.action-create {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.35); /* Mocniejszy, żywszy kolor */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 200, 150, 0.25); /* Wewnętrzny połysk i zewnętrzna poświata */
    border: 1px solid rgba(0, 200, 150, 0.3); /* Subtelna ramka odcinająca od szarego tła */
}

.action-update {
    color: var(--text-main);
    background: rgba(243, 156, 18, 0.4);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(243, 156, 18, 0.25);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.action-delete {
    color: var(--text-main);
    background: rgba(255, 59, 92, 0.3); /* Czerwony przy 0.3 jest już bardzo intensywny */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(255, 59, 92, 0.25);
    border: 1px solid rgba(255, 59, 92, 0.25);
}

.action-login {
    color: var(--text-main);
    background: rgba(74, 144, 226, 0.35);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(74, 144, 226, 0.25);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

.status-archive {
    color: var(--text-main);
    background: rgba(148, 153, 183, 0.25);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 153, 183, 0.2);
}
.detail-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    padding: 35px;
    background: #e0e5ec;
    border-radius: 30px;
    box-shadow: 25px 25px 50px #bec3cf, -25px -25px 50px #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 9999;
    pointer-events: none;
    animation: popupFadeIn 0.2s ease-out;
}
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.popup-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
}

.popup-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(166, 171, 189, 0.15);
}

    .popup-row:last-child {
        border-bottom: none;
    }

.popup-label {
    font-size: 1rem;
    font-weight: 700;
    color: #7c819d;
    width: 130px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d324f;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.popup-badge {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-right: 8px;
    background: transparent;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(0, 200, 150, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 200, 150, 0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #3d4468;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: none;
}

    .custom-radio input {
        display: none;
    }

.radio-box {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e0e5ec;
    box-shadow: inset 4px 4px 8px #bec3cf, inset -4px -4px 8px #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.custom-radio input:checked + .radio-box {
    background: #4a90e2;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.2), inset -2px -2px 5px rgba(255,255,255,0.2);
}

    .custom-radio input:checked + .radio-box::after {
        content: '';
        width: 8px;
        height: 8px;
        background: white;
        border-radius: 50%;
    }

.neu-btn-large {
    border: none;
    border-radius: 15px;
    padding: 15px 0;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 6px 6px 14px #bec3cf, -6px -6px 14px #ffffff;
    transition: all 0.2s ease;
    background: #e0e5ec;
    color: #3d4468;
}

    .neu-btn-large:hover {
        transform: translateY(-2px);
    }

    .neu-btn-large:active {
        transform: translateY(0);
        box-shadow: inset 3px 3px 6px rgba(0,0,0,0.1), inset -3px -3px 6px rgba(255,255,255,0.5);
    }

    .neu-btn-large:disabled {
        background: #a6abbd;
        color: #fff;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }


.public-wrapper {
    min-height: 100vh;
    width: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

    /* NADPISYWANIE GLOBALNYCH KLAS TYLKO DLA WIDOKU PUBLICZNEGO */
    .public-wrapper .neu-card-form {
        max-width: 1100px !important;
        padding: 40px;
        margin: 0;
    }

    .public-wrapper .form-header {
        display: flex !important;
        flex-direction: column !important; /* Ikona nad tekstem */
        align-items: center !important; /* Wyśrodkowanie w poziomie */
        justify-content: center !important;
        text-align: center !important;
        margin-bottom: 35px;
        padding-bottom: 25px;
        border-bottom: 2px solid rgba(190, 195, 207, 0.3);
        width: 100%;
    }   

        .public-wrapper .form-header h2 {
            width: 100%;
            color: var(--text-main);
            margin: 10px 0 8px 0;
            font-size: 1.8rem;
            font-weight: 800;
        }

        .public-wrapper .form-header p {
            margin-left: auto !important;
            margin-right: auto !important;
            display: block !important;
        }

    .public-wrapper .header-icon {
        margin: 0 0 15px 0 !important; /* Margines tylko na dole, by odsunąć od napisu */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .public-wrapper .form-group label {
        color: var(--text-muted);
        font-weight: 700;
        margin-bottom: 8px;
        display: block;
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .public-wrapper .neu-input {
        padding: 14px 15px !important;
        font-weight: 500;
        resize: none;
        font-family: inherit;
    }

    .public-wrapper .form-row {
        align-items: flex-start;
    }

/* POZOSTAŁE STYLE SPECYFICZNE DLA WIDOKU PUBLICZNEGO */
.neu-card-centered {
    background: var(--bg-color);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 20px 20px 60px var(--shadow-dark), -20px -20px 60px var(--shadow-light);
    text-align: center;
    color: var(--text-main);
    width: 100%;
    max-width: 500px;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px auto;
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.error-icon {
    color: var(--color-red);
}

.success-icon {
    color: var(--color-green);
}

.form-section {
    background: rgba(255, 255, 255, 0.3);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    box-sizing: border-box;
}

.public-wrapper .section-title {
    color: var(--color-blue);
    margin: 0 0 20px 0;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
}

.checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 600;
}

.password-reset-inline {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
}

.password-reset-inline-link {
    margin-left: 0 !important;
    white-space: nowrap;
}

.password-reset-modal-card {
    border-radius: 24px;
}

.password-reset-input {
    position: relative;
    background: #e0e5ec;
    border-radius: 16px;
    box-shadow: inset 5px 5px 10px #bec3cf, inset -5px -5px 10px #ffffff;
    display: flex;
    align-items: center;
    min-height: 58px;
    overflow: hidden;
}

    .password-reset-input input {
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        padding: 16px 16px;
        margin: 0;
        color: #3d4468;
        font-size: 1rem;
        font-weight: 500;
        outline: none;
        box-sizing: border-box;
    }

    .password-reset-input label {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #9499b7;
        font-size: 0.95rem;
        pointer-events: none;
        transition: all 0.2s ease;
    }

    .password-reset-input input:focus + label,
    .password-reset-input input:not(:placeholder-shown) + label {
        top: 6px;
        font-size: 0.72rem;
        color: #4a90e2;
        transform: translateY(0);
        font-weight: 700;
    }

.password-reset-actions {
    display: flex;
    gap: 10px;
}

    .custom-checkbox input {
        display: none;
    }

.checkbox-box {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg-color);
    box-shadow: inset 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-checkbox input:checked + .checkbox-box {
    background: var(--color-green);
}

    .custom-checkbox input:checked + .checkbox-box::after {
        content: '✓';
        color: white;
        font-weight: bold;
    }

.neu-submit-btn, .neu-submit-btn-blue {
    color: white;
    border: none;
    border-radius: 15px;
    padding: 18px 45px;
    font-weight: 800;
    font-size: 1.15rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neu-submit-btn {
    background: var(--color-green);
    box-shadow: 6px 6px 14px rgba(0, 200, 150, 0.3), -6px -6px 14px var(--shadow-light);
}

    .neu-submit-btn:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 20px rgba(0, 200, 150, 0.4);
    }

.neu-submit-btn-blue {
    background: var(--color-blue);
    box-shadow: 6px 6px 14px rgba(74, 144, 226, 0.3), -6px -6px 14px var(--shadow-light);
}

    .neu-submit-btn-blue:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 20px rgba(74, 144, 226, 0.4);
    }

    .neu-submit-btn:disabled, .neu-submit-btn-blue:disabled {
        background: #a6abbd;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes pop {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-anim {
    animation: pop 0.4s ease-out forwards;
}

@media (max-width: 900px) {
    .public-wrapper .form-grid {
        grid-template-columns: 1fr;
    }

    .public-wrapper .full-width {
        grid-column: span 1;
    }

    .public-wrapper .form-row {
        flex-direction: column;
    }
}
.pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.pdf-modal-card {
    background: #e0e5ec;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 20px 20px 60px #bec3cf, -20px -20px 60px #ffffff;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.4);
    animation: slideUp 0.3s ease;
}

.pdf-modal-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #3d4468;
    margin-top: 0;
    margin-bottom: 30px;
}

.pdf-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdf-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .pdf-form-group label {
        font-size: 0.95rem;
        font-weight: 600;
        color: #6c7293;
        margin-left: 10px;
    }

.pdf-modal-input {
    background: #e0e5ec;
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #3d4468;
    outline: none;
    box-shadow: inset 5px 5px 10px #bec3cf, inset -5px -5px 10px #ffffff;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

    .pdf-modal-input:focus {
        box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
    }

.pdf-modal-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.pdf-btn-cancel {
    flex: 1;
    background: #e0e5ec;
    border: none;
    border-radius: 15px;
    padding: 12px 0;
    color: #9499b7;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 6px 6px 14px #bec3cf, -6px -6px 14px #ffffff;
    transition: all 0.2s ease;
}

    .pdf-btn-cancel:hover {
        color: #3d4468;
        transform: translateY(-2px);
    }

.pdf-btn-generate {
    flex: 1;
    background: #e0e5ec;
    border: none;
    border-radius: 15px;
    padding: 12px 0;
    color: #e74c3c;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 6px 6px 14px #bec3cf, -6px -6px 14px #ffffff;
    transition: all 0.2s ease;
}

    .pdf-btn-generate:hover {
        transform: translateY(-2px);
        box-shadow: 8px 8px 18px #bec3cf, -8px -8px 18px #ffffff;
    }

    .pdf-btn-generate:active {
        transform: translateY(0);
        box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
.ticket-edit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .ticket-edit-layout {
        grid-template-columns: 1fr;
    }
}

.chat-messages-area::-webkit-scrollbar {
    width: 8px;
}

.chat-messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages-area::-webkit-scrollbar-thumb {
    background-color: #bec3cf;
    border-radius: 10px;
}

.chat-bubble {
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 85%;
    background: #e0e5ec;
    box-shadow: 6px 6px 14px #bec3cf, -6px -6px 14px #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .chat-bubble.user {
        align-self: flex-start;
        border-bottom-left-radius: 5px;
    }

    .chat-bubble.admin {
        align-self: flex-end;
        border-bottom-right-radius: 5px;
        border: 1px solid rgba(61, 68, 104, 0.2);
    }

.chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(190, 195, 207, 0.4);
    padding-bottom: 5px;
    font-size: 0.85rem;
}

.chat-bubble.user .author {
    color: #6c7293;
    font-weight: 700;
}

.chat-bubble.admin .author {
    color: #3d4468;
    font-weight: 800;
}

.chat-meta .time {
    color: #aab;
    font-size: 0.75rem;
}

.chat-content {
    color: #3d4468;
    line-height: 1.5;
    font-size: 0.95rem;
    word-wrap: break-word;
}



@keyframes pulse-dark {
    0% {
        box-shadow: 0 0 0 0 rgba(61, 68, 104, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(61, 68, 104, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(61, 68, 104, 0);
    }
}

/* Dodatkowe kolory filtrów statusów */
.action-filters .neu-btn-small.active-new {
    color: #4338ca;
    box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
}

.action-filters .neu-btn-small.active-inprogress {
    color: #d97706;
    box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
}

.action-filters .neu-btn-small.active-waiting {
    color: #0284c7;
    box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
}

.action-filters .neu-btn-small.active-resolved {
    color: #15803d;
    box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
}
/* Kropka dla dużych kafelków (Admin/Klient) */
.notification-dot {
    position: absolute;
    top: 20px; /* Odstęp od górnej krawędzi kafelka */
    right: 20px; /* Odstęp od prawej krawędzi kafelka */
    width: 18px; /* Delikatnie powiększona */
    height: 18px;
    background-color: #ff3b5c;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 59, 92, 0.6);
    animation: pulse-red 2s infinite;
    border: 2px solid #e0e5ec;
}

/* Kropka dla małego przycisku (Recepcja) */
.notification-dot-small {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background-color: #ff3b5c;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 59, 92, 0.6);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(255, 59, 92, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0);
    }
}
/* ==========================================================================
   1. BAZA I BLOKADA EKRANU (Anti-Scroll)
   ========================================================================== */
* {
    box-sizing: border-box;
}

.ex-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e0e5ec;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden !important;
    touch-action: none !important; /* Blokada przeciągania całego ekranu */
}

.ex-modal-content {
    width: 100vw;
    height: 100vh;
    padding: clamp(10px, 3vh, 30px);
    background: #e0e5ec;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Zmieniono z center na flex-start  */
    align-items: center;
    overflow: hidden !important;
}

.ex-step-container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Zmieniono z space-evenly na flex-start  */
    align-items: center;
    padding-top: clamp(20px, 6vh, 90px);
    gap: clamp(15px, 4vh, 40px); /* Zapewnia stałe odstępy między elementami  */
    height: auto;
    min-height: 100%;
}

/* ==========================================================================
   2. TYPOGRAFIA & OPTYMALIZACJA DOTYKU
   ========================================================================== */
.ex-admin-card, .ex-employee-card, .ex-exit-card,
.ex-neu-btn-small, .ex-custom-select, .ex-custom-option, .ex-clear-sig-btn {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

    .ex-admin-card:active, .ex-employee-card:active, .ex-exit-card:active, .ex-neu-btn-small:active {
        transition: none !important;
    }

.ex-step-title {
    text-align: center;
    color: #3d4468;
    font-weight: 800;
    font-size: clamp(1.8rem, 4.5vh, 2.5rem);
    margin: 0;
}

/* ==========================================================================
   3. GŁÓWNE KAFELKI (Menu & Kategorie)
   ========================================================================== */
.ex-selection-grid {
    display: flex;
    justify-content: center;
    gap: clamp(15px, 3vw, 30px);
    width: 100%;
    max-width: 900px;
    flex: 1;
    max-height: 40vh;
}

.ex-category-grid {
    display: grid !important; /* Wymusza siatkę zamiast flexboxa z .ex-selection-grid */
    grid-template-columns: repeat(2, 1fr); /* Dokładnie 2 równe kolumny */
    gap: clamp(5px, 3vw, 30px);
    width: 100%;
    max-width: 800px; /* Kontroluje maksymalną szerokość siatki */
    /* Jeśli masz dużo firm technicznych i kafelki wychodzą za ekran, odblokuj poniższe: */
    /* max-height: 50vh; */
    /* overflow-y: auto; */
    /* padding: 10px; */
    max-height: none !important;
}

    .ex-category-grid .ex-admin-card {
        width: 100%;
        max-width: none;
        /* ZMIENIONO: Zwiększono min-height (było 140px, jest 165px) żeby były wyższe */
        min-height: clamp(200px, 18vh, 260px) !important;
        /* DODANO: Delikatnie większy padding od góry i dołu, żeby zawartość oddychała */
        padding: clamp(20px, 3vh, 35px) 15px !important;
        height: auto;
    }

.ex-category-step .ex-nav-button-container {
    margin-top: 20px !important;
}

.ex-admin-card {
    background: #e0e5ec;
    border-radius: clamp(15px, 3vh, 30px);
    padding: clamp(15px, 2.5vh, 30px) 15px;
    box-shadow: 12px 12px 24px #bec3cf, -12px -12px 24px #ffffff;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
    flex: 1;
    min-width: 150px;
    max-width: 400px;
    height: 100%;
    min-height: 0; /* Skalowanie w pionie */
}

    .ex-admin-card:active {
        transform: scale(0.97);
        box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    }

    .ex-admin-card h3 {
        font-size: clamp(1.1rem, 2.5vh, 1.6rem);
        font-weight: 800;
        color: #3d4468;
        margin: clamp(5px, 1vh, 10px) 0 0 0;
        text-align: center;
    }

    .ex-admin-card p {
        font-size: clamp(0.8rem, 1.8vh, 1.1rem);
        color: #9499b7;
        margin: 5px 0 0 0;
        text-align: center;
    }

.ex-admin-icon {
    /* Rozmiar koła */
    width: clamp(50px, 10vh, 80px);
    height: clamp(50px, 10vh, 80px);
    border-radius: 50%;
    /* Centrowanie */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Neumorfizm */
    background: #e0e5ec;
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    margin-bottom: 10px;
    flex-shrink: 0; /* Ważne: zapobiega zgniataniu koła */
    overflow: hidden;
}

    .ex-admin-icon svg {
        /* Zamiast paddingu w rodzicu, kontrolujemy rozmiar tutaj */
        width: 65%;
        height: 65%;
        /* Upewniamy się, że kolor jest dziedziczony */
        stroke: currentColor;
        fill: none; /* Większość Twoich ikon to stroke (obramowanie) */

        display: block;
        pointer-events: none;
    }
/* Kolory dla ikon kafelków */
.ex-icon-green {
    color: #00c896;
    background: rgba(0, 200, 150, 0.1);
}

.ex-icon-red {
    color: #ff3b5c;
    background: rgba(255, 59, 92, 0.1);
}

.ex-icon-purple {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
}

.ex-icon-blue {
    color: #4a90e2;
    background: rgba(74, 144, 226, 0.1);
}

.ex-qr-scan-wrapper {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.ex-qr-step .ex-form-container {
    max-width: 920px;
    justify-content: flex-start;
}

.ex-qr-form {
    align-items: center;
    gap: 14px;
}

.ex-qr-hint {
    margin: 0;
    color: #6c7293;
    font-size: clamp(1rem, 2.1vh, 1.2rem);
    font-weight: 700;
    text-align: center;
}

.ex-qr-meta {
    color: #9499b7;
    font-weight: 600;
    font-size: clamp(0.9rem, 1.8vh, 1rem);
    text-align: center;
}

.ex-qr-meta strong {
    color: #3d4468;
}

.ex-qr-error {
    margin-top: 6px;
    margin-bottom: 0 !important;
    max-width: 780px;
}

.ex-qr-scan-camera-shell {
    width: 100%;
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    padding: 16px;
    position: relative;
}

.ex-qr-video {
    width: 100%;
    height: clamp(300px, 42vh, 460px);
    border-radius: 14px;
    background: #000;
    object-fit: cover;
}

.ex-qr-scan-frame {
    position: absolute;
    left: 50%;
    top: 50%;
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.22);
    pointer-events: none;
}

.ex-qr-scan-status {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    max-width: calc(100% - 40px);
    pointer-events: none;
}

/* ==========================================================================
   4. FORMULARZE, INPUTY I SELECTY
   ========================================================================== */
.ex-form-container {
    width: 100%;
    max-width: 800px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ex-form-group {
    margin-bottom: clamp(10px, 2vh, 20px);
}

    .ex-form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 700;
        color: #7c819d;
        font-size: clamp(1.2rem, 2.5vh, 1.6rem);
        margin-left: 10px;
    }

.ex-neu-input, .ex-custom-select {
    width: 100%;
    padding: clamp(12px, 2.5vh, 20px);
    border-radius: clamp(15px, 2.5vh, 25px);
    border: none;
    background: #e0e5ec;
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    font-size: clamp(1.2rem, 2.5vh, 1.8rem);
    color: #3d4468;
    outline: none;
}

.ex-capitalize-input {
    text-transform: capitalize;
}

.ex-custom-select {
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ex-dropdown-wrapper {
    position: relative;
}

.ex-custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #e0e5ec;
    border-radius: 20px;
    box-shadow: 10px 10px 20px #bec3cf, -10px -10px 20px #ffffff;
    z-index: 100;
    max-height: 30vh;
    overflow-y: auto;
    margin-top: 5px;
}

.ex-custom-option {
    padding: clamp(10px, 2vh, 15px) 20px;
    font-size: clamp(1.1rem, 2vh, 1.6rem);
    color: #3d4468;
    font-weight: 600;
    border-bottom: 1px solid #d1d9e6;
}

.ex-other-option {
    color: #4a90e2;
    font-style: italic;
}

.ex-option-disabled {
    color: #999;
    cursor: default;
}

.ex-dropdown-spacer {
    height: 30vh;
}

/* ==========================================================================
   5. PRZYCISKI
   ========================================================================== */
.ex-nav-button-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

.ex-flex-between {
    justify-content: space-between;
    gap: 2vw;
}

.ex-neu-btn-small {
    background: #e0e5ec;
    border: none;
    border-radius: clamp(15px, 3vh, 30px);
    padding: clamp(12px, 2.5vh, 20px) clamp(20px, 4vw, 50px);
    color: #3d4468;
    font-weight: 800;
    font-size: clamp(1.1rem, 2.5vh, 1.6rem);
    box-shadow: 8px 8px 16px #bec3cf, -8px -8px 16px #ffffff;
    transition: transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ex-neu-btn-small:active {
        transform: scale(0.95);
        box-shadow: inset 4px 4px 8px #bec3cf, inset -4px -4px 8px #ffffff;
    }

.ex-btn-full {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.ex-text-red {
    color: #ff3b5c;
}

.ex-text-green {
    color: #00c896;
}

.ex-margin-top {
    margin-top: clamp(15px, 3vh, 30px);
}

/* ==========================================================================
   6. RODO (GDPR) BOX
   ========================================================================== */
.ex-gdpr-box {
    width: 100%;
    max-width: 950px;
    padding: clamp(10px, 2vh, 20px);
    background: #e0e5ec;
    border-radius: clamp(10px, 2vh, 20px);
    box-shadow: inset 5px 5px 10px #bec3cf, inset -5px -5px 10px #ffffff;
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 20px);
}

.ex-gdpr-icon {
    font-size: clamp(1.5rem, 4vh, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 8vh, 60px);
    height: clamp(40px, 8vh, 60px);
    border-radius: 50%;
    background: #e0e5ec;
    box-shadow: 4px 4px 8px #bec3cf, -4px -4px 8px #ffffff;
    color: #4a90e2;
    flex-shrink: 0;
}

.ex-gdpr-text {
    flex-grow: 1;
    color: #6c7293;
    font-size: clamp(0.85rem, 1.8vh, 1.1rem);
    line-height: 1.3;
    text-align: center;
    padding-right: clamp(10px, 4vw, 60px);
}

.ex-gdpr-pl {
    margin: 0 0 5px 0;
}

.ex-gdpr-en {
    margin: 0;
    font-size: 0.9em;
}

.ex-gdpr-text strong {
    color: #3d4468;
    white-space: nowrap;
}

/* ==========================================================================
   7. LISTY Z WEWNĘTRZNYM SCROLLEM (Pracownicy i Wyjścia)
   ========================================================================== */
.ex-employee-grid-container, .ex-exit-grid-container {
    width: 100%;
    max-width: 1000px;
    flex: 1;
    min-height: 0;
    overflow-y: auto; /* Jedyne miejsce gdzie dozwolony jest scroll */
    touch-action: pan-y;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.ex-employee-title {
    text-align: center;
    color: #9499b7;
    font-size: clamp(1.2rem, 2.5vh, 1.5rem);
    margin: 0 0 15px 0;
}

.ex-employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: clamp(10px, 2vw, 20px);
}

.ex-employee-card {
    background: #e0e5ec;
    border-radius: 15px;
    padding: 10px;
    border: none;
    box-shadow: 6px 6px 12px #bec3cf, -6px -6px 12px #ffffff;
    font-size: clamp(1rem, 2vh, 1.3rem);
    font-weight: 700;
    color: #3d4468;
    text-align: center;
    min-height: clamp(80px, 12vh, 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
}

    .ex-employee-card:active {
        transform: scale(0.95);
        box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
        color: #4a90e2;
    }

.ex-exit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(15px, 2vw, 20px);
}

.ex-exit-card {
    background: #e0e5ec;
    border-radius: 20px; /* Delikatnie mniejsze zaokrąglenie, by pasowało do reszty */
    padding: clamp(10px, 2vh, 20px);
    box-shadow: 6px 6px 12px #bec3cf, -6px -6px 12px #ffffff; /* Złagodzony cień, identyczny jak w .ex-employee-card */
    display: flex;
    align-items: center;
    gap: 20px;
}

    .ex-exit-card:active {
        transform: scale(0.98);
        box-shadow: inset 5px 5px 10px #bec3cf, inset -5px -5px 10px #ffffff;
    }

.ex-card-time {
    font-size: clamp(1.5rem, 3vh, 2rem);
    font-weight: 800;
    color: #ff3b5c;
    background: rgba(255, 59, 92, 0.1);
    padding: 10px;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
}

.ex-card-name {
    font-size: clamp(1.2rem, 2.5vh, 1.6rem);
    font-weight: 700;
    color: #3d4468;
}

.ex-card-target {
    font-size: clamp(0.9rem, 1.8vh, 1.2rem);
    color: #9499b7;
    margin-top: 2px;
}

.ex-empty-state {
    text-align: center;
    font-size: clamp(1.2rem, 3vh, 1.8rem);
    color: #9499b7;
    margin: auto;
}

.ex-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* ==========================================================================
   8. PODPIS (Signature Pad)
   ========================================================================== */
.ex-signature-info {
    text-align: center;
    color: #3d4468;
    font-size: clamp(1.4rem, 3vh, 1.8rem);
    margin: 0 0 clamp(10px, 2vh, 20px) 0;
}

    .ex-signature-info span {
        font-size: 0.8em;
        color: #9499b7;
    }

.ex-sig-wrapper {
    background: #e0e5ec;
    border-radius: clamp(15px, 3vh, 30px);
    height: clamp(200px, 40vh, 350px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    position: relative;
    width: 100%;
}

.ex-signature-pad {
    width: 100%;
    height: 100%;
}

.ex-clear-sig-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #e0e5ec;
    color: #ff3b5c;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 5px 5px 10px #bec3cf, -5px -5px 10px #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ==========================================================================
   9. PIN KLAWIATURA I GENERATOR
   ========================================================================== */
.ex-pin-generated-wrapper {
    text-align: center;
    max-width: 600px;
}

.ex-success-icon {
    font-size: clamp(3rem, 8vh, 5rem);
    margin-bottom: 2vh;
}

.ex-success-title {
    color: #00c896;
    font-size: clamp(1.8rem, 4vh, 2.5rem);
    margin: 0 0 2vh 0;
}

.ex-success-subtitle {
    color: #3d4468;
    font-size: clamp(1.1rem, 2.5vh, 1.4rem);
    margin-bottom: 3vh;
    line-height: 1.4;
}

.ex-pin-display-box {
    background: #e0e5ec;
    padding: clamp(10px, 2vh, 20px);
    border-radius: 20px;
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    display: inline-block;
    margin-bottom: 4vh;
}

.ex-pin-number {
    font-size: clamp(2.5rem, 6vh, 4rem);
    font-weight: 800;
    color: #3d4468;
    font-family: monospace;
    letter-spacing: 10px;
}

.ex-pin-layout {
    display: flex;
    gap: clamp(20px, 4vw, 40px);
    align-items: center;
    max-width: 900px;
    width: 100%;
    flex: 1;
}

.ex-pin-info-box {
    flex: 1;
    background: #e0e5ec;
    padding: clamp(15px, 3vh, 30px);
    border-radius: 20px;
    box-shadow: 8px 8px 16px #bec3cf, -8px -8px 16px #ffffff;
}

.ex-pin-icon {
    font-size: clamp(2rem, 5vh, 2.5rem);
    margin-bottom: 10px;
    color: #4a90e2;
}

.ex-pin-info-box h4 {
    color: #3d4468;
    font-size: clamp(1.1rem, 2.5vh, 1.3rem);
    margin: 0 0 5px 0;
}

.ex-pin-info-box p {
    color: #6c7293;
    font-size: clamp(0.9rem, 2vh, 1rem);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.ex-pin-keypad-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ex-keypad-title {
    margin-bottom: 2vh;
}

.ex-pin-input-wrapper {
    margin-bottom: 2vh;
    width: 100%;
    max-width: 300px;
}

.ex-pin-input {
    width: 100%;
    text-align: center;
    font-size: clamp(1.8rem, 4vh, 2.2rem);
    padding: clamp(8px, 1.5vh, 10px);
    border-radius: 15px;
    border: none;
    background: #e0e5ec;
    box-shadow: inset 4px 4px 8px #bec3cf, -4px -4px 8px #ffffff;
    color: #3d4468;
    letter-spacing: 15px;
}

.ex-keypad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(8px, 1.5vh, 15px);
    margin-bottom: 2vh;
    width: 100%;
    max-width: 300px;
}

.ex-keypad-btn {
    padding: clamp(10px, 2vh, 15px) 0;
    font-size: clamp(1.2rem, 3vh, 1.5rem);
    border-radius: 15px;
}

/* ==========================================================================
   10. POTWIERDZENIA I BŁĘDY
   ========================================================================== */
.ex-confirm-box {
    text-align: center;
    max-width: 600px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: clamp(10px, 2vh, 18px) 0;
}

.ex-confirm-icon {
    font-size: clamp(3rem, 8vh, 5rem);
    margin-bottom: 2vh;
}

.ex-confirm-layout {
    margin: auto;
    width: 100%;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 2vh, 20px);
}

.ex-confirm-icon-wrap {
    width: clamp(90px, 14vh, 140px);
    height: clamp(90px, 14vh, 140px);
    margin: 0 auto clamp(12px, 2vh, 20px) auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b59b6;
}

.ex-confirm-icon-svg {
    width: 100%;
    height: 100%;
}

.ex-confirm-name {
    color: #3d4468;
    margin: 0 0 1vh 0;
    font-size: clamp(1.5rem, 4vh, 2.5rem);
}

.ex-confirm-target {
    color: #9499b7;
    font-size: clamp(1.2rem, 3vh, 1.5rem);
    margin: 0 0 4vh 0;
}

.ex-confirm-text {
    color: #3d4468;
    font-size: clamp(1rem, 2.5vh, 1.2rem);
    margin-bottom: 3vh;
}

.ex-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: clamp(6px, 1.5vh, 14px);
    flex-wrap: nowrap;
    flex-direction: column;
    align-items: center;
}

.ex-confirm-actions .ex-neu-btn-small {
    min-width: min(280px, 100%);
}

.ex-confirm-actions .ex-confirm-btn {
    order: 1;
}

.ex-confirm-actions .ex-cancel-btn {
    order: 2;
}

.ex-error-message {
    color: #ff3b5c;
    font-size: clamp(1.1rem, 2.5vh, 1.4rem);
    font-weight: 800;
    text-align: center;
    margin-top: 2vh;
    /* DODANO: Solidny odstęp od dołu, żeby odepchnąć przyciski */
    margin-bottom: clamp(15px, 2.5vh, 25px) !important;
    padding: clamp(8px, 1.5vh, 10px);
    background: rgba(255, 59, 92, 0.1);
    border-radius: 15px;
    border: 2px solid #ff3b5c;
    width: 100%;
}

.ex-success-toast {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3200;
    background: linear-gradient(145deg, rgba(0, 200, 150, 0.18), rgba(0, 200, 150, 0.10));
    border: 1px solid rgba(0, 200, 150, 0.45);
    color: #0e6d55;
    font-weight: 800;
    font-size: clamp(1rem, 2.2vh, 1.25rem);
    letter-spacing: 0.2px;
    padding: 14px 22px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(61, 68, 104, 0.2), 6px 6px 12px #bec3cf, -6px -6px 12px #ffffff;
    backdrop-filter: blur(2px);
    text-align: center;
    max-width: min(92vw, 760px);
    animation: ex-toast-in 180ms ease-out;
}

@keyframes ex-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -8px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.ex-small-error {
    margin-top: 5px;
    font-size: clamp(0.9rem, 2vh, 1.2rem);
    padding: 5px;
}

.ex-main-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
}

    /* Jeśli chcesz dodatkowo zwiększyć odstępy między tytułem a kafelkami */
    .ex-main-step .ex-selection-grid {
        margin-top: 20px;
    }

.ex-category-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
}

.ex-data-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
    /* Zmniejszamy główną lukę między tytułem (Klucz/Gość) a resztą */
    gap: clamp(10px, 2vh, 20px) !important;
}

    .ex-data-step .ex-form-container {
        /* To jest kluczowe! Wyłącza centrowanie, które "odpychało" pola w dół od tytułu */
        justify-content: flex-start !important;
    }

    /* Zmniejszenie luki dla napisu "Wybierz nazwisko / Select name" i siatki przycisków */
    .ex-data-step .ex-employee-title {
        margin: 10px 0 15px 0 !important; /* Nadpisuje domyślne marginesy */
    }

.ex-signature-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
    /* Utrzymuje napis blisko danych użytkownika */
    gap: clamp(5px, 1.5vh, 15px) !important;
}

.ex-sig-form {
    /* Formularz odkleja się od środka i rośnie do samego dołu */
    justify-content: flex-start !important;
    flex: 1 !important; /* KLUCZOWE: zmusza cały formularz do zajęcia 100% wolnego miejsca */
    display: flex;
    flex-direction: column;
}

.ex-signature-step .ex-signature-info {
    margin-bottom: clamp(5px, 1vh, 10px) !important;
}

.ex-sig-expanded {
    /* Ustawiamy sztywną, zgrabną wysokość - np. 300px (lub użyj clamp jeśli wolisz) */
    height: 300px !important;
    /* WYŁĄCZAMY rozciąganie na cały wolny ekran */
    flex: none !important;
    width: 100%;
    max-width: 800px; /* Opcjonalnie, żeby panel nie był też zbyt szeroki na dużym tablecie */
    margin: 0 auto clamp(20px, 4vh, 40px) auto; /* Wyśrodkowanie i odepchnięcie przycisków na dole */
    display: flex;
}

    /* Wymusza na komponencie SignaturePad pełne pokrycie nowej, wielkiej ramki */
    .ex-signature-pad, .ex-sig-expanded canvas {
        width: 100% !important;
        height: 100% !important;
        flex: 1;
    }


/* =========================================
   EKRAN 3b: WYGENEROWANY PIN (DZIĘKUJEMY)
   ========================================= */
.ex-pin-generated-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
}

/* =========================================
   EKRAN 6: POTWIERDZENIE WYJŚCIA
   ========================================= */
.ex-confirm-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
    /* Maksymalnie zmniejsza odstęp między tytułem a całą resztą poniżej */
    gap: clamp(10px, 2vh, 20px) !important;
}

    .ex-confirm-step .ex-confirm-box {
        justify-content: center !important;
    }

    .ex-confirm-step .ex-confirm-icon {
        /* Delikatny margines, żeby ikona nie "przykleiła" się całkowicie do tytułu */
        margin-top: 10px;
    }

.ex-sig-wrapper button:not(.ex-clear-sig-btn) {
    display: none !important;
}

/* Wymuszamy pełną wysokość dla płótna podpisu */
.ex-sig-wrapper .ex-signature-pad > div {
    height: 100% !important;
}

/* Na wszelki wypadek całkowicie wyłączamy wyświetlanie domyślnej stopki komponentu SignaturePad */
.ex-sig-wrapper .signature-pad--footer {
    display: none !important;
}
.ex-exit-list-step {
    padding-top: clamp(24px, 7vh, 100px) !important;
    /* Delikatnie przybliża kafelki z pracownikami do tytułu "Wybierz z listy" */
    gap: clamp(10px, 2vh, 20px) !important;
}

    /* Opcjonalnie: upewniamy się, że siatka z listą nie "wisi" w powietrzu */
    .ex-exit-list-step .ex-exit-grid-container {
        justify-content: flex-start !important;
    }


.ex-sig-wrapper canvas {
    border: none !important;
    outline: none !important;
    touch-action: none !important;
}
/* WŁASNA KLAWIATURA EKRANOWA */
.ex-keyboard-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 800px;
    margin: 20px auto 0 auto;
    padding: 20px;
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: 8px 8px 16px #bec3cf, -8px -8px 16px #ffffff;
}

.ex-kb-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ex-kb-key {
    padding: 15px 0 !important;
    font-size: 1.2rem !important;
    flex: 1;
    min-width: 45px;
    max-width: 60px;
    margin: 0 !important;
}

.ex-kb-space {
    flex: 5;
    max-width: 400px;
    font-size: 1.1rem !important;
    color: #4a90e2;
}

.ex-kb-action {
    font-weight: bold;
    font-size: 1.3rem !important;
    max-width: 80px;
}
.ex-kb-key-pressed {
    background: #4a90e2 !important;
    color: #ffffff !important;
    transform: scale(0.90) !important;
    box-shadow: inset 6px 6px 12px rgba(0,0,0,0.3), inset -6px -6px 12px rgba(255,255,255,0.2) !important;
}
.ex-data-step .ex-form-container {
    position: relative;
}

/* 2. Wyciągamy błąd "w powietrze" (identycznie jak w podpisie) */
.ex-data-step .ex-error-message {
    position: absolute;
    bottom: clamp(55px, 8vh, 75px); /* Pozycjonujemy go tuż nad przyciskami Wróć/Dalej */
    left: 50%;
    transform: translateX(-50%); /* Idealne wyśrodkowanie */
    width: 95%; /* Żeby ładnie wypełniał szerokość nad przyciskami */
    margin: 0 !important;
    z-index: 100; /* Upewniamy się, że przykryje klawiaturę, a nie schowa się pod nią */
    /* Dodajemy mocne tło i cień, żeby był mega czytelny, gdy przykryje inne elementy */
    background: #ffe6e9 !important;
    box-shadow: 0px 8px 16px rgba(255, 59, 92, 0.25);
}
.ex-sig-form {
    position: relative !important;
}

/* Wymuszone lewitowanie błędu */
.ex-signature-step .ex-error-message {
    position: absolute !important;
    bottom: clamp(60px, 10vh, 85px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    margin: 0 !important;
    z-index: 1000 !important; /* Zwiększamy z-index dla pewności */

    background: #ffe6e9 !important;
    box-shadow: 0px 8px 16px rgba(255, 59, 92, 0.25) !important;
}

.neumorphism-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e0e5ec;
    color: #3d4468;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow-y: auto;
    animation: pageFadeIn 0.8s ease-out forwards;
    opacity: 0;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.preloader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(224, 229, 236, 0.6); /* Półprzezroczyste tło */
    backdrop-filter: blur(8px); /* Efekt rozmycia tła pod spodem */
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pageFadeIn 0.3s ease-out forwards;
    transform: translateZ(0);
    backdrop-filter: blur(5px); /* Redukcja z 8px do 5px - drastyczny wzrost FPS w Chrome */
    -webkit-backdrop-filter: blur(5px);
}

.preloader-content {
    background: #e0e5ec;
    padding: 50px 60px;
    border-radius: 40px;
    box-shadow: 20px 20px 60px #bec3cf, -20px -20px 60px #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateZ(0);
}

.preloader-logo {
    width: 300px;
    max-width: 100%;
    margin-bottom: 40px;
    animation: pulseLogo 1.5s infinite alternate;
}

.preloader-spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid #bec3cf;
    border-top: 5px solid #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

.preloader-text {
    color: #3d4468;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 0.85;
    }

    100% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* =========================================
       3. KASKADOWE ANIMACJE (KARTY INFORMACYJNE)
       ========================================= */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0; /* Zaczynają jako niewidoczne */
    animation: slideInRight 0.6s ease-out forwards;
}

    /* Opóźnienia dla kolejnych elementów na liście */
    .feature-item:nth-child(1) {
        animation-delay: 0.2s;
    }

    .feature-item:nth-child(2) {
        animation-delay: 0.4s;
    }

    .feature-item:nth-child(3) {
        animation-delay: 0.6s;
    }

    .feature-item:nth-child(4) {
        animation-delay: 0.8s;
    }


.login-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

.login-split-container {
    width: 100%;
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.login-card {
    background: #e0e5ec;
    border-radius: 40px;
    padding: 40px 35px;
    box-shadow: 20px 20px 60px #bec3cf, -20px -20px 60px #ffffff;
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    width: 100%;
    transform: translateZ(0); /* Izolacja karty na GPU */
    box-shadow: 15px 15px 45px #bec3cf, -15px -15px 45px #ffffff; /* Lżejszy blur */
}

.info-card {
    background: transparent;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .info-card h2 {
        color: #3d4468;
        font-size: 2.2rem;
        font-weight: 800;
        margin-top: 0;
        margin-bottom: 15px;
        line-height: 1.2;
    }

.highlight-blue {
    color: #4a90e2;
}

.info-card p.lead {
    font-size: 1.1rem;
    color: #6c7293;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 500;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #e0e5ec;
    box-shadow: 6px 6px 12px #bec3cf, -6px -6px 12px #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

    .feature-text strong {
        color: #3d4468;
        font-size: 1.1rem;
        margin-bottom: 3px;
    }

    .feature-text span {
        color: #9499b7;
        font-size: 0.9rem;
    }

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.brand-logo {
    display: block;
    margin: 0 auto;
    width: 400px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-card .neu-input {
    position: relative;
    background: #e0e5ec;
    border-radius: 20px;
    box-shadow: inset 6px 6px 12px #bec3cf, inset -6px -6px 12px #ffffff;
    display: flex;
    align-items: center;
    height: 65px;
    transition: all 0.3s ease;
    overflow: hidden;
}

    .login-card .neu-input:focus-within {
        box-shadow: inset 3px 3px 6px #bec3cf, inset -3px -3px 6px #ffffff;
    }

    .login-card .neu-input input {
        width: 100%;
        height: 100%;
        background: transparent;
        border: none;
        padding: 15px 50px 15px 60px;
        margin: 0;
        color: #3d4468;
        font-size: 1.1rem;
        font-weight: 500;
        outline: none;
        box-sizing: border-box;
        line-height: normal;
        border-radius: 20px;
    }

        .login-card .neu-input input:-webkit-autofill,
        .login-card .neu-input input:-webkit-autofill:hover,
        .login-card .neu-input input:-webkit-autofill:focus,
        .login-card .neu-input input:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 1000px #fffdf2 inset !important;
            -webkit-text-fill-color: #3d4468 !important;
            border-radius: 20px;
            border: none !important;
        }

    .login-card .neu-input label {
        position: absolute;
        left: 60px;
        top: 50%;
        transform: translateY(-50%);
        color: #9499b7;
        font-size: 1rem;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 1;
    }

    .login-card .neu-input input:focus + label,
    .login-card .neu-input input:not(:placeholder-shown) + label {
        top: 2px;
        font-size: 0.75rem;
        color: #4a90e2;
        transform: translateY(0);
        font-weight: 700;
    }

.login-card .input-icon {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 24px;
    display: flex;
    align-items: center;
    color: #9499b7;
    pointer-events: none;
}

.login-card .password-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9499b7;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    outline: none;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
}

    .login-card .password-toggle:hover {
        color: #4a90e2;
    }

.neu-button {
    width: 100%;
    background: #e0e5ec;
    border: none;
    border-radius: 20px;
    padding: 20px;
    color: #4a90e2;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 8px 8px 20px #bec3cf, -8px -8px 20px #ffffff;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    letter-spacing: 1px;
}

    .neu-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 12px 12px 25px #bec3cf, -12px -12px 25px #ffffff;
    }

    .neu-button:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: inset 4px 4px 10px #bec3cf, inset -4px -4px 10px #ffffff;
    }

    .neu-button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.error-text {
    color: #ff3b5c;
    font-size: 0.85rem;
    margin-top: 8px;
    margin-left: 20px;
    display: block;
    font-weight: 600;
}

.landing-footer {
    text-align: center;
    padding: 30px 20px;
    color: #9499b7;
    font-size: 1rem;
    font-weight: 600;
    border-top: 1px solid rgba(190, 195, 207, 0.3);
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .login-split-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .info-card {
        text-align: center;
        padding: 0;
    }

    .feature-item {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .login-main-content {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .login-card {
        padding: 40px 25px;
    }

    .neu-input input {
        font-size: 1rem;
    }
}

.anim-element {
    opacity: 0;
    transition: transform 2.2s ease-out, opacity 2.2s ease-out;
    /* will-change już jest, ale dodajemy izolację GPU */
    will-change: opacity, transform;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Wyjątek: Pierwsza sekcja (Hero) ładuje się trochę szybciej (1.2s),
           aby użytkownik nie musiał czekać na pojawienie się strony po jej załadowaniu */
.snap-section:nth-child(1) .anim-element {
    transition-duration: 1.2s;
}

/* Kierunki początkowe - odległość ustawiona na 40px, aby przy wolnym czasie (2.2s)
           ruch był widoczny i bardzo płynny, przypominający "płynięcie" */
.anim-fade-up {
    transform: translate3d(0, 40px, 0);
}

.anim-slide-left {
    transform: translate3d(-40px, 0, 0);
}

.anim-slide-right {
    transform: translate3d(40px, 0, 0);
}

.anim-scale {
    transform: scale(0.92) translate3d(0, 0, 0);
}

.anim-element.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* Stan po najechaniu skrollem (aktywacja przez JS) */
.anim-element.is-visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* ZNACZNIE wolniejsze, kaskadowe opóźnienia.
           Kolejne elementy czekają wyraźnie dłużej, zanim zaczną "płynąć" */
.delay-100 {
    transition-delay: 0.2s;
}

.delay-200 {
    transition-delay: 0.4s;
}

.delay-300 {
    transition-delay: 0.6s;
}

.delay-400 {
    transition-delay: 0.8s;
}

.delay-500 {
    transition-delay: 1.0s;
}
/* =========================================================================
           1. USTAWIENIA SCROLL SNAPPINGU I RESZTA STYLÓW
           ========================================================================= */
.final-logo-wrapper {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.final-logo-img {
    width: 400px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(4px 4px 10px rgba(0,0,0,0.1));
}

:root {
    --bg-color: #e0e5ec;
    --text-main: #3d4468;
    --text-muted: #6c7293;
    --shadow-dark: #bec3cf;
    --shadow-light: #ffffff;
    --color-blue: #4a90e2;
    --color-green: #00c896;
    --color-purple: #9b59b6;
    --color-orange: #ff9f43;
    --color-red: #ff3b5c;
}

body {
    margin: 0;
}

.snap-container {
    height: 100vh;
    width: 100vw;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    background: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .snap-container::-webkit-scrollbar {
        display: none;
    }

.snap-section {
    height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.footer-section {
    justify-content: space-between;
}

.highlight-blue {
    color: var(--color-blue);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    gap: 5px;
    animation: bounce 2s infinite;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* =========================================================================
           2. EKRAN HERO (EKRAN 1)
           ========================================================================= */
.main-content-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1700px;
    width: 100%;
    margin: auto;
    padding: 0 60px;
    box-sizing: border-box;
    align-items: center;
    flex-grow: 1;
}

.hero-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-title {
    font-size: 4.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 45px;
    max-width: 650px;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    margin-bottom: 50px;
}

.neu-btn-primary {
    display: flex;
    align-items: center;
    background: var(--color-blue);
    border: none;
    border-radius: 20px;
    padding: 22px 50px;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 8px 8px 18px rgba(74, 144, 226, 0.4), -8px -8px 18px #ffffff;
    transition: all 0.3s ease;
}

    .neu-btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 12px 12px 24px rgba(74, 144, 226, 0.5), -6px -6px 12px #ffffff;
    }

.trusted-section {
    color: #9499b7;
    font-weight: 600;
    font-size: 1rem;
}

    .trusted-section p {
        margin-bottom: 15px;
    }

.trusted-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.neu-badge {
    background: var(--bg-color);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.features-column {
    width: 100%;
}

.features-grid-huge {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.card-wrapper {
    position: relative;
    height: 260px;
    width: 100%;
    z-index: 1;
}

    .card-wrapper:hover {
        z-index: 10;
    }

.feature-card-interactive {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    border-radius: 30px;
    padding: 35px;
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    min-height: 260px;
    box-sizing: border-box;
    transform: translateZ(0);
    box-shadow: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
}

.feature-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    margin-bottom: 20px;
}

.feature-card-interactive h3 {
    margin: 0 0 10px 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
}

.card-swap-area {
    position: relative;
    width: 100%;
    flex-grow: 1;
}

.feature-short-desc {
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    font-size: 1rem;
    max-height: 100px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}

.card-hidden-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease;
}

.detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .detail-list li {
        font-size: 0.95rem;
        color: var(--text-main);
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.feature-card-interactive:hover {
    box-shadow: 20px 20px 50px rgba(190, 195, 207, 0.8), -20px -20px 50px var(--shadow-light);
    transform: translateY(-5px);
}

    .feature-card-interactive:hover .feature-short-desc {
        max-height: 0;
        opacity: 0;
    }

    .feature-card-interactive:hover .card-hidden-details {
        max-height: 250px;
        opacity: 1;
        margin-top: 10px;
    }

/* =========================================================================
           3. EKRANY 2, 3, 4 (SEKCJE INFORMACYJNE)
           ========================================================================= */
.screen-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1500px;
    width: 100%;
    margin: auto;
    padding: 0 60px;
    box-sizing: border-box;
    align-items: center;
}

.row-reverse {
    direction: rtl;
}

    .row-reverse > * {
        direction: ltr;
    }

.text-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    color: var(--text-main);
}

.section-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.feature-bullet-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

    .feature-bullet-list li {
        display: flex;
        flex-direction: column;
        gap: 5px;
        font-size: 1rem;
        color: var(--text-muted);
        line-height: 1.5;
        position: relative;
        padding-left: 30px;
    }

        .feature-bullet-list li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 6px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--bg-color);
            box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
            border: 2px solid var(--color-blue);
        }

        .feature-bullet-list li strong {
            color: var(--text-main);
            font-size: 1.15rem;
            font-weight: 700;
        }

.graphic-content {
    transform: translateZ(0);
}

@keyframes floatY {
    0%, 100% {
        transform: translate3d(0, 0px, 0);
    }

    50% {
        transform: translate3d(0, -15px, 0);
    }
}

/* --- MOCKUP 1: SZEROKI TABLET (Kiosk PIN) --- */
.wide-tablet {
    width: 600px;
    height: 380px;
    background: var(--bg-color);
    border-radius: 40px;
    box-shadow: 25px 25px 50px var(--shadow-dark), -25px -25px 50px var(--shadow-light);
    border: 12px solid #ced4df;
    padding: 20px;
    box-sizing: border-box;
    animation: floatY 6s ease-in-out infinite;
}

.tablet-screen {
    background: var(--bg-color);
    border-radius: 20px;
    width: 100%;
    height: 100%;
    box-shadow: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
    overflow: hidden;
}

.mockup-split-layout {
    display: flex;
    gap: 25px;
    padding: 25px;
    height: 100%;
    box-sizing: border-box;
    align-items: center;
}

.mockup-info-panel {
    flex: 1.2;
    background: var(--bg-color);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

.mockup-icon-info {
    font-size: 2.2rem;
    color: var(--color-blue);
    margin-bottom: 10px;
}

.mockup-info-panel h4 {
    margin: 0 0 10px 0;
    color: var(--text-main);
    font-size: 1.1rem;
}

.mockup-info-panel p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.mockup-pin-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .mockup-pin-panel h4 {
        margin: 0 0 15px 0;
        color: var(--text-main);
        font-size: 1.2rem;
    }

.mockup-pin-display {
    width: 100%;
    height: 45px;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 10px;
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.mockup-pin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.m-btn {
    background: var(--bg-color);
    border-radius: 10px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.1rem;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}

.m-red {
    color: var(--color-red);
}

.m-green {
    color: var(--color-green);
}


/* --- MOCKUP 2: KARTY (Awizacje) --- */
.mockup-cards-stack {
    position: relative;
    width: 400px;
    height: 400px;
    animation: floatY 5s ease-in-out infinite;
}

.mockup-card {
    position: absolute;
    background: var(--bg-color);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 20px 20px 40px var(--shadow-dark), -20px -20px 40px var(--shadow-light);
}

.bottom-card {
    top: 60px;
    left: 40px;
    width: 300px;
    height: 280px;
    opacity: 0.8;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.top-card {
    top: 20px;
    left: 0;
    width: 340px;
    height: 250px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mc-header {
    display: flex;
    gap: 8px;
}

.mc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2);
}

.mc-link-box {
    background: var(--bg-color);
    padding: 12px;
    border-radius: 12px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-line {
    height: 12px;
    border-radius: 6px;
    background: rgba(190,195,207,0.4);
}

.w-full {
    width: 100%;
}

.w-half {
    width: 60%;
}

.mc-btn {
    background: var(--color-green);
    padding: 12px;
    border-radius: 12px;
    color: white;
    text-align: center;
    font-weight: 700;
    margin-top: auto;
    box-shadow: 4px 4px 10px rgba(0,200,150,0.3);
}

.mc-pdf-icon {
    width: 70px;
    height: 70px;
    background: #e0e5ec;
    border-radius: 15px;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #ff3b5c;
    font-size: 1.5rem;
}

/* --- MOCKUP 3: CZAT (Helpdesk) --- */
.mockup-chat {
    width: 400px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: floatY 4.5s ease-in-out infinite reverse;
}

.chat-bubble {
    padding: 20px;
    border-radius: 20px;
    max-width: 80%;
    background: var(--bg-color);
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
}

    .chat-bubble.left {
        align-self: flex-start;
        border-bottom-left-radius: 5px;
    }

    .chat-bubble.right {
        align-self: flex-end;
        border-bottom-right-radius: 5px;
        border: 1px solid rgba(255,255,255,0.4);
    }

.chat-author {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.chat-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
}

.chat-input-box {
    width: 100%;
    height: 55px;
    border-radius: 25px;
    background: var(--bg-color);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    color: #aab;
    font-size: 0.9rem;
    justify-content: space-between;
    margin-top: 10px;
}

.chat-send {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 4px 4px 8px rgba(74,144,226,0.4);
}


/* =========================================================================
           4. EKRAN KOŃCOWY (CTA I FOOTER)
           ========================================================================= */
.centered-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.final-cta-buttons {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.neu-btn-secondary {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: none;
    border-radius: 20px;
    padding: 22px 40px;
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 8px 8px 18px var(--shadow-dark), -8px -8px 18px var(--shadow-light);
    transition: all 0.3s ease;
    text-decoration: none;
}

    .neu-btn-secondary:hover {
        transform: translateY(-3px);
        box-shadow: 12px 12px 24px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
        color: var(--color-blue);
    }

.landing-footer {
    width: 100%;
    border-top: 1px solid rgba(190, 195, 207, 0.4);
    padding: 30px 60px;
    box-sizing: border-box;
}

.footer-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copy p {
    margin: 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-text {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-color);
    padding: 10px 20px;
    border-radius: 12px;
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    color: var(--color-blue);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
}

    .contact-badge:hover {
        box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    }


/* =========================================================================
           5. MEDIA QUERIES (RESPONSYWNOŚĆ)
           ========================================================================= */
@media (max-width: 1400px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .section-title {
        font-size: 2.8rem;
    }

    .main-content-row, .screen-content {
        padding: 0 40px;
        gap: 40px;
    }
}

@media (max-width: 1100px) {
    body {
        overflow: auto;
    }

    .snap-container {
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain; /* Pomaga stabilizować scroll-snap w Chrome */
    }

    .snap-section {
        height: auto;
        min-height: 100vh;
        padding: 80px 20px;
    }

    .main-content-row, .screen-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .row-reverse {
        direction: ltr;
    }

    .hero-column, .text-content {
        align-items: center;
    }

    .hero-title,
    .hero-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .feature-bullet-list li {
        text-align: left;
    }

    .trusted-badges, .final-cta-buttons {
        justify-content: center;
    }

    .scroll-indicator {
        display: none;
    }

    .graphic-content {
        margin-top: 40px;
    }

    .wide-tablet,
    .mockup-cards-stack,
    .mockup-chat {
        display: none;
    }

    .final-cta-buttons {
        margin-top: 10px;
        margin-bottom: 40px;
    }
}

@media (max-width: 650px) {
    .features-grid-huge {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .wide-tablet {
        width: 100%;
        max-width: 350px;
        height: auto;
        padding: 10px;
    }

    .mockup-split-layout {
        flex-direction: column;
        padding: 15px;
    }

    .mockup-cards-stack {
        width: 100%;
        max-width: 350px;
    }

    .mockup-chat {
        width: 100%;
        max-width: 350px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .final-logo-wrapper {
        margin-bottom: 30px;
    }

    .final-logo-img {
        width: 200px;
    }
}

@media (max-width: 430px) {
    html,
    body {
        overscroll-behavior-y: none;
    }

    body {
        overflow-x: hidden;
    }

    .page-wrapper,
    .public-wrapper,
    .neumorphism-wrapper,
    .snap-section {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .main-content-row,
    .screen-content,
    .login-main-content {
        padding-left: 0;
        padding-right: 0;
        gap: 22px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle,
    .section-desc {
        font-size: 1rem;
        line-height: 1.5;
    }

    .login-card {
        max-width: 100%;
        border-radius: 24px;
        padding: 24px 16px;
    }

    .brand-logo,
    .final-logo-img {
        width: min(240px, 70vw);
    }

    .info-card h2 {
        font-size: 1.6rem;
    }

    .info-card p.lead {
        font-size: 0.95rem;
        margin-bottom: 22px;
    }

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

    .login-card .neu-input {
        height: 56px;
    }

    .login-card .neu-input input {
        font-size: 16px;
        padding: 14px 46px 14px 52px;
    }

    .login-card .neu-input label {
        left: 52px;
        font-size: 0.9rem;
    }

    .login-card .input-icon {
        left: 14px;
    }

    .password-reset-inline {
        font-size: 0.78rem !important;
    }

    .password-reset-inline-link {
        font-size: 0.78rem !important;
    }

    .password-reset-actions {
        flex-direction: column;
    }

    .neu-button,
    .neu-btn,
    .neu-btn-small,
    .neu-btn-large,
    .neu-btn-primary {
        min-height: 46px;
        font-size: 0.95rem;
    }

    .neu-btn-icon {
        width: 34px;
        height: 34px;
        margin-right: 4px;
    }

    .admin-grid,
    .dashboard-grid,
    .cards-grid,
    .tech-grid,
    .creation-wrapper,
    .ticket-edit-layout {
        grid-template-columns: 1fr !important;
        gap: 14px;
        justify-items: center;
    }

    .admin-card,
    .user-card,
    .company-card {
        width: 100%;
        max-width: 420px;
    }

    .admin-card p,
    .admin-card h3 {
        text-align: center;
    }

    .neu-table-container {
        padding: 10px;
        border-radius: 18px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .neu-table,
    table {
        min-width: 860px;
    }

    .table-area,
    .neu-table-container {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .logs-layout .table-area,
    .logs-layout .neu-table-container {
        width: 100%;
        margin: 0 auto;
        background: var(--bg-color);
        border: 1px solid rgba(255, 255, 255, 0.55);
        box-shadow: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
        border-radius: 20px;
        background-clip: padding-box;
    }

    .table-area table,
    .neu-table-container table {
        table-layout: auto !important;
        min-width: 980px;
        margin: 0 auto;
    }

    .logs-layout .table-area table,
    .logs-layout .neu-table-container table {
        min-width: 1100px;
        background: transparent;
    }

    .table-area th,
    .table-area td,
    .neu-table-container th,
    .neu-table-container td {
        min-width: 130px;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }

    .logs-layout .status-badge,
    .logs-layout .role-badge {
        white-space: nowrap;
    }

    .logs-layout .neu-table-container thead,
    .logs-layout .neu-table-container tbody,
    .logs-layout .neu-table-container tr,
    .logs-layout .neu-table-container th,
    .logs-layout .neu-table-container td {
        background: transparent !important;
    }

    .logs-layout .pagination-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .command-center-arrow {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .logs-layout {
        gap: 14px;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
    }

    .header-container .back-btn {
        width: 36px;
        height: 36px;
    }

    .main-title,
    .section-title,
    .card-title,
    .page-wrapper h1 {
        font-size: 1.25rem !important;
        line-height: 1.25;
    }

    .page-wrapper p,
    .form-label,
    .text-muted,
    .item-details span,
    .feature-text span {
        font-size: 0.86rem;
        line-height: 1.4;
    }

    .neu-card,
    .neu-card-compact,
    .compact-form-card,
    .company-card,
    .user-card,
    .group-card,
    .building-item {
        border-radius: 16px;
        padding: 14px;
    }

    .creation-wrapper,
    .groups-container,
    .buildings-list,
    .employees-list {
        gap: 12px;
    }

    .form-row,
    .add-employee-row,
    .admin-add-row,
    .item-actions-footer,
    .action-buttons,
    .card-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .user-info h3,
    .company-details h3,
    .group-title {
        font-size: 1rem;
    }

    .role-badge,
    .status-badge,
    .count-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .neu-input,
    .neu-input-small,
    .search-input,
    .date-picker,
    .building-selector,
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .building-badge {
        padding: 6px 10px;
        min-height: 32px;
        font-size: 0.82rem;
    }

    .chat-floating-container {
        width: calc(100vw - 20px);
        right: 10px;
        bottom: 10px;
    }

    .chat-window {
        width: 100% !important;
        max-height: 70dvh;
    }

    .chat-messages-area {
        max-height: 45dvh;
    }

    .landing-footer,
    .footer-container,
    .footer-contact,
    .final-contact-panel {
        text-align: center;
        justify-content: center;
    }

    .landing-footer {
        padding: 18px 10px;
        font-size: 0.84rem;
    }

    .filters-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        padding: 14px;
        border-radius: 18px;
    }

    .action-filters {
        gap: 8px;
    }

    .action-filters .neu-btn-small {
        width: 100%;
        justify-content: center;
    }

    .modal-card,
    .pdf-modal-card {
        width: 95vw !important;
        max-height: 88dvh;
        overflow-y: auto;
        border-radius: 18px;
        padding: 18px !important;
    }

    .modal-card input[type="date"],
    .modal-card input[type="time"],
    .modal-card select,
    .modal-card textarea,
    .modal-card .neu-input,
    .modal-card .neu-input-small,
    .pdf-modal-card input,
    .pdf-modal-card select,
    .pdf-modal-card textarea,
    .public-wrapper textarea.neu-input,
    .public-wrapper select.neu-input {
        min-height: 46px;
        padding: 10px 12px !important;
        border-radius: 12px;
        font-size: 0.95rem !important;
    }

    .page-wrapper select,
    .page-wrapper select.neu-input,
    .modal-card select,
    .public-wrapper select,
    .public-wrapper select.neu-input,
    .neu-select-arrow,
    .ex-custom-select {
        border: 1.5px solid rgba(122, 134, 168, 0.45) !important;
        box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light) !important;
    }

    .page-wrapper select:focus,
    .page-wrapper select.neu-input:focus,
    .modal-card select:focus,
    .public-wrapper select:focus,
    .public-wrapper select.neu-input:focus,
    .neu-select-arrow:focus,
    .ex-custom-select:focus {
        border-color: rgba(74, 144, 226, 0.75) !important;
    }

    .modal-card .form-group {
        margin-bottom: 12px;
    }

    .header-actions .neu-btn-small,
    .header-actions form,
    .header-actions form .neu-btn-small {
        width: 100%;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .public-wrapper textarea.neu-input {
        min-height: 120px;
        resize: vertical;
    }

    .public-wrapper .avization-textarea {
        min-height: 120px !important;
        height: auto !important;
        line-height: 1.4;
    }

    .public-wrapper input[type="date"],
    .public-wrapper input[type="time"],
    .public-wrapper select.neu-input {
        min-height: 46px;
        padding: 10px 12px !important;
        border-radius: 12px;
        box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    }

    .modal-overlay,
    .pdf-modal-overlay {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .modal-overlay > div,
    .pdf-modal-overlay > div {
        margin-top: max(10px, env(safe-area-inset-top));
        margin-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .neu-card-form {
        max-width: 100% !important;
        padding: 16px !important;
        border-radius: 16px;
    }

    .form-actions {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .form-actions .neu-btn,
    .form-actions .neu-btn-small,
    .form-actions .neu-btn-large,
    .form-actions button {
        width: 100%;
        justify-content: center;
    }

    .modal-card [style*="display: flex"],
    .modal-card [style*="display:flex"] {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-card [style*="flex: 1"],
    .modal-card [style*="flex:1"] {
        flex: 1 1 100% !important;
    }

    [style*="width: 70px"],
    [style*="width:70px"],
    [style*="width: 60px"],
    [style*="width:60px"],
    [style*="height: 70px"],
    [style*="height:70px"],
    [style*="height: 60px"],
    [style*="height:60px"] {
        width: 56px !important;
        height: 56px !important;
    }

    .scroll-indicator {
        display: none;
    }

    .ex-step-title {
        font-size: 1.45rem;
    }

    .ex-form-container,
    .ex-nav-button-container,
    .ex-selection-grid,
    .ex-category-grid {
        width: 100%;
        max-width: 100%;
    }

    .ex-selection-grid {
        flex-direction: column;
        max-height: none;
    }

    .ex-category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ex-neu-input,
    .ex-custom-select,
    .ex-neu-btn-small,
    .ex-clear-sig-btn {
        font-size: 1rem;
        min-height: 44px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* KONTENER */
.chat-floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2001;
    cursor: default;
}

/* OKNO CZATU */
.chat-window {
    width: 500px;
    height: 600px;
    background: #e0e5ec;
    border-radius: 30px;
    box-shadow: 10px 10px 30px #bec3cf, -10px -10px 30px #ffffff;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: slideIn 0.3s ease-out;
    z-index: 2002;
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* NAGŁÓWEK */
.chat-header {
    background: #e0e5ec;
    padding: 20px;
    border-bottom: 2px solid rgba(190, 195, 207, 0.3);
    font-weight: 700;
    color: #3d4468;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LISTA WIADOMOŚCI */
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.95rem;
    word-wrap: break-word;
    box-shadow: 4px 4px 8px #bec3cf, -4px -4px 8px #ffffff;
}

.msg-mine {
    align-self: flex-end;
    background: #4a90e2;
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 4px 4px 10px rgba(74, 144, 226, 0.3);
}

.msg-other {
    align-self: flex-start;
    background: #e0e5ec;
    color: #3d4468;
    border-bottom-left-radius: 4px;
    box-shadow: 5px 5px 10px #bec3cf, -5px -5px 10px #ffffff;
}

.msg-sender {
    font-size: 0.75rem;
    margin-bottom: 3px;
    color: #4a90e2;
    font-weight: 700;
}

.msg-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.7;
    text-align: right;
}

/* INPUT AREA */
.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(190, 195, 207, 0.3);
    display: flex;
    gap: 12px;
    background: #e0e5ec;
}

    .chat-input-area input {
        flex-grow: 1;
        border: none;
        background: #e0e5ec;
        border-radius: 15px;
        padding: 12px;
        box-shadow: inset 4px 4px 8px #bec3cf, inset -4px -4px 8px #ffffff;
        outline: none;
        color: #3d4468;
    }

/* PRZYCISK TOGGLE */
.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e0e5ec;
    color: #4a90e2;
    border: none;
    box-shadow: 8px 8px 16px #bec3cf, -8px -8px 16px #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2002;
}

    .chat-toggle-btn:hover {
        transform: scale(1.05);
        box-shadow: 10px 10px 20px #bec3cf, -10px -10px 20px #ffffff;
    }

    .chat-toggle-btn:active {
        box-shadow: inset 4px 4px 8px #bec3cf, inset -4px -4px 8px #ffffff;
    }

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: #ff3b5c;
    border-radius: 50%;
    border: 3px solid #e0e5ec;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 59, 92, 0);
    }

    100% {
        transform: scale(0.9);
    }
}

.app-page-transition {
    animation: dashboardFadeIn 0.8s ease-out forwards;
    opacity: 0; /* Zapobiega mignięciu surowego HTML zanim animacja ruszy */
}

@keyframes dashboardFadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* =========================================
   STATUSY ZGŁOSZEŃ (TICKETS) - GLASSMORPHISM
   ========================================= */
.status-new {
    color: var(--text-main);
    background: rgba(67, 56, 202, 0.35); /* Indygowy #4338ca */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(67, 56, 202, 0.25);
    border: 1px solid rgba(67, 56, 202, 0.3);
}

.status-inprogress {
    color: var(--text-main);
    background: rgba(217, 119, 6, 0.35); /* Bursztynowy #d97706 */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(217, 119, 6, 0.25);
    border: 1px solid rgba(217, 119, 6, 0.3);
}

.status-waiting {
    color: var(--text-main);
    background: rgba(2, 132, 199, 0.35); /* Niebieski #0284c7 */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(2, 132, 199, 0.3);
}

.status-resolved {
    color: var(--text-main);
    background: rgba(21, 128, 61, 0.35); /* Ciemnozielony #15803d */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(21, 128, 61, 0.25);
    border: 1px solid rgba(21, 128, 61, 0.3);
}

/* =========================================
   PRIORYTETY ZGŁOSZEŃ (TICKETS) - GLASSMORPHISM
   ========================================= */
.priority-low {
    color: var(--text-main);
    background: rgba(22, 163, 74, 0.35); /* Zielony #16a34a */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(22, 163, 74, 0.25);
    border: 1px solid rgba(22, 163, 74, 0.3);
}

.priority-normal {
    color: var(--text-main);
    background: rgba(2, 132, 199, 0.35); /* Niebieski #0284c7 */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(2, 132, 199, 0.25);
    border: 1px solid rgba(2, 132, 199, 0.3);
}

.priority-high {
    color: var(--text-main);
    background: rgba(234, 88, 12, 0.35); /* Pomarańczowy #ea580c */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(234, 88, 12, 0.25);
    border: 1px solid rgba(234, 88, 12, 0.3);
}

.priority-critical {
    color: var(--text-main);
    background: rgba(220, 38, 38, 0.35); /* Czerwony #dc2626 */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.status-default {
    color: var(--text-main);
    background: rgba(108, 114, 147, 0.25); /* Szary #6c7293 */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(108, 114, 147, 0.2);
}

.role-badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.role-admin {
    color: var(--text-main);
    background: rgba(255, 59, 92, 0.2); /* Czerwony */
}

.role-head {
    color: var(--text-main);
    background: rgba(155, 89, 182, 0.2); /* Fioletowy */
}

.role-client {
    color: var(--text-main);
    background: rgba(243, 156, 18, 0.2); /* Pomarańczowy - NOWY KOLOR ADO */
}

.role-reception {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.2); /* Zielony */
}

/* Kolorowe paski na krawędziach kart użytkowników */
.border-admin {
    border-left-color: var(--color-red);
}

.border-client {
    border-left-color: var(--color-orange);
}

.border-head {
    border-left-color: var(--color-purple);
}

.border-reception {
    border-left-color: var(--color-green);
}

.status-active {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.35);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 200, 150, 0.25);
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.status-year-round {
    color: var(--text-main);
    background: rgba(243, 156, 18, 0.4);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(243, 156, 18, 0.25);
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-archive {
    color: var(--text-main);
    background: rgba(148, 153, 183, 0.25);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(148, 153, 183, 0.2);
}

/* =========================================
   PPOŻ / ASYSTA (AWIZACJE) - EFEKT SZKŁA
   ========================================= */
.badge-yes {
    color: var(--text-main);
    background: rgba(255, 59, 92, 0.3);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(255, 59, 92, 0.25);
    border: 1px solid rgba(255, 59, 92, 0.25);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-no {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.35);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 200, 150, 0.25);
    border: 1px solid rgba(0, 200, 150, 0.3);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* =========================================
   TYP PODMIOTU (NAJEMCY / PODWYKONAWCY) - EFEKT SZKŁA
   ========================================= */
.badge-tenant {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.35);
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 200, 150, 0.25);
    border: 1px solid rgba(0, 200, 150, 0.3);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-subcontractor {
    color: var(--text-main);
    background: rgba(0, 180, 255, 0.35); /* Wodny błękit */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 180, 255, 0.25);
    border: 1px solid rgba(0, 180, 255, 0.3);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-employee {
    color: var(--text-main);
    background: rgba(0, 200, 150, 0.35); /* Zielony */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 200, 150, 0.25);
    border: 1px solid rgba(0, 200, 150, 0.3);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.badge-standard {
    color: var(--text-main);
    background: rgba(0, 180, 255, 0.35); /* Wodny błękit */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.7), 0 3px 8px rgba(0, 180, 255, 0.25);
    border: 1px solid rgba(0, 180, 255, 0.3);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.action-create {
    color: var(--text-main);
    background: rgba(38, 222, 129, 0.45); /* Czysta, jasna "wiosenna" zieleń */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(38, 222, 129, 0.35);
    border: 1px solid rgba(38, 222, 129, 0.6);
}

.action-update {
    color: var(--text-main);
    background: rgba(255, 159, 67, 0.45); /* Słoneczny, jaskrawy pomarańcz */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(255, 159, 67, 0.35);
    border: 1px solid rgba(255, 159, 67, 0.6);
}

.action-delete {
    color: var(--text-main);
    background: rgba(255, 71, 87, 0.45); /* Żywa, jasna (koralowa) czerwień */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(255, 71, 87, 0.35);
    border: 1px solid rgba(255, 71, 87, 0.6);
}

.action-login {
    color: var(--text-main);
    background: rgba(74, 144, 226, 0.45); /* Lazurowy niebieski */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(74, 144, 226, 0.35);
    border: 1px solid rgba(74, 144, 226, 0.6);
}

/* =========================================
   STATUSY AWIZACJI I PARKINGU - EFEKT SZKŁA
   ========================================= */
.status-active {
    color: var(--text-main);
    background: rgba(38, 222, 129, 0.45); /* Taki sam jak action-create */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(38, 222, 129, 0.35);
    border: 1px solid rgba(38, 222, 129, 0.6);
}

.status-year-round {
    color: var(--text-main);
    background: rgba(255, 159, 67, 0.45); /* Taki sam jak action-update */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 10px rgba(255, 159, 67, 0.35);
    border: 1px solid rgba(255, 159, 67, 0.6);
}

.status-archive {
    color: var(--text-main);
    background: rgba(165, 177, 194, 0.35); /* Czysty, jasny perłowy-szary (zamiast brudnego fioletu) */
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.8), 0 3px 8px rgba(165, 177, 194, 0.2);
    border: 1px solid rgba(165, 177, 194, 0.4);
}

.data-hl-box {
    display: inline-block;
    padding: 2px 10px 2px 12px;
    font-weight: 700;
    color: var(--text-main);
    border-radius: 0 8px 8px 0;
    background-repeat: no-repeat;
    background-clip: padding-box; /* Obcina tło równo z paddingiem */
    background-size: calc(100% + 5px) 100%;
}

/* 1. Niebieski (Domyślny akcent) */
.data-hl-blue {
    border-left: 4px solid var(--color-blue);
    background: linear-gradient(90deg, rgba(74, 144, 226, 0.15) 0%, transparent 100%);
}

/* 2. Fioletowy (Administracja/Szefostwo) */
.data-hl-purple {
    border-left: 4px solid var(--color-purple);
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.15) 0%, transparent 100%);
}

/* 3. Zielony (Pozytywny / Recepcja / Gotowe) */
.data-hl-green {
    border-left: 4px solid var(--color-green);
    background: linear-gradient(90deg, rgba(0, 200, 150, 0.15) 0%, transparent 100%);
}

/* 4. Czerwony (Błędy / Odrzucone / Krytyczne) */
.data-hl-red {
    border-left: 4px solid var(--color-red);
    background: linear-gradient(90deg, rgba(255, 59, 92, 0.15) 0%, transparent 100%);
}

/* 5. Pomarańczowy (Klienci / W toku / Ostrzeżenia) */
.data-hl-orange {
    border-left: 4px solid var(--color-orange);
    background: linear-gradient(90deg, rgba(255, 159, 67, 0.15) 0%, transparent 100%);
}

/* 6. Żółty / Złoty (Czekające / Specjalne) */
.data-hl-yellow {
    border-left: 4px solid #eab308;
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.15) 0%, transparent 100%);
}

/* 7. Morski / Turkusowy (Techniczne / Informacyjne) */
.data-hl-teal {
    border-left: 4px solid #2b7a78;
    background: linear-gradient(90deg, rgba(43, 122, 120, 0.15) 0%, rgba(43, 122, 120, 0) 100%);
}
/* =========================================================================
   ANIMACJE "CINEMATIC REVEAL" (PERFEKCYJNIE PŁYNNE DLA FIREFOXA)
   ========================================================================= */
.anim-element {
    opacity: 0;
    /* Zamiast przesuwania z boku, element jest delikatnie pomniejszony (95%) */
    transform: scale(0.95);
    /* Płynne przejście tylko dla opacity i skali - to kosztuje przeglądarkę 0 CPU */
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.snap-section:nth-child(1) .anim-element {
    transition-duration: 1s;
}

/* Kiedy element pojawia się na ekranie, wyostrza się i wraca do 100% wielkości */
.anim-element.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Usuwamy klasy odpowiedzialne za przesuwanie - nie będą już wywoływać ruchu, 
   elementy użyją domyślnego "kinowego" pojawiania się powyżej */
.anim-fade-up, .anim-slide-left, .anim-slide-right, .anim-scale {
    /* Puste, nadpisane przez domyślny .anim-element */
}

/* Opóźnienia */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* =========================================================================
   LEWITACJA OBIEKTÓW (Bez obciążania GPU Firefoxa)
   ========================================================================= */
@keyframes floatY {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}
/* =========================================================================
   NOWE ELEMENTY LANDING PAGE (SEKCJE 2, 3, 4) - WYPEŁNIENIE PUSTKI
   ========================================================================= */

/* Wypukłe listy funkcji zamiast zwykłych kropek */
.neu-feature-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.neu-feature-item {
    background: var(--bg-color);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 10px 10px 20px var(--shadow-dark), -10px -10px 20px var(--shadow-light);
    display: flex;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease;
}

    .neu-feature-item:hover {
        transform: translateX(10px);
    }

.neu-feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--bg-color);
    box-shadow: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.neu-feature-text h4 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 800;
}

.neu-feature-text p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Lewitujące, szklane plakietki dookoła grafik (Glassmorphism) */
.floating-glass-badge {
    position: absolute;
    background: rgba(224, 229, 236, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 12px 12px 24px rgba(190, 195, 207, 0.5), -12px -12px 24px rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--text-main);
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    /* Usunięto animację floatY */
}

/* Wymuszenie zatrzymania pływania głównych grafik */
.wide-tablet, .mockup-cards-stack, .mockup-chat {
    animation: none !important;
}

.graphic-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}