/**
 * Berichtsheft Server - Haupt-CSS
 */

/* ==================== VARIABLEN ==================== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark-color: #1a1a2e;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ==================== ALLGEMEIN ==================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    font-size: 16px;
    line-height: 1.6;
}

/* Größere Schrift für bessere Lesbarkeit */
.card-title, .card-header {
    font-size: 1.1rem;
}

.table {
    font-size: 1rem;
}

.form-label {
    font-size: 1rem;
    font-weight: 500;
}

.form-control, .form-select {
    font-size: 1rem;
    padding: 0.625rem 0.875rem;
}

/* ==================== NAVBAR ==================== */
.navbar {
    box-shadow: var(--box-shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-size: 1rem;
    padding: 0.625rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* ==================== CARDS ==================== */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ==================== TABELLEN ==================== */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    background-color: var(--light-bg);
    border-bottom: 2px solid #dee2e6;
    padding: 1rem 0.875rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem 0.875rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ==================== BUTTONS ==================== */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border: none;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* ==================== FORMULARE ==================== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    font-size: 0.9rem;
}

/* ==================== BADGES ==================== */
.badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    font-size: 0.85rem;
}

/* ==================== ALERTS ==================== */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem 1rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--dark-color) !important;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-color) !important;
}

/* ==================== BERICHTSHEFT SPEZIFISCH ==================== */
.berichtsheft-tag {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
}

.berichtsheft-tag:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.1);
}

.berichtsheft-tag .tag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.berichtsheft-tag .tag-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.berichtsheft-tag .tag-datum {
    color: #6c757d;
    font-size: 0.9rem;
}

.berichtsheft-tag textarea {
    min-height: 100px;
    resize: vertical;
}

.berichtsheft-tag .zeit-inputs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.berichtsheft-tag .zeit-inputs input {
    width: 80px;
    text-align: center;
}

/* Status-Badges */
.status-entwurf { background-color: #95a5a6; }
.status-eingereicht { background-color: #f39c12; }
.status-zurueck { background-color: #e74c3c; }
.status-freigegeben { background-color: #27ae60; }

/* ==================== UNTERSCHRIFT ==================== */
.signature-pad {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    background-color: white;
    cursor: crosshair;
}

.signature-pad.active {
    border-color: var(--primary-color);
}

.signature-preview {
    max-height: 80px;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    background-color: white;
}

/* ==================== STATISTIK-CARDS ==================== */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ==================== MODAL ==================== */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ==================== DROPDOWN ==================== */
.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.625rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.dropdown-item i {
    width: 1.5rem;
}

/* ==================== LOADING ==================== */
.loading {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .navbar-brand span {
        display: none;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .berichtsheft-tag .zeit-inputs {
        flex-wrap: wrap;
    }
}

/* ==================== PRINT ==================== */
@media print {
    .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    body {
        background: white;
    }
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ==================== UTILITY CLASSES ==================== */
.cursor-pointer {
    cursor: pointer;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

.transition-all {
    transition: var(--transition);
}
