/* Wallet Ticket Manager - Stylesheet */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    background: transparent;
    border-bottom: none;
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    z-index: 101;
}

.nav-brand a {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-brand img {
    display: block;
}

/* Mandanten-Auswahl im Header */
.mandant-selector-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 1rem;
    background: transparent;
    margin-top: 1rem;
}

.mandant-selector-wrapper {
    display: flex;
    align-items: center;
}

#global-mandant-select {
    padding: 0.5rem 3rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    min-width: 280px;
    background: white;
    cursor: pointer;
    color: var(--text-color);
    transition: all 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 22px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#global-mandant-select:hover {
    border-color: var(--secondary-color);
}

#global-mandant-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Einfaches X wenn aktiv - kein komplexer Effekt */
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu Wrapper */
.nav-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-user {
    display: flex;
    align-items: center;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    width: 2.5rem;
    height: 2.5rem;
}

.btn-logout:hover {
    background: var(--bg-color);
    color: var(--danger-color);
}

.btn-logout i {
    font-size: 1.25rem;
}

/* Logout-Link nur auf mobil sichtbar */
.nav-logout-mobile {
    display: none !important;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger-btn {
        display: flex;
    }
    
    /* Desktop Logout Button verstecken */
    .btn-logout {
        display: none;
    }
    
    /* Mobile Logout Link anzeigen */
    .nav-logout-mobile {
        display: flex !important;
        margin-top: 2rem;
        padding-top: 0;
        border-top: none;
    }
    
    .nav-logout-mobile a {
        color: var(--danger-color) !important;
        font-weight: 400;
        font-size: 1rem;
        padding: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding: 6rem 2rem 2rem;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-menu-wrapper.active {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
        align-items: flex-start;
    }
    
    .nav-menu li {
        width: auto;
        border-bottom: none;
    }
    
    .nav-menu a {
        padding: 0;
        width: auto;
        font-size: 1.125rem;
        font-weight: 400;
    }
    
    .nav-menu a.active {
        color: var(--primary-color);
        background: transparent;
    }
}

.mandant-badge {
    padding: 0.375rem 0.875rem;
    background: var(--primary-color);
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.mandant-label {
    opacity: 0.9;
    font-weight: 400;
}

.mandant-name {
    font-weight: 600;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* Mandant Subheadline */
.mandant-subheadline {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.mandant-subheadline i {
    margin-right: 0.3rem;
}

/* Dashboard & Notifications */
.dashboard-container h1,
.notifications-container h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-value.stat-success {
    color: var(--success-color);
}

.stat-value.stat-danger {
    color: var(--danger-color);
}

.stat-value.stat-muted {
    color: var(--secondary-color);
}

.stat-label {
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Content Sections */
.content-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

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

th {
    background: var(--bg-color);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.actions-cell {
    white-space: nowrap;
}

code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Custom Fields Column */
.custom-fields-cell {
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 300px;
}

.custom-fields-cell strong {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.8125rem;
}

/* Tickets Page */
.tickets-container {
    /* Kein Background, Padding oder Border - gleich wie Dashboard */
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
}

.page-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Mandanten-Dropdown für Admins */
.mandant-filter-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.mandant-filter-form label {
    font-weight: 500;
    color: #495057;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

#mandant-select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    font-size: 0.95rem;
    min-width: 250px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#mandant-select:hover {
    border-color: var(--primary-color);
}

#mandant-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.filters-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

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

.filter-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.filter-group input,
.filter-group select {
    padding: 0.5rem 2.75rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    background: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-group input {
    background-image: none;
    padding: 0.5rem 0.75rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filters-form .btn {
    grid-column: 1 / -1;
    justify-self: flex-start;
}

/* Status Badges */
.status-badge {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap !important;
    min-width: max-content;
    hyphens: none;
    word-break: keep-all;
    overflow-wrap: normal;
}

.badge-email {
    background: #e3f2fd;
    color: #1976d2;
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap !important;
    min-width: max-content;
    hyphens: none;
    word-break: keep-all;
    overflow-wrap: normal;
}

.badge-push {
    background: #f3e5f5;
    color: #7b1fa2;
    display: inline-flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap !important;
    min-width: max-content;
    hyphens: none;
    word-break: keep-all;
    overflow-wrap: normal;
}

.notification-message-wrapper {
    text-align: left;
}

.notification-toggle-row {
    display: block;
    clear: both;
    width: 100%;
}

.notification-toggle-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: block !important;
    width: max-content;
    white-space: nowrap;
    margin-top: 0.25rem;
    margin-left: 0;
    clear: both;
}

.notification-toggle-link:hover {
    text-decoration: underline;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-expired {
    background: #fef3c7;
    color: #92400e;
}

.status-voided {
    background: #fee2e2;
    color: #991b1b;
}

.status-installed {
    background: #dbeafe;
    color: #1e40af;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-success {
    background: #10b981;
    color: white;
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: #10b981;
    color: white;
}

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

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--secondary-color);
    transition: all 0.2s;
    border-radius: 0.25rem;
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.btn-icon-danger {
    color: #dc3545;
}

.btn-icon-danger:hover:not(:disabled) {
    background: #dc3545;
    color: white;
}

.btn-icon i {
    font-size: 1.125rem;
}

/* Modal */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important; /* Sehr hoher z-index */
    overflow-y: auto;
}

/* Nur wenn explizit angezeigt */
.modal.show {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 0.5rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content-wide {
    max-width: 900px;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.form-group-full-width {
    grid-column: 1 / -1;
}

/* Image Upload Drag & Drop */
.image-upload-wrapper {
    width: 100%;
}

.file-input-hidden {
    display: none;
}

.drag-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-color);
    position: relative;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.drag-drop-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    border-style: solid;
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-zone-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.drop-zone-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 0.375rem;
}

.remove-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.inline-crop-editor {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.inline-crop-stage {
    width: min(460px, 100%);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    touch-action: none;
    cursor: grab;
}

.inline-crop-stage.is-dragging {
    cursor: grabbing;
}

.inline-crop-stage img {
    position: absolute;
    max-width: none !important;
    max-height: none !important;
    object-fit: initial !important;
    user-select: none;
    -webkit-user-drag: none;
}

.inline-crop-controls {
    margin-top: 1rem;
}

.inline-crop-controls label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #475569;
    margin-bottom: 0.4rem;
    gap: 0.5rem;
}

.inline-crop-controls input[type="range"] {
    width: 100%;
}

.inline-crop-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.inline-crop-rotate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.drop-zone-preview.is-cropping .remove-image-btn {
    display: none;
}

/* Extra .btn/.btn-secondary so this beats .btn.btn-secondary:hover { transform } (3-class rule) */
.drop-zone-preview .btn.btn-secondary.edit-app-recrop-btn {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
}

.drop-zone-preview .btn.btn-secondary.edit-app-recrop-btn:hover {
    transform: translateX(-50%) translateY(-2px);
}

.drop-zone-preview.is-cropping .edit-app-recrop-btn {
    display: none;
}

@media (max-width: 768px) {
    .form-grid-2col {
        grid-template-columns: 1fr;
    }
    
    .drag-drop-zone {
        padding: 1.5rem;
        min-height: 140px;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--secondary-color);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--danger-color);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--secondary-color);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.btn-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-close i {
    font-size: 1.125rem;
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Checkbox Layout - Verhindert Umbruch */
.form-group label.checkbox-label {
    display: inline-block;
    cursor: pointer;
    font-weight: 400;
    white-space: nowrap;
}

.form-group label.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.form-group input:not([type="checkbox"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.625rem 3rem 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    background-size: 20px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:not([type="checkbox"]),
.form-group input[type="date"],
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    background-image: none;
    padding: 0.625rem 0.875rem;
}

.form-group textarea {
    resize: vertical;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.filter-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-color);
    border-radius: 0.375rem;
}

.filter-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

/* Footer */
.main-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
    color: var(--secondary-color);
}

.footer-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-container a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    /* Mandanten-Auswahl mobil - volle Breite */
    .mandant-selector-container {
        padding: 0.75rem 1rem;
    }
    
    .mandant-selector-wrapper {
        gap: 0.5rem;
    }
    
    .mandant-selector-wrapper label {
        font-size: 1.1rem;
    }
    
    #global-mandant-select {
        min-width: auto;
        flex: 1;
        font-size: 0.95rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    #mandant-filter-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    #mandant-select {
        min-width: auto;
        width: 100%;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tickets-table {
        font-size: 0.875rem;
    }
    
    .tickets-table th,
    .tickets-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .custom-fields-cell {
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Accordion Styles */
.accordion-header {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    opacity: 0.8;
}

.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label span {
    margin-left: 0.5rem;
}

/* Email Send Fields */
#email-send-fields {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

#email-send-fields .form-group {
    margin-bottom: 1rem;
}

#email-send-fields .form-group:last-child {
    margin-bottom: 0;
}

/* Notification Message Wrapper */
.notification-message-wrapper {
    line-height: 1.5;
}

.notification-message-wrapper a {
    text-decoration: none;
    font-size: 0.9em;
}

.notification-message-wrapper a:hover {
    text-decoration: underline;
}

/* Secondary Button (für Formular) */
.btn.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

