/* Modernes Layout für kalenderabgleich.de */

/* Basis-Style */
* {
    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-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header-Style */
header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.app-brand img {
    display: block;
    width: auto;
    max-width: 220px;
    max-height: 56px;
    height: auto;
}

.app-header {
    padding: 14px 18px;
    gap: 16px;
    align-items: center;
}

.app-menu,
.public-menu {
    display: contents;
}

.mobile-nav-toggle {
    display: none;
    width: 44px;
    height: 42px;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.mobile-nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 2px;
    background: #213044;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #3498db;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: #3498db;
    color: white;
}

.user-info {
    text-align: right;
    margin-left: auto;
}

.user-info p {
    margin-bottom: 10px;
    font-weight: bold;
}

.app-nav {
    flex: 1 1 560px;
    justify-content: center;
    gap: 4px;
}

.app-nav a {
    color: #087ac2;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
}

.app-nav a:hover {
    background-color: #eef7fd;
    color: #075f96;
}

.app-user-info {
    flex: 0 0 auto;
    min-width: 155px;
}

.app-user-info p {
    margin-bottom: 8px;
    color: #16283d;
    font-size: 0.92rem;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
    box-sizing: border-box;
    min-width: 120px;
    text-align: center;
}

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

.dashboard-hero-actions .btn,
.section-header .btn,
.billing-status-card .btn {
    margin-right: 0;
    margin-bottom: 0;
}

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

.btn-logout {
    background-color: #e74c3c;
    padding: 8px 15px;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background-color: #c0392b;
}

.btn-sm {
    min-width: 0;
    padding: 7px 12px;
    font-size: 0.9rem;
}

.btn-small {
    min-width: 0;
    padding: 7px 12px;
    font-size: 0.9rem;
}

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

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

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

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

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

.btn-success:hover {
    background-color: #1f8f4f;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    background: #eaf0f4;
    color: #526576;
}

.badge-active,
.badge-trialing,
.badge-admin,
.badge-done {
    background: #dff5ea;
    color: #176b42;
}

.badge-open,
.badge-in_progress {
    background: #fff2d6;
    color: #8a5a00;
}

.badge-expired,
.badge-past_due,
.badge-rejected {
    background: #fde4df;
    color: #a93422;
}

.admin-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 4px 0;
}

.admin-inline-form select,
.admin-inline-form input[type="text"] {
    min-width: 140px;
    padding: 7px 9px;
    border: 1px solid #dce7ee;
    border-radius: 5px;
}

.admin-section-card {
    margin: 18px 0;
    border: 1px solid #d9e6ef;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.admin-section-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    color: #213044;
    font-weight: 800;
    list-style: none;
    background: #f8fbfd;
}

.admin-section-summary::-webkit-details-marker {
    display: none;
}

.admin-section-summary::after {
    content: "▾";
    color: #637483;
    transition: transform 0.2s ease;
}

.admin-section-card[open] .admin-section-summary::after {
    transform: rotate(180deg);
}

.admin-section-summary small {
    margin-left: auto;
    color: #637483;
    font-weight: 650;
}

.admin-section-body {
    padding: 20px;
    border-top: 1px solid #e7eef4;
}

.billing-confirm-box {
    background: #f3f9fb;
    border: 1px solid #d3eaf1;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.billing-confirm-box p {
    color: #526576;
    margin: 8px 0 12px;
}

.property-coverage-toggle {
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    color: #213044;
}

.checkbox-label input {
    margin-top: 5px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    color: #637483;
    padding: 22px 4px 36px;
    font-size: 0.94rem;
}

.app-footer strong {
    color: #213044;
}

.app-footer p {
    margin-top: 4px;
}

.app-footer .brand-disclaimer,
.public-footer .brand-disclaimer {
    max-width: 620px;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.55;
}

.app-footer nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-footer a {
    color: #1198b6;
    text-decoration: none;
}

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

.auth-legal-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #edf2f5;
    font-size: 0.9rem;
}

.auth-legal-links a {
    color: #637483;
    text-decoration: none;
}

.auth-legal-links a:hover {
    color: #1198b6;
    text-decoration: underline;
}

/* Hauptinhalt */
main {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
}

.page-intro {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #dbe8f0;
}

.page-intro h2 {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 8px;
}

