/* P2 audit: one horizontal page gutter. The shell header and bottom nav keep their own geometry. */

#main-app {
    --page-pad-x: 16px;
    --page-pad-x-mobile: 16px;
}

#main-app .app-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* P2 audit: in-page titles. The shell header keeps its own scale. */

#main-app .section-header h4,
#main-app .org-header-actions h4,
#main-app .org-preview-header h4 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    color: #0D3B66 !important;
}

[data-theme="dark"] #main-app .section-header h4,
[data-theme="dark"] #main-app .org-header-actions h4,
[data-theme="dark"] #main-app .org-preview-header h4 {
    color: #E8EEF5 !important;
}

#main-app .section-header .helper-text,
#main-app .org-preview-header .helper-text,
#main-app .org-header-actions .helper-text {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35;
    color: #46505E !important;
}

[data-theme="dark"] #main-app .section-header .helper-text,
[data-theme="dark"] #main-app .org-preview-header .helper-text,
[data-theme="dark"] #main-app .org-header-actions .helper-text {
    color: #94A3B8 !important;
}

/* P2 audit: dark dashboard surfaces. Header navy stays. */

[data-theme="dark"] body.device-desktop {
    --dv2-ink: #F8FAFC;
    --dv2-muted: #CBD5E1;
    --dv2-line: #334155;
    --dv2-paper: #0F172A;
    --dv2-card: #111827;
    --dv2-brand-soft: #1E293B;
    --dv2-ok-soft: #052E16;
    --dv2-warn-soft: #422006;
    --dv2-danger-soft: #450A0A;
    --dv2-info-soft: #172554;
}

[data-theme="dark"] body.device-desktop #main-app .app-container {
    background: #0F172A !important;
    color: #CBD5E1;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-btn-line,
[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-tab,
[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-empty,
[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-metric.is-alert {
    background: #111827;
    color: #CBD5E1;
    border-color: #334155;
}

[data-theme="dark"] body.device-desktop #assessor-nilai-tim-section .nilai-tim-empty,
[data-theme="dark"] body.device-desktop #assessor-nilai-tim-section .nilai-tim-compare-table,
[data-theme="dark"] #assessor-nilai-tim-section .nilai-tim-empty {
    background: #0F172A;
    color: #CBD5E1;
    border-color: #334155;
}

[data-theme="dark"] #main-app .director-risk-card,
[data-theme="dark"] #main-app .director-panel,
[data-theme="dark"] #main-app .director-row,
[data-theme="dark"] .hari-ini-wage,
[data-theme="dark"] .hari-ini-stat-grid div,
[data-theme="dark"] .hari-ini-block,
[data-theme="dark"] .hari-ini-checks,
[data-theme="dark"] .hari-ini-agenda,
[data-theme="dark"] .hari-ini-exceptions,
[data-theme="dark"] .hari-ini-alerts,
[data-theme="dark"] .hari-ini-exception {
    background: #111827;
    color: #CBD5E1;
    border-color: #334155;
}

/* P2 audit: dark dashboard badges use light text on a dark chip. */

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-pill-danger {
    background: #450A0A;
    color: #FCA5A5;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-pill-info {
    background: #172554;
    color: #93C5FD;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-pill-ok {
    background: #052E16;
    color: #86EFAC;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-pill-warn {
    background: #422006;
    color: #FBBF24;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-status-out {
    color: #F87171;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-task {
    border-top: 1px solid #334155;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-task-copy {
    min-width: 0;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-task b {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
}

[data-theme="dark"] #desktop-profile-dashboard.is-control .dc-task:first-child {
    border-top-width: 0;
}

@media (min-width: 769px) {
    #desktop-profile-dashboard.is-control .dc-tab {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
    }
}

/* Struktur node initials: dark text on the mint avatar. */

.org-avatar {
    fill: #4DCB8A !important;
}

.org-avatar-text {
    fill: #0F172A !important;
}

.org-tree-avatar:not(.is-company),
.org-pohon-avatar:not(.is-company),
.org-branch-avatar:not(.is-company) {
    background: #4DCB8A !important;
    color: #0F172A !important;
}

/* Empty Agenda search on the desktop frame. */

body.device-desktop #agenda-desktop-empty .agenda-search-clear {
    box-sizing: border-box;
    min-height: 44px;
}

body.device-desktop #agenda-scope-context.is-search-miss {
    color: #46505E;
}

[data-theme="dark"] body.device-desktop #agenda-scope-context.is-search-miss,
html[data-theme="dark"] body.device-desktop #agenda-scope-context.is-search-miss {
    color: #94A3B8;
}
