:root {
    --bg: #f6f2ef;          /* leicht warmes Bäckerei-Beige */
    --accent: #970000;      /* Amthor-Rot */
    --accent-dark: #6b0000; /* dunklere Variante für Hover/Verläufe */
    --accent-soft: #fff2f2; /* sehr weiches Rot für Hintergründe */
    --text: #111827;
    --muted: #6b7280;
    --card-bg: #ffffff;
    --border-soft: #e5e7eb;
}

/* Basis */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, #ffe4e6 0, #f9fafb 45%, var(--bg) 100%);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.page {
    min-height: 100vh;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

/* HEADER */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0 8px;
    animation: fadeDown 0.3s ease-out;
}

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

.amthor-logo {
    height: 38px;
    max-width: 220px;
    object-fit: contain;
    display: block;
}

.brand-text small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: .16em;
    color: #a1a1aa;
    text-transform: uppercase;
}
.brand-text strong {
    display: block;
    font-size: 0.96rem;
    color: #1f2937;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-note {
    font-size: 0.75rem;
    color: #6b7280;
}

@media (max-width: 640px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* CARD / GENERIC */

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 18px 18px 20px;
    box-shadow: 0 16px 40px rgba(15,23,42,0.08);
    border: 1px solid rgba(209,213,219,0.9);
    margin-top: 14px;
    animation: fadeUp 0.3s ease-out;
}

/* EVENT CARD + TILES */

.event-card {
    margin-top: 10px;
}

.event-main {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
}

.event-text-block {
    min-width: 0;
    flex: 1 1 220px;
}

.event-title {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.1rem);
}
.event-subtitle {
    margin: 2px 0 6px;
    font-size: 0.98rem;
    color: var(--muted);
}
.event-meta {
    margin: 0 0 4px;
    font-size: 0.9rem;
}
.event-note {
    margin: 4px 0;
    font-size: 0.9rem;
}

.event-list {
    margin: 4px 0 4px 1.1rem;
    padding: 0;
    font-size: 0.88rem;
    color: #4b5563;
}
.event-list li {
    margin-bottom: 2px;
}

.event-privacy {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Interne Tagline */

.event-internal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #fff1f2;
    border: 1px solid #fecaca;
    font-size: 0.78rem;
    color: var(--accent);
    margin: 4px 0 6px;
}

/* Status-Tiles */

.status-tiles-wrap {
    flex: 1 1 260px;
    min-width: 0;
}

.status-tiles-label {
    font-size: 0.78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 4px;
}

.status-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}
@media (max-width: 600px) {
    .status-tiles {
        grid-template-columns: minmax(0,1fr);
    }
}

.status-tile {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 12px 12px;
    font-size: 0.86rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 8px 18px rgba(148,163,184,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.status-tile-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.status-icon-yes {
    background: #dcfce7;
    color: #166534;
}
.status-icon-no {
    background: #fee2e2;
    color: #991b1b;
}
.status-tile-title {
    font-weight: 600;
    color: #1f2937;
}
.status-tile-sub {
    font-size: 0.78rem;
    color: #6b7280;
}

.status-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(148,163,184,0.28);
    border-color: #fecaca;
    background: #fff1f2;
}
.status-tile-yes:hover {
    background: #ecfdf3;
}
.status-tile-no:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.status-tile.active {
    border-color: var(--accent);
    background: #fff1f2;
    box-shadow: 0 16px 34px rgba(151, 0, 0, 0.28);
}

/* Mehr-Infos-Row */

.event-more-row {
    margin-top: 14px;
}

.event-more-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    border: 1px dashed #e5e7eb;
    padding: 8px 10px;
    background: #f9fafb;
}
.event-more-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}
.event-more-text {
    flex: 1 1 auto;
}
.event-more-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: #374151;
}
.event-more-sub {
    font-size: 0.8rem;
    color: #6b7280;
}
.event-more-form {
    flex: 0 0 auto;
}

/* Lock / Unlock */

.lock-box {
    background: #fff1f2;
    border-radius: 12px;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    font-size: 0.86rem;
    color: #7f1d1d;
    animation: fadeUp 0.25s ease-out;
}

.unlock-form {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) auto;
    gap: 8px;
    align-items: end;
    margin-top: 6px;
}
@media (max-width: 600px) {
    .unlock-form {
        grid-template-columns: minmax(0,1fr);
        align-items: stretch;
    }
}

.details-panel {
    margin-top: 4px;
    animation: fadeUp 0.3s ease-out;
}

