/* =========================================================
   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 {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.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);
}

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

.stat-arrow {
    flex: 0 0 auto;
    font-size: .9rem;
    color: #b8c4d6;
}

/* 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;
}

/* =========================
   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 #dde5f0;
    font-size: .75rem;
    color: var(--dash-muted);
    background: #f4f7fb;
}

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

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

/* 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);
    }

    .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;
    }
}
