/* Lykke Data Lake — einheitliches Tabellen-Design */

:root {
    --lykke-table-border: #e9ecef;
    --lykke-table-header-bg: #f8fafc;
    --lykke-table-header-color: #64748b;
    --lykke-table-row-hover: #f8fafc;
    --lykke-brand: #667eea;
    --lykke-brand-dark: #764ba2;
    --lykke-brand-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --lykke-brand-soft: rgba(102, 126, 234, 0.12);
    --lykke-brand-soft-hover: rgba(102, 126, 234, 0.2);
    --lykke-brand-border: rgba(102, 126, 234, 0.35);
    --lykke-table-accent: #667eea;
    --lykke-table-accent-portal: #667eea;
}

/* ── Wrapper ── */
.lykke-table-wrap,
.xp-table-wrap,
.xv-table-wrap,
.zfa-table-wrap,
.zf-preview-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--lykke-table-border);
}

.lykke-table-wrap--plain {
    border: none;
    background: transparent;
    border-radius: 0;
}

/* ── Basis-Tabelle ── */
.lykke-table,
.xp-table,
.xv-table,
.zfa-table,
.zf-bookings-table,
.zf-preview-table,
.profil-stamm-table,
.modal-timespan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.lykke-table th,
.xp-table th,
.xv-table th,
.zfa-table th,
.zf-bookings-table th,
.zf-preview-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--lykke-table-header-color);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--lykke-table-border);
    background: var(--lykke-table-header-bg);
    vertical-align: bottom;
}

.lykke-table td,
.xp-table td,
.xv-table td,
.zfa-table td,
.zf-bookings-table td,
.zf-preview-table td,
.profil-stamm-table td,
.modal-timespan-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #334155;
}

.lykke-table tbody tr:hover,
.xp-table tbody tr:hover,
.xv-table tbody tr:hover,
.zfa-table tbody tr:hover,
.zf-bookings-table tbody tr:hover,
.zf-preview-table tbody tr:hover {
    background: var(--lykke-table-row-hover);
}

.lykke-table tr:last-child td,
.xp-table tr:last-child td,
.xv-table tr:last-child td,
.zfa-table tr:last-child td,
.zf-bookings-table tr:last-child td,
.zf-preview-table tr:last-child td {
    border-bottom: none;
}

/* ── Akzent-Header (Xentral) ── */
.lykke-table--accent thead tr,
.xp-table thead tr,
.xv-table thead tr {
    background: var(--lykke-brand-gradient);
    color: #fff;
}

