/**
 * Kalender-Anwendung - Haupt-Stylesheet
 * Schlichtes schwarz-weiß Design mit Graustufen
 */

/* === RESET & GRUNDLAGEN === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #000000;
    --color-dark: #1a1a1a;
    --color-gray-900: #2d2d2d;
    --color-gray-800: #404040;
    --color-gray-700: #5a5a5a;
    --color-gray-600: #757575;
    --color-gray-500: #909090;
    --color-gray-400: #ababab;
    --color-gray-300: #c6c6c6;
    --color-gray-200: #e0e0e0;
    --color-gray-100: #f0f0f0;
    --color-white: #ffffff;
    
    /* Event-Farben */
    --color-event: #4caf50;
    --color-clubabend: #2196f3;
    --color-sonstiges: #9c27b0;
    --color-geburtstag: #f44336;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.18);
    
    --border-radius: 6px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--color-gray-100);
    color: var(--color-dark);
    line-height: 1.6;
    font-size: 14px;
}

/* === LOGIN-SEITE === */
.login-page {
    background: linear-gradient(135deg, var(--color-gray-900) 0%, var(--color-gray-700) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: block;
    stroke: var(--color-gray-900);
}

.login-header h1 {
    font-size: 24px;
    color: var(--color-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: var(--color-gray-600);
    font-size: 14px;
}

.login-form {
    margin-top: 30px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--color-gray-300);
    font-size: 12px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--color-gray-900);
    font-weight: 500;
    font-size: 14px;
}

.form-group label svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-gray-600);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--color-gray-200);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--color-white);
    color: var(--color-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gray-900);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--color-gray-900);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-black);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-gray-300);
    color: var(--color-dark);
}

.btn-secondary:hover {
    background: var(--color-gray-400);
}

.btn-danger {
    background: var(--color-gray-700);
    color: var(--color-white);
}

.btn-danger:hover {
    background: var(--color-gray-900);
}

.btn-success {
    background: var(--color-gray-800);
    color: var(--color-white);
}

.btn-success:hover {
    background: var(--color-gray-900);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === ALERTS === */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c62828;
}

.alert-error svg {
    stroke: #c62828;
}

.alert-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.alert-success svg {
    stroke: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
}

.alert-warning svg {
    stroke: #e65100;
}

.alert-info {
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-900);
}

.alert-info svg {
    stroke: var(--color-gray-900);
}

/* === HEADER === */
.header {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-gray-200);
    padding: 0 24px;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-dark);
    text-decoration: none;
}

.header-logo svg {
    width: 28px;
    height: 28px;
    stroke: var(--color-gray-900);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--color-gray-100);
    border-radius: var(--border-radius);
}

.header-user svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-gray-700);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--color-gray-600);
}

/* === MAIN LAYOUT === */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.page-title svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-gray-900);
}

.page-subtitle {
    color: var(--color-gray-600);
    font-size: 14px;
}

/* === CARDS === */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-gray-200);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-gray-900);
}

/* === TABLE === */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--color-gray-100);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-dark);
    border-bottom: 2px solid var(--color-gray-200);
    font-size: 13px;
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--color-gray-200);
    color: var(--color-gray-900);
}

tr:hover {
    background: var(--color-gray-100);
}

tr:last-child td {
    border-bottom: none;
}

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-systemadmin {
    background: var(--color-black);
    color: var(--color-white);
}

.badge-admin {
    background: var(--color-gray-700);
    color: var(--color-white);
}

.badge-member {
    background: var(--color-gray-400);
    color: var(--color-white);
}

.badge-prospect {
    background: var(--color-gray-200);
    color: var(--color-dark);
}

.badge-event {
    background: var(--color-event);
    color: var(--color-white);
}

.badge-clubabend {
    background: var(--color-clubabend);
    color: var(--color-white);
}

.badge-sonstiges {
    background: var(--color-sonstiges);
    color: var(--color-white);
}

.badge-geburtstag {
    background: var(--color-geburtstag);
    color: var(--color-white);
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 24px;
    border-bottom: 2px solid var(--color-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-dark);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.modal-close svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-gray-600);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 2px solid var(--color-gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* === DASHBOARD CARDS === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
}

.stat-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-gray-900);
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--color-gray-600);
    font-size: 13px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-dark);
}

/* === RESPONSIVE === */

/* Breakpoints:
   - Mobile: < 576px
   - Tablet: 576px - 768px
   - Desktop Small: 768px - 992px
   - Desktop Medium: 992px - 1200px
   - Desktop Large: > 1200px
*/

