.mobile-summary-page {
    --summary-ink: #11263d;
    --summary-muted: #607287;
    --summary-line: #d7e1eb;
    --summary-shell: #edf3f8;
    --summary-paper: #ffffff;
    --summary-accent: #0f5d99;
    --summary-accent-soft: #dcecf8;
    --summary-good: #1f7a46;
    --summary-good-soft: #e5f5ea;
    --summary-warn: #9a6700;
    --summary-warn-soft: #fff1cc;
    --summary-bad: #b42318;
    --summary-bad-soft: #f9e3e1;
    padding: 16px 12px 28px;
    background: linear-gradient(180deg, #f6f9fc 0%, var(--summary-shell) 100%);
    min-height: calc(100vh - 90px);
    color: var(--summary-ink);
}

.summary-surface {
    position: relative;
    margin-bottom: 18px;
    border: 1px solid #dfe8f1;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 38, 61, 0.08);
    overflow: hidden;
}

.summary-surface::before {
    content: none;
}

.summary-surface-body {
    padding: 28px 28px 24px;
}

.summary-subtitle {
    margin-top: 8px;
    color: var(--summary-muted);
    line-height: 1.65;
}

.summary-subtitle:before {
    content: "\f017";
    display: inline-block;
    margin-right: 10px;
    color: #00c27a;
    font-family: FontAwesome;
    font-style: normal;
}

.summary-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.summary-filter {
    margin-bottom: 14px;
}

.summary-filter select {
    width: 100%;
}

.summary-filter select option {
    line-height: 1.4;
}

.summary-filter-primary {
    padding-left: 12px;
    padding-right: 12px;
}

.summary-month-filter {
    width: calc(50% - 6px);
    min-width: 180px;
    margin-bottom: 16px;
}

.summary-month-filter .form-select {
    height: 48px;
    padding-left: 42px;
    border: 1px solid var(--summary-line);
    border-radius: 16px;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2300a06b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E"),
        var(--bs-form-select-bg-img, none);
    background-position: 14px center, right 0.75rem center;
    background-size: 18px 18px, 16px 12px;
    background-repeat: no-repeat, no-repeat;
    box-shadow: 0 4px 12px rgba(17, 38, 61, 0.05);
}

.summary-month-filter .form-select:focus {
    border-color: #98bdd9;
    box-shadow: 0 0 0 0.2rem rgba(15, 93, 153, 0.12);
}

.summary-kpis {
    margin-bottom: 14px;
    border: 1px solid var(--summary-line);
    border-radius: 18px;
    background: var(--summary-paper);
    box-shadow: 0 10px 26px rgba(17, 38, 61, 0.05);
    overflow: hidden;
}

.summary-kpis-body {
    padding: 6px 16px;
}

.summary-kpi-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-top: 1px solid #edf2f6;
}

.summary-kpi-row:first-child {
    border-top: 0;
}

.summary-kpi-label,
.summary-kpi-value {
    display: table-cell;
    vertical-align: middle;
    padding: 12px 0;
}

.summary-kpi-label {
    width: 62%;
    color: var(--summary-muted);
    font-weight: 700;
    line-height: 1.5;
}

.summary-kpi-value {
    color: var(--summary-ink);
    font-weight: 600;
    line-height: 1.15;
    text-align: right;
    word-break: break-word;
}

.summary-section-header {
    margin-bottom: 12px;
}

.summary-section-title {
    margin: 0;
    color: var(--summary-ink);
    font-weight: 700;
    line-height: 1.3;
}

.summary-section-text {
    margin-top: 6px;
    color: var(--summary-muted);
    line-height: 1.6;
}

.summary-search {
    margin-bottom: 12px;
}

.summary-search-input {
    width: 100%;
    padding-left: 42px;
    border-radius: 16px;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23607287' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-position: 14px center;
    background-size: 18px 18px;
    background-repeat: no-repeat;
}

.summary-table-wrap {
    overflow: hidden;
    border: 1px solid var(--summary-line);
    border-radius: 16px;
    background: #fcfeff;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--summary-line);
    vertical-align: top;
}

.summary-table thead {
    display: none;
}

.summary-table tbody td {
    color: var(--summary-ink);
    line-height: 1.6;
    background: #ffffff;
}

.summary-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.summary-table .project-name-cell {
    min-width: 230px;
}