.page-intro p {
    color: #5f6f7d;
    max-width: 860px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.info-panel {
    background: #f8fbfd;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.info-panel p:last-child {
    margin-bottom: 0;
}

.muted-text {
    color: #637483;
    font-size: 0.93rem;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-row input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #dce7ee;
    border-radius: 5px;
    background: #fff;
    color: #213044;
}

.export-url-box {
    margin-top: 14px;
    padding: 14px;
    background: #f3f9fb;
    border-radius: 8px;
    border: 1px solid #d3eaf1;
}

.export-url-box p {
    color: #526576;
    font-size: 0.9rem;
    margin: 0 0 10px 0;
}

.field-help {
    margin: 6px 0 0;
    color: #637483;
    font-size: 0.9rem;
    line-height: 1.45;
}

.source-setup-warning {
    margin: 10px 0;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid #dbe8f0;
    margin-bottom: 24px;
}

.dashboard-hero > div:first-child {
    min-width: 0;
}

.dashboard-hero h2 {
    border-bottom: 0;
    margin-bottom: 8px;
    padding-bottom: 0;
    font-size: 2rem;
}

.dashboard-hero p {
    color: #5f6f7d;
    max-width: 760px;
}

.dashboard-eyebrow,
.panel-kicker {
    color: #1198b6;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.dashboard-hero-actions,
.section-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.billing-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 24px;
    align-items: stretch;
    background: #f3f9fb;
    border: 1px solid #d3eaf1;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.billing-panel h3 {
    margin: 0 0 10px 0;
    color: #213044;
}

.billing-panel p {
    color: #5f6f7d;
}

.billing-status-card {
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 18px;
}

.billing-status-card dl {
    margin: 14px 0;
}

.billing-status-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f5;
}

.billing-status-card dl div:last-child {
    border-bottom: 0;
}

.billing-status-card dt {
    color: #637483;
}

.billing-status-card dd {
    color: #213044;
    font-weight: 700;
}

.billing-legal-note {
    font-size: 0.9rem;
    margin-top: 12px;
}

.dashboard-section {
    margin-top: 30px;
}

.section-header {
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h3 {
    margin: 0;
}

.empty-state {
    background: #f8fbfd;
    border: 1px dashed #cbd9e2;
    border-radius: 8px;
    color: #5f6f7d;
    padding: 18px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-good {
    background: #dff5ea;
    color: #176b42;
}

.status-bad {
    background: #fde4df;
    color: #a93422;
}

.status-muted {
    background: #eaf0f4;
    color: #526576;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    color: #213044;
    padding: 22px 20px;
    border-radius: 8px;
    border: 1px solid #dce7ee;
    text-align: center;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    line-height: 1.2;
    color: #1198b6;
}

.stat-label {
    display: block;
    font-size: 0.95em;
    margin-top: 8px;
    color: #637483;
}

/* Property Liste */
.property-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.property-card {
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 20px;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.06);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.property-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Quellen-Aktionen */
.source-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.source-actions .btn,
.source-actions .btn-secondary,
.source-actions .btn-danger {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

/* Icon-Button */
.btn-icon {
    padding: 6px 8px;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    pointer-events: none;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dce7ee;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.06);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f3f9fb;
    color: #213044;
    font-weight: bold;
    border-bottom: 1px solid #dce7ee;
}

tr:hover {
    background-color: #f8f9fa;
}

/* Formulare */
.login-container, .register-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

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

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

.form-group label.source-mode-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    cursor: pointer;
}

.form-group label.source-mode-checkbox input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
    margin: 4px 0 0;
    padding: 0;
}

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

