/*
 * Pezani business management surfaces.
 * This layer gives the existing AJAX views one consistent owner experience
 * without changing their API contracts.
 */
body.dashboard-shell .pezani-profile-shell {
    --pezani-ink: #17243a;
    --pezani-muted: #71809a;
    --pezani-line: #e4e9f1;
    --pezani-blue: #4d70d6;
    --pezani-green: #16a673;
    display: block;
    height: auto !important;
    min-height: 0 !important;
    color: var(--pezani-ink);
}

body.dashboard-shell #businessProfileTabs,
body.dashboard-shell #businessProfileTabs > .pezani-profile-shell,
body.dashboard-shell #businessProfileTabs .pezani-profile-shell > .custom-tab-1,
body.dashboard-shell #businessProfileTabs .pezani-profile-shell > .custom-tab-1 > .tab-content,
body.dashboard-shell #businessProfileTabs .pezani-profile-shell > .custom-tab-1 > .tab-content > .tab-pane {
    height: auto !important;
    min-height: 0 !important;
}

body.dashboard-shell.dashboard-tabs[data-view="profile"] .dashboard-content-body,
body.dashboard-shell.dashboard-tabs[data-view="profile"] .dashboard-content-body > .container-fluid,
body.dashboard-shell.dashboard-tabs[data-view="profile"] .dashboard-content-body > .container-fluid > .row,
body.dashboard-shell.dashboard-tabs[data-view="profile"] #businessProfileTabs {
    height: auto !important;
    min-height: 0 !important;
}

body.dashboard-shell .pezani-profile-toolbar {
    box-sizing: border-box;
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    align-self: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    margin: 0 0 1.25rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--pezani-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fe 100%);
    box-shadow: 0 10px 28px rgba(33, 50, 83, .06);
}

body.dashboard-shell .pezani-profile-shell > .pezani-profile-toolbar {
    height: auto !important;
    min-height: 0 !important;
}

body.dashboard-shell .pezani-profile-toolbar__copy {
    min-width: 0;
}

body.dashboard-shell .pezani-profile-toolbar__eyebrow {
    display: block;
    margin-bottom: .35rem;
    color: var(--pezani-blue);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

body.dashboard-shell .pezani-profile-toolbar h2 {
    margin: 0;
    color: var(--pezani-ink);
    font-size: 1.45rem;
    font-weight: 750;
    line-height: 1.2;
}

body.dashboard-shell .pezani-profile-toolbar p {
    margin: .4rem 0 0;
    color: var(--pezani-muted);
    font-size: .95rem;
    line-height: 1.5;
}

body.dashboard-shell .pezani-profile-toolbar__actions {
    display: flex;
    flex: 0 1 34rem;
    width: 100%;
    max-width: 34rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: .45rem;
}

body.dashboard-shell .pezani-profile-toolbar__actions > .btn {
    box-sizing: border-box;
    flex: 1 1 0%;
    min-width: 0;
    height: 2.9rem;
    min-height: 2.9rem;
    max-height: 2.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin: 0 !important;
    overflow: hidden;
    padding: 0 .6rem;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dashboard-shell .pezani-profile-toolbar__actions > .btn .material-icons {
    flex: 0 0 auto;
    margin: 0 !important;
    font-size: 1.05rem;
}

body.dashboard-shell .pezani-action-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dashboard-shell .pezani-composer-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: .45rem;
    width: 100%;
    margin-top: 1.25rem;
    overflow: hidden;
}

body.dashboard-shell .pezani-composer-actions > .btn {
    box-sizing: border-box;
    flex: 1 1 0%;
    min-width: 0;
    height: 2.9rem;
    min-height: 2.9rem;
    max-height: 2.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    margin: 0 !important;
    overflow: hidden;
    padding: 0 .45rem;
    border-radius: 9px;
    font-size: .84rem;
    font-weight: 750;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dashboard-shell .pezani-profile-toolbar__number {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--pezani-ink);
    font-size: .85rem;
    font-weight: 700;
}

body.dashboard-shell .pezani-profile-toolbar__number code {
    padding: .32rem .5rem;
    border: 1px solid #d8e0f0;
    border-radius: 6px;
    color: #445fc0;
    background: #eef2ff;
    font-size: .78rem;
    letter-spacing: .04em;
}

body.dashboard-shell .pezani-profile-progress {
    margin: 0 0 1.25rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--pezani-line);
    border-radius: 12px;
    background: #fff;
}

body.dashboard-shell .pezani-profile-progress__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .7rem;
}

body.dashboard-shell .pezani-profile-progress__heading strong {
    font-size: .96rem;
}

body.dashboard-shell .pezani-profile-progress__heading span {
    color: var(--pezani-green);
    font-size: .85rem;
    font-weight: 800;
}

body.dashboard-shell .pezani-profile-progress__bar {
    height: .55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #edf1f6;
}

body.dashboard-shell .pezani-profile-progress__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4d70d6, #16a673);
    transition: width .25s ease;
}