/* Meldungen */

.errors {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 8px 0 0;
    font-size: 0.85rem;
    border: 1px solid #fecaca;
}
.success {
    background: #dcfce7;
    color: #166534;
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 10px;
    font-size: 0.85rem;
    border: 1px solid #bbf7d0;
}
.success-inline {
    margin-top: 10px;
}
.success-animate {
    animation: popIn 0.35s ease-out;
}

/* Form-Felder & Buttons */

label {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 0.82rem;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f9fafb;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(151,0,0,0.25);
    background: #fff1f2;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

.btn-primary,
.btn-secondary {
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px rgba(151, 0, 0, 0.35);
}
.btn-primary:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(151, 0, 0, 0.45);
}

.btn-secondary {
    background: #f9fafb;
    color: var(--accent);
    border: 1px solid #fecaca;
    box-shadow: 0 6px 14px rgba(148,163,184,0.25);
}
.btn-secondary:hover {
    background: #fff1f2;
    transform: translateY(-1px);
}

.btn-small {
    padding: 7px 14px;
    font-size: 0.85rem;
    box-shadow: 0 8px 18px rgba(151,0,0,0.3);
}

/* FOOTER */

.site-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
}
.site-footer a {
    color: #6b7280;
}
.site-footer a:hover {
    color: #374151;
}

@media (max-width: 640px) {
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* MODAL */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 40;
}
.modal-backdrop.open {
    display: flex;
}

.modal {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15,23,42,0.35);
    padding: 16px 16px 18px;
    position: relative;
    animation: popIn 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6b7280;
}
.modal-close:hover {
    color: #111827;
}

.modal-header {
    margin-bottom: 8px;
}
.modal-title-main {
    margin: 0 0 2px;
    font-size: 1.1rem;
}
.modal-subline {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.modal-form {
    margin-top: 6px;
}
.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 8px 10px;
}
.modal-grid .full-width {
    grid-column: 1 / -1;
}

.modal-footer-nav {
    margin-top: 12px;
}

/* ADMIN STYLES (weiter wie gehabt, nur das Wichtigste) */

.admin-stats-card h2,
.admin-import-card h2,
.admin-table-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 8px;
}
@media (max-width: 768px) {
    .admin-stats-row {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}
@media (max-width: 480px) {
    .admin-stats-row {
        grid-template-columns: minmax(0,1fr);
    }
}

.stat-box {
    padding: 10px 10px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    text-align: center;
}
.stat-box .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
}
.stat-box .stat-value {
    margin-top: 4px;
    font-size: 1.3rem;
    font-weight: 600;
}

.stat-yes {
    border-color: #bbf7d0;
    background: #ecfdf3;
}
.stat-no {
    border-color: #fecaca;
    background: #fef2f2;
}
.stat-open {
    border-color: #e5e7eb;
    background: #f9fafb;
}

/* Admin – neue / edit Formulare */

.admin-new-guest {
    margin-bottom: 10px;
}

.new-guest-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.new-guest-form input[type="text"],
.new-guest-form input[type="email"] {
    max-width: 180px;
}

.admin-edit-guest {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.edit-guest-form .edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px 10px;
    margin-bottom: 8px;
}
@media (max-width: 800px) {
    .edit-guest-form .edit-grid {
        grid-template-columns: minmax(0,1fr);
    }
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.btn-tiny {
    padding: 3px 9px;
    font-size: 0.75rem;
}

.btn-ghost {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    padding: 4px 10px;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.btn-danger {
    border-radius: 999px;
    border: none;
    background: #b91c1c;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 10px;
    box-shadow: 0 8px 18px rgba(185,28,28,0.35);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-danger:hover {
    background: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(185,28,28,0.45);
}

/* TABLE */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.guests-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.guests-table th,
.guests-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: left;
}
.guests-table th {
    font-weight: 600;
    background: #f9fafb;
}
.guests-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Filterpills */

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.filter-pill {
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
}
.filter-pill:hover {
    background: #fff1f2;
    text-decoration: none;
}
.filter-pill.active {
    border-color: var(--accent);
    background: #fff1f2;
    color: var(--accent);
    font-weight: 600;
}

/* ANIMATIONEN */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    60% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Status-Badges in der Admin-Tabelle */

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
}

.status-badge-yes {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-badge-no {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.status-badge-open {
    background: #e5e7eb;
    color: #374151;
    border-color: #d1d5db;
}



