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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.card-small {
    padding: 20px;
}

.card-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h2 {
    color: #667eea;
    font-size: 24px;
    margin: 0;
}

.card-header h3 {
    color: #555;
    font-size: 18px;
    margin: 0;
}

/* Login Container */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #667eea;
}

/* Clock Container */
.clock-container {
    max-width: 800px;
    margin: 20px auto;
}

/* Admin Container */
.admin-container {
    max-width: 1200px;
    margin: 20px auto;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="datetime-local"],
select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="datetime-local"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

thead {
    background: #f7fafc;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f7fafc;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Status */
.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
}

.status-working {
    background: #c6f6d5;
    color: #22543d;
}

.status-lunch {
    background: #feebc8;
    color: #7c2d12;
}

.status-clocked-out {
    background: #e2e8f0;
    color: #2d3748;
}

.status-not-clocked {
    background: #fed7d7;
    color: #742a2a;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #48bb78;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #f56565;
}

.alert-info {
    background: #bee3f8;
    color: #2c5282;
    border-left: 4px solid #4299e1;
}

.alert-slot {
    min-height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-slot .alert {
    margin: 0;
    width: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #718096;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Time Display */
.time-display {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.date-display {
    font-size: 18px;
    color: #718096;
    text-align: center;
    margin-bottom: 30px;
}

/* Navigation */
.nav {
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.nav-links a:hover {
    color: #5568d3;
}

/* Dialogs */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 16px 16px;
    z-index: 1000;
}

.modal-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.modal-card h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

.modal-card p {
    margin-bottom: 20px;
    color: #4a5568;
}

/* Employee List */
.employee-list {
    list-style: none;
    padding: 0;
}

.employee-item {
    background: #f7fafc;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.employee-meta {
    color: #718096;
    font-size: 14px;
}

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

/* Filter Section */
.filter-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

.filter-group .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .time-display {
        font-size: 36px;
    }
    
    .nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .employee-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .filter-group .form-group {
        width: 100%;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px;
    }
}