body.dashboard-shell .pezani-profile-checklist {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .55rem;
    margin-top: .85rem;
}

body.dashboard-shell .pezani-profile-checklist__item {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    color: var(--pezani-muted);
    font-size: .78rem;
    line-height: 1.25;
}

body.dashboard-shell .pezani-profile-checklist__item span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    color: #8290a4;
    background: #edf1f6;
    font-size: .78rem;
    font-weight: 800;
}

body.dashboard-shell .pezani-profile-checklist__item.is-complete {
    color: var(--pezani-ink);
    font-weight: 650;
}

body.dashboard-shell .pezani-profile-checklist__item.is-complete span:first-child {
    color: #fff;
    background: var(--pezani-green);
}

body.dashboard-shell .pezani-profile-shell > .custom-tab-1,
body.dashboard-shell #profileSectionsList,
body.dashboard-shell #sectionContentList {
    min-width: 0;
}

body.dashboard-shell .pezani-profile-shell .tab-content {
    padding-top: 1.35rem !important;
}

body.dashboard-shell .pezani-form-surface {
    padding: 1.35rem 1.5rem 1.5rem;
    border: 1px solid var(--pezani-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(33, 50, 83, .04);
}

body.dashboard-shell .pezani-form-heading {
    margin: 0 0 1.35rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--pezani-line);
}

body.dashboard-shell .pezani-form-heading h3 {
    margin: 0;
    color: var(--pezani-ink);
    font-size: 1.2rem;
    font-weight: 750;
}

body.dashboard-shell .pezani-form-heading p {
    margin: .3rem 0 0;
    color: var(--pezani-muted);
    font-size: .9rem;
    line-height: 1.45;
}

body.dashboard-shell .pezani-form-surface .form-group {
    margin-bottom: 1.25rem;
}

body.dashboard-shell .pezani-form-surface label {
    display: block;
    margin-bottom: .5rem;
    color: var(--pezani-ink);
    font-size: .9rem;
    font-weight: 700;
}

body.dashboard-shell .pezani-form-surface .form-control {
    min-height: 2.9rem;
    border-radius: 9px;
}

body.dashboard-shell .pezani-form-surface textarea.form-control {
    min-height: 7rem;
}

body.dashboard-shell .business-hours-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .75rem;
    align-items: end;
}

body.dashboard-shell .business-hours-grid > .form-group {
    min-width: 0;
    margin-bottom: 0;
    padding-right: 0;
    padding-left: 0;
}

body.dashboard-shell .business-hours-day,
body.dashboard-shell .business-hours-closed {
    grid-column: 1 / -1;
}

body.dashboard-shell .business-hours-day {
    padding-bottom: .1rem;
}

@media (min-width: 768px) {
    body.dashboard-shell .business-hours-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr);
    }

    body.dashboard-shell .business-hours-day,
    body.dashboard-shell .business-hours-closed {
        grid-column: auto;
    }
}

body.dashboard-shell .pezani-form-surface .form-text,
body.dashboard-shell .pezani-form-surface small {
    color: var(--pezani-muted) !important;
    font-size: .82rem;
    line-height: 1.45;
}

body.dashboard-shell .pezani-form-surface > hr {
    margin: 1.5rem 0 1.25rem;
    border-color: var(--pezani-line);
}

body.dashboard-shell .pezani-form-surface .btn[type="submit"] {
    min-width: 9.5rem;
    min-height: 2.9rem;
    border-radius: 9px;
    font-weight: 750;
}

body.dashboard-shell .pezani-management-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e2e8f1 !important;
    border-radius: 14px !important;
    background: #fff;
    box-shadow: 0 8px 22px rgba(33, 50, 83, .05) !important;
    transition: transform .18s ease, box-shadow .18s ease;
}

body.dashboard-shell .pezani-management-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(33, 50, 83, .1) !important;
}

body.dashboard-shell .pezani-management-card .card-body {
    min-height: 8.25rem;
    padding: 1.2rem !important;
}

body.dashboard-shell .pezani-management-card h4 {
    color: var(--pezani-ink);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.3;
}

body.dashboard-shell .pezani-management-card .text-muted {
    color: var(--pezani-muted) !important;
    font-size: .84rem;
}

body.dashboard-shell .pezani-management-card .card-footer {
    min-height: 3.35rem;
    border-top: 1px solid #edf0f5 !important;
    background: #fbfcfe !important;
}

body.dashboard-shell .pezani-management-card .card-footer .d-flex {
    align-items: stretch;
    flex-wrap: nowrap;
}

body.dashboard-shell .pezani-management-card .card-footer .d-flex > a {
    flex: 1 1 0%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-width: 0;
    min-height: 3.35rem;
    overflow: hidden;
    padding-left: .2rem !important;
    padding-right: .2rem !important;
    color: #4b5b75;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
    white-space: nowrap;
}

body.dashboard-shell .pezani-management-card .card-footer .d-flex > a .mr-1 {
    margin-right: .15rem !important;
}

