/* Plik: public/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 100%; /* Zmieniono na 100% */
    width: 96%; /* Użyj 96% szerokości z marginesami po bokach */
    margin: 0 auto;
    padding: 20px 0; /* Zostaw padding tylko góra/dół, szerokość kontroluje width */
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1::before {
    content: "📋";
    font-size: 2.5rem;
    filter: none;
    -webkit-text-fill-color: initial;
}

.datetime {
    font-size: 1.1rem;
    color: #666;
    text-align: right;
}

.admin-section-bottom {
    margin-top: 30px;
    padding-bottom: 30px;
    text-align: right;
    position: relative;
}

.admin-button {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.admin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.add-task-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
}

.add-task-panel.show {
    max-height: 500px;
    opacity: 1;
}

.add-task-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    text-align: left; /* Wyrównanie do lewej */
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.employees-list {
    display: grid; /* Zmieniono na grid */
    grid-template-columns: repeat(3, 1fr); /* 3 kolumny */
    grid-gap: 20px; /* Odstęp między elementami gridu */
    padding: 0; /* Usunięto padding, kontener już go ma */
}

.employee-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 400px;
    /* Usunięto flex i max-width, teraz steruje nimi grid */
}

.employee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.employee-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.employee-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Tło ustawiane teraz przez JS */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

.task-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.tasks-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.tasks-list::-webkit-scrollbar {
    width: 6px;
}

.tasks-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.tasks-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.tasks-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.task-item {
    background: #f8f9ff;
    border: 1px solid #e6e9ff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.task-item:hover {
    background: #f0f2ff;
    border-color: #667eea;
}

.task-item.completed {
    background: #f0fdf4;
    border-color: #22c55e;
    opacity: 0.8;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #666;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.task-text {
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    flex-grow: 1;
    margin-right: 10px;
}

.task-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.task-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complete-btn {
    background: #22c55e;
    color: white;
}

.complete-btn:hover {
    background: #16a34a;
    transform: scale(1.1);
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.task-priority {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-top: 8px;
    display: inline-block;
}

.priority-high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-medium {
    background: #fef3c7;
    color: #d97706;
}

.priority-low {
    background: #dcfce7;
    color: #16a34a;
}

.task-date {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.no-tasks {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

.no-tasks::before {
    content: "📝";
    display: block;
    font-size: 3rem;
    margin-bottom: 15px;
}

.stats-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    margin-top: 30px; /* Zmienione na margin-top */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Floating button styles */
.floating-button {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Zmieniono na lewy dół */
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1200px) {
    .employees-list {
        grid-template-columns: repeat(2, 1fr); /* Dwie kolumny na średnich ekranach */
    }
}

@media (max-width: 768px) {
    .add-task-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .employees-list {
        grid-template-columns: 1fr; /* Jedna kolumna na małych ekranach */
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    .admin-section-bottom {
        text-align: center;
    }
    .admin-button {
        width: 100%;
    }

    .floating-button {
        left: 50%; /* Centrowanie na mniejszych ekranach */
        transform: translateX(-50%); /* Centrowanie na mniejszych ekranach */
        bottom: 15px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    .floating-button:hover {
        transform: translateX(-50%) translateY(-3px) scale(1.02);
    }
}

.animation-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #22c55e;
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.password-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.password-prompt-overlay.show {
    visibility: visible;
    opacity: 1;
}

.password-prompt-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

.password-prompt-box h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
}

.password-prompt-box input[type="password"] {
    width: calc(100% - 30px);
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.1rem;
}

.password-prompt-box input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-prompt-box button {
    padding: 10px 25px;
    margin: 0 5px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-prompt-box .submit-password-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.password-prompt-box .submit-password-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.password-prompt-box .cancel-password-btn {
    background: #e0e0e0;
    color: #333;
}

.password-prompt-box .cancel-password-btn:hover {
    background: #d0d0d0;
}
