/* =========================================================
   STRONA STARTOWA (DASHBOARD)
   Plik: dashboard.css
========================================================= */

/* zmienne na :root, a nie na .dashboard - stopka lezy poza <main class="dashboard">
   i inaczej nie widzialaby tych wartosci (var() bez wartosci uniewaznia cala deklaracje) */
:root {
    --dash-radius: 16px;
    --dash-border: #e6ecf5;
    --dash-shadow: 0 6px 20px rgba(15, 23, 42, .05);
    --dash-ink: #0f2745;
    --dash-muted: #6b7a90;
}

/* =========================
   NAGLOWEK
========================= */

.dash-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.dash-greeting {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dash-ink);
}

.dash-lead {
    margin: 0;
    font-size: .85rem;
    color: var(--dash-muted);
}

.dash-date {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: 14px;
    box-shadow: var(--dash-shadow);
    transition: .2s ease;
}

.dash-date-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #e8f0fe;
    color: #3473BA;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dash-date-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    text-align: left;
}

.dash-date-text small {
    font-size: .7rem;
    color: var(--dash-muted);
}

.dash-date-text strong {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dash-ink);
    white-space: nowrap;
}

/* =========================
   KAFELKI STATYSTYK
========================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    color: inherit;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .09);
}

.stat-icon {
    /* wysokosc ikony = wysokosc bloku tekstu (2 linie etykiety + liczba),
       dzieki temu etykieta zaczyna sie przy gorze ikony, a liczba konczy przy jej dole */
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: .78rem;
    line-height: 1.3;
    color: var(--dash-muted);
    /* stala wysokosc 2 linii - liczby we wszystkich kafelkach na tym samym poziomie */
    min-height: calc(.78rem * 1.3 * 2);
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--dash-ink);
}


/* warianty kolorystyczne ikon */
.ico-blue   { background: #e8f0fe; color: #3473BA; }
.ico-green  { background: #e6f6ec; color: #2f9e5b; }
.ico-orange { background: #fdf0dd; color: #e0912f; }
.ico-purple { background: #efeafd; color: #7c5cd6; }
.ico-red    { background: #fdeaea; color: #dc3f4a; }

/* tla wierszy - wspolne dla "Ostatnich powiadomien" i "Szybkich akcji" */
.tint-blue   { background: #eef4fd; }
.tint-green  { background: #eaf7ef; }
.tint-orange { background: #fdf6ea; }
.tint-purple { background: #f2edfd; }
.tint-red    { background: #fdeff1; }

/* =========================
   SIATKA DOLNA
========================= */

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

/* karta powiadomien rozciaga sie na wysokosc prawej kolumny,
   a stopka z "Zobacz wszystkie" laduje przy jej dolnej krawedzi */
.dash-grid > .dash-card {
    display: flex;
    flex-direction: column;
}

.dash-grid > .dash-card .notif-list {
    flex: 1 1 auto;
}

.dash-col-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.dash-card {
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
}

.dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 6px;
}

.dash-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.dash-card-menu {
    border: 0;
    padding: 4px 9px;
    border-radius: 8px;
    background: transparent;
    color: var(--dash-muted);
    line-height: 1;
}

.dash-card-menu:hover {
    background: #f1f5fb;
    color: var(--dash-ink);
}

/* =========================
   OSTATNIE POWIADOMIENIA
========================= */

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 16px 4px;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: inherit;
    transition: transform .18s ease, filter .18s ease;
}

.notif-item:hover {
    color: inherit;
    transform: translateX(3px);
    filter: brightness(.98);
}

/* kafelek ikony bialy na kolorowym tle - tak jak w "Szybkich akcjach" */
.notif-item .notif-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notif-body {
    flex: 1 1 auto;
    min-width: 0;
}

.notif-title {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--dash-ink);
}

.notif-sub {
    display: block;
    font-size: .75rem;
    line-height: 1.35;
    color: var(--dash-muted);
}

.notif-meta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-time {
    font-size: .72rem;
    color: var(--dash-muted);
    white-space: nowrap;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3473BA;
}

.notif-item.is-read .notif-dot {
    background: #d6dee9;
}

.dash-card-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding: 14px 20px;
    border-top: 1px solid #f0f4f9;
}

.dash-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #3473BA;
}

.dash-link:hover {
    color: #245a95;
}

/* =========================
   PANEL INSTRUKCJI
========================= */

.instr-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--dash-radius);
    color: #fff;
    background: linear-gradient(135deg, #0b2a63 0%, #12539f 55%, #1a6fd4 100%);
    box-shadow: 0 10px 26px rgba(11, 42, 99, .25);
}


.instr-title {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}





.instr-lead {
    position: relative;
    z-index: 2;
    margin: 10px 0 12px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .85);
}

.instr-list {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 9px;
    /* zostawiamy miejsce na ilustracje po prawej, zeby tekst na nia nie wchodzil */
    max-width: calc(100% - 195px);
}

.instr-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .92);
}

.instr-list a:hover {
    color: #fff;
    text-decoration: underline;
}

.instr-art {
    position: absolute;
    right: 8px;
    bottom: 0;
    width: 195px;
    max-width: 45%;
    z-index: 1;
    pointer-events: none;
}

/* =========================
   SZYBKIE AKCJE
========================= */

.quick-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 16px 18px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: inherit;
    transition: transform .18s ease, filter .18s ease;
}

