/* Shared responsive polish and product UI for the authenticated app shell. */

:root {
    --app-bg: #f5f7fb;
    --app-surface: #fff;
    --app-border: #e7ecf3;
    --app-border-strong: #d8e0ec;
    --app-text: #202b3c;
    --app-muted: #66758a;
    --app-faint: #8a98ab;
    --app-primary: #336dff;
    --app-primary-soft: #eef4ff;
    --app-success: #16a66a;
    --app-warning: #c47a00;
    --app-danger: #d64545;
    --app-shadow: 0 10px 28px rgba(24, 38, 66, 0.06);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: var(--app-bg);
    color: var(--app-text);
}

a {
    color: var(--app-primary);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--app-text);
    font-weight: 650;
    letter-spacing: 0;
}

strong {
    font-weight: 650;
}

.pcoded-wrapper.row {
    margin-left: 0;
    margin-right: 0;
}

.pcoded-main-container > .pcoded-wrapper > .container {
    max-width: 100%;
}

.app-mobile-header,
.app-mobile-brand {
    display: none;
}

.card {
    border-radius: 8px;
    border: 1px solid rgba(231, 236, 243, 0.8);
    box-shadow: var(--app-shadow);
    margin-bottom: 22px;
}

.card .card-header {
    border-bottom-color: var(--app-border);
}

.card .card-header h5 {
    color: var(--app-text);
    font-size: 0.95rem;
    font-weight: 650;
}

.pcoded-main-container > .pcoded-wrapper > .container {
    padding-left: 22px;
    padding-right: 22px;
}

.app-page-header {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 18px 0 22px;
}

.app-page-kicker {
    color: var(--app-faint);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 8px;
    margin-bottom: 6px;
}

.app-page-title {
    color: var(--app-text);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
}

.app-page-subtitle {
    color: var(--app-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 6px 0 0;
    max-width: 760px;
}

.app-page-actions,
.app-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.app-toolbar .btn,
.app-page-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    margin: 0;
}

.website-report-toolbar {
    flex-wrap: nowrap;
}

.website-report-toolbar .btn {
    white-space: nowrap;
}

.app-section {
    margin-bottom: 24px;
}

.app-section-title {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.app-section-title h3,
.app-section-title h4 {
    font-size: 1rem;
    margin: 0;
}

.app-surface {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    box-shadow: var(--app-shadow);
}

.app-metric-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    margin-bottom: 18px;
}

.app-metric-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 8px;
    min-height: 88px;
    padding: 15px;
}