.error {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.source-card .error {
    display: block;
    padding: 6px 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.success {
    background-color: #2ecc71;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Dashboard Section Trennung */
.dashboard-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.dashboard-section:last-child {
    border-bottom: none;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.pagination-info {
    color: #526576;
    font-weight: 700;
}

.btn.disabled,
.btn.disabled:hover {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: #95a5a6;
}

/* Sync-Status Badges */
.sync-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.sync-status.success {
    background-color: #d5f5e3;
    color: #27ae60;
}

.sync-status.error {
    background-color: #fadbd8;
    color: #e74c3c;
}

.sync-status.pending {
    background-color: #fdebd0;
    color: #f39c12;
}

/* Sync-Dauer */
.sync-duration {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Event-Typ Badges */
.event-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

.event-type.manual {
    background-color: #d5f5e3;
    color: #27ae60;
}

.event-type.imported {
    background-color: #d6eaf8;
    color: #3498db;
}

/* Profilseite */
.profile-section {
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.05);
}

.subscription-profile-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 18px 28px;
    align-items: start;
    background: #f8fbfd;
}

.subscription-profile-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-profile-main h3 {
    margin-bottom: 8px;
}

.subscription-profile-main p {
    color: #526576;
    margin: 0;
}

.subscription-profile-details {
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 10px 14px;
}

.subscription-profile-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.subscription-profile-actions .btn {
    margin: 0;
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.event-card {
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.06);
}

.event-card h4 {
    color: #213044;
    margin-bottom: 10px;
}

.event-card p {
    color: #637483;
    margin-bottom: 8px;
}

.profile-data {
    margin-bottom: 15px;
}

.profile-field {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.profile-field:last-child {
    border-bottom: none;
}

.profile-label {
    display: inline-block;
    width: 120px;
    font-weight: 600;
    color: #34495e;
}

.profile-value {
    display: inline-block;
    color: #555;
}

.profile-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.password-hint {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-top: -10px;
    margin-bottom: 15px;
}

.message-success {
    background-color: #d5f5e3;
    color: #27ae60;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #27ae60;
}

.message-error {
    background-color: #fadbd8;
    color: #e74c3c;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e74c3c;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    nav {
        justify-content: center;
        margin: 15px 0;
    }

    .app-nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        margin: 0;
        width: 100%;
    }

    .app-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        text-align: left;
    }

    .app-brand {
        justify-content: flex-start;
    }

    .app-menu {
        display: none;
        grid-column: 1 / -1;
        padding-top: 8px;
    }

    .app-menu.is-open {
        display: block;
    }

    .app-nav a {
        display: block;
        width: 100%;
        padding: 10px 12px;
        text-align: left;
    }

    .mobile-nav-toggle {
        display: block;
        align-self: center;
        justify-self: end;
    }
    
    .user-info {
        text-align: center;
        margin-top: 10px;
        margin-left: 0;
    }

    .app-user-info {
        min-width: 0;
    }

    .app-brand {
        justify-content: center;
    }

    .app-brand img {
        max-width: 220px;
        max-height: 48px;
    }
    
    .dashboard-hero,
    .billing-panel,
    .subscription-profile-card,
    .app-footer {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .dashboard-hero-actions,
    .section-header,
    .app-footer nav {
        justify-content: flex-start;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .property-list {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 10px 8px;
    }

    .filter-bar,
    .filter-panel {
        align-items: stretch;
    }

    .filter-field,
    .filter-field-toggle,
    .filter-bar select {
        min-width: 0;
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .billing-panel {
        padding: 18px;
    }

    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   Kalender Styles
   ============================================ */

/* Kalender Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-filter label {
    font-weight: bold;
    color: #2c3e50;
}

.calendar-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.calendar-month-title {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.btn-prev,
.btn-next {
    background-color: #95a5a6;
}

.btn-prev:hover,
.btn-next:hover {
    background-color: #7f8c8d;
}

.calendar-add-event {
    display: flex;
    align-items: center;
}

/* Neues Event Formular */
.new-event-form {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
}

.new-event-form h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* Kalender Tabelle */
.calendar-container {
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dce7ee;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.06);
}

.calendar-table th {
    background-color: #3498db;
    color: white;
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
}

.calendar-table td {
    vertical-align: top;
    padding: 8px;
    height: 118px;
    background-color: #fff;
    border: 1px solid #edf2f5;
}

.calendar-day {
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease, outline-color 0.15s ease;
}

.calendar-day:hover {
    background-color: #f3f9fb;
}

.calendar-day.today {
    background-color: #e8f4f8;
}

.calendar-day.has-events {
    background-color: #f8f9fa;
}

.calendar-day.range-start,
.calendar-day.range-end,
.calendar-day.range-preview {
    background-color: #e1f5ec;
    outline: 2px solid #27ae60;
    outline-offset: -2px;
}

.calendar-day.drag-over {
    background-color: #d5f5e3;
    outline: 2px dashed #27ae60;
    outline-offset: -2px;
}

.empty-day {
    background-color: #f5f5f5;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.day-number {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    color: #2c3e50;
}

.btn-day-add {
    width: 22px;
    height: 22px;
    line-height: 20px;
    border-radius: 50%;
    border: none;
    background-color: #27ae60;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    padding: 0;
    transition: background-color 0.2s ease;
}

.btn-day-add:hover {
    background-color: #219a52;
}

.today .day-number {
    background-color: #3498db;
    color: white;
}

/* Events im Kalender */
.day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.event-item {
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.manual-event {
    background-color: #d5f5e3;
    border-left: 3px solid #27ae60;
}

.imported-event {
    background-color: #d6eaf8;
    border-left: 3px solid #3498db;
}

.event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.event-link:hover {
    opacity: 0.8;
}

.event-title {
    font-weight: bold;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-info {
    position: relative;
    min-height: 20px;
    padding-right: 22px;
}

.event-note {
    display: block;
    font-size: 0.75rem;
    color: #7f8c8d;
    font-style: italic;
}

.btn-edit-note {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: #3498db;
    padding: 0 2px;
    position: absolute;
    top: 0;
    right: 0;
    line-height: 1.2;
}

.btn-edit-note:hover {
    color: #2980b9;
}

/* Legende */
.calendar-legend {
    margin-top: 20px;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 8px;
}

.calendar-legend h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.manual-event {
    background-color: #d5f5e3;
    border-left: 3px solid #27ae60;
}

.legend-color.imported-event {
    background-color: #d6eaf8;
    border-left: 3px solid #3498db;
}

/* Modal für Beschreibung bearbeiten */
.note-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.note-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.note-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Kalender Modal für Bearbeiten */
.calendar-modal {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bdc3c7;
}

.calendar-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

/* Neues Event Modal */
.event-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.event-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.event-modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.danger-zone {
    margin-top: 22px;
    border-top: 1px solid #f0c8c0;
    padding-top: 16px;
}

.danger-zone p {
    color: #a93422;
    font-weight: 700;
    margin-bottom: 10px;
}

/* Quellen-Farbkreis */
.source-color-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

/* Responsive Kalender */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-navigation {
        justify-content: center;
    }
    
    .calendar-table {
        font-size: 12px;
    }
    
    .calendar-table td {
        height: 86px;
        padding: 3px;
    }
    
    .day-number {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 0.9rem;
    }
    
    .event-item {
        font-size: 0.75rem;
        padding: 2px 4px;
    }
}

/* ============================================
   Sync-Quellen Karten
   ============================================ */

.source-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.sync-access-time {
    display: block;
    margin-top: 3px;
}

.source-card {
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 20px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(31, 47, 65, 0.06);
}

.source-card h4 {
    margin-bottom: 10px;
}

.source-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.source-card-header h4 {
    margin: 0;
}

.toggle-form {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 64px;
    height: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: #95a5a6;
}

.toggle-switch .toggle-knob {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(31, 47, 65, 0.25);
    transition: transform 0.2s ease;
}

.toggle-switch.is-on {
    justify-content: flex-start;
    background: #27ae60;
}

.toggle-switch.is-on .toggle-knob {
    transform: translateX(34px);
}

.toggle-switch.is-off {
    background: #95a5a6;
}

.source-card p {
    margin-bottom: 8px;
    word-wrap: break-word;
}

.source-card form {
    margin-top: auto;
    padding-top: 10px;
}

.source-card .status-active,
.source-card .status-inactive {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.source-card .status-active {
    background-color: #d5f5e3;
    color: #27ae60;
}

.source-card .status-inactive {
    background-color: #fadbd8;
    color: #e74c3c;
}

/* ============================================
   Oeffentliche Website
   ============================================ */

body.public-page {
    background: #f5f7fb;
    color: #1f2937;
}

.public-header {
    max-width: 1180px;
    margin: 18px auto 0 auto;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: center;
    gap: 24px;
    position: sticky;
    top: 12px;
    z-index: 20;
}

.public-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.public-brand img {
    width: 300px;
    max-width: 100%;
    height: auto;
    display: block;
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
}

.public-nav a,
.public-login {
    color: #475569;
    text-decoration: none;
    font-weight: 650;
    padding: 9px 11px;
    border-radius: 6px;
}

.public-nav a:hover,
.public-nav a.active,
.public-login:hover {
    color: #0891b2;
    background: #ecfeff;
}

.public-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f1f5f9;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 700;
}

.language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 24px;
    border-radius: 999px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.language-switch a.active {
    color: #fff;
    background: #0891b2;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.28);
}

.support-create-ticket[open] > summary {
    display: none;
}

.public-link-button,
.public-primary-button,
.public-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 750;
    line-height: 1.2;
}

.public-link-button,
.public-primary-button {
    color: #ffffff;
    background: #0891b2;
    box-shadow: 0 8px 18px rgba(8, 145, 178, 0.22);
}

.public-link-button:hover,
.public-primary-button:hover {
    background: #0e7490;
}

.public-secondary-button {
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.public-secondary-button:hover {
    border-color: #0891b2;
    color: #0891b2;
}

.public-main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 18px 56px 18px;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
    gap: 46px;
    align-items: center;
    min-height: auto;
    padding: 34px 0 34px 0;
}

.public-eyebrow {
    color: #0891b2;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.public-hero h1,
.public-page-title h1 {
    color: #111827;
    font-size: 3rem;
    line-height: 1.08;
    letter-spacing: 0;
    margin-bottom: 22px;
    max-width: 780px;
}

.public-hero-copy,
.public-page-title p {
    color: #475569;
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 720px;
}

.public-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.public-price-note {
    color: #475569;
    font-weight: 700;
    margin-top: 14px;
}

.public-hero-subnote {
    color: #475569;
    margin-top: 7px;
    font-weight: 650;
    line-height: 1.6;
}

.public-hero-panel {
    border: 1px solid #dbe3ea;
    border-radius: 8px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.hub-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    position: relative;
    padding: 12px;
}

.hub-source {
    min-height: 76px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-weight: 800;
}

.hub-center {
    grid-column: 1 / 3;
    border: 2px solid #0891b2;
    border-radius: 8px;
    background: #f0fdff;
    padding: 16px;
}

.hub-center img {
    display: block;
    width: 100%;
    height: auto;
}

.sync-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    color: #475569;
    font-size: 0.95rem;
}

.sync-row strong {
    color: #16a34a;
}

.public-section {
    padding: 54px 0;
}

.public-section-muted {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px;
    padding-left: 18px;
    padding-right: 18px;
}

.public-section-heading {
    max-width: 980px;
    margin-bottom: 28px;
}

.public-section-heading h2,
.public-feature h2,
.pricing-notes h2,
.faq-list h2,
.contact-box h2,
.legal-content h2 {
    color: #111827;
    border: 0;
    padding: 0;
}

.public-section-heading h2 {
    font-size: 2.05rem;
    line-height: 1.2;
}

.public-grid {
    display: grid;
    gap: 18px;
}

.public-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-feature {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
}

.public-section-muted .public-feature {
    background: #f8fafc;
}

.public-feature h2,
.public-feature h3 {
    margin: 0 0 10px 0;
}

.public-feature p,
.public-split p,
.pricing-notes p,
.faq-list p,
.contact-box p,
.legal-content p {
    color: #475569;
    line-height: 1.75;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #ecfeff;
    color: #0891b2;
    font-weight: 850;
    margin-bottom: 18px;
}

.public-split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.65fr);
    gap: 44px;
    align-items: start;
}

.public-split .public-primary-button {
    margin-top: 20px;
}

.public-check-list {
    list-style: none;
    display: grid;
    gap: 11px;
    padding: 0;
}

.public-check-list li {
    position: relative;
    padding-left: 30px;
    color: #334155;
    font-weight: 650;
    line-height: 1.55;
}

.public-check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ecfdf5;
    border: 1px solid #86efac;
}

.public-check-list li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 7px;
    width: 5px;
    height: 9px;
    border: solid #16a34a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.public-subpage,
.public-legal {
    max-width: 1040px;
}

.public-page-title {
    padding: 56px 0 34px 0;
}

.public-page-title h1 {
    font-size: 3.2rem;
}

.pricing-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.pricing-card,
.pricing-notes,
.contact-box,
.faq-list article,
.legal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 28px;
}