.quick-item:hover {
    color: inherit;
    transform: translateX(3px);
    filter: brightness(.98);
}

.quick-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.quick-body {
    flex: 1 1 auto;
    min-width: 0;
}

.quick-title {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.quick-sub {
    display: block;
    font-size: .75rem;
    color: var(--dash-muted);
}

.quick-arrow {
    flex: 0 0 auto;
    font-size: .85rem;
    color: #9fb0c8;
}

/* =========================
   FAKTUROWANIE (strona fakturowanie.html)
========================= */

.billing-panel {
    margin-bottom: 20px;
    padding: 18px 20px 20px;
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: var(--dash-shadow);
}

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

/* pojedyncza sekcja fakturowania: ikona, licznik i przyciski w jednym wierszu */
.billing-single {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
    background: #fbfcfe;
    border: 1px solid var(--dash-border);
    border-radius: 14px;
}

.billing-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.billing-single .billing-actions {
    margin-left: auto;
}

.billing-count {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 12px;
    background: #e8f0fe;
    color: #3473BA;
}

.billing-count strong {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
}

.billing-count small {
    font-size: .72rem;
    color: var(--dash-muted);
}

.billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.billing-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.1;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.billing-btn.is-ghost {
    background: #fff;
    border-color: var(--dash-border);
    color: var(--dash-ink);
}

.billing-btn.is-ghost:hover {
    border-color: #3473BA;
    color: #3473BA;
}

.billing-btn.is-primary {
    background: #053D6A;
    color: #fff;
}

.billing-btn.is-primary:hover {
    background: #0a4d85;
    color: #fff;
}

.billing-btn.is-warn {
    background: #fdf0dd;
    color: #a96a12;
}

.billing-btn.is-warn:hover {
    background: #f9e2c1;
    color: #8a560c;
}

/* przycisk "Instrukcja" i rozwijana pomoc w naglowku sekcji */
.billing-head-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.billing-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.1;
    color: #3473BA;
    transition: background .18s ease, border-color .18s ease;
}

.billing-help-btn:hover {
    background: #f3f8fe;
    border-color: #3473BA;
}

.billing-help-btn[aria-expanded="true"] {
    background: #eef4fd;
    border-color: #3473BA;
}

/* przycisk dzielony: opis sekcji + lista tematow pomocy */
.billing-help-group .billing-help-btn {
    border-radius: 10px 0 0 10px;
}

.billing-help-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid var(--dash-border);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    color: #3473BA;
    line-height: 1;
    transition: background .18s ease, border-color .18s ease;
}

.billing-help-more:hover,
.billing-help-more[aria-expanded="true"] {
    background: #eef4fd;
}

.billing-help-caret {
    font-size: .7rem;
    transition: transform .2s ease;
}

.billing-help-more[aria-expanded="true"] .billing-help-caret {
    transform: rotate(180deg);
}

.billing-help-menu {
    padding: 6px;
    border-radius: 12px;
    min-width: 260px;
}

.billing-help-menu .dropdown-item {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: .78rem;
    line-height: 1.35;
    white-space: normal;
    color: var(--dash-ink);
}

.billing-help-menu .dropdown-item:hover,
.billing-help-menu .dropdown-item:focus {
    background: #eef4fd;
    color: #245a95;
}

.billing-help {
    margin-bottom: 14px;
    padding: 14px 16px;
    background: #f7fafe;
    border: 1px dashed #cfe0f5;
    border-radius: 12px;
}

.billing-help-lead {
    margin: 0 0 10px;
    font-size: .8rem;
    line-height: 1.45;
    color: var(--dash-ink);
}

/* bez display:flex - inaczej przegladarka gubi punktory listy */
.billing-help-list {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: .78rem;
    line-height: 1.45;
    color: var(--dash-muted);
}

/* reset w style.css zdejmuje punktory takze z <li> - stad regula na elemencie listy */
.billing-help-list li {
    list-style: disc;
}

.billing-help-list li + li {
    margin-top: 6px;
}

