.pihpp-internal-dashboard-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 40px;
    color: #1f2937;
}

.pihpp-internal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.pihpp-internal-header h1 {
    margin: 0 0 6px 0;
    font-size: 28px;
    line-height: 1.2;
}

.pihpp-internal-header p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
}

.pihpp-internal-section {
    margin-top: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.pihpp-internal-section h2 {
    margin: 0 0 14px 0;
    font-size: 19px;
    color: #0f172a;
}

.pihpp-internal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.pihpp-internal-card {
    border-radius: 10px;
    padding: 14px;
    background: linear-gradient(135deg, #0b5cc0 0%, #0b7bc5 100%);
    color: #ffffff;
}

.pihpp-internal-card-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pihpp-internal-card-label {
    font-size: 12px;
    opacity: 0.92;
}

.pihpp-internal-timestamp {
    margin: 10px 2px 0;
    color: #6b7280;
    font-size: 12px;
}

.pihpp-followup-summary-grid {
    margin-bottom: 16px;
}

.pihpp-followup-empty {
    margin: 0;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f0f9ff;
    color: #334155;
}

.pihpp-followup-aging-group + .pihpp-followup-aging-group {
    margin-top: 22px;
}

.pihpp-followup-aging-group h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #1e293b;
    font-size: 15px;
}

.pihpp-followup-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.pihpp-followup-group-empty {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
}

.pihpp-internal-table-wrap {
    overflow-x: auto;
}

.pihpp-table-scroll-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 2px solid #f97316;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: #fff7ed;
    color: #7c2d12;
}

.pihpp-table-scroll-message {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: baseline;
    font-size: 13px;
}

.pihpp-table-scroll-message strong {
    color: #9a3412;
    font-size: 14px;
}

.pihpp-table-scroll-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.pihpp-table-scroll-button {
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid #c2410c;
    border-radius: 6px;
    background: #ffffff;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.pihpp-table-scroll-button:hover:not(:disabled),
.pihpp-table-scroll-button:focus-visible:not(:disabled) {
    background: #ffedd5;
    outline: 2px solid #fb923c;
    outline-offset: 1px;
}

.pihpp-table-scroll-button:disabled {
    border-color: #fed7aa;
    color: #cbd5e1;
    cursor: not-allowed;
}

.pihpp-internal-table-wrap.is-horizontally-scrollable {
    border: 2px solid #f97316;
    border-radius: 0 0 9px 9px;
    scrollbar-color: #c2410c #ffedd5;
    scrollbar-width: auto;
}

.pihpp-internal-table-wrap.is-horizontally-scrollable.has-hidden-columns-left {
    box-shadow: inset 18px 0 16px -18px rgba(154, 52, 18, 0.85);
}

.pihpp-internal-table-wrap.is-horizontally-scrollable.has-hidden-columns-right {
    box-shadow: inset -18px 0 16px -18px rgba(154, 52, 18, 0.85);
}

.pihpp-internal-table-wrap.is-horizontally-scrollable.has-hidden-columns-left.has-hidden-columns-right {
    box-shadow:
        inset 18px 0 16px -18px rgba(154, 52, 18, 0.85),
        inset -18px 0 16px -18px rgba(154, 52, 18, 0.85);
}

.pihpp-internal-table-wrap.is-horizontally-scrollable::-webkit-scrollbar {
    height: 16px;
}

.pihpp-internal-table-wrap.is-horizontally-scrollable::-webkit-scrollbar-track {
    background: #ffedd5;
    border-radius: 999px;
}

.pihpp-internal-table-wrap.is-horizontally-scrollable::-webkit-scrollbar-thumb {
    border: 3px solid #ffedd5;
    border-radius: 999px;
    background: #c2410c;
}

.pihpp-internal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1420px;
}

.pihpp-followup-aging-table {
    min-width: 980px;
}

.pihpp-internal-table th {
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: bottom;
}

.pihpp-internal-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
    font-size: 13px;
}

.pihpp-internal-table tr:hover {
    background: #f8fbff;
}

.pihpp-internal-agency-name {
    font-weight: 600;
    min-width: 190px;
}

.pihpp-status-cell {
    display: grid;
    gap: 2px;
    min-width: 120px;
}

.pihpp-status-count {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.pihpp-status-meta {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.3;
}

.pihpp-denial-chart {
    display: grid;
    gap: 10px;
}

.pihpp-denial-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr 140px;
    gap: 10px;
    align-items: center;
}

.pihpp-denial-label {
    font-size: 13px;
    color: #1f2937;
}

.pihpp-denial-bar-track {
    width: 100%;
    height: 18px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.pihpp-denial-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316 0%, #ef4444 100%);
    border-radius: 999px;
}

.pihpp-denial-value {
    text-align: right;
    font-size: 12px;
    color: #374151;
    font-weight: 600;
}

.pihpp-internal-footer {
    margin-top: 16px;
    font-size: 12px;
    color: #4b5563;
}

@media (max-width: 900px) {
    .pihpp-internal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .pihpp-denial-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .pihpp-denial-value {
        text-align: left;
    }

    .pihpp-table-scroll-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .pihpp-table-scroll-actions {
        width: 100%;
    }

    .pihpp-table-scroll-button {
        flex: 1;
    }
}