.pricing-card h2 {
    font-size: 4rem;
    line-height: 1;
    color: #111827;
    border: 0;
    padding: 0;
    margin: 8px 0;
}

.pricing-label {
    color: #0891b2;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pricing-tax,
.pricing-small {
    color: #64748b;
}

.pricing-card .public-check-list {
    margin: 26px 0;
}

.pricing-notes h2:not(:first-child) {
    margin-top: 28px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.faq-item {
    background: #fff;
    border: 1px solid #dbe5ec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 43, 67, 0.05);
    overflow: hidden;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    color: #173b5e;
    font-size: 1.35rem;
    font-weight: 750;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover,
.faq-item summary:focus-visible {
    background: #f4f9fc;
}

.faq-item summary:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.3);
    outline-offset: -3px;
}

.faq-toggle-icon {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.faq-toggle-icon::before,
.faq-toggle-icon::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 2px;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #0891b2;
}

.faq-toggle-icon::after {
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-toggle-icon::after {
    transform: rotate(0);
}

.faq-answer {
    padding: 0 28px 24px;
}

.faq-answer p {
    margin: 0;
    color: #526779;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.contact-box {
    max-width: 680px;
}

.contact-layout .contact-box {
    max-width: none;
}

.public-contact-form {
    display: grid;
    gap: 4px;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 14px;
}

.privacy-check input {
    flex: 0 0 auto;
    margin-top: 5px;
}

.privacy-check a {
    color: #0891b2;
    font-weight: 750;
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-turnstile {
    margin: 0 0 18px;
    min-height: 65px;
}

.contact-box a,
.legal-content a {
    color: #0891b2;
    font-weight: 750;
}

.legal-content h2:not(:first-child) {
    margin-top: 28px;
}

.public-footer {
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.public-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 18px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.public-footer p {
    color: #64748b;
    margin-top: 4px;
}

.public-footer nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.public-footer a {
    color: #475569;
    text-decoration: none;
    font-weight: 650;
}

.public-footer a:hover {
    color: #0891b2;
}

.public-cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 28px;
    padding: 28px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0fdff 0%, #eff6ff 100%);
}

.public-cta-box h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 1.65rem;
}

.public-cta-box p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.public-trademark-note {
    margin-top: 16px;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
}

.public-inline-link {
    margin-top: 14px;
}

.public-inline-link a,
.public-feature a {
    color: #0891b2;
    font-weight: 750;
}

@media (max-width: 980px) {
    .public-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        position: static;
    }

    .public-menu {
        display: none;
        grid-column: 1 / -1;
        padding-top: 8px;
    }

    .public-menu.is-open {
        display: block;
    }

    .public-nav,
    .public-actions {
        justify-content: flex-start;
    }

    .public-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .public-actions {
        margin-top: 8px;
    }

    .public-header .mobile-nav-toggle {
        display: block;
        justify-self: end;
    }

    .public-hero,
    .public-split,
    .public-cta-box,
    .pricing-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .public-cta-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-hero {
        min-height: auto;
    }

    .public-grid-2,
    .public-grid-3 {
        grid-template-columns: 1fr;
    }

    .public-section-muted {
        padding-left: 18px;
        padding-right: 18px;
    }

    .public-hero h1,
    .public-page-title h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 640px) {
    .public-main {
        padding-top: 18px;
    }

    .public-brand img {
        width: 240px;
    }

    .public-nav,
    .public-actions,
    .public-hero-actions,
    .sync-row,
    .public-footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .public-nav a,
    .public-login,
    .public-link-button,
    .public-primary-button,
    .public-secondary-button {
        width: 100%;
        text-align: center;
    }

    .public-hero h1,
    .public-page-title h1 {
        font-size: 2.15rem;
    }

    .public-section-heading h2 {
        font-size: 1.9rem;
    }

    .public-hero-panel,
    .public-feature,
    .public-cta-box,
    .pricing-card,
    .pricing-notes,
    .contact-box,
    .faq-list article,
    .legal-content {
        padding: 20px;
    }

    .faq-item summary {
        padding: 18px 20px;
        font-size: 1.08rem;
    }

    .faq-answer {
        padding: 0 20px 20px;
    }

    .hub-card {
        grid-template-columns: 1fr;
    }

    .hub-center {
        grid-column: 1;
    }
}

/* Ausstehende E-Mail-Änderung */
.pending-email-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 0.8rem;
    color: #fff;
    background-color: #e67e22;
    border-radius: 4px;
}

