/* ---------- Sekcja ---------- */

.bento-section {
    width: 100%;
    background: #ffffff;
    padding: 100px 20px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.bento-wrap {
    width: 100%;
    max-width: 1200px;
}

/* ---------- Siatka bento ----------
   [ 1 ][ 2 ][ 3 ]
   [ 1 ][   4    ]   */

.bento-grid {
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
}

.bento-card-1 { grid-column: 1;      grid-row: 1 / span 2; background: #f3efe3; }
.bento-card-2 { grid-column: 2;      grid-row: 1;          background: #e2e9da; }
.bento-card-3 { grid-column: 3;      grid-row: 1;          background: #d7ebdf; }
.bento-card-4 { grid-column: 2 / span 2; grid-row: 2;      background: #d6eae8; }

/* ---------- Karta ---------- */

.bento-card {
    position: relative;
    overflow: hidden;              /* makiety „wychodzą” poza krawędź i są ucinane */
    border-radius: 20px;
    padding: 28px 0 0 28px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 460px;
}

.bento-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 28px;
}

.bento-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #ffffff;
    color: #101c19;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-icon svg { width: 18px; height: 18px; }

.bento-title {
    margin: 0;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 600;
    font-size: 21px;
    line-height: 28px;
    letter-spacing: -0.5px;
    color: #101c19;
}

.bento-desc {
    margin: 14px 0 0;
    padding-right: 28px;
    max-width: 340px;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 24px;
    letter-spacing: -0.2px;
    color: #3f4a46;
}

/* ---------- Makieta (białe okno aplikacji) ---------- */

.bento-mock {
    margin-top: 32px;
    margin-right: 28px;
    padding: 14px;
    background: #ffffff;
    border-radius: 14px 14px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #101c19;
    box-shadow: 0 10px 30px rgba(16, 28, 25, 0.06);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Makieta wychodzi poza prawą krawędź karty */
.bento-mock-bleed-right {
    margin-right: -60px;
    padding-right: 54px;           /* białe tło wychodzi poza kartę, ale treść kończy się przed krawędzią */
    border-radius: 14px 0 0 0;
}

.bento-card:hover .bento-mock {
    transform: translateY(-8px);
}

.bento-mock p { margin: 0; }
.bento-mock ul { margin: 0; padding: 0; list-style: none; }

/* elementy makiet */
.bm-label  { display: block; font-weight: 500; }
.bm-small  { display: block; font-size: 10.5px; color: #7d8783; }
.bm-title  { display: block; font-weight: 600; font-size: 13px; }
.bm-strong { margin-top: 4px !important; font-weight: 500; font-size: 13px; line-height: 18px; }
.bm-green  { color: #087443 !important; }
.bm-red    { color: #d93a3a !important; }

.bm-num {
    display: block;
    margin: 6px 0 2px;
    font-size: 17px;
    line-height: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

.bm-num-lg { font-size: 26px; line-height: 32px; margin-top: 10px; }

.bm-panel {
    padding: 12px;
    border: 1px solid #edf1ee;
    border-radius: 10px;
}

.bm-panel-foot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf1ee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bm-arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #101c19;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* KPI */
.bm-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.bm-kpi {
    padding: 12px;
    border: 1px solid #edf1ee;
    border-radius: 10px;
}

.bm-kpi-active { background: #f1f5ed; border-color: #f1f5ed; }

/* wykres liniowy */
.bm-line { display: block; width: 100%; height: 110px; margin-top: 8px; }

.bm-months {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10.5px;
    color: #7d8783;
}

/* wiersze listy */
.bm-rows { margin-top: 8px !important; }

.bm-rows li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f3f1;
}

.bm-rows li:last-child { border-bottom: none; }

.bm-rows em {
    margin-left: auto;
    font-style: normal;
    font-weight: 500;
    color: #4b5552;
}

.bm-av {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #f1f5ed;
    color: #087443;
    font-size: 9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-av-dark { background: #101c19; color: #ffffff; }

/* słupki z flagą (karta 2) */
.bm-bars {
    position: relative;
    flex: 1;
    min-height: 90px;
    background:
        repeating-linear-gradient(to right, #c3cfb9 0 2px, transparent 2px 9px) bottom / 100% 70% no-repeat;
    -webkit-mask-image: linear-gradient(to top, #000 50%, rgba(0,0,0,.5));
}

.bm-bars::after {
    content: "";
    position: absolute;
    left: var(--marker);
    top: 18px;
    bottom: 0;
    border-left: 1px dashed #101c19;
}

.bm-flag {
    position: absolute;
    left: var(--marker);
    top: 0;
    transform: translateX(-50%);
    padding: 2px 6px;
    border-radius: 999px;
    background: #087443;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
}

/* raport z kolumnami (karta 3) */
.bm-report {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
}

.bm-columns {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 110px;
    padding-top: 20px;
}

.bm-columns i {
    position: relative;
    flex: 1;
    height: var(--h);
    border-radius: 3px 3px 0 0;
    background: #d6eadd;
}

.bm-columns i.is-top { background: #087443; }

.bm-columns em {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 5px;
    border-radius: 4px;
    background: #dcefe3;
    color: #087443;
    font-style: normal;
    font-size: 9.5px;
    font-weight: 600;
}

.bm-progress {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    gap: 10px;
}

.bm-progress i,
.bm-mini i {
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(to right, #087443 var(--w), #e5ece7 var(--w));
}

.bm-mini { margin-top: 8px; }
.bm-mini i { display: block; }

/* ---------- Szeroka karta 4 ---------- */

.bento-card-4 {
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    padding: 0;
}

.bento-text {
    flex: 0 0 38%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-text .bento-head,
.bento-text .bento-desc { padding-right: 0; }

.bento-mock-side {
    margin: 28px -60px 0 0;
    padding-right: 54px;
    border-radius: 14px 0 0 0;
}

.bm-side-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 10px;
}

.bm-ring-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bm-ring { width: 64px; height: 64px; }

.bm-legend { display: flex; gap: 10px; margin-top: 8px; font-size: 10.5px; color: #4b5552; }
.bm-legend span { display: flex; align-items: center; gap: 4px; }
.bm-legend i { width: 8px; height: 8px; border-radius: 2px; background: #087443; }
.bm-legend .bm-i2 { background: #7cc79b; }

.bm-team { grid-column: 1 / -1; }

.bm-team li div { font-weight: 500; }

.bm-team em {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5ed;
    font-size: 10.5px;
}

/* ---------- Responsywność ---------- */

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-card-1 { grid-column: 1;       grid-row: 1 / span 2; }
    .bento-card-2 { grid-column: 2;       grid-row: 1; }
    .bento-card-3 { grid-column: 2;       grid-row: 2; }
    .bento-card-4 { grid-column: 1 / -1;  grid-row: 3; }
}

@media (max-width: 640px) {
    .bento-section {
        padding: 60px 16px;
    }

    .bento-grid {
        margin-top: 32px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bento-card-1,
    .bento-card-2,
    .bento-card-3,
    .bento-card-4 {
        grid-column: 1;
        grid-row: auto;
    }

    .bento-card {
        min-height: 0;
        padding: 22px 0 0 22px;
    }

    .bento-card-4 {
        flex-direction: column;
        padding: 0;
    }

    .bento-text {
        flex: none;              /* w układzie kolumnowym 38% oznaczałoby 38% wysokości → pusta przestrzeń */
        padding: 22px 22px 0;
    }

    .bento-mock-side {
        margin: 24px -60px 0 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bento-mock { transition: none; }
    .bento-card:hover .bento-mock { transform: none; }
}