/* Excel-like Professional Table Styling */
.excel-table {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px solid #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.excel-table th {
    background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
    border-right: 1px solid #d1d5db;
    border-bottom: 2px solid #d1d5db;
    padding: 0.875rem 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    user-select: none;
}

.excel-table th:last-child {
    border-right: none;
}

.excel-table td {
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.625rem 0.75rem;
    background-color: #ffffff;
    font-size: 0.8rem;
    vertical-align: middle;
    transition: background-color 0.15s ease;
}

.excel-table td:last-child {
    border-right: none;
}

.excel-table tbody tr:nth-child(even) td {
    background-color: #f9fafb;
}

.excel-table tbody tr:hover td {
    background-color: #fef3c7 !important;
    box-shadow: inset 0 0 0 1px #f59e0b;
}

.excel-table .text-right {
    text-align: right;
}

.excel-table .text-center {
    text-align: center;
}

.excel-table .text-left {
    text-align: left;
}

/* Number formatting in Excel style */
.excel-number {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Responsive table container */
.table-container {
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
}

/* Custom scrollbar for table container */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading animation for tables */
.table-loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Professional status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #fef2f2;
    color: #991b1b;
}

/* Excel-like selection highlighting */
.excel-table td.selected {
    background-color: #dbeafe !important;
    box-shadow: inset 0 0 0 2px #3b82f6;
}

/* Professional loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern card shadows */
.modern-card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient headers */
.gradient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Improved focus styles */
.excel-table td:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
    background-color: #dbeafe !important;
}

/* Professional typography */
.table-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.table-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    opacity: 0.8;
}
