/* ============================================= 
   MODULES.CSS - Styles für Supabase-Module
   ============================================= */

:root {
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --hover-bg: #f5f5f5;
    --primary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-muted: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Vacation Request Cards */
.vacation-request-card,
.employee-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.vacation-request-card:hover,
.employee-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.request-header,
.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.request-body,
.employee-details {
    margin-bottom: 1rem;
}

.request-body p,
.employee-details .detail-row {
    margin: 0.5rem 0;
    color: #374151;
}

.request-body strong,
.employee-details span {
    color: #111827;
    font-weight: 600;
}

.request-actions,
.employee-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Report Container */
.report-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.report-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.report-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.report-header p {
    color: var(--text-muted);
    margin: 0.25rem 0;
}

/* Report Tables */
.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.report-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.report-table th {
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.report-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: #374151;
}

.report-table tbody tr {
    background: white;
    transition: background-color 0.2s;
}

.report-table tbody tr:hover {
    background: var(--hover-bg);
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

/* Summary Grid */
.report-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.report-summary h4 {
    color: #374151;
    margin-bottom: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-item span {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.summary-item strong {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-secondary {
    background: #e5e7eb;
    color: #374151;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Employee Details */
.employee-info h4 {
    margin: 0 0 0.25rem 0;
    color: #111827;
}

.employee-info p {
    margin: 0;
    color: var(--text-muted);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 4px;
}

.detail-row span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-row i {
    color: var(--primary-color);
    width: 16px;
}

/* Report Actions */
.report-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    justify-content: center;
}

.report-actions .btn {
    min-width: 150px;
}

/* Vacation Balance Modal */
.vacation-balance {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    align-items: center;
}

.balance-item span {
    color: #6b7280;
    font-weight: 500;
}

.balance-item strong {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal.fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-dialog {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-header .close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 0.5s ease-in-out;
}

/* Status Indicators */
.status-active {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-inactive {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .report-actions {
        flex-direction: column;
    }
    
    .report-actions .btn {
        width: 100%;
    }
    
    .modal-dialog {
        width: 95%;
        margin: 1rem;
    }
    
    .report-table {
        font-size: 0.875rem;
    }
    
    .report-table th,
    .report-table td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .report-actions,
    .modal,
    .sidebar,
    .app-header,
    .section-header button {
        display: none !important;
    }
    
    .report-container {
        box-shadow: none;
        padding: 0;
    }
    
    .report-table {
        page-break-inside: avoid;
    }
}

/* Efficiency Indicators */
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}