.project-name-link,
.project-name-link:hover,
.project-name-link:focus {
    display: block;
    color: var(--summary-ink);
    font-weight: 700;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.numeric-cell {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.summary-money {
    font-weight: 700;
}

.detail-text {
    min-width: 0;
    color: var(--summary-ink);
}

.detail-collapse {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.detail-full {
    display: none;
}

.detail-collapse.expanded .detail-preview {
    display: none;
}

.detail-collapse.expanded .detail-full {
    display: block;
}

.detail-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--summary-accent);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.detail-toggle:hover,
.detail-toggle:focus {
    color: #0a4978;
    text-decoration: underline;
    outline: none;
}

.pct-badge {
    display: inline-block;
    min-width: 74px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.pct-verylow {
    background: var(--summary-bad-soft);
    border: 1px solid #efc0bc;
    color: var(--summary-bad);
}

.pct-low {
    background: var(--summary-warn-soft);
    border: 1px solid #ecdca6;
    color: var(--summary-warn);
}

.pct-mid {
    background: var(--summary-accent-soft);
    border: 1px solid #bdd7ea;
    color: var(--summary-accent);
}

.pct-high {
    background: var(--summary-good-soft);
    border: 1px solid #c7e6d0;
    color: var(--summary-good);
}

.summary-empty {
    padding: 18px 14px;
    color: var(--summary-muted);
    text-align: center;
}

.problem-summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--summary-line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--summary-paper);
}

.problem-summary-item {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-top: 1px solid #edf2f6;
}

.problem-summary-item:first-child {
    border-top: 0;
}

.problem-summary-label,
.problem-summary-value {
    display: table-cell;
    vertical-align: middle;
    padding: 12px 14px;
}

.problem-summary-label {
    color: var(--summary-muted);
    font-weight: 600;
    line-height: 1.5;
}

.problem-summary-value {
    width: 76px;
    text-align: right;
    font-weight: 700;
    color: var(--summary-ink);
}

.summary-force-card-table .summary-table-wrap {
    border: 0;
    border-radius: 16px;
    background: transparent;
}

.summary-force-card-table .summary-table,
.summary-force-card-table .summary-table tbody,
.summary-force-card-table .summary-table tr,
.summary-force-card-table .summary-table td {
    display: block;
    width: 100%;
}

.summary-force-card-table .summary-table tbody tr {
    margin-bottom: 12px;
    border: 1px solid var(--summary-line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(17, 38, 61, 0.05);
    overflow: hidden;
}

.summary-force-card-table .summary-table tbody td {
    box-sizing: border-box;
    position: relative;
    padding: 12px 14px 12px 128px;
    border-top: 1px solid #ecf1f6;
    text-align: left;
    white-space: normal;
    background: transparent;
}

.summary-force-card-table .summary-table tbody tr td:first-child {
    border-top: 0;
}

.summary-force-card-table .summary-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    top: 12px;
    left: 14px;
    width: 98px;
    color: var(--summary-muted);
    font-family: inherit;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.5;
}

.summary-force-card-table .summary-table .project-name-cell {
    min-width: 0;
    width: 100%;
}

.summary-force-card-table .numeric-cell {
    text-align: left;
    white-space: normal;
}

@media (max-width: 640px) {
    .summary-surface-body {
        padding: 24px 22px 22px;
    }

    .summary-kpis-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .summary-filter select {
        line-height: 1.4;
    }

    .summary-subtitle {
        margin-top: 16px;
    }

    .summary-kpi-row {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .summary-kpi-label,
    .summary-kpi-value {
        display: table-cell;
        width: auto;
        vertical-align: middle;
    }

    .summary-kpi-label {
        padding-bottom: 12px;
    }

    .summary-kpi-value {
        padding-top: 12px;
        text-align: right;
    }

    .summary-table-wrap {
        border: 0;
        background: transparent;
    }

    .summary-table,
    .summary-table tbody,
    .summary-table tr,
    .summary-table td {
        display: block;
        width: 100%;
    }

    .summary-table tbody tr {
        margin-bottom: 12px;
        border: 1px solid var(--summary-line);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(17, 38, 61, 0.05);
        overflow: hidden;
    }

    .summary-table tbody tr:nth-child(even) td,
    .summary-table tbody td {
        background: transparent;
    }

    .summary-table tbody td {
        box-sizing: border-box;
        position: relative;
        padding: 12px 14px 12px 128px;
        border-top: 1px solid #ecf1f6;
        text-align: left;
        white-space: normal;
    }

    .summary-table tbody tr td:first-child {
        border-top: 0;
    }

    .summary-table tbody td::before {
        content: attr(data-label);
        position: absolute;
        top: 12px;
        left: 14px;
        width: 98px;
        color: var(--summary-muted);
        font-family: inherit;
        font-weight: 600;
        letter-spacing: normal;
        line-height: 1.5;
    }

    .summary-table .project-name-cell {
        min-width: 0;
        width: 100%;
    }

    .summary-table .project-name-cell::before {
        content: "Dự án";
    }

    .numeric-cell {
        text-align: left;
    }
}
