
/* ========================================
   PAGE BOX — PANEL KLIENTA
   Kolory: czarny, pomarańczowy, biały
   ======================================== */

.page-box,
.page-box * {
    box-sizing: border-box;
}

.page-box {
    width: 100%;
    margin: 0 0 25px;
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
}

/* Nagłówek */
.page-box_header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px;
    background: #222;
    border-bottom: 3px solid #ff7900;
    color: #fff;
}

/* Ikona nagłówka */
.page-box_header > .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    background: #ff7900;
    border-radius: 5px;
    color: #fff;
    font-size: 20px;
}

/* Tytuł i opis */
.page-box_header .desc {
    flex: 1;
    min-width: 0;
}

.page-box_header .desc h3 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.page-box_header .desc p {
    margin: 0;
    color: #ccc;
    font-size: 13px;
    line-height: 1.5;
}

/* Przyciski akcji w nagłówku */
.page-box_header .action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.page-box_header .action a {
    display: inline-block;
    padding: 9px 12px;
    background: #ff7900;
    border: 1px solid #ff7900;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}

.page-box_header .action a:hover {
    background: #e66d00;
    border-color: #e66d00;
    color: #fff;
}

/* Wnętrze */
.page-box_content {
    padding: 24px;
    background: #fff;
}

/* Sekcje */
.page-box .section {
    margin: 0 0 24px;
    padding: 0;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    overflow: hidden;
}

.page-box .section:last-child {
    margin-bottom: 0;
}

/* Nagłówek sekcji */
.page-box .section-header {
    padding: 13px 17px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-left: 4px solid #ff7900;
    color: #292929;
    font-size: 15px;
    font-weight: 700;
}

/* Zawartość sekcji */
.page-box .section-content {
    padding: 8px 17px;
    background: #fff;
}

/* Wiersze danych */
.page-box .data-row {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 45px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.page-box .data-row:last-child {
    border-bottom: 0;
}

/* Etykiety */
.page-box .data-label {
    flex: 0 0 190px;
    width: 190px;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

/* Wartości */
.page-box .data-value {
    flex: 1;
    min-width: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.page-box .data-value a {
    color: #e66d00;
    text-decoration: none;
}

.page-box .data-value a:hover {
    color: #bd5900;
    text-decoration: underline;
}

/* Pola formularza */
.page-box .txt {
    display: block;
    width: 100%;
    max-width: 430px;
    min-height: 39px;
    padding: 8px 11px;
    background: #fafafa;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.page-box .txt:focus {
    background: #fff;
    border-color: #ff7900;
    box-shadow: 0 0 0 2px rgba(255, 121, 0, 0.12);
}

.page-box .txt:disabled {
    background: #eee;
    color: #777;
    cursor: not-allowed;
}

/* Lista rozwijana */
.page-box select.txt {
    cursor: pointer;
}

/* Pola wymagane */
.page-box .required {
    color: #e66d00;
    font-weight: 700;
}

/* Główny przycisk formularza */
.page-box .btt {
    display: inline-block;
    min-height: 40px;
    padding: 10px 18px;
    background: #ff7900;
    border: 1px solid #ff7900;
    border-radius: 4px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.page-box .btt:hover {
    background: #e66d00;
    border-color: #e66d00;
}

/* Komunikaty */
.page-box .alert,
.page-box .profile-alert {
    padding: 12px 15px;
    margin: 0 0 18px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.page-box .alert-success,
.page-box .profile-alert:not(.profile-alert_error) {
    background: #f0f8f0;
    border: 1px solid #cfe5cf;
    color: #326b32;
}

.page-box .alert-danger,
.page-box .profile-alert_error {
    background: #fff2f0;
    border: 1px solid #efc7c2;
    color: #a52b20;
}

/* Responsywność */
@media (max-width: 768px) {
    .page-box_header {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }

    .page-box_header .desc h3 {
        font-size: 18px;
    }

    .page-box_header .action {
        width: 100%;
        justify-content: flex-start;
    }

    .page-box_content {
        padding: 14px;
    }

    .page-box .section-content {
        padding: 6px 12px;
    }

    .page-box .data-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 12px 0;
    }

    .page-box .data-label {
        flex: auto;
        width: 100%;
    }

    .page-box .data-value {
        width: 100%;
    }

    .page-box .txt {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-box_header > .icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .page-box_header .desc h3 {
        font-size: 17px;
    }

    .page-box_header .action a {
        padding: 8px 10px;
        font-size: 11px;
    }

    .page-box_content {
        padding: 10px;
    }

    .page-box .section-header {
        padding: 11px 12px;
        font-size: 14px;
    }
}
