/* Gleis4 Restaurant Bistro Cafe - Mitarbeiterverwaltung */
/* Modernes Design mit Restaurant-Atmosphäre */

:root {
    --primary-color: #2c5530;
    --secondary-color: #8b4513;
    --accent-color: #d4af37;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden !important;
    transform: none !important;
    transition: none !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden !important;
    transform: none !important;
    transition: none !important;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    height: auto;
    transform: none !important;
    transition: none !important;
    padding-left: 1rem;
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    transform: none !important;
    transition: none !important;
    position: relative !important;
    flex-direction: row;
    gap: 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: -1rem;
}

.logo:hover {
    color: var(--white);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-direction: row;
    margin-left: 0;
    max-width: 70%;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-size: 0.9rem;
    max-width: 110px;
    min-width: 80px;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Desktop Navigation Toggle verstecken */
.nav-toggle {
    display: none;
}

/* Desktop Navigation verbessern */
@media (min-width: 769px) {
    .header {
        padding: 1.2rem 0;
    }
    
    .header-content {
        gap: 2rem;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.8rem;
    }
    
    .nav-menu a {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
        border: 1px solid transparent;
        white-space: nowrap;
    }
    
    .nav-menu a:hover {
        border-color: rgba(255,255,255,0.3);
        background-color: rgba(255,255,255,0.15);
    }
    
    .nav-menu a.active {
        background-color: rgba(255,255,255,0.2);
        border-color: var(--accent-color);
        color: var(--accent-color);
        font-weight: 600;
    }
}

@media (min-width: 1367px) {
    .nav-menu {
        display: flex;
        flex-wrap: nowrap;
        overflow: visible;
        max-width: none;
        gap: 1rem;
    }
    .nav-menu a {
        max-width: none;
        min-width: 100px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

@media (min-width: 1024px) and (max-width: 1366px) {
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        overflow: visible;
        max-width: 100vw;
        gap: 0.5rem;
    }
    .nav-menu a {
        font-size: 0.95rem;
        padding: 0.45rem 0.7rem;
        min-width: 80px;
        max-width: none;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .header-content {
        flex-wrap: wrap;
    }
}


/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    position: relative;
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-control.error {
    border-color: var(--danger-color);
}

.form-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 100px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background-color: #1e3a22;
    transform: translateY(-1px);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #6b3410;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-success:hover {
    background-color: #1e7e34;
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-danger:hover {
    background-color: #c82333;
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-info {
    background-color: var(--info-color);
    color: var(--white);
}

.btn-info:hover {
    background-color: #138496;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
    font-weight: 500;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
    font-weight: 500;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
    font-weight: 500;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
    font-weight: 500;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.table tbody tr:hover {
    background-color: var(--gray-100);
}

.table-responsive {
    overflow-x: auto;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Time Tracking */
.time-display {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    color: var(--primary-color);
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
}

.time-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

/* Cash Register */
.cash-display {
    background: linear-gradient(135deg, var(--accent-color) 0%, #f4d03f 100%);
    color: var(--dark-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.cash-amount {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.cash-target {
    font-size: 1.2rem;
    opacity: 0.8;
}

.money-counter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.money-item {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.money-item:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.money-item.selected {
    border-color: var(--accent-color);
    background-color: #fff8dc;
}

.money-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.money-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 0.4rem 0;
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
        width: 100% !important;
        height: auto;
    }
    
    .header-content {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding-right: 0.5rem;
    }
    
    .logo {
        font-size: 1rem;
        white-space: nowrap;
        flex-shrink: 0;
        max-width: 70%;
    }
    
    .nav-menu {
        display: none !important; /* Verstecke Navigation auf Mobile */
    }
    
    /* Mobile Navigation Toggle */
    .nav-toggle {
        display: flex !important;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        color: var(--white);
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0.3rem;
        border-radius: 6px;
        transition: var(--transition);
        flex-shrink: 0;
        min-width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        margin-right: -0.5rem;
    }
    
    .nav-toggle:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    
    .nav-menu.mobile-open {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        width: auto;
        min-width: 220px;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 0.3rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        gap: 0.15rem;
        z-index: 999;
        border-radius: 0 0 12px 0;
        max-height: 70vh;
        overflow-y: auto;
        align-items: stretch;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        border-radius: var(--border-radius);
        text-align: left;
        background: rgba(255,255,255,0.1);
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        color: var(--white) !important;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        min-height: 44px;
        width: 100%;
        box-sizing: border-box;
        gap: 0.5rem;
    }
    
    .nav-menu.mobile-open a:hover {
        background: rgba(255,255,255,0.2);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        color: var(--accent-color) !important;
    }
    
    .nav-menu.mobile-open a:active {
        background: rgba(255,255,255,0.3);
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .card-header {
        padding: 1.2rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .card-title {
        font-size: 1.3rem;
        margin: 0;
        color: var(--gray-800);
        font-weight: 600;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    .time-controls {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .stat-card {
        padding: 1.2rem;
        border-radius: 12px;
        text-align: center;
        background: var(--white);
        border: 2px solid var(--gray-200);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 1.8rem;
        font-weight: bold;
        color: var(--primary-color);
        text-shadow: none;
        line-height: 1.2;
    }
    
    .stat-label {
        font-size: 0.85rem;
        margin-top: 0.5rem;
        color: var(--gray-700);
        font-weight: 500;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .money-counter {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .time-display {
        font-size: 1.8rem;
        font-weight: bold;
    }
    
    .cash-amount {
        font-size: 2rem;
        font-weight: bold;
    }
    
    .table-responsive {
        font-size: 0.9rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table th {
        padding: 1rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .table td {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        border-radius: 8px;
        font-weight: 500;
        min-width: 120px;
        margin: 0.2rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: 1px solid rgba(0,0,0,0.1);
    }
    
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .btn-sm {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-width: 80px;
        margin: 0.1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        border: 1px solid rgba(0,0,0,0.1);
    }
    
    .btn-sm:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    
    .form-control {
        font-size: 1rem;
        padding: 1rem;
        border-radius: 8px;
        border: 2px solid var(--gray-300);
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
    }
    
    .form-label {
        font-size: 1rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: var(--gray-700);
    }
    
    .d-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    
    .alert {
        padding: 1rem;
        border-radius: 8px;
        font-size: 0.95rem;
        font-weight: 500;
        border-left-width: 6px;
    }
    
    .alert h4 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 6px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-content {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu a {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .money-counter {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .container {
        padding: 0 30px;
    }
}

/* Mobile Landscape (Querformat) Optimierung */
@media (max-width: 932px) and (orientation: landscape) {
    .header {
        padding: 0.2rem 0;
    }
    
    .header-content {
        gap: 0.5rem;
        padding-right: 0.2rem;
    }
    
    .logo {
        font-size: 0.8rem;
        max-width: 55%;
    }
    
    .nav-toggle {
        min-width: 28px;
        height: 28px;
        font-size: 0.9rem;
        padding: 0.15rem;
    }
    
    .nav-menu.mobile-open {
        min-width: 180px;
        max-height: 55vh;
        gap: 0.05rem;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        min-height: 32px;
    }
    
    .main-content {
        padding: 0.5rem 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .card {
        margin-bottom: 0.8rem;
        padding: 1rem;
        border-radius: 6px;
    }
    
    .card-header {
        padding: 0.8rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }
    
    .stat-card {
        padding: 0.6rem;
        min-height: 80px;
        border-radius: 6px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
        margin-top: 0.2rem;
        line-height: 1.2;
    }
    
    .d-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.6rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
    }
    
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 80px;
        border-radius: 6px;
    }
    
    .table-responsive {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
    
    .form-control {
        font-size: 0.9rem;
        padding: 0.6rem;
        border-radius: 6px;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .alert {
        padding: 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        border-radius: 4px;
    }
}

/* Sehr kleine Bildschirme im Querformat */
@media (max-width: 700px) and (orientation: landscape) {
    .header {
        padding: 0.15rem 0;
    }
    
    .header-content {
        gap: 0.3rem;
        padding-right: 0.15rem;
    }
    
    .logo {
        font-size: 0.7rem;
        max-width: 45%;
    }
    
    .nav-toggle {
        min-width: 24px;
        height: 24px;
        font-size: 0.8rem;
        padding: 0.1rem;
    }
    
    .nav-menu.mobile-open {
        min-width: 160px;
        max-height: 50vh;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        min-height: 28px;
    }
    
    .main-content {
        padding: 0.3rem 0;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .stat-card {
        padding: 0.4rem;
        min-height: 60px;
        border-radius: 4px;
    }
    
    .stat-number {
        font-size: 1rem;
    }
    
    .stat-label {
        font-size: 0.6rem;
        margin-top: 0.15rem;
        line-height: 1.1;
    }
    
    .d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
    }
    
    .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-width: 60px;
        border-radius: 4px;
    }
    
    .card {
        padding: 0.8rem;
        margin-bottom: 0.6rem;
        border-radius: 4px;
    }
    
    .card-header {
        padding: 0.6rem;
    }
    
    .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }
    
    .table-responsive {
        font-size: 0.7rem;
    }
    
    .table th,
    .table td {
        padding: 0.3rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .form-control {
        font-size: 0.8rem;
        padding: 0.4rem;
        border-radius: 4px;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .alert {
        padding: 0.6rem;
        font-size: 0.8rem;
        border-radius: 4px;
    }
    
    .badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
        border-radius: 3px;
    }
}

/* iPad Air 13" (M3) Optimierung - Querformat */
@media (min-width: 1024px) and (max-width: 1366px) {
    .header {
        padding: 0.8rem 0;
    }
    
    .header-content {
        gap: 1.5rem;
        padding-right: 0.5rem;
    }
    
    .logo {
        font-size: 1.4rem;
        max-width: 70%;
    }
    
    .nav-toggle {
        min-width: 40px;
        height: 40px;
        font-size: 1.2rem;
        padding: 0.3rem;
    }
    
    .nav-menu.mobile-open {
        min-width: 280px;
        max-height: 70vh;
        gap: 0.2rem;
        max-width: 90vw;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
        max-width: none;
        min-width: auto;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .container {
        padding: 0 25px;
        max-width: 1200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }
    
    .stat-card {
        padding: 1.2rem;
        min-height: 120px;
        border-radius: 10px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
        margin-top: 0.5rem;
        line-height: 1.3;
    }
    
    .d-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1.2rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.5rem !important;
    }
    
    .btn {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
        min-width: 120px;
        border-radius: 8px;
    }
    
    .card {
        padding: 1.8rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 1.2rem;
    }
    
    .card-title {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
    }
    
    .table-responsive {
        font-size: 0.95rem;
    }
    
    .table th,
    .table td {
        padding: 0.8rem 0.6rem;
        font-size: 0.95rem;
    }
    
    .form-control {
        font-size: 1rem;
        padding: 0.8rem;
        border-radius: 8px;
    }
    
    .form-label {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .alert {
        padding: 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    
    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    /* Touch-Optimierung für iPad Querformat */
    .btn {
        min-height: 44px; /* Apple's empfohlene Mindestgröße für Touch */
    }
    
    .nav-menu.mobile-open a {
        min-height: 44px; /* Touch-freundliche Größe */
    }
    
    /* Navigation-Optimierung für iPad */
    .nav-menu.mobile-open {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.3rem;
        padding: 0.5rem;
        width: auto;
        min-width: 300px;
        max-width: 95vw;
    }
    
    .nav-menu.mobile-open a {
        text-align: center;
        justify-content: center;
        align-items: center;
        display: flex;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        min-width: auto;
    }
    
    .form-control {
        min-height: 44px; /* Touch-freundliche Eingabefelder */
    }
    
    .table th,
    .table td {
        min-height: 44px; /* Touch-freundliche Tabellenzellen */
    }
    
    /* Größere Touch-Bereiche für bessere Bedienung */
    .stat-card {
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .stat-card:hover {
        transform: scale(1.02);
    }
    
    .card {
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .card:hover {
        transform: scale(1.01);
    }
}

/* iPad Air 13" (M3) Optimierung - Hochformat */
@media (min-width: 1024px) and (max-width: 1366px) and (orientation: portrait) {
    .header {
        padding: 0.6rem 0;
    }
    
    .header-content {
        gap: 1.2rem;
        padding-right: 0.4rem;
    }
    
    .logo {
        font-size: 1.2rem;
        max-width: 65%;
    }
    
    .nav-toggle {
        min-width: 36px;
        height: 36px;
        font-size: 1.1rem;
        padding: 0.25rem;
    }
    
    .nav-menu.mobile-open {
        min-width: 220px;
        max-height: 65vh;
        gap: 0.15rem;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    .main-content {
        padding: 1.2rem 0;
    }
    
    .container {
        padding: 0 20px;
        max-width: 1100px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        min-height: 100px;
        border-radius: 8px;
    }
    
    .stat-number {
        font-size: 1.6rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
        margin-top: 0.4rem;
        line-height: 1.2;
    }
    
    .d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.2rem !important;
    }
    
    .btn {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
        min-width: 110px;
        border-radius: 7px;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.2rem;
        border-radius: 10px;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.7rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        font-size: 0.95rem;
        padding: 0.7rem;
        border-radius: 7px;
    }
    
    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .alert {
        padding: 0.9rem;
        font-size: 0.9rem;
        border-radius: 7px;
    }
    
    .badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 5px;
    }
    
    /* Touch-Optimierung für iPad */
    .btn {
        min-height: 44px; /* Apple's empfohlene Mindestgröße für Touch */
    }
    
    .nav-menu.mobile-open a {
        min-height: 44px; /* Touch-freundliche Größe */
    }
    
    /* Navigation-Optimierung für iPad Hochformat */
    .nav-menu.mobile-open {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.25rem;
        padding: 0.4rem;
        width: auto;
        min-width: 280px;
        max-width: 90vw;
    }
    
    .nav-menu.mobile-open a {
        text-align: center;
        justify-content: center;
        align-items: center;
        display: flex;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        max-width: none;
        min-width: auto;
    }
    
    .form-control {
        min-height: 44px; /* Touch-freundliche Eingabefelder */
    }
    
    .table th,
    .table td {
        min-height: 44px; /* Touch-freundliche Tabellenzellen */
    }
}

/* Extrem kleine Bildschirme im Querformat (iPhone SE, etc.) */
@media (max-width: 568px) and (orientation: landscape) {
    .header {
        padding: 0.1rem 0;
    }
    
    .header-content {
        gap: 0.2rem;
        padding-right: 0.1rem;
    }
    
    .logo {
        font-size: 0.6rem;
        max-width: 40%;
    }
    
    .nav-toggle {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
        padding: 0.05rem;
    }
    
    .nav-menu.mobile-open {
        min-width: 140px;
        max-height: 45vh;
    }
    
    .nav-menu.mobile-open a {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        min-height: 24px;
    }
    
    .main-content {
        padding: 0.2rem 0;
    }
    
    .container {
        padding: 0 5px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.3rem;
    }
    
    .stat-card {
        padding: 0.3rem;
        min-height: 50px;
        border-radius: 3px;
    }
    
    .stat-number {
        font-size: 0.9rem;
    }
    
    .stat-label {
        font-size: 0.55rem;
        margin-top: 0.1rem;
        line-height: 1.0;
    }
    
    .d-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.3rem !important;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.3rem !important;
    }
    
    .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
        min-width: 50px;
        border-radius: 3px;
    }
    
    .card {
        padding: 0.6rem;
        margin-bottom: 0.4rem;
        border-radius: 3px;
    }
    
    .card-header {
        padding: 0.4rem;
    }
    
    .card-title {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }
    
    .table-responsive {
        font-size: 0.65rem;
    }
    
    .table th,
    .table td {
        padding: 0.2rem 0.15rem;
        font-size: 0.65rem;
    }
    
    .form-control {
        font-size: 0.7rem;
        padding: 0.3rem;
        border-radius: 3px;
    }
    
    .form-label {
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
    }
    
    .alert {
        padding: 0.4rem;
        font-size: 0.7rem;
        border-radius: 3px;
    }
    
    .badge {
        padding: 0.15rem 0.3rem;
        font-size: 0.55rem;
        border-radius: 2px;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.close {
    color: var(--gray-500);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--danger-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--gray-600); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--gray-600);
    color: var(--white);
}

.badge-success {
    background-color: var(--success-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-weight: 600;
}

.badge-danger {
    background-color: var(--danger-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-weight: 600;
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
    font-weight: 600;
}

.badge-info {
    background-color: var(--info-color);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-weight: 600;
}

/* Calendar Styles */
.calendar-grid {
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--gray-300) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    margin: 1rem 0 !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.calendar-header {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 1px !important;
    background-color: var(--gray-300) !important;
    width: 100% !important;
    min-width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.calendar-cell {
    background-color: var(--white);
    padding: 0.5rem;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 1px !important;
    background-color: var(--gray-300) !important;
    width: 100% !important;
    min-width: 100% !important;
}

.calendar-cell.header {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
    font-weight: 600 !important;
    text-align: center !important;
    padding: 0.8rem 0.2rem !important;
    min-height: auto !important;
    font-size: 0.8rem !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    border: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.calendar-cell.empty {
    background-color: var(--gray-100);
}

.calendar-cell.today {
    background-color: rgba(var(--primary-color), 0.1);
    border: 2px solid var(--primary-color);
}

.calendar-cell.weekend {
    background-color: var(--gray-50);
}

.calendar-cell.has-schedule {
    background-color: rgba(var(--success-color), 0.1);
    border-left: 4px solid var(--success-color);
}

.date-number {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 0.3rem;
}

.schedule-info {
    font-size: 0.8rem;
    color: var(--gray-700);
}

.schedule-info .time {
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 0.2rem;
}

.schedule-info .break {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.2rem;
}

.schedule-info .notes {
    font-size: 0.8rem;
    color: var(--info-color);
}

.no-schedule {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: auto;
}

/* Mobile Calendar */
@media (max-width: 768px) {
    .calendar-grid {
        font-size: 0.8rem;
        width: 100% !important;
    }
    
    .calendar-header {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 1px !important;
        width: 100% !important;
    }
    
    .calendar-days {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 1px !important;
        width: 100% !important;
    }
    
    .calendar-cell {
        padding: 0.3rem;
        min-height: 60px;
        width: 100% !important;
        min-width: 0 !important;
    }
    
    .calendar-cell.header {
        padding: 0.4rem 0.1rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .date-number {
        font-size: 0.9rem;
    }
    
    .schedule-info {
        font-size: 0.7rem;
    }
    
    .schedule-info .time {
        font-size: 0.7rem;
    }
    
    .schedule-info .break {
        font-size: 0.65rem;
    }
    
    .no-schedule {
        font-size: 0.7rem;
    }
} 