body.dashboard-shell .pezani-management-card .card-footer .d-flex > a:hover,
body.dashboard-shell .pezani-management-card .card-footer .d-flex > a:focus-visible {
    color: var(--pezani-blue);
    background: #f0f4ff;
}

body.dashboard-shell .pezani-management-card .card-footer .d-flex > a.text-danger:hover,
body.dashboard-shell .pezani-management-card .card-footer .d-flex > a.text-danger:focus-visible {
    color: #c83c5a;
    background: #fff2f4;
}

body.dashboard-shell .pezani-management-card__media {
    width: 112px !important;
    height: 88px !important;
    border-radius: 10px !important;
    object-fit: cover;
}

body.dashboard-shell .pezani-content-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .55rem;
}

body.dashboard-shell .pezani-content-card__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    color: #4c5d78;
    background: #f1f4f8;
    font-size: .72rem;
    font-weight: 700;
}

body.dashboard-shell .pezani-content-card__meta span:first-child {
    color: #315ec5;
    background: #edf2ff;
}

body.dashboard-shell .pezani-profile-load-error {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1rem 0;
    padding: 1rem 1.15rem;
}

body.dashboard-shell .pezani-profile-load-error strong,
body.dashboard-shell .pezani-profile-load-error span {
    flex: 1 1 100%;
}

body.dashboard-shell .pezani-profile-load-error strong {
    color: #842029;
    font-size: 1rem;
}

body.dashboard-shell .pezani-profile-load-error span {
    color: #842029;
    font-size: .9rem;
}

body.dashboard-shell .pezani-profile-load-error .btn {
    min-height: 2.6rem;
    margin-top: .15rem;
    border-radius: 8px;
    font-weight: 700;
}

body.dashboard-shell .pezani-content-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 27, 48, .68);
}

body.dashboard-shell .pezani-content-preview-modal[hidden] {
    display: none;
}

body.dashboard-shell .pezani-content-preview-modal__dialog {
    width: min(100%, 700px);
    max-height: 92vh;
    overflow: auto;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 27, 48, .28);
}

body.dashboard-shell .pezani-content-preview-modal__header,
body.dashboard-shell .pezani-content-preview-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-color: #e6ebf2;
}

body.dashboard-shell .pezani-content-preview-modal__header {
    border-bottom: 1px solid #e6ebf2;
}

body.dashboard-shell .pezani-content-preview-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid #e6ebf2;
}

body.dashboard-shell .pezani-content-preview-modal__header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 750;
}

body.dashboard-shell .pezani-content-preview-modal__close {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    color: #52627b;
    background: #f2f5f9;
    cursor: pointer;
}

body.dashboard-shell .pezani-content-preview-modal__body {
    padding: 1.25rem;
}

body.dashboard-shell .pezani-content-preview-modal__image {
    display: block;
    width: 100%;
    max-height: 340px;
    margin-bottom: 1.1rem;
    border-radius: 12px;
    object-fit: cover;
}

body.dashboard-shell .pezani-content-preview-modal__body h4 {
    margin-bottom: .35rem;
    color: var(--pezani-ink);
    font-size: 1.35rem;
}

body.dashboard-shell .pezani-content-preview-modal__body p {
    color: #596981;
    font-size: .95rem;
    line-height: 1.6;
}

@media only screen and (max-width: 767px) {
    body.dashboard-shell .pezani-profile-toolbar {
        flex-direction: column;
        padding: 1.1rem;
    }

    body.dashboard-shell .pezani-profile-toolbar__actions {
        flex: 0 0 auto;
        width: 100%;
        height: auto !important;
        min-height: 0 !important;
        max-width: none;
        justify-content: flex-start;
    }

    body.dashboard-shell .pezani-profile-toolbar__actions > .btn {
        padding-left: .25rem;
        padding-right: .25rem;
        font-size: .7rem;
        height: 2.9rem;
        min-height: 2.9rem;
        max-height: 2.9rem;
    }

    body.dashboard-shell .pezani-composer-actions {
        gap: .3rem;
    }

    body.dashboard-shell .pezani-composer-actions > .btn {
        height: 3rem;
        min-height: 3rem;
        max-height: 3rem;
        padding-left: .2rem;
        padding-right: .2rem;
        font-size: .7rem;
    }

    body.dashboard-shell .pezani-profile-checklist {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.dashboard-shell .pezani-form-surface {
        padding: 1rem;
    }

    body.dashboard-shell .pezani-management-card .card-body {
        min-height: 7rem;
    }

    body.dashboard-shell .pezani-management-card .card-footer .d-flex > a {
        min-height: 3rem;
        font-size: .68rem;
    }
}

@media only screen and (max-width: 420px) {
    body.dashboard-shell .pezani-profile-checklist {
        grid-template-columns: 1fr;
    }

    body.dashboard-shell .pezani-management-card__media {
        width: 92px !important;
        height: 76px !important;
    }
}