/* === MOBILE SMALL (< 576px) === */
@media (max-width: 575px) {
    body {
        font-size: 13px;
    }
    
    /* Login */
    .login-box {
        padding: 24px 16px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-icon {
        width: 48px;
        height: 48px;
    }
    
    /* Header */
    .header {
        padding: 0 12px;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
        gap: 12px;
    }
    
    .header-logo {
        font-size: 16px;
    }
    
    .header-logo svg {
        width: 24px;
        height: 24px;
    }
    
    .header-nav {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .header-user {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .user-info {
        display: none; /* Verstecke Benutzername auf sehr kleinen Displays */
    }
    
    /* Main Container */
    .main-container {
        padding: 12px;
    }
    
    /* Page Header */
    .page-title {
        font-size: 22px;
        flex-wrap: wrap;
    }
    
    .page-title svg {
        width: 26px;
        height: 26px;
    }
    
    .page-subtitle {
        font-size: 13px;
    }
    
    /* Cards */
    .card {
        padding: 16px 12px;
        margin-bottom: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-title {
        font-size: 16px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%; /* Volle Breite auf mobil */
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }
    
    /* Tables - Horizontal Scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
        min-width: 600px; /* Force horizontal scroll */
    }
    
    th, td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .stat-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    /* Modal */
    .modal {
        padding: 0;
    }
    
    .modal-content {
        margin: 0;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* === MOBILE LARGE / TABLET (576px - 768px) === */
@media (min-width: 576px) and (max-width: 767px) {
    /* Header */
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 0;
    }
    
    .header-nav {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    /* Main Container */
    .main-container {
        padding: 20px;
    }
    
    /* Cards */
    .card {
        padding: 20px;
    }
    
    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
    }
    
    /* Buttons in Gruppen */
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* === TABLET / SMALL DESKTOP (768px - 991px) === */
@media (min-width: 768px) and (max-width: 991px) {
    .main-container {
        padding: 24px 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-nav {
        gap: 12px;
    }
    
    /* Tables bleiben scrollbar wenn zu breit */
    .table-container {
        overflow-x: auto;
    }
}

/* === MEDIUM DESKTOP (992px - 1199px) === */
@media (min-width: 992px) and (max-width: 1199px) {
    .main-container {
        max-width: 960px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === LARGE DESKTOP (≥ 1200px) === */
@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === TOUCH-OPTIMIERUNG === */
@media (hover: none) and (pointer: coarse) {
    /* Größere Touch-Targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 38px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
    
    /* Keine Hover-Effekte auf Touch */
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-danger:hover,
    .btn-success:hover {
        transform: none;
    }
    
    tr:hover {
        background: transparent;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-width: 767px) and (orientation: landscape) {
    .modal-content {
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .header-content {
        padding: 8px 0;
    }
    
    .main-container {
        padding: 12px;
    }
}

/* === HIGH DPI DISPLAYS === */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Schärfere Borders und Shadows */
    .card,
    .modal-content,
    .login-box {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 
                    0 2px 4px rgba(0, 0, 0, 0.06);
    }
}

/* === PRINT STYLES === */
@media print {
    .header,
    .header-nav,
    .btn,
    .modal,
    .alert {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .main-container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* === DARK MODE UNTERSTÜTZUNG (optional) === */
@media (prefers-color-scheme: dark) {
    /* Kann später aktiviert werden */
    /* body {
        background: #1a1a1a;
        color: #f0f0f0;
    } */
}

/* === REDUZIERTE BEWEGUNG === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.ml-1 { margin-left: 8px; }
.ml-2 { margin-left: 16px; }
.mr-1 { margin-right: 8px; }
.mr-2 { margin-right: 16px; }

.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-column {
    flex-direction: column;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* Display Utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

/* Responsive Display Utilities */
@media (max-width: 575px) {
    .d-sm-none { display: none; }
    .d-sm-block { display: block; }
    .d-sm-flex { display: flex; }
}

@media (min-width: 576px) and (max-width: 767px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
}

@media (min-width: 768px) {
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
    .d-lg-flex { display: flex; }
}

/* Width Utilities */
.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }

.h-100 { height: 100%; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

/* Text Utilities */
.text-nowrap { white-space: nowrap; }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.font-weight-normal { font-weight: 400; }
.font-weight-bold { font-weight: 600; }

/* Spacing */
.mx-auto { 
    margin-left: auto; 
    margin-right: auto; 
}

/* Visibility */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Box Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-none { box-shadow: none; }

/* === CALENDAR RESPONSIVE === */
@media (max-width: 767px) {
    /* FullCalendar Anpassungen für Mobile */
    .fc-toolbar {
        flex-direction: column !important;
        gap: 12px;
    }
    
    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .fc-button {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
    
    .fc-toolbar-title {
        font-size: 18px !important;
    }
    
    /* Kalender Events */
    .fc-event {
        font-size: 11px !important;
    }
    
    .fc-daygrid-day-number {
        font-size: 13px !important;
    }
    
    .fc-col-header-cell-cushion {
        font-size: 12px !important;
        padding: 4px !important;
    }
    
    /* Calendar Toolbar */
    .calendar-toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    
    .calendar-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .legend {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .legend-item {
        font-size: 12px;
    }
}

/* === EVENT DETAILS RESPONSIVE === */
@media (max-width: 767px) {
    .event-details-grid {
        grid-template-columns: 1fr !important;
    }
    
    .event-meta {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .event-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .event-actions .btn {
        width: 100%;
    }
    
    .participants-list {
        grid-template-columns: 1fr !important;
    }
    
    .attachments-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === USER MANAGEMENT RESPONSIVE === */
@media (max-width: 767px) {
    .user-filters {
        flex-direction: column;
    }
    
    .user-filters select,
    .user-filters input {
        width: 100%;
    }
    
    .user-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .user-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* === SETTINGS RESPONSIVE === */
@media (max-width: 767px) {
    .settings-tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .settings-tab {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
    }
    
    .settings-content {
        padding: 16px;
    }
    
    .settings-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    .settings-actions {
        width: 100%;
    }
}

/* === FORM GROUPS RESPONSIVE === */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column !important;
    }
    
    .form-row .form-group {
        width: 100% !important;
    }
    
    .recurrence-options {
        padding: 12px;
    }
    
    .checkbox-group {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* === BUTTON GROUPS RESPONSIVE === */
@media (max-width: 575px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0;
    }
    
    .btn-toolbar {
        flex-direction: column;
        gap: 12px;
    }
}

/* === WHATSAPP REMINDER RESPONSIVE === */
@media (max-width: 767px) {
    .whatsapp-preview {
        padding: 12px;
        font-size: 13px;
    }
    
    .whatsapp-controls {
        flex-direction: column;
    }
    
    .whatsapp-controls .btn {
        width: 100%;
    }
}

/* === ACCESSIBILITY IMPROVEMENTS === */
/* Focus-sichtbare Outlines für Tastaturnavigation */
*:focus-visible {
    outline: 3px solid var(--color-gray-900);
    outline-offset: 2px;
}

/* Größere klickbare Bereiche für Links in Text */
a {
    padding: 2px 0;
    margin: -2px 0;
}

/* Skip-to-content Link für Screenreader */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-black);
    color: var(--color-white);
    padding: 8px 16px;
    z-index: 9999;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* Bessere Link-Kennzeichnung */
a:not(.btn) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* === SMOOTH SCROLLING === */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* === CONTAINER QUERIES (Progressive Enhancement) === */
@supports (container-type: inline-size) {
    .card {
        container-type: inline-size;
    }
    
    @container (max-width: 400px) {
        .card-header {
            flex-direction: column;
        }
    }
}

/* === PWA INSTALLATION STYLES === */

/* Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: -200px;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--color-gray-900);
}

.pwa-install-banner.show {
    bottom: 0;
}

.pwa-install-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pwa-install-icon {
    width: 48px;
    height: 48px;
    background: var(--color-gray-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-install-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-gray-900);
}

.pwa-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pwa-install-text strong {
    font-size: 15px;
    color: var(--color-dark);
    font-weight: 600;
}

.pwa-install-text span {
    font-size: 13px;
    color: var(--color-gray-600);
}

.pwa-install-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pwa-btn-install {
    background: var(--color-gray-900);
    color: var(--color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwa-btn-install:hover {
    background: var(--color-black);
    transform: translateY(-1px);
}

.pwa-btn-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--color-gray-600);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pwa-btn-close:hover {
    background: var(--color-gray-100);
    color: var(--color-dark);
}

/* iOS Banner */
.pwa-ios-banner {
    border-top-color: #007AFF;
}

.pwa-ios-banner .pwa-install-icon {
    background: #007AFF;
}

.pwa-ios-banner .pwa-install-icon svg {
    stroke: white;
}

/* Update Notification */
.pwa-update-notification {
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-gray-900);
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    border-radius: 12px;
    z-index: 10000;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    max-width: 90%;
}

.pwa-update-notification.show {
    top: 20px;
}

.pwa-update-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pwa-update-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-update-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-white);
}

.pwa-update-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-update-text strong {
    font-size: 14px;
    font-weight: 600;
}

.pwa-update-text span {
    font-size: 13px;
    opacity: 0.9;
}

.pwa-btn-update {
    background: var(--color-white);
    color: var(--color-gray-900);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-btn-update:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Success Message */
.pwa-success-message {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-success-message.show {
    top: 20px;
}

.pwa-success-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
}

.pwa-success-content svg {
    width: 24px;
    height: 24px;
    stroke: white;
    flex-shrink: 0;
}

/* Responsive PWA Banners */
@media (max-width: 767px) {
    .pwa-install-banner {
        padding: 12px 16px;
    }
    
    .pwa-install-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .pwa-install-icon {
        width: 40px;
        height: 40px;
    }
    
    .pwa-install-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .pwa-install-text strong {
        font-size: 14px;
    }
    
    .pwa-install-text span {
        font-size: 12px;
    }
    
    .pwa-install-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .pwa-btn-install {
        flex: 1;
        padding: 12px 16px;
    }
    
    .pwa-update-notification {
        min-width: auto;
        width: calc(100% - 32px);
        left: 16px;
        transform: none;
    }
    
    .pwa-success-message {
        width: calc(100% - 32px);
        left: 16px;
        transform: none;
    }
}

/* PWA Standalone-Modus Anpassungen */
@media (display-mode: standalone) {
    /* Verstecke Browser-spezifische Elemente im App-Modus */
    .browser-only {
        display: none !important;
    }
    
    /* Erhöhe oberen Padding für Statusbar */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .header {
        padding-top: env(safe-area-inset-top);
    }
}

/* iOS Safe Area Anpassungen */
@supports (padding: env(safe-area-inset-top)) {
    .pwa-install-banner {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

