/* Ticket141 – öffentliche Seiten (Shop, Embed, Bestellung, Ticket). Hell, MudBlazor-Optik, Akzent über --t141-accent. */
:root { --t141-accent: #14b8a6; --t141-ink: rgba(0,0,0,.87); --t141-muted: rgba(0,0,0,.6); --t141-line: #e0e0e0; --t141-bg: #f6f8f9; }
html, body { margin: 0; }
body.t141 { background: var(--t141-bg); color: var(--t141-ink); font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif; line-height: 1.5; }
body.t141-embed { background: transparent; }
.t141 a { color: var(--t141-accent); }
.t141-wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.t141-muted { color: var(--t141-muted); }
.t141-mono { font-family: Consolas, "Courier New", monospace; letter-spacing: .02em; }
.t141-skip { position: absolute; left: -10000px; }
.t141-skip:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 6px 10px; }

/* Kopf + Fuß */
.t141-head { background: #fff; border-bottom: 1px solid var(--t141-line); border-top: 4px solid var(--t141-accent); }
.t141-head__inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.t141-brand { font-weight: 600; font-size: 1.15rem; color: var(--t141-ink) !important; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t141-head nav { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.t141-head nav > a { text-decoration: none; font-weight: 500; }
.t141-main { padding: 24px 0 48px; min-height: 50vh; }
.t141-foot { background: #fff; border-top: 1px solid var(--t141-line); padding: 24px 0 16px; font-size: .9rem; color: var(--t141-muted); }
.t141-foot__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.t141-foot__name { font-weight: 600; color: var(--t141-ink); margin: 0 0 4px; }
.t141-foot p { margin: 0 0 4px; }
.t141-foot nav { display: flex; flex-direction: column; gap: 4px; }
.t141-powered { text-align: center; font-size: .78rem; margin-top: 16px; }
.t141-powered a { color: inherit !important; }

/* Startseite */
.t141-hero { padding: 8px 0 20px; }
.t141-hero h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; font-weight: 600; }
.t141-rich p { margin: 0 0 .75em; }
.t141-rich img { max-width: 100%; height: auto; }
.t141-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.t141-filter a { padding: 4px 14px; border-radius: 16px; border: 1px solid var(--t141-line); background: #fff; color: var(--t141-ink); text-decoration: none; font-size: .875rem; }
.t141-filter a.is-active { background: var(--t141-accent); border-color: var(--t141-accent); color: #fff; }
.t141-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.t141-card { display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden; text-decoration: none; color: var(--t141-ink) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08); transition: box-shadow .15s, transform .15s; }
.t141-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.14); transform: translateY(-2px); }
.t141-card--past { opacity: .65; }
.t141-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: color-mix(in srgb, var(--t141-accent) 14%, #fff); display: flex; align-items: center; justify-content: center; }
.t141-card__date { display: flex; flex-direction: column; align-items: center; color: var(--t141-accent); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.t141-card__date small { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; }
.t141-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.t141-card__group { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; color: var(--t141-accent); }
.t141-card__title { font-size: 1.15rem; margin: 0; font-weight: 600; }
.t141-card__meta { font-size: .875rem; color: var(--t141-muted); margin: 0; }
.t141-card__cta { margin-top: auto; padding-top: 8px; font-weight: 600; color: var(--t141-accent); }

/* Event-Kopf */
.t141-event-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.t141-event-head--img { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: center; }
.t141-event-head img { width: 100%; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.t141-event-head h1 { margin: 4px 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 600; line-height: 1.15; }
.t141-event-head__tag { font-size: 1.1rem; color: var(--t141-muted); margin: 0 0 8px; }
.t141-event-head__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--t141-ink); font-weight: 500; }
@media (max-width: 720px) { .t141-event-head--img { grid-template-columns: minmax(0, 1fr); } }

/* Shop */
.t141-shop { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.t141-shop--embed { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .t141-shop { grid-template-columns: minmax(0, 1fr); } }
.t141-h { font-size: 1.15rem; font-weight: 600; margin: 0 0 12px; }
.t141-panel { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08); margin-bottom: 20px; }
.t141-cats { display: flex; flex-direction: column; gap: 10px; }
.t141-cat { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--t141-line);
    border-left: 4px solid var(--cat, var(--t141-accent)); border-radius: 6px; background: #fff; }
.t141-cat--off { opacity: .6; }
.t141-cat__name { font-weight: 600; margin: 0; font-size: 1rem; }
.t141-cat__desc { margin: 2px 0 0; font-size: .875rem; color: var(--t141-muted); }
.t141-cat__state { margin: 2px 0 0; font-size: .8rem; font-weight: 600; color: var(--t141-muted); }
.t141-cat__state--few { color: #ef6c00; }
.t141-cat__price { font-weight: 600; text-align: right; white-space: nowrap; }
.t141-cat__price small { display: block; font-weight: 400; font-size: .78rem; color: var(--t141-muted); }
.t141-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: .7rem; font-weight: 600; vertical-align: middle;
    background: color-mix(in srgb, var(--t141-accent) 16%, #fff); color: color-mix(in srgb, var(--t141-accent) 70%, #000); }
.t141-qty { display: flex; align-items: center; gap: 4px; }
.t141-qty input { width: 3.2rem; min-height: 38px; text-align: center; font: inherit; border: 1px solid rgba(0,0,0,.23); border-radius: 4px; -moz-appearance: textfield; }
.t141-qty input::-webkit-outer-spin-button, .t141-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.t141-qty button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--t141-line); background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--t141-accent); }
.t141-qty button:hover { background: color-mix(in srgb, var(--t141-accent) 10%, #fff); }
@media (max-width: 520px) { .t141-cat { grid-template-columns: minmax(0, 1fr) auto; } .t141-cat__qty { grid-column: 1 / -1; justify-self: end; } }

.t141-form { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.t141-field { margin-top: 6px; }
.t141 .dw-btn--primary { background: var(--t141-accent); }
.t141 .dw-btn--primary:hover { background: color-mix(in srgb, var(--t141-accent) 85%, #000); }
.t141 .dw-btn { border-color: color-mix(in srgb, var(--t141-accent) 50%, transparent); color: var(--t141-accent); }
.t141 .dw-btn--primary, .t141 .dw-btn--primary:hover { color: #fff; }
.t141 .dw-btn:disabled { opacity: .5; cursor: default; }
.t141 .dw-input:focus { border-color: var(--t141-accent); box-shadow: inset 0 0 0 1px var(--t141-accent); }
.t141 .dw-field:focus-within .dw-label { color: var(--t141-accent); }
.t141 .dw-check input { accent-color: var(--t141-accent); }
.t141-row { display: flex; gap: 8px; align-items: stretch; }
.t141-row .dw-field { flex: 1; }
.t141-btn-lg { min-height: 48px; font-size: 1rem; }

.t141-summary { position: sticky; top: 16px; }
.t141-summary ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: .92rem; }
.t141-summary li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.t141-totals { margin: 12px 0; }
.t141-totals > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: .95rem; }
.t141-totals dt, .t141-totals dd { margin: 0; }
.t141-totals .t141-total { border-top: 1px solid var(--t141-line); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 1.1rem; }
.t141-coupon-msg { font-size: .85rem; margin: 4px 0 0; min-height: 1.2em; }
.t141-coupon-msg.is-ok { color: #2e7d32; }
.t141-coupon-msg.is-error { color: #d32f2f; }
.t141-terms { font-size: .85rem; color: var(--t141-muted); white-space: normal; }
.t141-privacy { font-size: .8rem; color: var(--t141-muted); margin: 8px 0 0; }
.t141-error { background: #fdecea; color: #611a15; border-radius: 4px; padding: 10px 14px; font-size: .9rem; }
.t141-side h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--t141-muted); margin: 14px 0 4px; }
.t141-side h3:first-child { margin-top: 0; }
.t141-side p { margin: 0 0 6px; }
.t141-member { display: flex; flex-direction: column; gap: 8px; }
.t141-embed-head { padding: 4px 0 12px; font-size: 1rem; }
.t141-embed-main { padding: 8px 4px 4px; }

/* Bestellung */
.t141-order-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .t141-order-grid { grid-template-columns: minmax(0, 1fr); } }
.t141-items { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t141-items td { padding: 4px 0; border-bottom: 1px solid var(--t141-line); vertical-align: top; }
.t141-items td.num { text-align: right; white-space: nowrap; padding-left: 8px; }
.t141-items tr.strong td { font-weight: 700; border-bottom: 0; padding-top: 8px; }
.t141-tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.t141-tk-mini { background: #fff; border: 1px solid var(--t141-line); border-top: 4px solid var(--t141-accent); border-radius: 6px; padding: 12px; text-align: center;
    text-decoration: none; color: var(--t141-ink) !important; display: flex; flex-direction: column; gap: 4px; }
.t141-tk-mini--off { opacity: .55; border-top-color: #9e9e9e; }
.t141-tk-mini .js-qr { width: 150px; height: 150px; margin: 4px auto; }
.t141-tk-mini .js-qr svg, .t141-tk .js-qr svg { width: 100%; height: 100%; display: block; }
.t141-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.t141-actions form { margin: 0; }

/* Ticket (einzeln + Druck) */
body.t141-print { background: #eef1f3; }
.t141-tk-page { width: min(760px, 100% - 32px); margin: 24px auto; }
.t141-tk { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.15); margin-bottom: 24px; break-inside: avoid; page-break-inside: avoid; }
.t141-tk--off { filter: grayscale(1); opacity: .75; }
.t141-tk__head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--t141-accent); color: #fff; font-weight: 600; }
.t141-tk__body { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 20px; padding: 20px; }
@media (max-width: 560px) { .t141-tk__body { grid-template-columns: minmax(0, 1fr); } }
.t141-tk__event { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.2; }
.t141-tk__body p { margin: 0 0 4px; }
.t141-tk__holder { font-size: 1.1rem; font-weight: 600; margin-top: 10px !important; }
.t141-tk__state { color: #d32f2f; font-weight: 700; }
.t141-tk__note { font-size: .85rem; color: var(--t141-muted); margin-top: 8px !important; }
.t141-tk__qr { text-align: center; }
.t141-tk .js-qr { width: 190px; height: 190px; margin: 0 auto; }
.t141-tk__code { font-weight: 700; margin-top: 6px !important; }
.t141-tk__foot { padding: 10px 20px; border-top: 1px dashed var(--t141-line); font-size: .78rem; color: var(--t141-muted); }
@media print {
    .no-print { display: none !important; }
    body.t141-print { background: #fff; }
    .t141-tk-page { width: 100%; margin: 0; }
    .t141-tk { box-shadow: none; border: 1px solid #bbb; page-break-after: always; }
    .t141-tk:last-child { page-break-after: auto; }
    .t141-tk__head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Demo-Instanz (Ticket141:DemoTenants) */
.t141-demo { background: #fff8e1; border-bottom: 1px solid #ffe082; color: #5d4037; padding: 10px 16px; text-align: center; font-size: .92rem; }
.t141-embed .t141-demo { border: 1px solid #ffe082; border-radius: 6px; margin-bottom: 12px; }
