/* =========================================================
   EventRunde – zentrale Basisgestaltung
   ========================================================= */

:root {
    --bg: #eef3ef;
    --bg-accent: #e3ece6;
    --surface: #ffffff;
    --surface-soft: #f4f7f5;
    --text: #18241f;
    --muted: #66736c;
    --border: #d8e2dc;
    --primary: #1f6a50;
    --primary-hover: #18563f;
    --primary-soft: #e8f3ed;
    --accent: #d9a441;
    --accent-soft: #fff4dc;
    --danger: #b14646;
    --danger-hover: #913737;
    --success: #2f7657;
    --warning: #916a1f;
    --shadow: 0 14px 36px rgba(31, 72, 55, 0.10);
    --shadow-hover: 0 18px 42px rgba(31, 72, 55, 0.14);
    --radius: 18px;
    --radius-small: 11px;
    --max-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(31, 106, 80, 0.08), transparent 32rem),
        linear-gradient(180deg, var(--bg-accent) 0, var(--bg) 18rem, var(--bg) 100%);
    line-height: 1.55;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.72rem 1.05rem;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    background: linear-gradient(135deg, var(--primary), #2c7d60);
    color: #fff;
    font-weight: 750;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

button:hover,
.button:hover {
    background: linear-gradient(135deg, var(--primary-hover), #23684f);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(31, 106, 80, 0.18);
}

button:active,
.button:active {
    transform: translateY(1px);
}

.button-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.button-secondary:hover {
    background: var(--primary-soft);
    border-color: #c3d7cb;
}

.button-danger {
    background: var(--danger);
}

.button-danger:hover {
    background: var(--danger-hover);
}

.page-shell {
    width: min(calc(100% - 2rem), var(--max-width));
    margin: 0 auto;
    padding: 1.4rem 0 3.5rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 0.35rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-weight: 850;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 8px 18px rgba(31, 72, 55, 0.16);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.page-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.page-subtitle {
    margin: 0;
    color: var(--muted);
}

.card {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94));
    border: 1px solid rgba(210, 223, 216, 0.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.35rem;
    backdrop-filter: blur(8px);
}

.card + .card {
    margin-top: 1rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * Event-Karten im User-Dashboard:
 * Karten einer Reihe gleich hoch halten und Aktionsbutton unten ausrichten.
 */
.grid.grid-2 > article.card,
.grid.grid-3 > article.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-top: 0;
}

/* Kleiner Abstand zwischen einem oberen Kartenbereich und folgendem Raster. */
section.card + section.grid.grid-2,
section.card + section.grid.grid-3 {
    margin-top: 1rem;
}

.grid.grid-2 > article.card > .actions:last-child,
.grid.grid-3 > article.card > .actions:last-child {
    margin-top: auto;
    padding-top: 1rem;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1rem 0;
}

form {
    width: 100%;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: #fff;
    color: var(--text);
    outline: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(31, 106, 80, 0.12);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
}

fieldset {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

legend {
    padding: 0 0.35rem;
    font-weight: 800;
}

.notice {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-small);
    margin: 1rem 0;
    border: 1px solid var(--border);
    background: var(--surface);
}

.notice-success {
    border-color: #b9d8c8;
    background: #eff8f3;
    color: #24543d;
}

.notice-error {
    border-color: #e4b9b9;
    background: #fff2f2;
    color: #7c2b2b;
}

.notice-warning {
    border-color: #e5d2a5;
    background: #fff8e8;
    color: #745717;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
    font-size: 0.92rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--surface);
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.status-active {
    background: #e6f4eb;
    color: #276a4c;
}

.status-draft {
    background: #eef2ef;
    color: #5f6963;
}

.status-closed {
    background: #f8ecec;
    color: #8a4444;
}

.muted {
    color: var(--muted);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

@media (max-width: 760px) {
    .page-shell {
        width: min(calc(100% - 1rem), var(--max-width));
        padding-top: 1rem;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions > * {
        width: 100%;
    }

    button,
    .button {
        width: 100%;
    }

    th,
    td {
        white-space: nowrap;
    }
}

@media print {
    body {
        background: #fff;
    }

    .no-print {
        display: none !important;
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border-color: #aaa;
    }
}

/* =========================================================
   EventRunde – finales Design-Fundament
   ========================================================= */

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(
        90deg,
        var(--primary),
        #4b9477 55%,
        var(--accent)
    );
    z-index: 999;
}

.card {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.card:hover {
    border-color: #c9d9d0;
    box-shadow: var(--shadow-hover);
}

.page-header .button-secondary {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
}

h2,
h3 {
    letter-spacing: -0.02em;
}

h2 {
    margin-top: 0;
    margin-bottom: 0.85rem;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

h3 {
    margin-top: 0;
}

.card > h2:first-child,
.card > h3:first-child {
    color: #244438;
}

.actions {
    align-items: center;
}

.status {
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.status-active::before,
.status-draft::before,
.status-closed::before {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    margin-right: 0.42rem;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.notice {
    box-shadow: inset 4px 0 0 rgba(0, 0, 0, 0.05);
}

.notice-success {
    box-shadow: inset 4px 0 0 var(--success);
}

.notice-error {
    box-shadow: inset 4px 0 0 var(--danger);
}

.notice-warning {
    box-shadow: inset 4px 0 0 var(--accent);
}

.table-wrap {
    box-shadow: 0 6px 20px rgba(31, 72, 55, 0.05);
}

th {
    color: #29453a;
    font-weight: 800;
}

tbody tr:hover {
    background: #f8faf9;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #bdcdc4;
}

fieldset {
    background: #fbfcfb;
}

legend {
    color: #29483b;
}

/* Anlass-Designs – dezente Akzentflächen als Basis */
.theme-birthday {
    --primary: #8d3f72;
    --primary-hover: #74325d;
    --primary-soft: #f6eaf2;
}

.theme-grill {
    --primary: #9a522c;
    --primary-hover: #7e4021;
    --primary-soft: #f8eee8;
}

.theme-party {
    --primary: #5846a6;
    --primary-hover: #47378a;
    --primary-soft: #efecfa;
}

.theme-christmas {
    --primary: #2e6b49;
    --primary-hover: #24583c;
    --primary-soft: #e8f3ec;
}

.theme-nature {
    --primary: #4f7135;
    --primary-hover: #3f5c2b;
    --primary-soft: #edf4e8;
}

.theme-neutral {
    --primary: #315e50;
    --primary-hover: #284d42;
    --primary-soft: #ebf2ef;
}

@media (max-width: 760px) {
    body::before {
        height: 4px;
    }

    .card {
        padding: 1.1rem;
        border-radius: 15px;
    }

    .brand-mark {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .page-title {
        font-size: clamp(1.65rem, 8vw, 2.15rem);
    }
}