:root {
    --color-primary: #3d2b56;
    --color-accent: #b8860b;
    --color-bg: #f7f5f2;
    --color-card: #ffffff;
    --color-border: #e0dcd5;
    --color-error: #a4222a;
    --color-success: #2a6b3f;
    --color-text: #2b2b2b;
    --vm-green: #3d8c3a;
}

* { box-sizing: border-box; }

body {
    font-family: Arial, Helvetica, sans-serif;
    background: transparent;
    color: var(--color-text);
    margin: 0;
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 12px 14px 24px;
}
.container.narrow { max-width: 480px; }

.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}
.flash-success { background: #e3f3e6; color: var(--color-success); border: 1px solid #b7dcc0; }
.flash-error { background: #fbe6e7; color: var(--color-error); border: 1px solid #edb9bc; }

.empty-state { text-align: center; color: #777; margin: 40px 0; }

/* ══ Ansichts-Umschaltung (in-page, iframe-tauglich) ══════════════════════ */
.view { display: none; animation: fadeIn 0.25s ease; }
.view.view-active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.grid-intro { text-align: center; margin: 4px 0 22px; }
.grid-intro h1 { margin: 0 0 4px; color: var(--vm-green); font-size: 26px; }
.grid-intro p { margin: 0; color: #666; font-size: 15px; }

/* ══ Kachel-Raster ═══════════════════════════════════════════════════════ */
.event-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
@media (max-width: 780px) { .event-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 520px) { .event-grid { grid-template-columns: 1fr; } }

.tile {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.13);
}
.tile-full { opacity: 0.72; }
.tile-full:hover { transform: none; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.tile-head {
    padding: 18px 16px 16px;
    color: #fff;
    position: relative;
    min-height: 104px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.tile-cat {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.22);
    padding: 3px 9px;
    border-radius: 20px;
}
.tile-icon { position: absolute; top: 10px; right: 14px; font-size: 30px; }
.tile-title { margin: 0; font-size: 18px; line-height: 1.25; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tile-info { display: flex; flex-direction: column; gap: 4px; }
.tile-row { font-size: 13.5px; color: #555; }

.tile-slots { margin-top: 2px; }
.slot-bar {
    height: 7px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 5px;
}
.slot-fill { height: 100%; background: var(--vm-green); border-radius: 6px; transition: width 0.3s ease; }
.slot-text { font-size: 12.5px; font-weight: bold; color: #666; }
.slot-text.slot-low { color: #e05500; }
.slot-text.slot-full { color: var(--color-error); }

.tile-price { font-size: 15px; font-weight: bold; color: var(--color-text); margin-top: auto; }
.price-free { color: var(--vm-green); }

.tile-btn {
    background: var(--vm-green);
    color: #fff;
    border: none;
    padding: 11px 14px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    width: 100%;
    transition: background 0.15s ease;
}
.tile-btn:hover { background: #327430; }
.tile-btn-full { background: #b0b0b0; cursor: not-allowed; }

/* ══ Zurück-Button ═══════════════════════════════════════════════════════ */
.back-btn {
    background: none;
    border: none;
    color: var(--vm-green);
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    padding: 6px 0;
    margin-bottom: 14px;
}
.back-btn:hover { text-decoration: underline; }

/* ══ Detailansicht ═══════════════════════════════════════════════════════ */
.detail-head {
    color: #fff;
    padding: 26px 22px;
    border-radius: 14px 14px 0 0;
    position: relative;
}
.detail-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.detail-cat {
    font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px;
    background: rgba(255,255,255,0.22); padding: 3px 10px; border-radius: 20px;
}
.detail-head h2 { margin: 10px 0 0; font-size: 24px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }

.detail-body {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 22px;
}
.detail-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 16px; }
.fact { font-size: 15px; color: #444; }

.detail-slots { margin: 16px 0; }
.detail-slots .slot-bar { height: 9px; }
.detail-slots .slot-text { font-size: 14px; }

.detail-desc {
    margin: 16px 0;
    padding: 14px 16px;
    background: #faf9f7;
    border-radius: 9px;
    color: #444;
    font-size: 14.5px;
    line-height: 1.6;
}

/* ══ Anmeldeformular ═════════════════════════════════════════════════════ */
.form-head {
    color: #fff;
    padding: 20px 22px;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: center;
    gap: 14px;
}
.form-head-icon { font-size: 34px; text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.form-head h2 { margin: 0; font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,0.55); }
.form-head-date { font-size: 13.5px; opacity: 0.92; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 20px 22px;
}
.registration-form label { font-size: 14px; font-weight: bold; }
.registration-form input, .registration-form textarea {
    width: 100%;
    padding: 9px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 15px;
    margin-top: 4px;
    font-weight: normal;
}
.registration-form input:focus, .registration-form textarea:focus {
    outline: none;
    border-color: var(--vm-green);
    box-shadow: 0 0 0 3px rgba(61,140,58,0.12);
}
.consent-label { font-weight: normal; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.consent-label input { width: auto; margin-top: 3px; }
.consent-label a { color: var(--vm-green); }
.consent-optional {
    background: #f3f8f3;
    border: 1px solid #d8e8d6;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 2px;
}
.consent-hint { color: #888; font-style: italic; }

.btn-register, .btn-submit {
    background: var(--vm-green);
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}
.btn-register:hover, .btn-submit:hover { background: #327430; }

.full-notice { color: var(--color-error); font-style: italic; margin-top: 14px; }

/* --- Zahlungsauswahl --- */
.payment-choice {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 4px 0;
}
.payment-choice legend { font-size: 13px; font-weight: bold; padding: 0 6px; color: var(--vm-green); }
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    font-size: 14px;
    padding: 5px 0;
    cursor: pointer;
}
.radio-label input { width: auto; margin: 0; }
.total-hint { color: var(--color-accent); font-weight: bold; font-size: 13px; }

.paypal-area { margin-top: 6px; }
.paypal-hint { font-size: 13px; color: #666; margin-bottom: 10px; }

.field-hint {
    display: block;
    font-weight: normal;
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

/* --- Hinweis-Kasten (z.B. Wizards-Account erforderlich) --- */
.event-notice {
    background: #fdf6e3;
    border: 1px solid #e6d9a8;
    border-left: 4px solid var(--color-accent);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #5a4a1e;
}
.event-notice strong { display: block; margin-bottom: 4px; color: #7a5f14; font-size: 14px; }
.event-notice a { color: #7a5f14; font-weight: bold; }

.site-footer { text-align: center; padding: 20px; color: #999; font-size: 12.5px; }

/* ══ Admin-Backend (unverändert erhalten) ════════════════════════════════ */
.site-header { background: var(--color-primary); color: #fff; padding: 30px 20px; text-align: center; }
.site-header h1 { margin: 0 0 8px; }
.site-header p { max-width: 600px; margin: 0 auto; opacity: 0.9; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.admin-form { display: flex; flex-direction: column; gap: 14px; }
.admin-form label { font-weight: bold; font-size: 14px; }
.admin-form input, .admin-form textarea {
    width: 100%; padding: 8px; border: 1px solid var(--color-border); border-radius: 4px; margin-top: 4px; font-weight: normal;
}
.form-row { display: flex; gap: 16px; }
.form-row label { flex: 1; }
.hint { color: #777; font-size: 13px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.admin-table th, .admin-table td { border-bottom: 1px solid var(--color-border); padding: 8px 10px; text-align: left; }
.admin-table th { background: #f0ede8; }
.admin-table .actions a { margin-right: 4px; }
.row-cancelled { opacity: 0.5; text-decoration: line-through; }
.link-button { background: none; border: none; color: var(--color-primary); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
