/* Leistung KIK Bönen - wyglad arkusza QlikView "KIK Bönen" (LeistungKik.qvw) */

.kik-page {
    --kik-orange: #ffbf0a;
    --kik-orange-light: #ffe69c;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    color: #000;
    background-color: #fff;
    padding: 8px;
}

/* ── naglowek ─────────────────────────────────────────────────────────── */
.kik-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--kik-orange-light);
    margin-bottom: 14px;
}
.kik-logo { height: 52px; }
.kik-date-box {
    background-color: #e8573a;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    padding: 6px 14px;
    width: 300px;
    white-space: pre-line;
}
.kik-date-box .mantine-DateInput-input { height: 24px; min-height: 24px; font-size: 11px; }
.kik-update {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.kik-update-box {
    background-color: #ffff00;
    color: #e8573a;
    font-weight: bold;
    font-size: 12px;
    padding: 10px 18px;
    min-width: 280px;
    text-align: center;
}
.kik-reload-time { color: #e8000f; font-weight: bold; font-size: 15px; }
.kik-reload-button {
    background-color: #fffea0;
    border: 1px solid #c9c27a;
    border-radius: 14px;
    padding: 5px 20px;
    font-family: Tahoma, Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.kik-legend {
    background-color: #ffe396;
    font-weight: bold;
    font-size: 10px;
    padding: 6px 10px;
    white-space: pre-line;
    line-height: 1.35;
}

/* ── obiekt QV: belka tytulu + tresc ─────────────────────────────────── */
.kik-object {
    border: 1px solid var(--kik-orange);
    background-color: #fff;
    min-width: 0;
}
.kik-object-caption {
    background-color: var(--kik-orange);
    font-size: 12px;
    padding: 2px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kik-object-body { padding: 0; }

/* box Variablen */
.kik-variables td { padding: 1px 4px; font-size: 10px; white-space: nowrap; }
.kik-variables td:nth-child(3) { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }

/* list boxy (Jahr / Monat / Woche / Tag) */
.kik-listbox { display: grid; gap: 0; }
.kik-listbox label {
    display: flex !important;
    justify-content: center;
    margin: 0 !important;
    padding: 1px 0;
    border: 1px solid #f2f2f2;
    cursor: pointer;
    font-size: 11px;
}
.kik-listbox input { display: none; }
.kik-listbox label:has(input:checked) { background-color: #5bd75b; }
.kik-listbox label:has(.kik-excluded) { background-color: #dcdcdc; color: #777; }
.kik-listbox-1 { grid-template-columns: repeat(1, 1fr); }
.kik-listbox-3 { grid-template-columns: repeat(3, 1fr); }
.kik-listbox-4 { grid-template-columns: repeat(4, 1fr); }
.kik-listbox-5 { grid-template-columns: repeat(5, 1fr); }
.kik-selections { min-height: 60px; padding: 4px; font-size: 11px; white-space: pre-line; }

/* ── uklad arkusza ───────────────────────────────────────────────────── */
.kik-body {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.kik-left { display: flex; flex-direction: column; gap: 14px; }
.kik-main {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-areas:
        "mitarbeiter premie"
        "teamboss    premie"
        "pause       pause";
    gap: 14px;
    align-items: start;
}
.kik-area-mitarbeiter { grid-area: mitarbeiter; }
.kik-area-premie { grid-area: premie; }
.kik-area-teamboss { grid-area: teamboss; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.kik-area-pause { grid-area: pause; }
.kik-area-faktury { margin-top: 14px; }

@media (max-width: 1500px) {
    .kik-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mitarbeiter" "teamboss" "premie" "pause"; }
}

/* ── tabele (AgGrid) w stylu tabel przestawnych QV ───────────────────── */
.kik-object .ag-theme-alpine {
    --ag-font-family: Tahoma, Arial, sans-serif;
    --ag-font-size: 11px;
    --ag-row-height: 18px;
    --ag-header-height: 22px;
    --ag-cell-horizontal-padding: 4px;
    --ag-header-background-color: #fff;
    --ag-odd-row-background-color: #fff;
    --ag-row-border-color: #ededed;
    --ag-border-color: #e0e0e0;
    --ag-header-column-separator-display: none;
    --ag-wrapper-border-radius: 0;
}
.kik-object .ag-header-cell-text { font-weight: bold; }
.kik-object .ag-cell { line-height: 17px; }
/* tytul tabeli jest w belce QV - naglowek komponentu zostaje tylko z przyciskiem eksportu */
.kik-object h3 { display: none; }
.kik-object div:has(> h3) { justify-content: flex-end !important; min-height: 0; }
.kik-object div:has(> h3) > div:first-child { display: none !important; }
.kik-object div:has(> h3) button { margin: 1px 4px 1px 0 !important; padding: 0 4px; }
.kik-object div:has(> h3) button img { height: 16px; }

.kik-area-premie .ag-theme-alpine { height: 640px; }
.kik-pause .ag-header-cell { padding: 0 !important; }
.kik-pause .ag-header-cell-text { font-size: 8px; font-weight: normal; }
