

/* ==================== TRYB CIEMNY (domyślny) ==================== */
:root {
    --bg-dark: #0a0a1a;
    --bg-card: #14142a;
    --bg-sidebar: #0d0d1f;
    --text: #e0e0e0;
    --text-muted: #888;
    --border: rgba(255, 255, 255, 0.1);
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.05);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
    --modal-overlay: rgba(0, 0, 0, 0.7);
    
    --primary: #6c63ff;
    --accent: #00d4ff;
    --success: #2ed573;
    --warning: #ffa502;
    --danger: #ff4757;


/* ===== ZMIENNE ===== */

     --primary-dark: #4a42d4
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== BACKGROUND ===== */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    perspective: 1000px;
}

.floating-shape {
    position: absolute;
    border: 1px solid rgba(108, 99, 255, 0.2);
    animation: float3d 20s infinite linear;
    opacity: 0.3;
}

.floating-shape:nth-child(1) {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    transform: rotateX(45deg) rotateY(45deg);
}

.floating-shape:nth-child(2) {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    border-radius: 50%;
    border-color: rgba(0, 212, 255, 0.2);
}

.floating-shape:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 30%;
    animation-delay: -10s;
    border-color: rgba(255, 71, 87, 0.2);
}

.floating-shape:nth-child(4) {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 40%;
    animation-delay: -15s;
    border-radius: 20%;
}

.floating-shape:nth-child(5) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 70%;
    animation-delay: -7s;
    border-color: rgba(46, 213, 115, 0.2);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary);
    border-radius: 50%;
    animation: particleFloat 15s infinite;
    opacity: 0.5;
}

/* ===== LOGIN ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.8s ease-out;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(108, 99, 255, 0.1);
}

.login-box:hover {
    transform: translateY(-5px) rotateX(2deg);
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== NEURAL NETWORK ANIMATION ===== */
.neural-network-container {
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
    position: relative;
    perspective: 800px;
}

#neuralCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== LAYOUT ===== */
.dashboard {
    display: none;
    min-height: 100vh;
}

.dashboard.active {
    display: flex;
}

.sidebar {
    width: 280px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    padding: 30px 0 0 0;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    z-index: 100;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 25px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header .user-info {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-header .user-role {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(108, 99, 255, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 5px;
}

.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
    overflow-x: auto;
}

/* ===== SIDEBAR LOGO Z ANIMACJĄ ===== */
.sidebar-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-container canvas {
    flex-shrink: 0;
    /*border-radius: 50%; */
    /*background: rgba(108, 99, 255, 0.05);*/
    /*border: 1px solid rgba(108, 99, 255, 0.2);*/
}

.sidebar-logo-container h2 {
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}


/* ===== NAVIGATION ===== */
.nav-menu {
    list-style: none;
    padding: 20px 15px;
    flex: 1;
    overflow-y: auto;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-menu a .nav-icon {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--text-muted);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select option {
    background: #1a1a2e;
    color: var(--text);
}

.form-group .error-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

.form-group .error-msg.show {
    display: block;
}

/* ===== GLOBALNY STYL DLA OPTION W SELECTACH ===== */
select option {
    background: #1a1a2e !important;
    color: var(--text) !important;
    padding: 8px;
}

select option:hover {
    background: var(--primary) !important;
    color: white !important;
}

.filter-panel select option {
    background: #1a1a2e !important;
    color: var(--text) !important;
}

table select option {
    background: #1a1a2e !important;
    color: var(--text) !important;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 5px 20px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #1db954);
    color: white;
    box-shadow: 0 5px 20px rgba(46, 213, 115, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(46, 213, 115, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e84142);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* ===== COLORS ===== */
.priority-high {
    color: var(--danger);
}

.priority-medium {
    color: var(--warning);
}

.priority-low {
    color: var(--success);
}

/* ==================== RESPONSYWNOŚĆ TABEL ==================== */

/* Kontener tabeli - poziomy pasek przewijania */
.table-container {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
    display: block;
    margin-bottom: 20px;
}

/* Tabela - minimalna szerokość aby się nie ściskała */
.table-container table {
    min-width: 800px;
    width: 100%;
    display: table;
}

/* Tabela uprawnień - szersza */
#permissionsTable {
    min-width: 1000px !important;
}

/* Tabela harmonogramu */
.schedule-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sticky pierwsza kolumna (ID/nazwa) */
.table-container table th:first-child,
.table-container table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg-card);
}

/* Sticky ostatnia kolumna (Akcje) */
.table-container table th:last-child,
.table-container table td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: var(--bg-card);
}

/* Cień na sticky kolumnach dla lepszego wyglądu */
.table-container table th:first-child::after,
.table-container table td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -6px;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to right, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

.table-container table th:last-child::before,
.table-container table td:last-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: -6px;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to left, rgba(0,0,0,0.15), transparent);
    pointer-events: none;
}

/* ==================== RESPONSYWNOŚĆ FILTRÓW ==================== */

/* Panel filtrów - zawijanie na małych ekranach */
.filter-panel > div {
    flex-wrap: wrap !important;
}

