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

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

.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
}

header h1 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.current-time {
    font-size: 32px;
    font-weight: 300;
    margin: 10px 0;
}

.current-date {
    font-size: 14px;
    opacity: 0.9;
}

main {
    padding: 20px;
}

.employee-section {
    margin-bottom: 25px;
}

.employee-selector {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
}

.employee-selector label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

#employeeSelect {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    margin-bottom: 15px;
}

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

.btn-add-employee {
    width: 100%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-employee:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

.clock-section {
    margin-bottom: 30px;
}

.employee-info {
    text-align: center;
    margin-bottom: 15px;
}

.employee-name {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
}

.status-display {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
}

.status-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.status-value {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
}

.status-value.working {
    color: #28a745;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    font-size: 24px;
}

.btn-clock-in {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-clock-in:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-clock-out {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-clock-out:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.4);
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.today-info {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.info-item:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.info-label {
    font-size: 14px;
    color: #6c757d;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.records-section h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #495057;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

#monthFilter {
    flex: 1;
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.btn-clear {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-clear:hover {
    background: #c82333;
}

.records-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.records-table {
    width: 100%;
    border-collapse: collapse;
}

.records-table thead {
    background: #f8f9fa;
}

.records-table th,
.records-table td {
    padding: 12px 8px;
    text-align: left;
    font-size: 14px;
}

.records-table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.records-table td {
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.records-table tbody tr:hover {
    background: #f8f9fa;
}

.no-records {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 14px;
    display: none;
}

.no-records.show {
    display: block;
}

.summary-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
}

.summary-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #495057;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

.summary-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #667eea;
}

.sync-status {
    margin-top: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.sync-status.connected {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.sync-status.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.sync-icon {
    font-size: 18px;
}

.sync-text {
    color: #495057;
    font-weight: 500;
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .container {
        border-radius: 0;
        max-width: 100%;
    }
    
    header {
        border-radius: 0;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .records-table {
        font-size: 12px;
    }
    
    .records-table th,
    .records-table td {
        padding: 8px 4px;
    }
}