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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1 {
    color: #2563eb;
    margin-bottom: 10px;
}

.controls {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.control-group label {
    font-weight: 500;
    color: #555;
}

input[type="date"],
input[type="text"],
select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

button {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6b7280;
}

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

.summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    padding: 15px;
    background: #f9fafb;
    border-radius: 4px;
    border-left: 4px solid #2563eb;
}

.summary-item h3 {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Container Styles */
.progress-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.progress-header h3 {
    margin: 0;
    color: #2563eb;
    font-size: 18px;
    font-weight: 600;
}

.progress-close-btn {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 6px 12px;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.progress-close-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

.progress-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-step {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 24px;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percentage {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

.progress-message-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    min-height: 32px;
}

.progress-message {
    flex: 1;
    font-size: 13px;
    color: #6b7280;
    padding: 6px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #2563eb;
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-message.slide-in {
    animation: slideInFromBottom 0.3s ease-out forwards;
    display: block;
}

.progress-message.slide-out {
    animation: slideOutToTop 0.3s ease-in forwards;
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutToTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.progress-steps-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    white-space: nowrap;
}

.progress-steps-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.progress-steps-list {
    margin-top: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    max-height: 300px;
    overflow-y: auto;
}

.progress-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.progress-steps-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.progress-steps-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.progress-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280; /* Muted text color */
}

.progress-step-item:last-child {
    border-bottom: none;
}

.step-number {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    flex-shrink: 0;
}

.step-time {
    font-size: 11px;
    color: #9ca3af;
    flex-shrink: 0;
    font-family: monospace;
}

.step-text {
    flex: 1;
    color: #6b7280; /* Muted text color */
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background: #f3f4f6;
}

th.sort-asc::after {
    content: ' ▲';
    font-size: 10px;
}

th.sort-desc::after {
    content: ' ▼';
    font-size: 10px;
}

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

tbody tr:hover {
    background: #f9fafb;
}

.text-right {
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-unapproved {
    background: #dc2626; /* RED background */
    color: #ffffff; /* White text for better contrast */
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.column-selector {
    position: relative;
    display: inline-block;
}

.column-selector-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 264px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    z-index: 10;
    padding: 16px;
}

.column-selector-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
}

.column-selector-item:hover {
    background: #f9fafb;
}

.overtime-tooltip {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 256px;
    background: #1f2937;
    color: white;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    z-index: 50;
    border: 1px solid #374151;
    display: none;
}

.overtime-tooltip.visible {
    display: block;
}

.overtime-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.overtime-detail:last-child {
    margin-bottom: 0;
}

.overtime-group {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #10b981;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

.gap-4 {
    gap: 16px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-blue-600 {
    color: #2563eb;
}

.text-purple-600 {
    color: #9333ea;
}

.text-green-600 {
    color: #10b981;
}

.text-red-600 {
    color: #dc2626;
}

.overflow-x-auto {
    overflow-x: auto;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