.filter-panel select,
.filter-panel input {
    min-width: 150px !important;
    flex: 1 1 150px;
}

/* ==================== RESPONSYWNOŚĆ NAGŁÓWKA TABELI ==================== */

/* Nagłówek tabeli z przyciskami */
.table-header {
    flex-wrap: wrap;
    gap: 10px;
}

.table-header > div {
    flex-wrap: wrap;
    gap: 8px;
}

/* ==================== RESPONSYWNOŚĆ STATYSTYK ==================== */

/* Siatka statystyk - zawijanie na małych ekranach */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px;
}

/* ==================== RESPONSYWNOŚĆ KALENDARZA ==================== */

.calendar-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 320px;
}

/* ==================== RESPONSYWNOŚĆ MODALI ==================== */

@media (max-width: 768px) {
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-row {
        flex-direction: column !important;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .table-header h3 {
        font-size: 1rem;
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */

/* Styl paska przewijania (Chrome, Edge, Safari) */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(108, 99, 255, 0.4);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 99, 255, 0.7);
}

/* ==================== RESPONSYWNOŚĆ HARMONOGRAMU ==================== */

@media (max-width: 1024px) {
    .schedule-grid {
        min-width: 700px;
    }
}

@media (max-width: 768px) {
    .schedule-grid {
        min-width: 600px;
    }

    .schedule-day-header .day-full {
        display: none;
    }

    .schedule-day-header .day-name {
        font-size: 0.75rem;
    }
}

/* ==================== WYŁĄCZENIE ANIMACJI ==================== */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}



/* ==================== TRYB JASNY - PEŁNA DEFINICJA ==================== */
[data-theme="light"] {
    --bg-dark: #f5f5f7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.05);
    --bg-input: rgba(0, 0, 0, 0.03);
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --modal-overlay: rgba(0, 0, 0, 0.5);
}

/* ==================== ELEMENTY SPECJALNE - TRYB JASNY ==================== */
[data-theme="light"] body {
    background: var(--bg-dark);
    color: var(--text);
}

[data-theme="light"] .sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
}

[data-theme="light"] .nav-item a {
    color: var(--text);
}

[data-theme="light"] .nav-item a:hover {
    background: var(--bg-hover);
}

[data-theme="light"] .nav-item a.active {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

[data-theme="light"] .table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

[data-theme="light"] table thead th {
    background: rgba(0, 0, 0, 0.03);
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

[data-theme="light"] table tbody tr {
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px var(--shadow);
}

[data-theme="light"] .modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px var(--shadow-lg);
}

[data-theme="light"] .modal-overlay {
    background: var(--modal-overlay);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

[data-theme="light"] .btn {
    color: var(--text);
}

[data-theme="light"] .filter-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

[data-theme="light"] .notification-bell-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow-lg);
}

[data-theme="light"] .settings-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow-lg);
}

[data-theme="light"] .empty-state {
    color: var(--text-muted);
}

[data-theme="light"] .chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
}

[data-theme="light"] .badge {
    border: 1px solid var(--border);
}

[data-theme="light"] .icon-btn {
    color: var(--text-muted);
}

[data-theme="light"] .icon-btn:hover {
    background: var(--bg-hover);
}

[data-theme="light"] .schedule-cell {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .schedule-cell:hover {
    background: rgba(108, 99, 255, 0.05);
}

[data-theme="light"] .schedule-entry {
    background: rgba(108, 99, 255, 0.1);
    color: var(--text);
}

[data-theme="light"] .timestamp-item {
    border-left-color: var(--border);
}

[data-theme="light"] .password-strength {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .color-option {
    border-color: var(--border);
}

[data-theme="light"] .color-option:hover {
    transform: scale(1.1);
}

[data-theme="light"] .color-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary);
}

/* ==================== NOWOCZESNE KAFELKI NOTATEK (3D) ==================== */
.note-card-modern {
    border-radius: 16px;
    padding: 18px;
    position: relative;
    cursor: grab;
    /* Płynne przejście dla wszystkich właściwości */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Warstwowe cienie dla efektu 3D + delikatne podświetlenie górnej krawędzi */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Delikatny efekt rozmycia tła (glassmorphism) - świetnie wygląda w dark mode */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

/* Efekt po najechaniu myszką (unoszenie się) */
.note-card-modern:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.25),
        0 10px 10px -5px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