.pending-email-info {
    padding: 16px;
    margin-top: 12px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.pending-email-info p {
    margin: 6px 0;
}

.email-change-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 8px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #f7fbfe;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 16px;
    margin: 0 0 22px;
}

.filter-bar label {
    font-weight: 700;
    color: #213044;
}

.filter-bar select,
.filter-bar input[type="search"] {
    min-width: 220px;
    padding: 9px 10px;
    border: 1px solid #dce7ee;
    border-radius: 5px;
}

.filter-panel {
    align-items: flex-end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 260px;
}

.filter-field-toggle {
    min-width: 280px;
}

.compact-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 6px;
    font-weight: 600;
}

.compact-checkbox input {
    margin: 0;
}

.filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
}

.filter-actions .btn {
    margin: 0;
    white-space: nowrap;
}

.auth-page {
    min-height: 100vh;
    background: #f5f7fb;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 18px;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    box-shadow: 0 16px 42px rgba(31, 47, 65, 0.12);
    padding: 30px;
}

.auth-language-switch {
    position: absolute;
    top: 18px;
    right: 18px;
}

.auth-brand {
    display: inline-flex;
    margin-bottom: 20px;
}

.auth-brand img {
    width: 260px;
    max-width: 100%;
    height: auto;
}

.auth-card h1 {
    color: #213044;
    font-size: 1.9rem;
    margin-bottom: 8px;
}

