/**
 * Urlaubsplaner - Eigene Styles
 *
 * @author Graup-IT
 * @copyright (c) 2026 Graup-IT - https://www.graup-it.de
 */

/* =========================================
   CSS Custom Properties / Branding
   ========================================= */
:root {
    --app-primary: #0d6efd;
    --app-secondary: #6c757d;
}

/* =========================================
   Bootstrap Overrides mit Branding
   ========================================= */
.btn-primary {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: color-mix(in srgb, var(--app-primary) 85%, black);
    border-color: color-mix(in srgb, var(--app-primary) 80%, black);
}

.btn-outline-primary {
    color: var(--app-primary);
    border-color: var(--app-primary);
}

.btn-outline-primary:hover {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

.bg-primary {
    background-color: var(--app-primary) !important;
}

.text-primary {
    color: var(--app-primary) !important;
}

.nav-link.active {
    color: var(--app-primary) !important;
    font-weight: 600;
}

.page-link {
    color: var(--app-primary);
}

.page-item.active .page-link {
    background-color: var(--app-primary);
    border-color: var(--app-primary);
}

/* =========================================
   Layout
   ========================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-top: 56px;
    background-color: #f8f9fa;
}

/* =========================================
   Sidebar
   ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: .5rem 1rem;
    margin: 0 .5rem;
    border-radius: .375rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, .05);
}

.sidebar .nav-link.active {
    background-color: color-mix(in srgb, var(--app-primary) 10%, white);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-heading {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* =========================================
   Karten
   ========================================= */
.card {
    border-radius: .5rem;
    transition: box-shadow .2s ease;
}

.hover-shadow:hover {
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15) !important;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

/* =========================================
   Tabellen
   ========================================= */
.table th {
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* DataTables Anpassungen */
.dataTables_wrapper .dataTables_filter input {
    border-radius: .375rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: .375rem;
}

/* =========================================
   Formulare
   ========================================= */
.form-label {
    font-weight: 500;
    font-size: .875rem;
    margin-bottom: .25rem;
}

.required::after {
    content: " *";
    color: #dc3545;
}

/* =========================================
   Avatar / Profilbild
   ========================================= */
.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-secondary);
    color: #fff;
    font-weight: 600;
}

/* =========================================
   Dokument-Icons
   ========================================= */
.doc-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .375rem;
    font-size: 1.25rem;
}

.doc-icon-pdf { background-color: #fee2e2; color: #dc2626; }
.doc-icon-word { background-color: #dbeafe; color: #2563eb; }
.doc-icon-excel { background-color: #d1fae5; color: #059669; }
.doc-icon-image { background-color: #fef3c7; color: #d97706; }
.doc-icon-default { background-color: #f3f4f6; color: #6b7280; }

/* =========================================
   Sonstiges
   ========================================= */
.border-bottom-dashed {
    border-bottom: 1px dashed rgba(0, 0, 0, .1);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Dropzone Anpassungen */
.dropzone {
    border: 2px dashed var(--app-primary);
    border-radius: .5rem;
    background: #fafbfc;
}

.dropzone:hover {
    background: #f0f4ff;
}

/* Flatpickr Anpassungen */
.flatpickr-day.selected {
    background: var(--app-primary);
    border-color: var(--app-primary);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        padding-top: 0;
    }

    body {
        padding-top: 56px;
    }

    main {
        padding: 1rem !important;
    }

    .table-responsive {
        font-size: .875rem;
    }
}

@media (max-width: 575.98px) {
    .card-body {
        padding: 1rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

/* =========================================
   Drucken
   ========================================= */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }

    main {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        padding-top: 0;
    }
}
