/**
 * Shared Styles für Request-Systeme
 * Verwendet von: Urlaubsanträge, Schichttausch, etc.
 */

/* ============================================
   Request Cards
   ============================================ */

.request-card {
    background: var(--bg-secondary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.request-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: var(--primary-color, #3b82f6);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.request-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.request-title strong {
    font-size: 16px;
    color: var(--text-primary, #1f2937);
}

.request-date {
    color: var(--text-muted, #6b7280);
    font-size: 14px;
    white-space: nowrap;
}

.request-body {
    margin-bottom: 12px;
    color: var(--text-secondary, #4b5563);
    font-size: 14px;
}

.request-type {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 13px;
    margin-right: 8px;
}

.request-days {
    color: var(--text-muted, #6b7280);
    font-size: 13px;
}

.request-note {
    margin: 8px 0 0 0;
    font-style: italic;
    color: var(--text-muted, #6b7280);
}

.request-vertretung {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary, #4b5563);
}

.request-rejection {
    margin: 8px 0 0 0;
    padding: 8px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    font-size: 13px;
}

.request-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.request-actions button {
    flex: 1;
}

/* ============================================
   Status Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

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

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-secondary {
    background: #e5e7eb;
    color: #4b5563;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ============================================
   Kontingent Cards (für Urlaub)
   ============================================ */

.kontingent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kontingent-card {
    background: var(--bg-secondary, #fff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.kontingent-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

.kontingent-typ {
    font-size: 18px;
    font-weight: 600;
}

.kontingent-jahr {
    color: var(--text-muted, #6b7280);
    font-size: 14px;
}

.kontingent-balken {
    margin-bottom: 16px;
}

.balken-bg {
    position: relative;
    height: 24px;
    background: #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
}

.balken-genommen {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 12px 0 0 12px;
    transition: width 0.3s;
}

.balken-geplant {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transition: width 0.3s, left 0.3s;
}

.balken-beantragt {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #94a3b8, #64748b);
    transition: width 0.3s, left 0.3s;
}

.kontingent-details {
    font-size: 14px;
}

.kontingent-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color-light, #f3f4f6);
}

.kontingent-row:last-child {
    border-bottom: none;
}

.kontingent-verfuegbar {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid var(--border-color, #e5e7eb);
    font-weight: 600;
}

/* ============================================
   Check Result (Validierungs-Feedback)
   ============================================ */

.check-summary {
    padding: 12px;
    background: #dbeafe;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.check-warnungen {
    margin-top: 12px;
}

.warnung-info {
    padding: 10px 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 14px;
}

.warnung-blockiert {
    padding: 10px 12px;
    background: #fee2e2;
    border-left: 3px solid #dc2626;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.konflikt-schichten {
    margin: 8px 0 0 16px;
    padding-left: 8px;
    list-style: none;
}

.konflikt-schichten li {
    padding: 4px 0;
    color: var(--text-muted, #6b7280);
    font-size: 13px;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #6b7280);
}

.empty-state p {
    font-size: 15px;
    margin: 0;
}

/* ============================================
   Loading State
   ============================================ */

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #6b7280);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .kontingent-cards {
        grid-template-columns: 1fr;
    }
    
    .request-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .request-date {
        font-size: 13px;
    }
    
    .request-actions {
        flex-direction: column;
    }
}

/* ============================================
   Dark Mode Support (optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .request-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .request-card:hover {
        border-color: #60a5fa;
    }
    
    .kontingent-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .balken-bg {
        background: #374151;
    }
    
    .check-summary {
        background: #1e3a5f;
    }
}

/* ============================================
   Text Utilities
   ============================================ */

.text-danger {
    color: #dc2626 !important;
}

.text-success {
    color: #16a34a !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-muted {
    color: #6b7280 !important;
}

.text-primary {
    color: #3b82f6 !important;
}

