/* =========================================================
   POL-BUD CARGO - NOWE PODSTRONY PANELU
   Paleta i typografia zgodne z pulpit.php, profil.php i kierowcy.php
   ========================================================= */

.pb-page {
    max-width: 1250px;
    margin: 0 auto;
    padding: 45px 40px 60px;
    font-family: Inter, Arial, sans-serif;
    color: #fff;
}

.pb-page-head { margin-bottom: 30px; }

.pb-page-head small {
    color: #49a6ff;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 12px;
    text-transform: uppercase;
}

.pb-page h1 {
    font-size: clamp(25px, 4vw, 36px);
    margin: 12px 0;
}

.pb-page-intro {
    color: #8995a7;
    line-height: 1.7;
    margin: 0;
    max-width: 720px;
}

/* --- Kafelki podsumowania --- */
.pb-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 30px 0;
}

.pb-stat {
    background: #101927;
    border: 1px solid #1e2c40;
    border-radius: 13px;
    padding: 24px;
}

.pb-stat span {
    display: block;
    color: #8995a7;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.pb-stat strong {
    display: block;
    margin-top: 12px;
    font-size: 30px;
    font-weight: 800;
}

/* --- Filtry --- */
.pb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.pb-filters a {
    padding: 10px 14px;
    border: 1px solid #263b54;
    border-radius: 7px;
    color: #dce8f8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: 0.2s;
}

.pb-filters a:hover { border-color: #49a6ff; color: #fff; }

.pb-filters a.pb-filter-active {
    background: #12395f;
    border-color: #31547b;
    color: #8bc9ff;
}

/* --- Tabele --- */
.pb-table-wrap {
    background: #101927;
    border: 1px solid #1e2c40;
    border-radius: 13px;
    overflow-x: auto;
    margin-bottom: 24px;
}

.pb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.pb-table th,
.pb-table td {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    color: #dce8f8;
    border-bottom: 1px solid #263448;
}

.pb-table th {
    color: #8995a7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pb-table tbody tr:last-child td { border-bottom: 0; }
.pb-table tbody tr:hover { background: #0c1726; }
.pb-table tr.pb-row-me { background: #12395f33; }

.pb-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    background: #16314e;
    color: #69b8ff;
    font-size: 11px;
    font-weight: 800;
}

.pb-link {
    color: #69b8ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}

.pb-link:hover { color: #8bc9ff; }

/* --- Karty i formularze --- */
.pb-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.pb-card {
    background: #101927;
    border: 1px solid #1e2c40;
    border-radius: 13px;
    padding: 24px;
    margin-bottom: 18px;
}

.pb-card h2 {
    font-size: 18px;
    margin: 0 0 6px;
    color: #fff;
}

.pb-card label {
    display: block;
    margin: 16px 0 7px;
    color: #8995a7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.pb-card input[type=text],
.pb-card input[type=password],
.pb-card input[type=file],
.pb-card textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #263b54;
    border-radius: 7px;
    background: #080d16;
    color: #fff;
    font: inherit;
    font-size: 13px;
}

.pb-card input:focus,
.pb-card textarea:focus {
    border-color: #49a6ff;
    outline: none;
}

.pb-card input:disabled { opacity: 0.55; }

.pb-card textarea { resize: vertical; min-height: 110px; }

.pb-card button {
    margin-top: 18px;
    padding: 13px 18px;
    border: 1px solid #31547b;
    border-radius: 7px;
    background: #124e85;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: 0.2s;
}

.pb-card button:hover { background: #176b9e; border-color: #49a6ff; }

.pb-card button.pb-danger { background: #59313b; border-color: #813344; }
.pb-card button.pb-danger:hover { background: #6d3945; }

.pb-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #183451;
    color: #65b5ff;
    font-size: 38px;
    font-weight: 800;
    margin: 8px 0 4px;
}

.pb-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }

/* --- Komunikaty --- */
.pb-alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pb-alert-ok { background: #153326; border: 1px solid #28764d; color: #9df0bd; }
.pb-alert-error { background: #351c25; border: 1px solid #813344; color: #ffadb6; }

/* --- Lista wpisow --- */
.pb-feed { display: grid; gap: 16px; margin-bottom: 24px; }

.pb-feed-item {
    background: #101927;
    border: 1px solid #1e2c40;
    border-radius: 13px;
    padding: 24px;
}

.pb-feed-item h2 { font-size: 18px; margin: 0 0 8px; color: #fff; }
.pb-feed-item p { color: #b8c9df; line-height: 1.75; margin: 0; }

.pb-meta {
    color: #8995a7 !important;
    font-size: 12px !important;
    margin: 0 0 12px !important;
}

.pb-empty {
    color: #8995a7;
    background: #101927;
    border: 1px solid #1e2c40;
    border-radius: 13px;
    padding: 24px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.pb-empty code { color: #69b8ff; }

.pb-inline { margin-top: 10px; }
.pb-visually-hidden {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Logo w naglowkach --- */
.pb-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin-right: 14px;
}

.pb-logo-link img { border-radius: 8px; display: block; }

@media (max-width: 900px) {
    .pb-page { padding: 30px 20px 50px; }
    .pb-stats { grid-template-columns: 1fr; }
    .pb-cards { grid-template-columns: 1fr; }
}

/* --- Wybor wielu rang: czytelna siatka --- */
.rank-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid #1e2c40; }
.rank-form label { display: block; color: #8995a7; font-size: 11px; font-weight: 800; letter-spacing: 1px; margin-bottom: 12px; }
.rank-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 14px; }
.rank-option { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border: 1px solid #263b54; border-radius: 8px; background: #0b1726; cursor: pointer; font-size: 12px; color: #dce8f8; font-weight: 600; }
.rank-option:hover { border-color: #49a6ff; }
.rank-option input { width: 17px; height: 17px; accent-color: #1688ff; flex: 0 0 17px; cursor: pointer; }
.rank-option:has(input:checked) { background: #12395f; border-color: #31547b; color: #8bc9ff; }
.rank-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.rank { padding: 6px 12px; border-radius: 20px; background: #16314e; color: #69b8ff; font-size: 11px; font-weight: 800; }
.rank.admin-rank { background: #47391c; color: #f5d477; }
