/* grandMA2 Fixture-Etiketten – im Stil der hesteig-Tools (siehe ski-radius) */
.fxl {
    --acc: #3bbc84;
    --acc-soft: rgba(59, 188, 132, 0.15);
    --red: #f87171;
    --card: rgba(255, 255, 255, 0.04);
    --field: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.12);
    --mut: rgba(255, 255, 255, 0.66);
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    display: grid;
    gap: 16px;
    font-size: 14px;
}

.fxl [hidden] {
    display: none !important;
}

/* globale Seiten-Styles (section, h2, p, a) neutralisieren */
.fxl section {
    margin: 0;
}

.fxl h1 {
    font-size: clamp(30px, 7vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0.03em;
    padding: 0;
}

.fxl h2,
.fxl h4 {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0.14em;
    text-align: left;
    text-transform: uppercase;
}

.fxl h4 {
    margin: 14px 0 6px;
    font-size: 11px;
    color: var(--mut);
}

.fxl p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.55;
    color: var(--mut);
}

.fxl p a {
    font-size: inherit;
    text-transform: none;
    color: var(--acc);
}

.fxl code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: #fff;
    word-break: break-all;
}

.fxl .lead {
    max-width: 760px;
    margin-top: 10px;
    font-size: 17px;
}

.fxl .muted {
    color: var(--mut);
}

.fxl .card,
.fxl .panel,
.fxl .settings,
.fxl .topbar,
.fxl .check-head {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    min-width: 0;
}

/* ---------- Anleitung + Download ---------- */
.fxl .steps {
    display: grid;
    gap: 16px;
}

.fxl .step small {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--acc);
}

.fxl .step:first-child {
    border-color: var(--acc);
    background: linear-gradient(150deg, rgba(59, 188, 132, 0.22), rgba(59, 188, 132, 0.03));
    box-shadow: 0 0 40px -10px rgba(59, 188, 132, 0.55);
}

.fxl .dl {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}


/* ---------- Buttons + Felder: eine Höhe, ein Radius, eine Schrift ---------- */
.fxl {
    --ctl-h: 38px;
    --ctl-r: 10px;
}

.fxl .btn,
.fxl .tab,
.fxl input[type=number],
.fxl input[type=search],
.fxl input[type=text],
.fxl select {
    height: var(--ctl-h);
    border: 1px solid var(--line);
    border-radius: var(--ctl-r);
    color: #fff;
    font: 600 13px/1 Mulish, sans-serif;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, filter 0.15s;
}

.fxl .btn,
.fxl .tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    background: var(--field);
    text-transform: none;
    filter: none;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.fxl .btn:hover,
.fxl .tab:hover,
.fxl .file-btn:focus-within {
    opacity: 1;
    border-color: var(--acc);
    background: var(--acc-soft);
}

.fxl .btn:focus-visible,
.fxl .tab:focus-visible,
.fxl .file-btn:focus-within,
.fxl input:focus-visible,
.fxl select:focus-visible {
    outline: none;
    border-color: var(--acc);
    box-shadow: 0 0 0 3px rgba(59, 188, 132, 0.35);
}

.fxl .btn:active {
    filter: brightness(0.9);
}

.fxl .btn.primary,
.fxl .tab.active {
    border-color: transparent;
    background: var(--gradient-main);
}

.fxl .btn.primary {
    font-weight: 800;
}

.fxl .btn.primary:hover {
    filter: brightness(1.12);
}

.fxl .btn.ghost {
    background: transparent;
}

.fxl .btn.danger {
    color: var(--red);
}

.fxl .btn.danger:hover {
    border-color: var(--red);
    background: rgba(248, 113, 113, 0.12);
}

.fxl input[type=number],
.fxl input[type=search],
.fxl input[type=text],
.fxl select {
    width: 100%;
    padding: 0 10px;
    background: var(--field);
    font-weight: 400;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.fxl input::placeholder {
    color: var(--mut);
}

.fxl select {
    appearance: none;
    padding-right: 30px;
    background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 12px no-repeat;
    cursor: pointer;
}

.fxl select option {
    background: #15151d;
}

/* Checkboxen im selben Look */
.fxl input[type=checkbox] {
    appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    background: var(--field);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.fxl input[type=checkbox]:hover {
    border-color: var(--acc);
}

.fxl input[type=checkbox]:checked {
    border-color: transparent;
    background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.fxl input[type=range] {
    accent-color: var(--acc);
    cursor: pointer;
}

.fxl .controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fxl .controls input[type=search],
.fxl .controls select {
    width: auto;
    min-width: 150px;
}

.fxl .inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--ctl-h);
    color: var(--mut);
    font-size: 13px;
    white-space: nowrap;
}

.fxl .inline input[type=number] {
    width: 64px;
}

/* ---------- App-Kopf ---------- */
.fxl .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
}