.auth-copy {
    color: #637483;
    margin-bottom: 24px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.auth-secondary-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -2px 0 18px;
    color: #405267;
    cursor: pointer;
}

.auth-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.auth-secondary-links a {
    color: #1198b6;
    font-weight: 700;
    text-decoration: none;
}

.auth-secondary-links a:hover {
    text-decoration: underline;
}

.field-error {
    color: #a93422;
    font-size: 0.9rem;
    margin-top: 6px;
}

@media (max-width: 520px) {
    .auth-card {
        padding-top: 58px;
    }

    .auth-language-switch {
        top: 16px;
        right: 16px;
    }
}

.ticket-list {
    display: grid;
    gap: 14px;
}

.ticket-card {
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.ticket-card-header p {
    margin: 4px 0 0;
    color: #637483;
}

.ticket-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.ticket-actions form {
    margin: 0;
}

.support-create-ticket summary {
    list-style: none;
    cursor: pointer;
    width: max-content;
}

.support-create-ticket summary::-webkit-details-marker {
    display: none;
}

.support-create-ticket[open] summary {
    margin-bottom: 12px;
}

.ticket-reply {
    flex: 1 1 100%;
    width: 100%;
}

.ticket-reply summary {
    list-style: none;
    cursor: pointer;
    width: max-content;
}

.ticket-reply summary::-webkit-details-marker {
    display: none;
}

.ticket-reply-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    background: #f7fbfe;
    border: 1px solid #dce7ee;
    border-radius: 8px;
}

