/* --- GLOBALNE USTAWIENIA I EFEKT CRT --- */
body {
    background-color: #050914;
    color: #c4d0eb;
    font-family: 'Orbitron', sans-serif;
    margin: 0;
    padding: 0;
    background-image: radial-gradient(circle at center, #0a1128 0%, #050914 100%);
    min-height: 100vh;
    position: relative;
}

/* Efekt starych monitorów (Scanlines) */
body::after {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 255, 255, 0.06));
    background-size: 100% 3px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    border: 1px solid rgba(0, 210, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.1), inset 0 0 20px rgba(0, 210, 255, 0.05);
    padding: 30px;
    background: rgba(5, 9, 20, 0.85);
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

/* --- TYPOGRAFIA I AKCENTY --- */
h1, h2, h3, h4 { color: #fff; text-transform: uppercase; letter-spacing: 2px; margin-top: 0; text-shadow: 0 0 5px rgba(0, 210, 255, 0.5); }
.neon-text { color: #00d2ff; text-shadow: 0 0 10px #00d2ff, 0 0 20px #00d2ff; }
p { line-height: 1.6; font-family: sans-serif; font-size: 14px; }

/* --- NAWIGACJA GŁÓWNA --- */
.navbar {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: rgba(5, 9, 20, 0.95);
    border-bottom: 2px solid #00d2ff;
    flex-wrap: wrap;
    box-shadow: 0 5px 20px rgba(0, 210, 255, 0.2);
    position: relative;
    z-index: 1;
}
.nav-link {
    color: #8fa5d1; text-decoration: none; font-weight: 700; letter-spacing: 2px; padding: 10px 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); text-transform: uppercase; font-size: 14px;
    border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
    color: #fff; background: rgba(0, 210, 255, 0.1); border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.6), inset 0 0 10px rgba(0, 210, 255, 0.4);
    text-shadow: 0 0 5px #fff;
}

/* --- MENU ZAKŁADEK --- */
.admin-menu, .sub-menu { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.sub-menu { border-bottom: 1px dashed rgba(0, 210, 255, 0.3); padding-bottom: 15px; }
.admin-tab, .sub-tab {
    color: #8fa5d1; text-decoration: none; padding: 8px 16px; font-size: 12px; font-weight: bold;
    transition: 0.3s; text-transform: uppercase; border: 1px solid transparent; position: relative;
}
.admin-tab:hover, .sub-tab:hover { color: #00d2ff; border-color: rgba(0, 210, 255, 0.5); }
.admin-tab.active, .sub-tab.active { background: rgba(0, 210, 255, 0.1); color: #00d2ff; border-color: #00d2ff; box-shadow: 0 0 10px rgba(0, 210, 255, 0.3); }

/* --- ELEMENTY FORMULARZY (Z CYBER ANIMACJĄ) --- */
input, textarea, select {
    width: 100%; background: rgba(0, 210, 255, 0.02); border: 1px solid rgba(0, 210, 255, 0.3); color: #00d2ff;
    padding: 12px 15px; font-family: 'Orbitron', sans-serif; font-size: 14px; margin-bottom: 15px; box-sizing: border-box;
    transition: 0.3s; outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: #00d2ff; background: rgba(0, 210, 255, 0.1); box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

button, .btn, .btn-small {
    background: transparent; color: #00d2ff; border: 1px solid #00d2ff; padding: 12px 25px;
    font-family: 'Orbitron', sans-serif; cursor: pointer; text-transform: uppercase; text-decoration: none;
    transition: all 0.3s ease-in-out; font-weight: bold; font-size: 14px; display: inline-block; position: relative; overflow: hidden;
}
/* Cyberpunk Hover Effect */
button:hover, .btn:hover, .btn-small:hover {
    background: #00d2ff; color: #000; box-shadow: 0 0 10px #00d2ff, 0 0 30px #00d2ff, 0 0 60px #00d2ff;
    transform: scale(1.02); text-shadow: none; border-color: #fff;
}
.btn-small { padding: 6px 12px; font-size: 11px; margin-right: 5px;}
.btn-full { width: 100%; }

/* --- SYSTEM POWIADOMIEŃ (PULSACJA) --- */
@keyframes pulseAlert {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7); transform: scale(1); }
    50% { transform: scale(1.1); }
    70% { box-shadow: 0 0 0 10px rgba(255, 51, 102, 0); transform: scale(1); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); transform: scale(1); }
}
.notify-badge {
    background: #ff3366; color: #fff; padding: 2px 8px; border-radius: 50px; font-size: 11px;
    margin-left: 8px; font-weight: bold; animation: pulseAlert 1.5s infinite;
    text-shadow: none; border: 1px solid #fff; display: inline-block;
}

/* --- KARTY I UKŁAD --- */
.grid-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
@media(max-width: 768px) { .grid-layout { grid-template-columns: 1fr; } }
.panel-section { background: rgba(0, 210, 255, 0.02); padding: 20px; border: 1px solid rgba(0, 210, 255, 0.1); position: relative; }
.panel-section::before { content: ''; position: absolute; top: -1px; left: -1px; width: 20px; height: 20px; border-top: 2px solid #00d2ff; border-left: 2px solid #00d2ff; }
.panel-section::after { content: ''; position: absolute; bottom: -1px; right: -1px; width: 20px; height: 20px; border-bottom: 2px solid #00d2ff; border-right: 2px solid #00d2ff; }

.tasks-container { max-height: 550px; overflow-y: auto; padding-right: 10px; }
.tasks-container::-webkit-scrollbar { width: 4px; }
.tasks-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.5); }
.tasks-container::-webkit-scrollbar-thumb { background: #00d2ff; }

.task-card { background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(0, 210, 255, 0.15); padding: 15px; margin-bottom: 15px; transition: 0.3s; }
.task-card:hover { border-color: #00d2ff; box-shadow: 0 0 15px rgba(0, 210, 255, 0.2); }
.task-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed rgba(0, 210, 255, 0.3); padding-bottom: 10px; margin-bottom: 10px; }
.task-desc { color: #a4b1cd; }
.task-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }

.status-badge { padding: 4px 8px; font-size: 10px; border: 1px solid; font-weight: bold; text-shadow: 0 0 5px currentColor; box-shadow: inset 0 0 5px currentColor;}
.badge-pending { border-color: #00d2ff; color: #00d2ff; }
.badge-done { border-color: #00e676; color: #00e676; }

.header-info { background: rgba(0, 0, 0, 0.6); padding: 15px; border-left: 4px solid #00d2ff; margin-bottom: 20px; border-bottom: 1px solid rgba(0,210,255,0.2); }
.error-box { background: rgba(255, 51, 102, 0.1); border: 1px solid #ff3366; color: #ff3366; padding: 15px; text-align: center; text-shadow: 0 0 5px #ff3366; }
.cyber-line { border: 0; height: 1px; background: #00d2ff; box-shadow: 0 0 10px #00d2ff; margin: 20px 0; }

/* --- KOMUNIKATOR --- */
.chat-layout { display: flex; height: 65vh; border: 1px solid rgba(0, 210, 255, 0.2); background: rgba(0,0,0,0.5); position: relative; }
.chat-sidebar { width: 260px; background: rgba(5, 9, 20, 0.8); border-right: 1px solid rgba(0, 210, 255, 0.2); display: flex; flex-direction: column; }
.chat-sidebar-header { padding: 15px; border-bottom: 1px solid rgba(0, 210, 255, 0.1); font-size: 12px; color: #00d2ff; font-weight: bold; }
.chat-contacts { overflow-y: auto; flex: 1; }
.chat-contact { display: block; padding: 12px 15px; color: #c4d0eb; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.02); font-family: sans-serif; font-size: 14px; transition: 0.2s; position: relative;}
.chat-contact:hover { background: rgba(0, 210, 255, 0.05); color: #00d2ff; }
.chat-contact.active { background: rgba(0, 210, 255, 0.15); border-left: 3px solid #00d2ff; color: #fff; text-shadow: 0 0 5px #00d2ff; }

/* Kropka nieprzeczytanej wiadomości na liście kontaktów */
.unread-dot { display: inline-block; width: 8px; height: 8px; background: #ff3366; border-radius: 50%; box-shadow: 0 0 5px #ff3366; float: right; margin-top: 5px; }

.chat-main { flex: 1; display: flex; flex-direction: column; background: rgba(5, 9, 20, 0.4); }
.chat-history { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 75%; padding: 10px 15px; border-radius: 2px; font-family: sans-serif; font-size: 14px; line-height: 1.5; position: relative;}
.chat-bubble.mine { align-self: flex-end; background: rgba(0, 210, 255, 0.1); border: 1px solid #00d2ff; color: #fff; border-right: 4px solid #00d2ff; }
.chat-bubble.theirs { align-self: flex-start; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #e0e0e0; border-left: 4px solid #00e676; }
.chat-meta { font-size: 10px; color: #8fa5d1; margin-bottom: 4px; display: block; }
.chat-input-area { padding: 15px; border-top: 1px solid rgba(0, 210, 255, 0.2); background: rgba(0,0,0,0.6); display: flex; gap: 10px; }
.chat-input-area input { margin-bottom: 0; flex: 1; border-color: #00d2ff; }
.chat-input-area button { padding: 12px 20px; margin: 0; }
/* --- NIESTANDARDOWY SCROLLBAR DLA CZATU --- */
.chat-history::-webkit-scrollbar { 
    width: 8px; 
}
.chat-history::-webkit-scrollbar-track { 
    background: rgba(0, 0, 0, 0.4); 
    border-radius: 10px; 
    border: 1px solid rgba(0, 210, 255, 0.1);
}
.chat-history::-webkit-scrollbar-thumb { 
    background: rgba(0, 210, 255, 0.6); 
    border-radius: 10px; 
    transition: 0.3s;
}
.chat-history::-webkit-scrollbar-thumb:hover { 
    background: #00d2ff; 
    box-shadow: 0 0 10px #00d2ff; 
}