/* Inter Bold 700 i Regular 400 (pakiet @fontsource/inter 5.0.8, licencja SIL OFL: fonts/Inter-LICENSE) dolaczona do projektu.
   Dla kazdej grubosci dwa pliki wg zakresu znakow: latin oraz latin-ext (polskie znaki ogonkowe).
   Grubosc 400 jest potrzebna, bo bez niej przegladarka dla font-weight 400 uzywalaby kroju 700 (wygladaloby jak bold). Pliki musza lezec w static/css/,
   bo tylko ten folder jest kopiowany do assets/ przy starcie aplikacji. */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/inter-latin-ext-700-normal.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Montserrat 400 i 700 (pakiet @fontsource/montserrat 5.0.8, licencja SIL OFL: fonts/Montserrat-LICENSE).
   Wlasna nazwa rodziny "RWT Montserrat", zeby nie kolidowac z Montserrat 400 ladowana globalnie z Google Fonts. */
@font-face {
    font-family: "RWT Montserrat";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/montserrat-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "RWT Montserrat";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("fonts/montserrat-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "RWT Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/montserrat-latin-ext-700-normal.woff2") format("woff2");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "RWT Montserrat";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   RealWorkTime.py - raport "Realny czas pracy" (zadanie #139847).
   Wszystkie klasy z przedrostkiem "rwt-", zmienne tylko na .rwt-page,
   zeby nie wplywac na inne strony. Granat jak w rern_layout.css.
   ============================================================ */

#page-content:has(.rwt-page) {
    margin-left: 0.1vw;
    margin-right: 0;
    padding: 0 0 10px 10px;
    /* base_styles.css: .content-no-offcanvas ma width: 99vw (a .content-nav-open / .content cos innego) -
       przy marginesie i paddingu to daje szczeline po prawej stronie albo ucina tabele; tu szerokosc = reszta ekranu */
    width: auto;
    max-width: none;
    box-sizing: border-box;
}

.rwt-page {
    --rwt-font: "RWT Montserrat", Montserrat, Arial, sans-serif;   /* czcionka calej strony (zeby wrocic do Intera: "Inter", "Segoe UI", Arial) */
    --rwt-navy: #1c2650;
    --rwt-crimson: #b5173f;
    --rwt-crimson-hover: #961234;
    --rwt-ink: #1d2433;
    --rwt-muted: #6b7587;
    --rwt-line: #dfe3ea;
    --rwt-bg: #eef0f4;
    --rwt-card: #fff;
    --rwt-head: #8a92a5;           /* naglowek tabeli: jasnoszary (Pracownik, pusty naglowek, dni pn-pt) */
    --rwt-head-off: #646d84;       /* naglowek dnia wolnego: ciemniejszy */
    --rwt-day-sep: #f5f7fa;        /* podzial dni: jasniejszy niz tlo dni wolnych (--rwt-off), zeby weekendy tez byly rozdzielone */
    --rwt-metric: #e6e9ef;         /* komorki Start / Stop / Czas pracy */
    --rwt-office: #27e619;            /* wartosci domyslne = TimeSheetStatus: 901 */
    --rwt-remote: #009600;            /* 902 */
    --rwt-leave: #00ffee;             /* 6 Urlop */
    --rwt-sick-ink: #ff0000;          /* 5 Chory */
    --rwt-corrected: #ffb300;
    --rwt-off: #dfe3ea;
    --rwt-bad: #b9153f;               /* odchylenia od normy: R185 G021 B063 (zadanie #139847) */
    --rwt-pos: #0a8a1c;
    --rwt-neg: #b9153f;
    font-family: var(--rwt-font);
    font-size: 12px;
    color: var(--rwt-ink);
    background: var(--rwt-bg);
    border-radius: 8px;
    overflow: hidden;
}

.rwt-page *,
.rwt-page *::before,
.rwt-page *::after { box-sizing: border-box; }

/* globalne style appki ustawiaja Montserrat/500 na wszystkim - tu ma byc Arial; :where() = specyficznosc 0 */
.rwt-page { font-weight: 400; line-height: normal; }
.rwt-page :where(*) { font-weight: inherit; font-style: normal; }
.rwt-page :where(span, p, label, button, small, strong, td, th, a, h1, h2) { font-size: inherit; line-height: inherit; }

/* ---------- pasek gorny ---------- */
.rwt-topbar {
    height: 62px;
    background: var(--rwt-navy);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
}
.rwt-logo { height: 46px; width: auto; flex: 0 0 auto; }
.rwt-brand {
    font-size: 19px;
    letter-spacing: .08em;
    color: #fff;
    white-space: nowrap;
}
.rwt-brand strong { font-weight: 700; font-size: inherit; }
.rwt-client {
    margin-left: 6px;
    border-left: 1px solid #ffffff55;
    padding-left: 26px;
    height: 26px;
    display: flex;
    align-items: center;
}
.rwt-client-logo { display: block; height: 15px; width: auto; }

/* ---------- uklad ---------- */
.rwt-main { padding: 14px 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.rwt-card {
    background: var(--rwt-card);
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(4, 31, 79, .06);
}

/* ---------- breadcrumb ---------- */
.rwt-crumbs { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; }
.rwt-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.rwt-crumb-muted { color: var(--rwt-muted); }
.rwt-crumb-sep { color: var(--rwt-muted); }
.rwt-crumb-current { font-weight: 700; color: var(--rwt-ink); }
.rwt-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0;
    background: transparent; border: 0; border-radius: 6px;
    color: var(--rwt-ink); cursor: pointer;
}
.rwt-icon-btn:hover { background: var(--rwt-bg); }

/* ---------- tytul ---------- */
.rwt-heading { padding: 0 2px; }
.rwt-title { margin: 0 0 4px; font-size: 26px; font-weight: 700; color: var(--rwt-ink); }
.rwt-subtitle { margin: 0; color: var(--rwt-muted); font-size: 13px; }
.rwt-demo-badge {
    display: inline-block; margin-left: 8px; padding: 1px 8px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em;
    color: #c01848; background: #fde8ee; border-radius: 3px;
}

/* ---------- filtry ---------- */
.rwt-filters { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 16px 16px; flex-wrap: wrap; }
.rwt-filters-row { display: flex; gap: 16px; flex-wrap: wrap; }
.rwt-filter { display: flex; flex-direction: column; gap: 4px; width: 240px; }
.rwt-filter-label { font-size: 12px; font-weight: 600; color: var(--rwt-muted); }

.rwt-dropdown .Select-control,
.rwt-dropdown > div > div:first-child {
    min-height: 36px;
    border: 1px solid var(--rwt-line);
    border-radius: 4px;
    background: #fff;
}
.rwt-page .rwt-dropdown { font-size: 14px; font-weight: 700; color: var(--rwt-ink); }
.rwt-page .rwt-dropdown * { font-weight: 700; }

.rwt-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 20px;
    font: inherit; font-size: 14px; font-weight: 700;
    border: 0; border-radius: 4px; cursor: pointer;
}
.rwt-btn-primary { background: var(--rwt-crimson); color: #fff; }
.rwt-btn-primary:hover { background: var(--rwt-crimson-hover); }

/* ---------- tabela (AIO_AgGridDataTable) ---------- */
/* padding karty z tabela: 0 z gory, lewej i prawej (tabela od krawedzi do krawedzi karty); legenda i notka maja wlasny odstep */
.rwt-report { padding: 0 0 12px; overflow: hidden; }

/* AIO_AgGridDataTable owija tabele we wlasny pasek (tytul, +, pobieranie) - tu bez paska narzedzi */
.rwt-grid > div > div { background: transparent !important; border-radius: 0 !important; }
.rwt-grid div:has(+ div > [class*="ag-theme"]) { display: none !important; }
.rwt-grid div:has(> [class*="ag-theme"]) { margin: 0 !important; padding: 0 !important; }

/* cala strona: czcionka ze zmiennej --rwt-font, domyslnie bold (poza ikonami AgGrid) */
.rwt-page,
.rwt-page :not(.ag-icon) { font-family: var(--rwt-font) !important; font-weight: 700 !important; }
/* napis w naglowku: ELIOT zwykly, ANALYTICS pogrubiony (po regule globalnej, bo ta ma !important i wymusza bold) */
.rwt-page .rwt-brand { font-weight: 400 !important; }
.rwt-page .rwt-brand strong { font-weight: 700 !important; }

/* wysokosc tabeli wyznacza AgGrid (domLayout: autoHeight) - bez sztywnej wysokosci, zeby nie bylo pustego miejsca pod wierszami */
.rwt-grid [class*="ag-theme"] {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    --ag-background-color: #fff;
    --ag-border-color: var(--rwt-line);
    --ag-row-border-color: #fff;
    --ag-cell-horizontal-padding: 4px;
    --ag-font-size: 12px;
    --ag-font-family: "RWT Montserrat", Montserrat, Arial, sans-serif;
    --ag-foreground-color: var(--rwt-ink);
    --ag-header-foreground-color: #fff;
    --ag-header-background-color: var(--rwt-head);
    --ag-borders: none;
    --ag-header-column-resize-handle-display: none;
}

/* ea_lib ustawia tlo wierszy parzystych/nieparzystych wprost - wymuszamy biale */
.rwt-grid [class*="ag-theme"] .ag-row-odd,
.rwt-grid [class*="ag-theme"] .ag-row-even { background-color: #fff; }
.rwt-grid .ag-root-wrapper { border: 0; }

/* AG Grid rezerwuje 15 px po prawej na pionowy pasek przewijania, mimo ze przy autoHeight go nie ma -
   to ten pusty pasek po prawej stronie tabeli (tabela ma tyle wysokosci co wiersze, wiec nie przewija sie pionowo) */
.rwt-grid .ag-body-vertical-scroll { display: none !important; }

/* naglowki */
.rwt-grid .ag-header-cell, .rwt-grid .ag-header-group-cell {
    border-right: 1px solid #ffffff55;
    font-weight: 700;
    justify-content: center;
    text-align: center;
}
.rwt-grid .ag-header-cell-label { justify-content: center; }
.rwt-grid .rwt-hdr-left .ag-header-cell-label { justify-content: flex-start; }
/* naglowki kolumn przypietych z lewej (Pracownik, pusty naglowek etykiet) i dni pn-pt: jasnoszare, biala czcionka;
   dni wolne ciemniejsze. !important, bo style ea_lib ustawiaja biale tlo naglowkow. */
.rwt-grid .ag-header-cell.rwt-hdr-left,
.rwt-grid .ag-header-cell.rwt-hdr-day,
.rwt-grid .ag-header-cell.rwt-hdr-sum {
    background-color: var(--rwt-head) !important;
    color: #fff !important;
}
/* dzien wolny: ciemniejszy naglowek (klase .rwt-day-off ustawia komponent rwt_DayHeader, bo zmiana headerClass psula naglowki) */
.rwt-grid .ag-header-cell.rwt-hdr-day:has(.rwt-day-off) { background-color: var(--rwt-head-off) !important; }
.rwt-grid .ag-header-cell .ag-header-cell-label,
.rwt-grid .ag-header-cell .ag-header-cell-text { color: #fff !important; }
.rwt-grid .rwt-hdr-sum { font-size: 12px; }
.rwt-grid .rwt-hdr-sum .ag-header-cell-text { white-space: normal; line-height: 14px; text-align: center; }
.rwt-grid .rwt-hdr-day { padding: 0; }
.rwt-grid .ag-header-cell.rwt-hdr-left { padding-left: 8px; padding-right: 8px; }
.rwt-day-head { text-align: center; width: 100%; }
.rwt-day-num { font-size: 12px; font-weight: 700; line-height: 14px; }
.rwt-day-dow { font-size: 10px; font-weight: 400; line-height: 12px; opacity: .9; }

/* komorki */
.rwt-grid .ag-cell {
    display: flex; align-items: center; justify-content: center;
    padding: 0 1px; line-height: 24px; font-size: 11px;
    border-right: 1px solid #fff;
    border-bottom: 1px solid #fff;
}
/* linia oddzielajaca pracownikow: pod ostatnim wierszem (Czas pracy), przez wszystkie kolumny, ciemna (jak naglowek dnia wolnego) */
.rwt-grid .rwt-row-last .ag-cell { border-bottom: 2px solid var(--rwt-head-off) !important; }

/* kolumna pracownika wyglada jak jedna scalona komorka na 3 wiersze: bez linii miedzy wierszami,
   zostaje tylko ciemna linia pod ostatnim wierszem (.rwt-row-last), ktora oddziela pracownikow */
.rwt-grid .ag-row { border-bottom: 0 !important; }
.rwt-grid .rwt-cell-emp {
    justify-content: flex-start; padding: 0 8px; background: #fff;
    border-right: 1px solid var(--rwt-line);
    border-bottom: 0 !important;
}
.rwt-grid .rwt-emp-name { font-weight: 700; }
.rwt-grid .rwt-emp-code { color: var(--rwt-muted); }
.rwt-grid .rwt-cell-metric { justify-content: flex-end; padding: 0 8px; background: var(--rwt-metric) !important; font-weight: 700; border-right: 1px solid var(--rwt-line); }

/* podzial dni: jasnoszary border z lewej strony kazdej kolumny dnia (01-31), w naglowku i w komorkach */
.rwt-grid .ag-header-cell.rwt-hdr-day { border-left: 1px solid var(--rwt-day-sep); border-right: 0; }
.rwt-grid .ag-cell.rwt-cell-day { border-left: 1px solid var(--rwt-day-sep); border-right: 0; }
/* ten sam podzial dla kolumn za dniami: Srednia / Suma, Norma, Roznica */
.rwt-grid .ag-header-cell.rwt-hdr-sum { border-left: 1px solid var(--rwt-day-sep); border-right: 0; }
.rwt-grid .ag-cell.rwt-cell-sum,
.rwt-grid .ag-cell.rwt-cell-norm,
.rwt-grid .ag-cell.rwt-cell-diff { border-left: 1px solid var(--rwt-day-sep); border-right: 0; }

/* wszystkie komorki tabeli (dane) maja 11 px - takze nazwisko, kod, etykiety wierszy i podsumowanie */
.rwt-grid .ag-cell,
.rwt-grid .ag-cell * { font-size: 11px !important; }

/* pogrubienie komorek zalezy od klas: .rwt-bold (cellClassRules dni: Urlop / Chory / odchylenie od normy; cellClass kolumn
   Start/Stop, Srednia/Suma, Norma, Roznica) oraz .rwt-emp-name (nazwisko). Pozostale komorki sa zwykle (400).
   Globalna regula strony ustawia bold na wszystkim, wiec komorki tabeli najpierw zerujemy. */
.rwt-grid .ag-cell,
.rwt-grid .ag-cell * { font-weight: 400 !important; }
.rwt-grid .ag-cell.rwt-bold,
.rwt-grid .ag-cell.rwt-bold *,
.rwt-grid .ag-cell.rwt-emp-name,
.rwt-grid .ag-cell.rwt-emp-name * { font-weight: 700 !important; }

/* kolory dni */
.rwt-grid .rwt-office    { background: var(--rwt-office);    color: #000; }
.rwt-grid .rwt-remote    { background: var(--rwt-remote);    color: #000; }
.rwt-grid .rwt-leave     { background: var(--rwt-leave);     color: #000; }
.rwt-grid .rwt-sick      { background: #fff; color: var(--rwt-sick-ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--rwt-line); }
.rwt-grid .rwt-corrected { background: var(--rwt-corrected); color: #3b2a00; }
.rwt-grid .rwt-off       { background: var(--rwt-off); }
.rwt-grid .rwt-bad       { color: var(--rwt-bad) !important; font-weight: 700; }

/* kolumny podsumowania */
.rwt-grid .rwt-cell-sum, .rwt-grid .rwt-cell-norm, .rwt-grid .rwt-cell-diff { background: #fff; border-right: 1px solid var(--rwt-line); }
.rwt-grid .rwt-cell-sum, .rwt-grid .rwt-cell-diff { font-weight: 700; }
.rwt-grid .rwt-cell-norm { color: var(--rwt-muted); }
.rwt-grid .rwt-pos { color: var(--rwt-pos); }
.rwt-grid .rwt-neg { color: var(--rwt-neg); }

/* ---------- legenda ---------- */
.rwt-legend {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
    margin-top: 12px; padding: 0 12px;
    font-size: 12px;
}
.rwt-legend-title { font-weight: 700; }
.rwt-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.rwt-swatch { display: inline-block; width: 24px; height: 14px; border: 1px solid #00000022; }
.rwt-swatch.rwt-office { background: var(--rwt-office); }
.rwt-swatch.rwt-remote { background: var(--rwt-remote); }
.rwt-swatch.rwt-leave { background: var(--rwt-leave); }
.rwt-swatch.rwt-corrected { background: var(--rwt-corrected); }
.rwt-swatch.rwt-off { background: var(--rwt-off); }
.rwt-swatch.rwt-sick { background: #fff; border: 1px solid #b9c0cc; }
.rwt-legend-dev { color: var(--rwt-bad); font-weight: 700; }

.rwt-note { margin-top: 8px; padding: 0 12px; font-size: 11px; color: var(--rwt-muted); }
