* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #101010;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: #e0e0e0;
}

/* Subtle dark background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(40, 40, 40, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(60, 60, 60, 0.3) 0%, transparent 50%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #222, transparent),
        radial-gradient(2px 2px at 40px 70px, #333, transparent),
        radial-gradient(1px 1px at 90px 40px, #444, transparent),
        radial-gradient(1px 1px at 130px 80px, #222, transparent),
        radial-gradient(2px 2px at 160px 30px, #333, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    z-index: -1;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: #181818;
    border: 1px solid #222;
    border-radius: 25px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 0.8s ease-out;
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.title {
    color: #fafafa;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.subtitle {
    color: #bdbdbd;
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: 400;
}

#loginForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
}

.input {
    width: 100%;
    padding: 15px 20px;
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    color: #fafafa;
    font-size: 16px;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #444;
    box-shadow: 0 0 0 3px rgba(60, 60, 60, 0.3);
    background: #181818;
}

.input::placeholder {
    color: #666;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #a82323 0%, #5c1010 100%);
    color: #fafafa;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 35, 35, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background: linear-gradient(135deg, #c93030 0%, #7a1a1a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(168, 35, 35, 0.5);
}

.login-btn:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #a82323 0%, #5c1010 100%);
}

.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #fafafa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Input Focus Effects */
.input-group {
    position: relative;
}

.input-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.input-group:focus-within::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 30px 25px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
    }
}

/* Additional Interactive Elements */
.login-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: #222;
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-box:hover::before {
    opacity: 0.2;
}

/* Security Badge */
.security-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #222;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 8px 16px;
    color: #fafafa;
    font-size: 12px;
    font-weight: 600;
}

/* Enhanced Focus States */
.input:focus + .input-group::after {
    width: 100%;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .login-box {
        border: 2px solid #fafafa;
    }
    
    .input {
        border: 2px solid #fafafa;
    }
    
    .login-btn {
        border: 2px solid #fafafa;
    }
}

.help-text {
    font-size: 0.75rem;     
    color: #bfc7d5;          
    opacity: 0.85;         
    margin-top: 4px;
    letter-spacing: 0.2px;
}

/* --- ZMIANA PRZYCISKÓW NA CIEMNO CZERWONE --- */
.btn-primary, .btn-secondary, .action-btn.primary, .action-btn.secondary, .logout-btn {
    background: linear-gradient(135deg, #a82323 0%, #5c1010 100%);
    color: #fafafa;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 35, 35, 0.3);
}

.btn-primary:hover, .btn-secondary:hover, .action-btn.primary:hover, .action-btn.secondary:hover, .logout-btn:hover {
    background: linear-gradient(135deg, #c93030 0%, #7a1a1a 100%);
    box-shadow: 0 6px 25px rgba(168, 35, 35, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active, .btn-secondary:active, .action-btn.primary:active, .action-btn.secondary:active, .logout-btn:active {
    background: linear-gradient(135deg, #a82323 0%, #5c1010 100%);
}

/* Styl nagłówka i liczby w stat-card */
.stat-card h3 {
    color: #fafafa !important; /* jasny, bez niebieskiego */
}

.stat-card {
    background: #181818;
    border: 1px solid #222;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    border-color: #a82323 !important; /* ciemno czerwony na hover */
    box-shadow: 0 6px 25px rgba(168, 35, 35, 0.3);
}