.fxl .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.fxl .brand-mark {
    flex: none;
    width: 12px;
    height: 36px;
    border-radius: 4px;
    background: var(--gradient-main);
}

.fxl .brand p {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.fxl .privacy {
    flex-basis: 100%;
    font-size: 13px;
}

.fxl .privacy::before {
    content: "🔒 ";
}

/* Freigabe aufs Handy */
.fxl .share {
    flex-basis: 100%;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.fxl .share p {
    margin: 0 0 10px;
    font-size: 13px;
}

.fxl #shareName {
    flex: 1 1 220px;
    width: auto;
}

.fxl .share-live {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.fxl .qr {
    flex: none;
    width: 168px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.fxl .qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.fxl .share-info {
    flex: 1 1 260px;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.fxl .share-info p {
    margin: 0;
}

.fxl .sync-state {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 13px;
}

.fxl .sync-state::before {
    content: "● ";
    color: var(--acc);
}

.fxl .sync-state.err::before {
    color: var(--red);
}

/* Umschalter Etiketten-Export / Prüfliste */
.fxl .tabs {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.35);
}

.fxl .tabs .tab {
    flex-direction: column;
    gap: 2px;
    height: auto;
    min-height: 56px;
    padding: 8px 14px;
    border-color: transparent;
    background: transparent;
    white-space: normal;
}

.fxl .tabs .tab b {
    font-size: 15px;
}

.fxl .tabs .tab small {
    font-size: 12px;
    font-weight: 400;
    color: var(--mut);
}

.fxl .tabs .tab.active {
    background: var(--gradient-main);
    box-shadow: 0 0 24px -8px rgba(59, 188, 132, 0.7);
}

.fxl .tabs .tab.active small {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Tabs ---------- */
.fxl .tab-panel {
    display: none;
    gap: 16px;
}

.fxl .tab-panel.active {
    display: grid;
}

/* ---------- Einstellungen ---------- */
.fxl .settings {
    display: grid;
    gap: 12px;
    align-content: start;
}

.fxl details {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.fxl summary {
    padding: 4px 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}

.fxl summary::marker {
    color: var(--acc);
}

.fxl details[open] summary {
    margin-bottom: 8px;
}

.fxl .grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fxl .field {
    display: grid;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: var(--mut);
}

.fxl .field.full {
    margin-top: 8px;
}

.fxl .unit {
    font-weight: 300;
    opacity: 0.7;
}

.fxl .check {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.35;
    cursor: pointer;
}

.fxl .check.inline {
    margin: 0;
    align-items: center;
}

.fxl .check input {
    margin-top: 1px;
}

.fxl .info {
    margin-top: 10px;
    font-size: 13px;
}

.fxl .info b {
    color: var(--acc);
}

.fxl .logo-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.fxl .logo-preview {
    display: grid;
    place-items: center;
    width: 120px;
    height: 56px;
    padding: 6px;
    border-radius: 8px;
    background: #fff;
}

.fxl .logo-preview img {
    max-width: 100%;
    max-height: 100%;
}

.fxl .logo-preview .muted {
    color: #666;
    font-size: 12px;
}

.fxl .logo-actions {
    display: grid;
    gap: 6px;
}

/* ---------- Auswahl + Vorschau ---------- */
.fxl .workarea {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.fxl .panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 12px;
}

/* eigener Stapelkontext: der sticky Tabellenkopf bleibt unter dem Seiten-Header */
.fxl .table-wrap {
    isolation: isolate;
    max-height: 380px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.fxl .fx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fxl .fx-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px;
    background: #17171f;
    color: var(--mut);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
}

.fxl .fx-table td {
    padding: 5px 8px;
    border-top: 1px solid var(--line);
    white-space: nowrap;
}

.fxl .fx-table tbody tr {
    cursor: pointer;
}

.fxl .fx-table tbody tr:hover {
    background: var(--acc-soft);
}

.fxl .fx-table tr.off td:not(.c-check):not(.c-num) {
    opacity: 0.4;
}

.fxl .c-check,
.fxl .c-num {
    width: 1%;
}

.fxl .c-num input {
    width: 64px;
    height: 30px;
    padding: 0 8px;
}

.fxl .mono {
    font-family: ui-monospace, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.fxl .empty {
    padding: 32px 16px;
    color: var(--mut);
    text-align: center;
}

.fxl .hint {
    margin: 0 0 12px;
    font-size: 13px;
}

.fxl .pages {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-height: 80vh;
    padding: 16px;
    overflow: auto;
    border-radius: 12px;
    background: #06090d;
}

.fxl .page svg {
    display: block;
    border-radius: 2px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

.fxl .page figcaption {
    margin-top: 6px;
    color: var(--mut);
    font-size: 12px;
    text-align: center;
}

/* SVG der Bögen: Papier, Umrisse, Druckfarbe */
.fxl .paper {
    fill: #fff;
}

.fxl .ol {
    fill: none;
    stroke: #c8c8c8;
    stroke-width: 0.25;
    stroke-dasharray: 1 1;
}

.fxl .skip {
    fill: url(#hatch);
    stroke: #c8c8c8;
    stroke-width: 0.25;
}

.fxl .hl {
    stroke: #ddd;
    stroke-width: 0.6;
}

.fxl .hit {
    fill: transparent;
    cursor: pointer;
}

.fxl .hit:hover {
    fill: rgba(59, 188, 132, 0.18);
}

.fxl .ink,
.fxl .dip {
    stroke: #000;
    fill: none;
}

.fxl .ink .f,
.fxl .dip .f,
.fxl .ink text,
.fxl .dip text {
    fill: #000;
    stroke: none;
}

/* ---------- Prüfliste ---------- */
.fxl .check-head {
    display: grid;
    gap: 12px;
}

.fxl .progress-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fxl .progress {
    flex: 1;
    height: 10px;
    overflow: hidden;
    border-radius: 5px;
    background: var(--field);
}

.fxl .progress .bar {
    width: 0;
    height: 100%;
    background: var(--gradient-main);
    transition: width 0.3s;
}

.fxl .progress-text {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fxl .chk-list {
    display: grid;
    gap: 8px;
}

.fxl .chk-item {
    position: relative;
    display: grid;
    grid-template-columns: 28px 64px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, opacity 0.2s;
}

.fxl .chk-item:hover {
    border-color: var(--acc);
}

.fxl .chk-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fxl .chk-item:focus-within {
    outline: 2px solid var(--acc);
}

.fxl .tick {
    width: 26px;
    height: 26px;
    border: 2px solid var(--line);
    border-radius: 8px;
}

.fxl .chk-item.done {
    background: rgba(59, 188, 132, 0.08);
    opacity: 0.6;
}

.fxl .chk-item.done .tick {
    border-color: transparent;
    background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.fxl .chk-item small {
    display: block;
    color: var(--mut);
    font-size: 11px;
    font-weight: 400;
}

.fxl .ci-id,
.fxl .ci-patch {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
}

.fxl .ci-main {
    min-width: 0;
}

.fxl .ci-main b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fxl .ci-patch {
    color: var(--acc);
}

.fxl .ci-dip {
    grid-column: 2 / -1;
}

.fxl svg.dip {
    display: block;
    width: 100%;
    max-width: 300px;
    padding: 4px;
    border-radius: 6px;
    background: #fff;
}

/* ---------- Overlays ---------- */
.drop-hint {
    position: fixed;
    inset: 16px;
    z-index: 50;
    display: grid;
    place-items: center;
    border: 3px dashed #3bbc84;
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.8);
    font-size: 28px;
    font-weight: 800;
    pointer-events: none;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 60;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border: 1px solid #3bbc84;
    border-radius: 12px;
    background: #10151a;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transform: translateX(-50%);
}

.toast.err {
    border-color: #f87171;
}

.drop-hint[hidden],
.toast[hidden] {
    display: none;
}

/* ---------- Breakpoints ---------- */
@media (min-width: 900px) {
    .fxl .steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .fxl #tab-labels {
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: start;
    }

    .fxl .settings {
        position: sticky;
        top: 116px;
        max-height: calc(100vh - 132px);
        overflow: auto;
    }

    .fxl .check-head {
        grid-template-columns: minmax(200px, 1fr) auto;
    }

    .fxl .progress-wrap {
        grid-column: 1 / -1;
    }

    .fxl .chk-item {
        grid-template-columns: 28px 72px minmax(0, 1fr) 100px minmax(160px, 260px);
    }

    .fxl .ci-dip {
        grid-column: auto;
    }
}