.ticket-reply-form label {
    font-weight: 700;
    color: #213044;
}

.ticket-reply-form textarea {
    min-height: 110px;
    width: 100%;
    padding: 10px;
    border: 1px solid #dce7ee;
    border-radius: 5px;
    resize: vertical;
    font: inherit;
}

.ticket-message-list {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.ticket-message {
    padding: 12px;
    border: 1px solid #dce7ee;
    border-left: 4px solid #3498db;
    border-radius: 8px;
    background: #fff;
}

.ticket-message-admin {
    border-left-color: #27ae60;
    background: #f7fcfa;
}

.ticket-message p {
    margin: 6px 0 0;
}

.ticket-message-meta {
    color: #637483;
    font-size: 0.9rem;
    font-weight: 700;
}

.ticket-admin-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ticket-admin-row select,
.support-filter-bar select {
    min-width: 180px;
    padding: 9px 10px;
    border: 1px solid #dce7ee;
    border-radius: 5px;
}

.ticket-closed-note {
    align-self: center;
    margin: 0;
    padding: 7px 0;
}

.admin-ticket-card {
    padding: 18px;
}

.admin-ticket-card {
    padding: 0;
    overflow: hidden;
}

.admin-ticket-summary {
    display: block;
    cursor: pointer;
    padding: 16px 18px;
    list-style: none;
}

.admin-ticket-summary::-webkit-details-marker {
    display: none;
}

.admin-ticket-summary::after {
    content: "Details öffnen";
    display: inline-block;
    margin-top: 10px;
    color: #087ac2;
    font-size: 0.9rem;
    font-weight: 700;
}

.admin-ticket-card[open] .admin-ticket-summary {
    border-bottom: 1px solid #dce7ee;
}

.admin-ticket-card[open] .admin-ticket-summary::after {
    content: "Details schließen";
}

.admin-ticket-summary:hover {
    background: #f7fbfe;
}

.admin-ticket-summary-meta {
    margin-top: 6px;
}

.admin-ticket-body {
    padding: 0 18px 18px;
}

.badge-answered {
    background: #dff5ea;
    color: #176b42;
}

.badge-closed {
    background: #eaf0f4;
    color: #526576;
}

.help-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.help-card {
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(31, 47, 65, 0.06);
}

.help-card h2,
.help-section-title {
    color: #213044;
    margin-bottom: 14px;
}

.help-steps {
    display: grid;
    gap: 12px;
    padding-left: 22px;
}

.help-steps li,
.help-list li {
    color: #405267;
    padding-left: 4px;
}

.help-list {
    display: grid;
    gap: 10px;
    padding-left: 20px;
}

.help-provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.help-provider-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 150px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    color: #405267;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(31, 47, 65, 0.06);
}