.lykke-table--accent th,
.xp-table th,
.xv-table th {
    color: #fff;
    text-transform: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: normal;
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.lykke-table--accent tbody tr:hover,
.xp-table tbody tr:hover,
.xv-table tbody tr:hover {
    background: #f5f6fe;
}

/* ── Akzent-Header (Portal) ── */
.lykke-table--accent-portal thead tr {
    background: var(--lykke-table-accent-portal);
    color: #fff;
}

.lykke-table--accent-portal th {
    color: #fff;
    text-transform: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: normal;
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.lykke-table--accent-portal tbody tr:hover {
    background: #f5f6fe;
}

/* ── Varianten ── */
.lykke-table--compact th,
.lykke-table--compact td,
.modal-timespan-table th,
.modal-timespan-table td,
.zf-bookings-table th,
.zf-bookings-table td {
    padding: 6px 8px;
    font-size: 12px;
}

.lykke-table--compact th,
.modal-timespan-table th,
.zf-bookings-table th {
    font-size: 11px;
}

.lykke-table--scroll {
    min-width: 720px;
}

.lykke-table--scroll-wide {
    min-width: 1024px;
}

.lykke-table--scroll-admin {
    min-width: 1100px;
}

/* Key-Value (Stammdaten) */
.lykke-table--kv,
.profil-stamm-table {
    font-size: 14px;
}

.lykke-table--kv th,
.profil-stamm-table th {
    width: 38%;
    text-transform: none;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    background: transparent;
    padding: 10px 14px 10px 0;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.lykke-table--kv td,
.profil-stamm-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.lykke-table--kv tr:last-child th,
.lykke-table--kv tr:last-child td,
.profil-stamm-table tr:last-child th,
.profil-stamm-table tr:last-child td {
    border-bottom: none;
}

.lykke-table--kv tbody tr:hover,
.profil-stamm-table tbody tr:hover {
    background: transparent;
}

/* ── Zell-Hilfsklassen ── */
.lykke-table-center {
    text-align: center;
}

.lykke-table-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.lykke-table-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.lykke-table-empty {
    padding: 24px;
    text-align: center;
    color: #64748b;
}

.lykke-table-row-warn {
    background-color: #fff3cd;
}

.lykke-table-row-deleted,
.xp-table tbody tr.xp-row-deleted {
    opacity: 0.55;
}

/* ── Aktionen ── */
.lykke-table-actions,
.zfa-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    white-space: nowrap;
}

.lykke-table-btn,
.xp-detail-btn,
.xv-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: var(--lykke-brand-soft);
    color: var(--lykke-brand);
    cursor: pointer;
}

.lykke-table-btn:hover,
.xp-detail-btn:hover {
    background: var(--lykke-brand-soft-hover);
}

.lykke-table-btn:focus-visible,
.xp-detail-btn:focus-visible,
.xv-detail-btn:focus-visible {
    outline: 2px solid var(--lykke-table-accent);
    outline-offset: 2px;
}

.lykke-table-actions button,
.zfa-actions button {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lykke-table-actions .material-symbols-outlined,
.zfa-actions .material-symbols-outlined {
    font-size: 18px;
    line-height: 1;
}

/* ── Toolbar ── */
.lykke-table-toolbar,
.xp-toolbar,
.zfa-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.lykke-table-toolbar__start,
.xp-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 220px;
    flex-wrap: wrap;
    min-width: 0;
}

.lykke-table-toolbar__search,
.xp-toolbar-search,
.zfa-toolbar-search {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 520px;
}

.lykke-table-toolbar__search input[type="search"],
.lykke-table-toolbar__search input[type="text"],
input.lykke-table-toolbar__search[type="search"],
input.lykke-table-toolbar__search[type="text"],
.xp-toolbar-search input[type="search"],
.xp-toolbar-search input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.lykke-table-toolbar__search form,
form.lykke-table-toolbar__search {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

form.lykke-table-toolbar__search input[type="search"] {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 520px;
}

.lykke-table-toolbar__actions,
.xp-toolbar-actions,
.zfa-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.lykke-table-toolbar__btn,
.zfa-btn-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: var(--lykke-brand-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.2;
}

.lykke-table-toolbar__btn:hover,
.zfa-btn-toolbar:hover {
    filter: brightness(1.05);
    color: #fff;
}

.lykke-table-toolbar__btn:disabled,
.zfa-btn-toolbar:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
    filter: none;
}

.lykke-table-toolbar__btn .material-symbols-outlined,
.zfa-btn-toolbar .material-symbols-outlined {
    font-size: 20px;
}

.lykke-table-toolbar__msg {
    font-size: 14px;
    color: #475569;
}

/* ── Pagination ── */
.lykke-pagination,
.zfa-pagination {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #64748b;
}

.lykke-pagination__summary,
.zfa-pagination-summary {
    color: #64748b;
    font-size: 14px;
}

.lykke-pagination__btns,
.zfa-pagination-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lykke-pagination a,
.lykke-pagination__btn {
    padding: 8px 14px;
    background: var(--lykke-brand-gradient);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lykke-pagination a:hover {
    filter: brightness(1.05);
    color: #fff;
}

.lykke-pagination__btn:disabled,
.lykke-pagination__btn.is-disabled,
.lykke-pagination span.is-disabled,
.zfa-pagination-btns button:disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 8px;
    font-size: 14px;
    cursor: not-allowed;
    border: none;
    font-weight: 600;
}

.lykke-pagination__info {
    color: #666;
    font-size: 14px;
}

/* ── Marken-Chips (wie Dev Preset) ── */
.lykke-chip,
.zfa-type-xentral,
.zf-tag,
.zf-tag-me {
    background: var(--lykke-brand-gradient);
    color: #fff;
    border-color: transparent;
}

.zf-tag-extra {
    background: var(--lykke-brand-soft);
    color: var(--lykke-brand);
    border: 1px solid var(--lykke-brand-border);
}

.zf-tag-extra .zf-tag-remove {
    background: var(--lykke-brand-soft-hover);
    color: var(--lykke-brand);
}

.zf-tag-extra .zf-tag-remove:hover {
    background: rgba(102, 126, 234, 0.28);
}

/* ── Checkboxen / Switches ── */
.zfa-form-box input[type="checkbox"],
.zf-card input[type="checkbox"] {
    accent-color: var(--lykke-brand);
}

.zf-switch input:checked + .zf-switch__track,
.xp-switch input:checked + .xp-switch__track {
    background: var(--lykke-brand-gradient);
}

.zf-switch input:focus-visible + .zf-switch__track,
.xp-switch input:focus-visible + .xp-switch__track {
    outline: 2px solid var(--lykke-brand-border);
    outline-offset: 2px;
}

/* ── Primäre Aktions-Buttons (Dialoge / Formulare) ── */
.zfa-btn-add,
.zf-btn-submit {
    background: var(--lykke-brand-gradient);
    color: #fff;
    border: none;
}

.zfa-btn-add:hover,
.zf-btn-submit:hover {
    filter: brightness(1.05);
}