.billing-help-list strong {
    color: var(--dash-ink);
}

.billing-help .dash-link {
    font-size: .78rem;
}

/* podsumowanie dnia - liczniki powiadomien
   piec kafelkow w jednym rzedzie, tak jak na stronie startowej */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fbfcfe;
    border: 1px solid var(--dash-border);
    border-radius: 12px;
}

.summary-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.summary-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-label {
    font-size: .75rem;
    line-height: 1.3;
    color: var(--dash-muted);
}

.summary-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--dash-ink);
}

.summary-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f4f9;
}

/* "Ukryj fakturowanie" zamyka wiersz po prawej stronie */
.summary-actions .is-primary {
    margin-left: auto;
}

/* kafelek szybkiej akcji moze byc przyciskiem (otwiera modal) */
button.quick-item {
    width: 100%;
    border: 0;
    font: inherit;
    text-align: left;
}

/* =========================
   MODAL Z TERMINAMI
========================= */

.terms-modal .modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.terms-modal .modal-header {
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--dash-border);
}

.terms-modal .modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.terms-modal-sub {
    margin: 4px 0 0;
    font-size: .78rem;
    color: var(--dash-muted);
}

.terms-modal .modal-body {
    padding: 16px 20px;
}

.terms-modal .modal-footer {
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--dash-border);
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.terms-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fbfcfe;
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    color: inherit;
    transition: transform .18s ease, border-color .18s ease;
}

.terms-item:hover {
    color: inherit;
    transform: translateX(3px);
    border-color: #cfe0f5;
}

/* data terminu - dzien nad skrotem miesiaca */
.terms-date {
    flex: 0 0 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    border-radius: 10px;
    background: #eef4fd;
    line-height: 1.1;
}

.terms-date strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dash-ink);
}

.terms-date small {
    font-size: .65rem;
    text-transform: uppercase;
    color: var(--dash-muted);
}

.terms-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}

.terms-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.terms-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.terms-sub {
    font-size: .75rem;
    color: var(--dash-muted);
}

.terms-tag {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 8px;
    background: #eef2f7;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--dash-muted);
}

/* termin w ciagu najblizszych dni */
.terms-tag.is-soon {
    background: #fdeaea;
    color: #b93038;
}

@media (max-width: 575.98px) {
    .terms-item {
        flex-wrap: wrap;
    }

    .terms-tag {
        margin-left: 58px;
    }
}

/* grupy powiadomien rozwijane przyciskiem "Pokaz powiadomienia" */
.notice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    background: #eef4fd;
    border-radius: 12px;
}

.notice-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notice-body {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notice-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.notice-sub {
    font-size: .75rem;
    color: var(--dash-muted);
}

.notice-count {
    flex: 0 0 auto;
    min-width: 38px;
    padding: 4px 10px;
    border-radius: 10px;
    background: #fff;
    font-size: .95rem;
    font-weight: 700;
    text-align: center;
    color: var(--dash-ink);
}

.notice-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: #e0912f;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.1;
    color: #fff;
    transition: filter .18s ease;
}

.notice-btn:hover {
    filter: brightness(.95);
}

.notice-btn.is-empty {
    background: #e6ecf5;
    color: var(--dash-muted);
    cursor: default;
}

/* pozycje rozwinietej grupy */
.notice-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 2px;
    padding: 12px 14px;
    background: #fbfcfe;
    border: 1px solid var(--dash-border);
    border-radius: 12px;
}

.notice-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    font-size: .78rem;
}

.notice-item-name {
    font-weight: 600;
    color: var(--dash-ink);
}

.notice-item-client {
    padding: 2px 8px;
    border-radius: 8px;
    background: #e8f0fe;
    font-weight: 600;
    color: #2b5f9c;
}

.notice-item-meta {
    margin-left: auto;
    color: var(--dash-muted);
}

.notice-empty {
    margin: 0;
    font-size: .78rem;
    color: var(--dash-muted);
}

.notice-items .dash-link {
    align-self: flex-start;
    margin-top: 4px;
    font-size: .78rem;
}

/* lista dokumentow rozwijana przyciskiem "Pokaz" */
.issue-list {
    margin-top: 14px;
    border: 1px solid var(--dash-border);
    border-radius: 14px;
    overflow: hidden;
}

.issue-list-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: #f7fafe;
    border-bottom: 1px solid var(--dash-border);
}

.issue-list-title {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.issue-list-count {
    font-size: .75rem;
    color: var(--dash-muted);
}

/* szeroka tabela przewija sie w poziomie wewnatrz swojej ramki */
.issue-table-wrap {
    overflow-x: auto;
}

.issue-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .75rem;
}

.issue-table th,
.issue-table td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f4f9;
    white-space: nowrap;
}