.help-provider-card:hover {
    border-color: #3498db;
    transform: translateY(-1px);
}

.help-provider-card strong {
    color: #213044;
    font-size: 1.1rem;
}

.help-trademark-note {
    margin: 16px 0 0;
    padding: 14px 16px;
    border: 1px solid #dce7ee;
    border-left: 4px solid #3498db;
    border-radius: 8px;
    background: #f7fbfe;
    color: #526576;
    font-size: 0.92rem;
    line-height: 1.55;
}

.help-placeholder {
    margin-top: 18px;
    padding: 14px;
    background: #f7fbfe;
    border: 1px dashed #b9d7e6;
    border-radius: 8px;
    color: #526576;
}

.help-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.help-screenshot {
    margin: 0;
    padding: 12px;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    background: #f7fbfe;
}

.help-screenshot-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.help-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    border-radius: 5px;
}

.help-screenshot figcaption {
    margin-top: 10px;
    color: #405267;
    line-height: 1.5;
}

.help-privacy-note {
    margin: 16px 0 0;
    color: #526576;
    font-size: 0.9rem;
}

.help-cleanup-step {
    margin: 20px 0 0;
    padding: 14px 16px;
    border-left: 4px solid #e67e22;
    border-radius: 6px;
    background: #fff7ec;
    color: #405267;
    line-height: 1.55;
}

.help-lightbox {
    width: min(88vw, 1180px);
    max-width: none;
    max-height: 88vh;
    margin: auto;
    padding: 48px 24px 20px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    overflow: auto;
}

.help-lightbox::backdrop {
    background: rgba(15, 24, 34, 0.82);
}

.help-lightbox img {
    display: block;
    width: 100%;
    max-height: calc(88vh - 120px);
    object-fit: contain;
}

.help-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 46px;
    height: 58px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: rgba(33, 48, 68, 0.82);
    color: #fff;
    font-size: 2.6rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.help-lightbox-prev {
    left: 10px;
}

.help-lightbox-next {
    right: 10px;
}

.help-lightbox-nav:hover {
    background: #213044;
}

.help-lightbox-caption {
    margin: 14px 8px 0;
    color: #405267;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.help-lightbox-close {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #213044;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 768px) {
    .help-lightbox {
        width: 92vw;
        max-height: 90vh;
        padding: 44px 12px 16px;
    }

    .help-lightbox img {
        max-height: calc(90vh - 130px);
    }

    .help-lightbox-nav {
        width: 38px;
        height: 50px;
        font-size: 2.1rem;
    }
}

@media (max-width: 768px) {
    .help-layout {
        grid-template-columns: 1fr;
    }
}
