/* CSS Variablen für iOS Fix */
:root {
    --vh: 1vh;
}

/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* iOS Fix */
}

/* Container für zentrierte Inhalte */
.page-container {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* iOS Fix */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Basis-Container */
.container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 600px;
}

/* Admin-Container */
.admin-container {
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8em;
}

.admin-body {
    background: #f8f9fa;
}

/* Überschriften und Text */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 3em;
    margin-bottom: 10px;
}

.page-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.lock-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: #3498db;
}

/* Info-Box */
.info-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
}

.info-box h3 {
    color: #2980b9;
    margin-bottom: 8px;
}

.info-box ul {
    margin-left: 20px;
    color: #555;
}

/* Formulare */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

textarea {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="password"] {
    padding: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="password"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.notizen-field {
    min-height: 80px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.submit-btn {
    background: #e74c3c;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.login-btn {
    background: #3498db;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.login-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #d68910;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-edit-meldung {
    background: #3498db;
    color: white;
}

.btn-edit-meldung:hover {
    background: #2980b9;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Nachrichten */
.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* Statistiken */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab {
    flex: 1;
    padding: 15px 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.tab.active {
    background: #3498db;
    color: white;
}

.tab:hover:not(.active) {
    background: #ecf0f1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Karten */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

/* Filter */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: end;
}

/* Tabellen */
.meldungen-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.meldungen-table th,
.meldungen-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.meldungen-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.meldungen-table tr:hover {
    background: #f8f9fa;
}

.meldung-content {
    max-width: 300px;
    word-wrap: break-word;
}

/* Status-Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-width: fit-content;
}

.status-unbearbeitet {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-kategorisiert {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Kategorie-Form - Einheitlich und schön */
.kategorie-form {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.kategorie-form select {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 35px;
}

.kategorie-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.kategorie-form button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    min-width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

/* Einheitliche Button-Styles für Tabellen */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 85px;
    height: 32px;
    white-space: nowrap;
}

.btn-edit {
    background: #f39c12;
    color: white;
    border: 1px solid #e67e22;
}

.btn-edit:hover {
    background: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: 1px solid #c0392b;
}

.btn-delete:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-edit-meldung {
    background: #3498db;
    color: white;
    border: 1px solid #2980b9;
}

.btn-edit-meldung:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* Verbesserte Aktions-Bereiche */
.kategorie-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

.meldung-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

/* Tabellen-Optimierungen */
.meldungen-table td {
    vertical-align: top;
    padding: 12px 8px;
}

/* Status-Spalte */
.meldungen-table td:nth-child(3) {
    min-width: 130px;
}

/* Aktions-Spalte */
.meldungen-table td:last-child {
    min-width: 200px;
    width: 200px;
}

/* Dropdown in Filter-Bereichen auch verbessern */
.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Filter-Actions auch verbessern */
.filter-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    min-width: 100px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Form-Selects in Edit-Forms */
.edit-form select,
.meldung-edit-form select,
.form-group select {
    padding: 10px 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #2c3e50;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 40px;
}

.edit-form select:focus,
.meldung-edit-form select:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Edit-Forms */
.edit-form {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.edit-form.show {
    display: block;
}

.edit-form .form-group {
    margin-bottom: 15px;
}

.edit-form input,
.edit-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.edit-form .btn {
    margin-right: 10px;
}

.meldung-edit-form {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid #3498db;
}

.meldung-edit-form.show {
    display: block;
}

/* Notizen */
.notizen-display {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 8px;
    font-size: 0.9em;
    color: #856404;
    margin-top: 5px;
    white-space: pre-wrap;
}

.notizen-display:empty {
    display: none;
}

/* 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);
    backdrop-filter: blur(3px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    color: #e74c3c;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.modal-body {
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #7f8c8d;
    font-size: 0.9em;
}

.back-link {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-link a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.back-link a:hover {
    color: #2c3e50;
}

/* Admin-Link */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.admin-link:hover {
    background: rgba(0,0,0,0.9);
}

/* FontAwesome Icon Styles */
.icon {
    margin-right: 8px;
}

.icon-only {
    margin-right: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Grundlegende mobile Anpassungen */
    body {
        /* Verhindere iOS Safari Zoom und Scroll-Probleme */
        -webkit-text-size-adjust: 100%;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        overflow-x: hidden;
        position: relative;
    }
    
    /* iOS Safari Viewport Fix */
    .page-container {
        padding: 10px;
        min-height: 100vh;
        min-height: -webkit-fill-available; /* iOS Safari Fix */
        align-items: flex-start;
        padding-top: 20px;
        /* Verhindere Verschiebung bei Tastatur */
        position: relative;
    }
    
    .container {
        padding: 20px;
        margin: 0;
        max-width: none;
        width: 100%;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        /* Stabilere Positionierung */
        position: relative;
        transform: none;
    }
    
    .login-container {
        padding: 25px 20px;
        margin: 0;
        max-width: none;
        width: 100%;
        position: relative;
        transform: none;
    }
    
    /* Header optimiert für Mobile */
    .page-header {
        margin-bottom: 20px;
    }
    
    .logo {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    .page-header h1 {
        font-size: 1.6em;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 1em;
        margin-bottom: 20px;
    }
    
    .lock-icon {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    
    /* Info-Box mobil optimiert */
    .info-box {
        padding: 12px;
        margin-bottom: 20px;
        font-size: 0.9em;
    }
    
    .info-box h3 {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .info-box ul {
        margin-left: 15px;
        line-height: 1.5;
    }
    
    .info-box li {
        margin-bottom: 4px;
    }
    
    /* Formulare mobil - iOS optimiert */
    .form-group {
        margin-bottom: 18px;
        position: relative;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
        -webkit-user-select: none;
        user-select: none;
    }
    
    textarea {
        min-height: 200px;
        font-size: 36px; /* Verhindert Zoom auf iOS */
        padding: 12px;
        /* iOS Safari Fixes */
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
        border-radius: 8px;
        /* Verhindere Verschiebung */
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
        /* Bessere Touch-Behandlung */
        -webkit-user-select: text;
        user-select: text;
        /* Scroll-Verhalten */
        -webkit-overflow-scrolling: touch;
    }
    
    /* iOS Safari spezifische Fixes für Textarea */
    textarea:focus {
        /* Verhindere automatisches Scrollen */
        position: relative;
        z-index: 1;
        /* Smooth Transition */
        transition: border-color 0.3s ease;
        -webkit-transition: border-color 0.3s ease;
    }
    
    input[type="password"] {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 12px;
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
        border-radius: 8px;
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
    }
    
    /* Buttons mobil */
    .submit-btn,
    .login-btn {
        padding: 14px 20px;
        font-size: 16px;
        margin-bottom: 15px;
        /* iOS Touch-Optimierung */
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
        border-radius: 8px;
        -webkit-tap-highlight-color: transparent;
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
    }
    
    /* Footer angepasst */
    .footer {
        margin-top: 20px;
        padding-top: 15px;
        font-size: 0.85em;
    }
    
    .back-link {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .back-link a {
        font-size: 0.9em;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Admin-Link mobil - weniger aufdringlich */
    .admin-link {
        position: fixed;
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 0.8em;
        border-radius: 20px;
        z-index: 999;
        opacity: 0.8;
        -webkit-tap-highlight-color: transparent;
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
    }
    
    .admin-link:hover {
        opacity: 1;
    }
    
    /* iOS Safari Keyboard Fixes */
    @supports (-webkit-touch-callout: none) {
        .page-container {
            /* iOS spezifische Höhe */
            min-height: -webkit-fill-available;
        }
        
        /* Verhindere Verschiebung bei Keyboard */
        .container,
        .login-container {
            position: relative;
            top: 0;
            transform: none;
            -webkit-transform: none;
        }
        
        /* Stabilere Textarea für iOS */
        textarea {
            position: relative;
            z-index: 1;
        }
        
        /* Keyboard-Erscheinung Fix */
        textarea:focus,
        input:focus {
            /* Verhindere Seiten-Sprung */
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
    
    /* Admin-Bereich mobil */
    .header-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 1.4em;
        line-height: 1.3;
    }
    
    .admin-container {
        padding: 0 15px;
    }
    
    .tabs {
        flex-direction: column;
        margin-bottom: 20px;
    }
    
    .tab {
        padding: 12px 15px;
        font-size: 14px;
        border-bottom: 1px solid #eee;
        -webkit-tap-highlight-color: transparent;
    }
    
    .tab:last-child {
        border-bottom: none;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .filters {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-actions {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    /* Statistiken mobil */
    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .stat-label {
        font-size: 0.8em;
    }
    
    /* Tabellen mobil - bessere Darstellung */
    .meldungen-table {
        font-size: 0.8em;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .meldungen-table th,
    .meldungen-table td {
        padding: 8px 6px;
        min-width: 100px;
    }
    
    .meldung-content {
        max-width: 150px;
        font-size: 0.9em;
        line-height: 1.3;
        white-space: normal;
    }
    
    /* Buttons in Tabellen */
    .btn-small {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 70px;
        height: 28px;
        -webkit-tap-highlight-color: transparent;
    }
    
    .kategorie-form {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .kategorie-form select {
        font-size: 13px;
        padding: 8px 10px;
        min-width: auto;
    }
    
    .kategorie-form button {
        font-size: 13px;
        padding: 8px 12px;
        min-width: auto;
    }
    
    /* Modal mobil */
    .modal-content {
        margin: 10px;
        padding: 20px;
        max-width: none;
        width: calc(100% - 20px);
        transform: translate3d(0,0,0);
        -webkit-transform: translate3d(0,0,0);
    }
    
    .modal-header h3 {
        font-size: 1.3em;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Edit-Forms mobil */
    .edit-form,
    .meldung-edit-form {
        padding: 10px;
    }
    
    .edit-form .form-group {
        margin-bottom: 12px;
    }
    
    .edit-form input,
    .edit-form textarea {
        font-size: 14px;
        padding: 6px 8px;
        -webkit-appearance: none;
    }
    
    /* Spezielle mobile Verbesserungen */
    .icon {
        margin-right: 4px;
    }
    
    /* Bessere Touch-Targets */
    .btn, .submit-btn, .login-btn {
        min-height: 44px; /* Apple HIG Empfehlung */
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Reduziere Abstände für mehr Inhalt */
    h2 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
    
    /* Allgemeine Touch-Verbesserungen */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Erlaubte User-Selection nur für Textfelder */
    input, textarea {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Noch kleinere Bildschirme (< 480px) */
@media (max-width: 480px) {
    .page-container {
        padding: 5px;
        padding-top: 15px;
        min-height: -webkit-fill-available;
    }
    
    .container,
    .login-container {
        padding: 15px;
        border-radius: 10px;
        position: relative;
        transform: none;
        -webkit-transform: none;
    }
    
    .logo {
        font-size: 2em;
    }
    
    .page-header h1 {
        font-size: 1.4em;
    }
    
    .info-box {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .submit-btn,
    .login-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .admin-link {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75em;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card:last-child {
        grid-column: 1 / -1;
    }
}

/* Noch kleinere Bildschirme (< 480px) */
@media (max-width: 480px) {
    .page-container {
        padding: 5px;
        padding-top: 15px;
    }
    
    .container,
    .login-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    .logo {
        font-size: 2em;
    }
    
    .page-header h1 {
        font-size: 1.4em;
    }
    
    .info-box {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .submit-btn,
    .login-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .admin-link {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75em;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card:last-child {
        grid-column: 1 / -1;
    }
}