.issue-table th {
    font-weight: 600;
    color: var(--dash-muted);
    background: #fbfcfe;
    white-space: nowrap;
}

.issue-table tbody tr:last-child td {
    border-bottom: 0;
}

.issue-table tbody tr:hover td {
    background: #f7fafe;
}

/* status dokumentu */
.issue-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
}

.issue-status.is-todo {
    background: #e8f0fe;
    color: #2b5f9c;
}

.issue-status.is-nocounter {
    background: #fdf0dd;
    color: #a96a12;
}

/* etykiety w komorkach - klient, umowa, numer seryjny, licznik */
.issue-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    color: #1f4f86;
    background: #e8f0fe;
}

a.issue-chip:hover {
    background: #dbe8fb;
    color: #163d6a;
}

.issue-chip.is-serial {
    background: #fdf0dd;
    color: #a96a12;
}

.issue-chip.is-ok {
    background: #e6f6ec;
    color: #237a45;
}

.issue-chip.is-stale {
    background: #fdeaea;
    color: #b93038;
}

.issue-mini-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
}

.issue-mini {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: #eef2f7;
    font-size: .7rem;
    font-weight: 600;
    color: var(--dash-ink);
}

.issue-mini:hover {
    background: #e2e9f3;
    color: var(--dash-ink);
}

/* akcje w wierszu */
.issue-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.issue-btn {
    display: inline-block;
    padding: 5px 10px;
    border: 0;
    border-radius: 8px;
    font-size: .7rem;
    font-weight: 600;
    text-align: center;
    transition: filter .18s ease;
}

.issue-btn:hover {
    filter: brightness(.95);
}

.issue-btn.is-msg {
    background: #fdf0dd;
    color: #a96a12;
}

.issue-btn.is-service {
    background: #e8f0fe;
    color: #2b5f9c;
}

.issue-btn.is-skip {
    background: #fdeaea;
    color: #b93038;
}

/* komunikat makiety po wyslaniu powiadomienia */
.billing-info {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eaf7ef;
    font-size: .78rem;
    color: #2f9e5b;
}

.billing-info.is-visible {
    display: flex;
}

/* =========================
   STOPKA
========================= */

/* stopka siedzi na samym dole strony - .main jest kolumna flex,
   a .content ma flex:1, wiec przy krotkiej tresci stopka i tak lezy na dole okna */
.dash-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #dcdfe4;
    font-size: .75rem;
    color: var(--dash-muted);
    background: #e9ebef;
}

/* =========================
   RESPONSYWNOSC
========================= */

@media (max-width: 1399.98px) {
    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

/* piec licznikow nie dzieli sie rowno na trzy kolumny - na srednim ekranie
   uklad to 3 + 2, gdzie drugi rzad wypelnia cala szerokosc */
@media (max-width: 1399.98px) and (min-width: 992px) {
    .billing-summary {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .summary-item {
        grid-column: span 2;
    }

    .summary-item:nth-child(4),
    .summary-item:nth-child(5) {
        grid-column: span 3;
    }
}

/* prawa kolumna jest tu waska - mniejsza ilustracja, wiecej miejsca na tekst */
@media (max-width: 1399.98px) and (min-width: 992px) {
    .instr-art {
        width: 135px;
    }

    .instr-list {
        max-width: calc(100% - 125px);
    }
}

@media (max-width: 991.98px) {
    .dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .billing-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-summary .summary-item:last-child {
        grid-column: 1 / -1;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .instr-list {
        max-width: 100%;
    }

    .instr-art {
        width: 150px;
        opacity: .45;
    }
}

@media (max-width: 575.98px) {
    .dash-greeting {
        font-size: 1.3rem;
    }

    .stat-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .dash-date {
        width: 100%;
    }

    .dash-date-text {
        flex: 1 1 auto;
    }

    .notif-item {
        flex-wrap: wrap;
    }

    .notif-meta {
        width: 100%;
        padding-left: 50px;
    }

    .instr-art {
        display: none;
    }

    .instr-list {
        max-width: 100%;
    }

    .dash-footer {
        padding: 14px 16px;
        font-size: .7rem;
    }

    .billing-panel {
        padding: 16px;
    }

    .billing-actions .billing-btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .billing-date strong {
        white-space: nowrap;
    }

    /* na waskim ekranie przyciski schodza pod licznik, na pelna szerokosc */
    .billing-single .billing-actions {
        margin-left: 0;
        width: 100%;
    }

    .notice-btn {
        flex: 1 1 100%;
    }

    .notice-item-meta {
        margin-left: 0;
        width: 100%;
    }

    .billing-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .summary-actions .is-primary {
        margin-left: 0;
    }

}