/* Efekt podczas przeciągania (Drag & Drop) */
.note-card-modern.dragging {
    opacity: 0.85;
    cursor: grabbing;
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 30px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 0 2px var(--primary); /* Świecąca obwódka w kolorze motywu */
    z-index: 1000;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Dostosowanie przycisków akcji wewnątrz kafelka, aby też wyglądały na "wciśnięte" lub wypukłe */
.note-card-modern .icon-btn {
    transition: all 0.2s ease;
    border-radius: 8px;
}
.note-card-modern .icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* 🆕 Nowa klasa dla ikon w menu ustawień */
.item-icon {
    margin-right: 10px;
    font-size: 1.1rem;
    display: inline-block;
    width: 20px;
    text-align: left;
}

/* ==================== 📢 POWIADOMIENIA SYSTEMOWE (TOAST) ==================== */

/* Kontener na powiadomienia - w prawym górnym rogu, OBOK ikony powiadomień */
.toast-container {
    position: fixed;
    top: 20px;
    right: 120px; /* 🆕 Przesunięcie w lewo aby nie nachodzić na ikonę dzwonka */
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none; /* Pozwala klikać przez kontener */
}

/* Pojedyncze powiadomienie */
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all; /* Powiadomienie można klikać */
    animation: toastSlideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

/* Animacja wejścia */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animacja wyjścia */
@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Ikona powiadomienia */
.toast-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Treść powiadomienia */
.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
}

/* Przycisk zamknięcia */
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* Pasek postępu (auto-znikanie) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==================== KOLORY POWIADOMIEŃ ==================== */

/* Sukces */
.toast.toast-success {
    border-left: 4px solid var(--success);
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.1), var(--bg-card));
}

.toast.toast-success .toast-icon {
    color: var(--success);
}

.toast.toast-success .toast-progress {
    background: var(--success);
}

/* Błąd */
.toast.toast-error {
    border-left: 4px solid var(--danger);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1), var(--bg-card));
}

.toast.toast-error .toast-icon {
    color: var(--danger);
}

.toast.toast-error .toast-progress {
    background: var(--danger);
}

/* Ostrzeżenie */
.toast.toast-warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.1), var(--bg-card));
}

.toast.toast-warning .toast-icon {
    color: var(--warning);
}

.toast.toast-warning .toast-progress {
    background: var(--warning);
}

/* Info */
.toast.toast-info {
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), var(--bg-card));
}

.toast.toast-info .toast-icon {
    color: var(--accent);
}

.toast.toast-info .toast-progress {
    background: var(--accent);
}

/* ==================== RESPONSYWNOŚĆ POWIADOMIEŃ ==================== */
@media (max-width: 768px) {
    .toast-container {
        right: 20px;
        left: 20px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ==================== TRYB JASNY - POWIADOMIENIA ==================== */
[data-theme="light"] .toast {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .toast-success {
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.15), #ffffff);
}

[data-theme="light"] .toast-error {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), #ffffff);
}

[data-theme="light"] .toast-warning {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.15), #ffffff);
}

[data-theme="light"] .toast-info {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), #ffffff);
}

/* ==================== 📱 DASHBOARD MOBILNY ==================== */

/* Ukryj sidebar na mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        padding-bottom: 80px; /* Miejsce na dolny pasek nawigacji */
    }
}

/* Mobile dashboard container */
.mobile-dashboard {
    padding-bottom: 20px;
}

.mobile-header {
    margin-bottom: 20px;
}

.mobile-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.mobile-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile stats grid - 2x2 */
.mobile-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.mobile-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.mobile-stat-card:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px var(--shadow);
}

.mobile-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 12px;
}

.mobile-stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile sections */
.mobile-section {
    margin-bottom: 25px;
}

.mobile-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text);
}

/* Mobile tickets list */
.mobile-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-ticket-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.mobile-ticket-card:active {
    transform: scale(0.98);
    background: var(--bg-hover);
}

.mobile-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.mobile-ticket-id {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.mobile-ticket-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.mobile-ticket-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.4;
}

.mobile-ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mobile-ticket-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile empty state */
.mobile-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.mobile-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ==================== 📱 DOLNY PASEK NAWIGACJI ==================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px var(--shadow-lg);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    min-width: 60px;
}

.mobile-nav-item:active {
    transform: scale(0.9);
}

.mobile-nav-item.active {
    background: rgba(108, 99, 255, 0.1);
}

.mobile-nav-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.mobile-nav-item.active .mobile-nav-icon {
    filter: drop-shadow(0 0 8px var(--primary));
}

.mobile-nav-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-nav-item.active .mobile-nav-label {
    color: var(--primary);
    font-weight: 600;
}

/* Przycisk dodawania (środkowy) */
.mobile-nav-add {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
    justify-content: center;
}

.mobile-nav-add .mobile-nav-icon {
    color: white;
    font-size: 1.8rem;
}

.mobile-nav-add:active {
    transform: scale(0.9);
    box-shadow: 0 2px 10px rgba(108, 99, 255, 0.6);
}

/* Ukryj dolny pasek na desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none;
    }
}

/* ==================== 📱 POPRAWKI RESPONSYWNOŚCI ==================== */
@media (max-width: 768px) {
    /* Powiększ przyciski dla lepszego dotyku */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .btn-small {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    /* Powiększ ikony akcji */
    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Ukryj zbędne elementy na mobile */
    .table-container table th:nth-child(n+6),
    .table-container table td:nth-child(n+6) {
        display: none;
    }
    
    /* Powiększ formularze */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 1rem;
    }
    
    /* Dostosuj modale */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px;
    }
}