/* Employee Time Clock Styles */
.employee-timeclock {
    border: none;
    padding: 40px;
    max-width: 480px;
    margin: 30px auto;
    text-align: center;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 
                0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

.employee-timeclock::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3498db 0%, #2ecc71 50%, #f39c12 100%);
}

.timeclock-title {
    margin: 0 0 25px 0;
    color: #1a2332;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.current-time {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 15px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
}

.timeclock-form {
    margin-bottom: 20px;
}

.employee-timeclock input[type="text"],
.employee-timeclock select {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 12px;
    border: 2px solid #e8ecf1;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    background-color: white;
    color: #2c3e50;
    font-weight: 500;
}

.employee-timeclock input[type="text"]:focus,
.employee-timeclock select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1),
                0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.employee-timeclock select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="10" viewBox="0 0 14 10"><path fill="%23667eea" d="M7 10L0 0h14z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.employee-timeclock select:hover {
    border-color: #667eea;
    background-color: #fafbfc;
}

.button-container {
    display: flex !important;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

#clock-in-btn,
#clock-out-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.timeclock-btn {
    flex: 1;
    min-width: 140px;
    padding: 18px 24px;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

.timeclock-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.timeclock-btn:hover::before {
    left: 100%;
}

.timeclock-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15),
                0 6px 12px rgba(0, 0, 0, 0.1);
}

.timeclock-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.timeclock-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.clock-in {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.3);
    display: flex !important;
}

.clock-in:hover:not(:disabled) {
    background: linear-gradient(135deg, #0e8074 0%, #2dd46b 100%);
    box-shadow: 0 12px 28px rgba(17, 153, 142, 0.4);
}

.clock-out {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(235, 51, 73, 0.3);
    display: flex !important;
}

.clock-out:hover:not(:disabled) {
    background: linear-gradient(135deg, #d62839 0%, #e04a38 100%);
    box-shadow: 0 12px 28px rgba(235, 51, 73, 0.4);
}

.btn-icon {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.btn-text {
    font-size: 13px;
    font-weight: 700;
}

.timeclock-message {
    margin: 20px 0;
    padding: 16px 20px;
    border-radius: 12px;
    font-weight: 600;
    min-height: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    line-height: 1.5;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeclock-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.timeclock-message.success::before {
    content: '✓ ';
    font-weight: 700;
    font-size: 18px;
}

.timeclock-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.timeclock-message.error::before {
    content: '⚠ ';
    font-weight: 700;
    font-size: 18px;
}

.loading-indicator {
    color: #667eea;
    font-weight: 700;
    padding: 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loading-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.timeclock-info {
    margin-top: 25px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d9edf7 100%);
    border-radius: 12px;
    border-left: 5px solid #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.timeclock-info p {
    margin: 0;
    color: #1c4966;
    line-height: 1.7;
    font-size: 13px;
    font-weight: 500;
}

.timeclock-info small {
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .employee-timeclock {
        margin: 15px;
        padding: 30px 20px;
        max-width: none;
        border-radius: 16px;
    }
    
    .button-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .timeclock-btn {
        min-width: auto;
        width: 100%;
    }
    
    .timeclock-title {
        font-size: 24px;
    }
    
    .current-time {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Animation for button state changes */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.timeclock-btn.loading {
    animation: pulse 1.5s infinite;
    pointer-events: none;
}

/* Admin styles */
.timeclock-admin-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf1;
}

.timeclock-admin-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
    color: white;
    padding: 16px !important;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.timeclock-admin-table td {
    padding: 14px !important;
    border-bottom: 1px solid #f0f2f5;
}

.timeclock-admin-table tr:hover {
    background-color: #f8f9fc;
    transition: background-color 0.2s ease;
}

/* WordPress Admin Enhancements */
.wrap h1.wp-heading-inline {
    color: #1a2332;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wrap hr.wp-header-end {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    margin: 0 0 30px 0;
}

/* Stats Cards */
.timeclock-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.stats-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: none !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: inherit;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stats-card > div:first-child {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.stats-card > div:nth-child(2) {
    font-size: 36px !important;
    font-weight: 800 !important;
    line-height: 1.2;
    margin: 8px 0;
}

.stats-card > div:nth-child(3) {
    font-size: 12px !important;
    color: #6c757d !important;
    font-weight: 600;
}

/* Buttons */
.button.button-primary,
.page-title-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.button.button-primary:hover,
.page-title-action:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.button.button-primary:active {
    transform: translateY(0);
}

/* Form Tables */
.form-table th {
    color: #1a2332;
    font-weight: 600;
    font-size: 14px;
}

.form-table input[type="text"],
.form-table input[type="time"],
.form-table input[type="number"],
.form-table input[type="date"],
.form-table select {
    border: 2px solid #e8ecf1;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-table input[type="text"]:focus,
.form-table input[type="time"]:focus,
.form-table input[type="number"]:focus,
.form-table input[type="date"]:focus,
.form-table select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Notices */
.notice {
    border-left-width: 5px;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notice.notice-success {
    border-left-color: #28a745;
    background: #d4edda;
}

.notice.notice-info {
    border-left-color: #17a2b8;
    background: #d1ecf1;
}

.notice.notice-warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.notice.notice-error {
    border-left-color: #dc3545;
    background: #f8d7da;
}

/* Postbox */
.postbox {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.postbox h3 {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 14px 18px !important;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    color: #1a2332;
}

.postbox .inside {
    padding: 18px;
}

.postbox code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
}

/* Status badges */
.status-allowed {
    color: #28a745;
    font-weight: 700;
}

.status-blocked {
    color: #dc3545;
    font-weight: 700;
}

/* WP List Table improvements */
.wp-list-table {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.wp-list-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    padding: 14px 12px;
    font-weight: 600;
    color: #1a2332;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.wp-list-table tbody tr {
    transition: background-color 0.2s ease;
}

.wp-list-table tbody tr:hover {
    background-color: #f8f9fc;
}

.wp-list-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f0f2f5;
}

/* Action badges styling */
.action-badge,
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.action-clockin {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
}

.action-clockout {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.15);
}

.status-on_time {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
}

.status-late {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.15);
}

.location-onsite {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.15);
}

.location-offsite {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.15);
}

.location-unknown {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #6c757d;
    box-shadow: 0 2px 6px rgba(108, 117, 125, 0.1);
}

/* Container backgrounds */
.add-employee-form,
.employee-list,
.employee-summary,
.detailed-logs,
.security-warnings,
.employee-help,
.timeclock-filters {
    background: white;
    padding: 25px;
    margin: 25px 0;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.add-employee-form h2,
.employee-list h2,
.employee-summary h2,
.detailed-logs h2,
.security-warnings h2,
.employee-help h3,
.timeclock-filters h2 {
    color: #1a2332;
    font-weight: 700;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2f5;
}

.employee-help {
    background: linear-gradient(135deg, #e8f4f8 0%, #d9edf7 100%);
    border-left: 5px solid #3498db;
}

.security-warnings {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 5px solid #ff9800;
}

/* Pagination */
.tablenav .tablenav-pages {
    margin: 0;
}

.tablenav .tablenav-pages a {
    border: 2px solid #e8ecf1;
    border-radius: 6px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.tablenav .tablenav-pages a:hover {
    border-color: #667eea;
    background: #f8f9fc;
    color: #667eea;
}