.app-metric-label {
    color: var(--app-muted);
    font-size: 0.74rem;
    font-weight: 650;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.app-metric-value {
    color: var(--app-text);
    font-size: 1.45rem;
    font-weight: 750;
    line-height: 1.1;
}

.app-metric-note {
    color: var(--app-muted);
    font-size: 0.78rem;
    margin-top: 6px;
}

.app-jump-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.app-jump-nav a {
    background: #fff;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    color: var(--app-muted);
    font-size: 0.8rem;
    font-weight: 650;
    padding: 7px 11px;
}

.app-jump-nav a:hover {
    border-color: var(--app-primary);
    color: var(--app-primary);
    text-decoration: none;
}

.app-empty-state {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed var(--app-border-strong);
    color: var(--app-muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    padding: 26px 20px;
    text-align: center;
}

.app-empty-state i {
    color: var(--app-faint);
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.app-empty-state strong {
    color: var(--app-text);
    display: block;
    margin-bottom: 4px;
}

.app-danger-link {
    color: var(--app-danger);
    font-weight: 650;
}

.app-user-avatar {
    align-items: center;
    background: var(--app-primary-soft);
    border: 1px solid #dbe7ff;
    border-radius: 50%;
    color: var(--app-primary);
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 750;
    height: 38px;
    justify-content: center;
    text-transform: uppercase;
    width: 38px;
}

.pcoded-navbar .pcoded-inner-navbar > li.active > a,
.pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger > a {
    background: rgba(70, 128, 255, 0.13);
    color: #fff;
    font-weight: 650;
}

.pcoded-navbar .pcoded-inner-navbar > li.active:after,
.pcoded-navbar .pcoded-inner-navbar > li.pcoded-trigger:after {
    background: #7aa2ff;
    bottom: 8px;
    left: 0;
    top: 8px;
    width: 4px;
}

.profile-popup-custom .pro-body .dropdown-item {
    text-transform: none;
}

.table thead th,
.table thead td {
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.table-responsive thead th,
.app-table-scroll thead th {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}

.seo_attribute_level .card-header {
    align-items: center;
    display: flex;
    gap: 10px;
}

.seo_attribute_level .card-header span {
    color: var(--app-muted);
    flex: 1 1 auto;
    font-size: 0.82rem;
}

.app-check-state {
    display: none;
}

.app-seo-check-list.app-hide-passed .seo_attribute_field_name:has(.app-check-state-passed) {
    display: none;
}

.seo_attribute_field_name {
    border-bottom: 1px solid #f1f4f8;
    line-height: 1.45;
    padding: 10px 0;
}

.seo_attribute_field_name:last-child {
    border-bottom: 0;
}

.seo_attribute_field_name:has(.app-check-state-issue) {
    color: var(--app-text);
}

.seo_attribute_field_name:has(.app-check-state-passed) {
    color: var(--app-muted);
}

.table-responsive,
.app-table-scroll,
.dataTables_wrapper {
    width: 100%;
}

.table-responsive,
.app-table-scroll,
.dataTables_scrollBody {
    -webkit-overflow-scrolling: touch;
}

.app-table-scroll {
    overflow-x: auto;
}

.table th,
.table td {
    vertical-align: middle;
}

.dataTables_wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody {
    max-width: 100%;
}

@media only screen and (max-width: 991px) {
    .pcoded-header.custom-header2 {
        align-items: center;
        background: #fff;
        box-shadow: 0 2px 18px rgba(15, 23, 42, 0.08);
        display: flex;
        min-height: 64px;
        padding: 0 16px;
    }

    .pcoded-header.custom-header2 .app-mobile-header {
        align-items: center;
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
    }

    .pcoded-header.custom-header2 .navbar-collapse-custom {
        display: flex;
        flex: 0 0 auto;
        width: auto;
    }

    .pcoded-header.custom-header2 .mobile-menu {
        display: inline-block;
        height: 40px;
        left: auto;
        margin-right: 12px;
        position: relative;
        top: auto;
        width: 40px;
    }

    .pcoded-header.custom-header2 .mobile-menu span,
    .pcoded-header.custom-header2 .mobile-menu span:after,
    .pcoded-header.custom-header2 .mobile-menu span:before {
        background: #263241;
    }

    .pcoded-header.custom-header2 .mobile-menu span {
        left: 8px;
        top: 19px;
        width: 24px;
    }

    .pcoded-header.custom-header2 .mobile-menu span:before {
        top: -7px;
        width: 24px;
    }

    .pcoded-header.custom-header2 .mobile-menu span:after {
        top: 7px;
        width: 16px;
    }

    .pcoded-header.custom-header2 .app-mobile-brand {
        align-items: center;
        display: inline-flex;
        min-width: 0;
    }

    .pcoded-header.custom-header2 .app-mobile-brand img {
        height: 42px;
        width: auto;
    }

    .pcoded-header.custom-header2 .drp-user svg {
        height: 34px;
        width: 34px;
    }

    .pcoded-content {
        padding: 18px 14px 24px;
    }

    .pcoded-main-container > .pcoded-wrapper > .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .app-page-header {
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
    }

    .app-page-actions,
    .app-toolbar {
        justify-content: flex-start;
        width: 100%;
    }

    .website-report-toolbar {
        padding-bottom: 4px;
        width: 100%;
    }

    .app-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-header {
        margin-bottom: 12px;
    }

    .breadcrumb {
        flex-wrap: wrap;
        gap: 4px 0;
        line-height: 1.35;
        margin-bottom: 0;
    }

    .card .card-block,
    .card .card-body {
        padding: 20px 18px;
    }

    .card .card-header,
    .card .card-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .card .card-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 10px;
    }

    .pcoded-navbar {
        position: fixed;
        z-index: 1031;
    }

    .pcoded-navbar.mob-open ~ .pcoded-main-container:before {
        position: fixed;
    }
}

@media only screen and (max-width: 767px) {
    .auth-wrapper {
        min-height: 100vh;
        padding: 18px 12px;
    }

    .auth-wrapper .auth-content {
        width: 100%;
    }

    .auth-wrapper .card {
        margin-bottom: 0;
    }

    .auth-wrapper .card-body {
        padding: 24px 18px;
    }

    #on_page_div_container {
        left: auto !important;
        margin-left: 0 !important;
        margin-top: -90px !important;
        max-width: calc(100vw - 28px);
        padding-left: 0;
        padding-right: 0;
        position: relative !important;
        width: calc(100vw - 28px) !important;
    }

    h1,
    .h1 {
        font-size: 2rem;
    }

    h2,
    .h2 {
        font-size: 1.65rem;
    }

    h4,
    .h4 {
        font-size: 1.2rem;
    }

    .btn {
        white-space: normal;
    }

    .website-report-toolbar {
        width: 100%;
    }

    .website-report-toolbar .btn {
        flex: 1 1 145px;
        justify-content: center;
        min-height: 36px;
    }

    .table-responsive,
    .app-table-scroll {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
        width: calc(100% + 36px);
    }

    .table {
        min-width: 620px;
    }

    .app-page-title {
        font-size: 1.35rem;
    }

    .app-metric-grid {
        grid-template-columns: 1fr;
    }

    .app-page-actions .btn,
    .app-toolbar .btn {
        flex: 1 1 145px;
    }

    .exports-card .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-panel {
        border-radius: 8px;
        margin-left: -4px;
        margin-right: -4px;
        padding: 12px;
    }

    .filter-grid,
    .filter-range {
        grid-template-columns: 1fr;
    }

    .filter-range-separator {
        display: none;
    }

    .filter-actions,
    .active-filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions .btn,
    .filter-actions form,
    .filter-actions form .btn {
        width: 100%;
    }
}

@media only screen and (max-width: 575px) {
    .pcoded-header.custom-header2 {
        min-height: 58px;
        padding: 0 12px;
    }

    .pcoded-content {
        padding: 14px 10px 20px;
    }

    .pcoded-main-container > .pcoded-wrapper > .container {
        padding-left: 0;
        padding-right: 0;
    }

    .page-wrapper > .row {
        margin-left: -6px;
        margin-right: -6px;
    }

    .page-wrapper > .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }

    .card .card-block,
    .card .card-body {
        padding: 16px 14px;
    }

    .card .card-header,
    .card .card-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .table-responsive,
    .app-table-scroll {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
        width: calc(100% + 28px);
    }

    .profile-popup-custom {
        min-width: min(290px, calc(100vw - 24px));
    }
}
