/* ==========================================
   URLAUBSPLANER - CUSTOM CSS
   Mobile-Optimierung v3.0 - FIXES
   ========================================== */

/* ===== CSS VARIABLEN ===== */
:root {
    /* Primärfarben */
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --primary-light: #3b82f6;
    /* Sekundärfarben */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0ea5e9;
    /* Grautöne */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Layout-Farben */
    --header-bg: #f8fafc;
    --header-border: #e2e8f0;
    --nav-bg: #ffffff;
    --nav-hover: #f1f5f9;
    --nav-border: #e2e8f0;
    --content-bg: #ffffff;
    --page-bg: #f8fafc;
    /* Text-Farben */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* ===== GLOBAL OVERRIDES ===== */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--page-bg);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

#app, .page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== TOP HEADER (Level 1) ===== */
.top-header {
    background-color: var(--header-bg);
    border-bottom: 3px solid var(--primary-color);
    padding: 21px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.portal-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.portal-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.portal-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.portal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.portal-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.header-user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user-greeting {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .header-user-greeting i {
        font-size: 1.1rem;
        color: var(--primary-color);
    }

.header-user-section .btn,
.header-login-section .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

    .header-user-section .btn:hover {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
        transform: translateY(-1px);
    }

.header-login-section .btn-primary:hover {
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

/* ===== NAVIGATION BAR (Level 2) ===== */
.navigation-bar {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0 24px;
    min-height: 48px;
}

.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

    .nav-link:hover {
        background-color: var(--nav-hover);
        color: var(--primary-color);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .nav-link.active {
        background-color: transparent;
        color: var(--primary-color);
        border-bottom: 4px solid var(--primary-color);
        font-weight: 700;
    }

        .nav-link.active:hover {
            background-color: var(--nav-hover);
            transform: none;
        }

    .nav-link i {
        margin-right: 10px;
        font-size: 1.1rem;
        min-width: 16px;
    }

/* ===== HAMBURGER MENU ===== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-header {
    display: none;
}

.close-btn {
    display: none;
}

.nav-overlay {
    display: none;
}

.nav-menu-wrapper {
    display: contents;
}

/* ===== MAIN CONTENT ===== */
.content {
    flex: 1;
    padding: 32px 24px;
    width: 100%;
    min-height: calc(100vh - 146px);
    background-color: var(--page-bg);
    margin-top: 142px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.card-header {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: var(--radius-sm);
    transition: all 0.15s ease-in-out;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

    .btn:active {
        transform: translateY(0);
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
    }

/* ===== TABLES ===== */
.table {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .table thead th {
        background: var(--gray-50);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-size: 0.9rem;
    }

    .table tbody tr {
        transition: all 0.2s ease;
    }

        .table tbody tr:hover {
            background-color: var(--gray-50);
            transform: scale(1.001);
        }

/* ===== FORMS ===== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* ===== DASHBOARD ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

    .stat-card:hover {
        border-left-width: 6px;
        box-shadow: var(--shadow-lg);
    }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

    .stat-icon.bg-primary {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    }

    .stat-icon.bg-success {
        background: linear-gradient(135deg, #10b981, #34d399);
    }

    .stat-icon.bg-warning {
        background: linear-gradient(135deg, #f59e0b, #fbbf24);
    }

    .stat-icon.bg-danger {
        background: linear-gradient(135deg, #ef4444, #f87171);
    }

.action-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-200);
}

    .action-card:hover {
        border-color: var(--primary-color);
        box-shadow: var(--shadow-lg);
        transform: translateY(-4px);
    }

.action-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 4rem;
        color: var(--gray-300);
        margin-bottom: 1rem;
    }

/* ===== FOOTER ===== */
.legal-footer-fixed-full {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    background: #333;
    padding: 20px 50px;
    color: white;
    z-index: 999;
    margin-top: auto;
}

.legal-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

    .legal-links a {
        color: white;
        text-decoration: none;
        font-size: 14px;
    }

        .legal-links a:hover {
            text-decoration: underline;
        }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--gray-500);
    }

/* ===== PAGINATION - DESKTOP ===== */
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background-color: white;
    border-top: 1px solid var(--gray-200);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* WICHTIG: EINHEITLICHE HÖHE für alle Pagination-Elemente */
.pagination-current {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    font-size: 0.875rem;
    height: 38px; /* FESTE HÖHE */
    display: flex;
    align-items: center;
    line-height: 1;
}

.pagination-controls .btn {
    min-width: 38px; /* Gleiche Breite wie Höhe */
    height: 38px; /* FESTE HÖHE */
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    gap: 4px;
}

/* Override btn-outline-secondary für bessere Sichtbarkeit - DESKTOP */
.pagination-controls .btn-outline-secondary {
    border: 1px solid var(--text-primary) !important; /* DUNKEL! */
    color: var(--text-primary) !important;
}

    .pagination-controls .btn-outline-secondary:hover:not(:disabled) {
        background-color: var(--primary-color) !important;
        border-color: var(--primary-color) !important;
        color: white !important;
    }

    .pagination-controls .btn-outline-secondary:disabled {
        border-color: var(--gray-300) !important;
        color: var(--gray-400) !important;
        opacity: 0.6;
    }

/* ===== ACTION-SPALTE - DESKTOP ===== */
@media (min-width: 769px) {
    /* Action-Spalte feste Breite */
    .table thead th:last-child {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        text-align: left; /* Header linksbündig */
        padding-left: 1rem;
    }

    .table tbody td:last-child {
        width: 220px;
        min-width: 220px;
        max-width: 220px;
        text-align: left; /* Content linksbündig */
        padding-left: 1rem;
    }

        /* Action-Buttons linksbündig */
        .table tbody td:last-child > .d-flex {
            justify-content: flex-start !important;
        }

    /* Button-Größen kompakt */
    .d-flex.gap-2 {
        gap: 0.375rem !important;
    }

    .btn-group .btn-sm {
        padding: 0.375rem 0.625rem !important;
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

        .btn-group .btn-sm i {
            font-size: 0.9rem;
            margin: 0;
        }

        /* Bootstrap btn-group styling */
        .btn-group .btn-sm:not(:last-child) {
            border-right: 0;
        }

        .btn-group .btn-sm:first-child {
            border-top-right-radius: 0 !important;
            border-bottom-right-radius: 0 !important;
        }

        .btn-group .btn-sm:last-child {
            border-top-left-radius: 0 !important;
            border-bottom-left-radius: 0 !important;
        }

    /* Pagination horizontal */
    .pagination-wrapper {
        flex-direction: row;
    }

    .pagination-info {
        text-align: left;
    }

    .row.mb-4 .btn-success {
        width: auto !important;
        height: auto !important;
        font-size: 0.875rem !important;
        overflow: visible !important;
    }
}

/* ===== TABLET (max-width: 1200px) ===== */
@media (max-width: 1200px) {
    .nav-link {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

        .nav-link i {
            margin-right: 8px;
        }
}

/* ===== TABLET (max-width: 992px) ===== */
@media (max-width: 992px) {
    .portal-title {
        font-size: 1.5rem;
    }

    .nav-content,
    .header-content {
        padding: 0 16px;
    }

    .content {
        padding: 24px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .action-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE (768px und kleiner) ===== */
@media (max-width: 768px) {
    /* ===== HEADER MOBILE ===== */
    .top-header {
        padding: 10px 0;
    }

    .header-content {
        padding: 0 12px;
    }

    .portal-logo {
        height: 35px !important;
    }

    .portal-info {
        gap: 10px;
    }

    .portal-title {
        font-size: 1.2rem;
    }

    .portal-subtitle {
        font-size: 0.8rem;
        display: block;
    }

    .header-user-section {
        gap: 8px;
    }

    .header-user-greeting {
        font-size: 0.75rem;
        gap: 4px;
    }

        .header-user-greeting i {
            display: none;
        }

    .header-user-section .btn,
    .header-login-section .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

        .header-user-section .btn i,
        .header-login-section .btn i {
            display: none;
        }

    /* ===== NAVIGATION MOBILE ===== */
    .navigation-bar {
        top: 60px;
        background-color: var(--nav-bg);
    }

    .nav-content {
        padding: 0 12px 0 52px;
        min-height: 40px;
        position: relative;
        display: flex;
        align-items: center;
    }

    .hamburger-btn {
        display: flex !important;
        position: absolute;
        left: 6px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1005;
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .hamburger-line {
        width: 100%;
        height: 2px;
    }

    .nav-content > .main-nav > .nav-list {
        display: none !important;
    }

    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 1004;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .main-nav.menu-open .nav-menu-wrapper {
        left: 0;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1003;
        pointer-events: none;
    }

        .nav-overlay.active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

    .mobile-nav-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
        border-bottom: 1px solid var(--nav-border);
        background-color: var(--header-bg);
    }

    .mobile-nav-title {
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-primary);
    }

    .close-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 1.5rem;
        color: var(--text-primary);
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
    }

        .close-btn:hover {
            background-color: var(--nav-hover);
        }

    .nav-menu-wrapper .nav-list {
        display: flex !important;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        flex: 1;
        list-style: none;
        margin: 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 0.95rem;
        border-bottom: none;
        border-left: 4px solid transparent;
        border-radius: var(--radius-sm);
        margin-bottom: 4px;
        display: flex;
        align-items: center;
    }

        .nav-link:hover {
            background-color: var(--nav-hover);
            transform: none;
        }

        .nav-link.active {
            background-color: rgba(30, 58, 138, 0.08);
            border-left: 4px solid var(--primary-color);
            border-bottom: none;
        }

        .nav-link i {
            margin-right: 12px;
            font-size: 1.2rem;
            min-width: 20px;
        }

        .nav-link span {
            display: inline;
        }

    .nav-item-password {
        margin-top: auto;
        padding-top: 8px;
        border-top: 1px solid var(--nav-border);
    }

    /* ===== CONTENT MOBILE ===== */
    .content {
        margin-top: 100px;
        padding: 16px 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .action-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }

    .dashboard-container {
        padding: 1rem;
    }

    .welcome-section h2 {
        font-size: 1.5rem;
    }

    /* ===== APPOINTMENTS PAGE HEADER MOBILE ===== */
    .row.mb-4 {
        margin-bottom: 1rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important; /* Weniger Gap */
        flex-wrap: nowrap !important;
        padding: 0 !important; /* Kein extra Padding */
        margin-left: 0 !important; /* Bootstrap row negativen Margin entfernen */
        margin-right: 0 !important;
    }

        .row.mb-4 > .col,
        .row.mb-4 > * > .col {
            width: auto !important;
            flex: 1 1 auto !important; /* Überschrift nimmt Platz */
            max-width: none !important;
            margin-bottom: 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        .row.mb-4 > .col-auto,
        .row.mb-4 > * > .col-auto {
            width: auto !important;
            flex: 0 0 auto !important; /* Button feste Größe */
            max-width: none !important;
            margin-bottom: 0 !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        .row.mb-4 h3 {
            font-size: 1.5rem; /* Kleiner */
            margin-bottom: 0;
            font-weight: 700;
        }

        /* Button quadratisch, icon-only */
        .row.mb-4 .btn-success {
            width: 48px !important;
            height: 48px !important;
            min-height: 48px !important;
            padding: 0 !important;
            border-radius: 8px !important;
            flex-shrink: 0 !important;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            color: transparent !important; /* Text unsichtbar */
            text-indent: -9999px !important; /* Text wegschubsen */
        }

            .row.mb-4 .btn-success i {
                font-size: 1.4rem !important;
                margin: 0 !important;
                line-height: 1 !important;
                position: absolute !important; /* Icon absolut positionieren */
                color: white !important; /* Icon wieder sichtbar */
                text-indent: 0 !important; /* Icon indent zurücksetzen */
            }

    /* ===== FILTER COMPONENT MOBILE ===== */
    .card.mb-3 {
        margin-bottom: 1rem !important;
        box-shadow: var(--shadow-sm);
    }

    .card-title {
        font-size: 1.5rem !important; /* GRÖßER! */
        font-weight: 600;
        margin-bottom: 1rem;
    }

    .card-body .row.g-3 {
        /*row-gap: 0.5rem !important;*/
    }

        .card-body .row.g-3 > .col-md-3,
        .card-body .row.g-3 > .col-md-12 {
            flex: 0 0 100%;
            max-width: 100%;
        }

    .form-label {
        font-size: 1rem !important; /* GRÖßER! */
        font-weight: 600;
        margin-bottom: 6px;
        color: var(--text-primary);
    }

    .form-select,
    .form-control {
        padding: 12px 14px !important;
        font-size: 1rem !important; /* GRÖßER! */
        min-height: 48px !important;
        border-radius: var(--radius-sm);
        border: 1px solid var(--gray-300);
    }

        .form-select:focus,
        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
        }

    .row.g-2 > .col {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }

        .row.g-2 > .col:last-child {
            margin-bottom: 0;
        }

    .card-body .col-md-12 {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-top: 6px;
    }

        .card-body .col-md-12 .btn {
            width: auto;
            flex: 1;
            padding: 12px 16px !important;
            font-size: 1rem !important; /* GRÖßER! */
            min-height: 48px !important;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

            .card-body .col-md-12 .btn i {
                font-size: 1.1rem;
            }

        .card-body .col-md-12 .btn-secondary {
            margin-left: 0 !important;
        }

    /* ===== DATA TABLE MOBILE ===== */
    .table-responsive {
        margin-bottom: 1.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .table {
        font-size: 1rem; 
        margin-bottom: 0;
        min-width: 600px;
    }

        .table thead th {
            padding: 12px 10px;
            font-size: 0.9rem; 
            font-weight: 700;
            white-space: nowrap;
            vertical-align: middle;
            letter-spacing: 0.3px;
            text-transform: uppercase;
        }

        .table tbody td {
            padding: 12px 10px;
            vertical-align: middle;
            line-height: 1.4;
            font-size: 1rem; 
        }

            /* ERSTE SPALTE STICKY */
            /*.table thead th:first-child,
            .table tbody td:first-child {
                position: sticky;
                left: 0;
                background-color: white;
                z-index: 10;
                box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
                font-weight: 600;
                min-width: 120px;
            }*/

        .table thead th:first-child {
            background-color: var(--gray-50);
            z-index: 11;
        }

    .badge {
        font-size: 0.9rem !important; 
        padding: 5px 10px !important;
        font-weight: 600;
        white-space: nowrap;
        display: inline-block;
    }

    /* ===== ACTION BUTTONS MOBILE - KOMPAKT & LESBAR ===== */
    .d-flex.gap-2 {
        gap: 0.375rem !important;
    }

    .btn-group .btn-sm {
        padding: 0.5rem 0.75rem !important;
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

        .btn-group .btn-sm i {
            font-size: 1rem;
            margin: 0;
        }

    .btn-info {
        background-color: var(--info-color) !important;
        border-color: var(--info-color) !important;
    }

    /* Loading & Empty State */
    .text-center.p-5 {
        padding: 2rem 1rem !important;
    }

        .text-center.p-5 .spinner-border {
            width: 2rem;
            height: 2rem;
        }

        .text-center.p-5 p {
            font-size: 1rem; /* GRÖßER! */
            margin-top: 1rem;
        }

        .text-center.p-5 i {
            font-size: 3rem !important;
        }

    /* ===== PAGINATION MOBILE - GUT SICHTBAR ===== */
    .pagination-wrapper {
        flex-direction: column;
        padding: 1.25rem;
        gap: 16px;
        background-color: white; /* Weiß statt grau */
        border-radius: var(--radius-md);
        border: 1px solid var(--gray-300); /* Sichtbarer Border */
        box-shadow: var(--shadow-sm);
    }

    .pagination-info {
        text-align: center;
        font-size: 0.95rem; /* GRÖßER! */
        font-weight: 600;
        color: var(--text-primary);
    }

    .pagination-controls {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

        /* EINHEITLICHE HÖHE + GUT SICHTBAR */
        .pagination-controls .btn {
            min-width: 44px;
            height: 44px; /* GRÖßER! */
            padding: 0 0.875rem;
            font-size: 0.95rem !important; /* GRÖßER! */
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            gap: 4px;
        }

        /* Override btn-outline-secondary für bessere Sichtbarkeit */
        .pagination-controls .btn-outline-secondary {
            background-color: white;
            border: 2px solid var(--text-primary) !important; /* DUNKEL! */
            color: var(--text-primary) !important;
        }

            .pagination-controls .btn-outline-secondary:hover:not(:disabled) {
                background-color: var(--primary-color) !important;
                border-color: var(--primary-color) !important;
                color: white !important;
            }

            .pagination-controls .btn-outline-secondary:disabled {
                background-color: var(--gray-100) !important;
                border-color: var(--gray-300) !important;
                color: var(--gray-400) !important;
                opacity: 0.6;
            }

    .pagination-current {
        font-size: 0.85rem; /* GRÖßER! */
        font-weight: 700;
        padding: 0 0.75rem;
        height: 44px; /* GLEICHE HÖHE */
        display: flex;
        align-items: center;
        background-color: var(--gray-100);
        border: 2px solid var(--gray-400); /* DUNKLER! */
        color: var(--text-primary);
    }

    /* ===== FOOTER MOBILE ===== */
    .legal-footer-fixed-full {
        padding: 15px 20px;
    }

    .legal-links {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        justify-content: flex-start;
    }

        .legal-links a {
            font-size: 0.85rem;
        }

    /* Mobile - Filter ausklappbar */
    .filter-toggle-btn {
        display: flex !important;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px !important;
        font-size: 1rem !important;
        font-weight: 600;
        min-height: 48px !important;
        margin-bottom: 1rem;
    }

    .filter-card {
        display: none;
    }

        .filter-card.show {
            display: block !important;
        }
    
}

/* ===== SEHR KLEINE MOBILE (576px und kleiner) ===== */
@media (max-width: 576px) {
    .portal-logo {
        height: 30px !important;
    }

    .portal-title {
        font-size: 1rem;
    }

    .portal-subtitle {
        font-size: 0.7rem;
    }

    .header-user-greeting {
        font-size: 0.7rem;
    }

    .header-user-section .btn,
    .header-login-section .btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .nav-menu-wrapper {
        width: 260px;
    }

    .nav-link {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .content {
        padding: 12px 8px;
        margin-top: 98px;
    }

    .action-icon {
        font-size: 2rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .card-body h6 {
        font-size: 0.85rem;
    }

    .card-body h3 {
        font-size: 1.4rem;
    }

    .welcome-section h2 {
        font-size: 1.3rem;
    }

    /* Appointments Page */
    .row.mb-4 h3 {
        font-size: 1.70rem; 
    }

    .row.mb-4 .btn-success {
        padding: 10px 14px !important;
        font-size: 0.90rem !important; 
        min-height: 40px !important;
    }

    .card-title {
        font-size: 1.3rem !important; 
    }

    .form-label {
        font-size: 0.95rem; 
    }

    .form-select,
    .form-control {
        padding: 11px 12px !important;
        font-size: 0.95rem !important; 
        min-height: 44px !important;
    }

    .card-body .col-md-12 .btn {
        padding: 11px 14px !important;
        font-size: 0.95rem !important;
        min-height: 44px !important;
    }

    /* Table - LESBAR! */
    .table {
        font-size: 0.95rem;
    }

        .table thead th {
            padding: 10px 8px;
            font-size: 0.85rem;
        }

        .table tbody td {
            padding: 10px 8px;
            font-size: 0.95rem;
        }

    .badge {
        font-size: 0.85rem !important;
        padding: 4px 8px !important;
    }

    /* Action Buttons - proportional */
    .btn-group .btn-sm {
        padding: 0.4rem 0.6rem !important;
        min-width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }

        .btn-group .btn-sm i {
            font-size: 0.9rem;
        }

    /* Pagination - SICHTBAR! */
    .pagination-controls .btn {
        min-width: 40px;
        height: 40px;
        padding: 0 0.75rem;
        font-size: 0.9rem !important;
        font-weight: 600;
    }

    .pagination-controls .btn-outline-secondary {
        border: 2px solid var(--text-primary) !important;
        color: var(--text-primary) !important;
    }

        .pagination-controls .btn-outline-secondary:hover:not(:disabled) {
            background-color: var(--primary-color) !important;
            border-color: var(--primary-color) !important;
            color: white !important;
        }

    .pagination-current {
        font-size: 0.85rem;
        padding: 0 0.75rem;
        height: 40px;
        font-weight: 700;
    }

    .pagination-info {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .legal-footer-fixed-full {
        padding: 10px 15px;
    }

}

/* ===== FILTER TOGGLE - NUR MOBILE ===== */

/* Desktop - Filter immer sichtbar, Button versteckt */
@media (min-width: 769px) {
    .filter-toggle-btn {
        display: none !important;
    }

    .filter-card {
        display: block !important;
    }

    .row.mb-4 .btn-success {
        width: auto !important;
        height: auto !important;
        min-height: auto !important;
        padding: 8px 16px !important;
        font-size: 0.875rem !important;
        line-height: normal !important;
    }

        .row.mb-4 .btn-success i {
            font-size: 1rem !important;
            margin-right: 8px !important;
        }
}

/* ===== RUNDE BUTTONS IN BTN-GROUP (bei gap-2 Wrapper) ===== */
/* Bootstrap entfernt normalerweise innere Ecken, aber wir wollen runde Buttons */
.d-flex.gap-2 .btn-group {
    display: inline-flex;
    gap: 0; /* Buttons bleiben zusammen */
}

    .d-flex.gap-2 .btn-group .btn {
        border-radius: 0 !important; /* Erst mal alle eckig */
    }


        /* Nur äußere Ecken rund machen */
        .d-flex.gap-2 .btn-group .btn:first-child {
            border-top-left-radius: 0.375rem !important;
            border-bottom-left-radius: 0.375rem !important;
        }

        .d-flex.gap-2 .btn-group .btn:last-child {
            border-top-right-radius: 0.375rem !important;
            border-bottom-right-radius: 0.375rem !important;
        }

        /* Wenn nur 1 Button in der Gruppe */
        .d-flex.gap-2 .btn-group .btn:only-child {
            border-radius: 0.375rem !important;
        }

@media (min-width: 769px) {
    .card-footer .d-grid {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }

    .card-footer .row {
        width: auto;
        flex: 0 0 auto;
    }

    .card-footer .col-6,
    .card-footer .col-12 {
        width: auto !important;
        flex: 0 0 auto;
    }

    .card-footer .btn {
        width: auto !important;
    }
}