.plan-view {
    color: #1b2a41;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

.plan-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
}

.plan-heading h2 {
    margin: 0;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0a2463;
}

.plan-heading p,
.plan-note {
    margin: 2px 0 0;
    color: #5b6b82;
    font-size: 12px;
}

.plan-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 8px 10px;
    padding: 10px 14px;
    border: 1px solid #dce4f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(154, 169, 188, 0.16);
    margin-bottom: 12px;
}

.plan-filters label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #5b6b82;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.plan-filters select,
.plan-button {
    height: 30px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1b2a41;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 600;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-filters select:hover,
.plan-button:hover:not(:disabled) {
    border-color: #94a3b8;
}

.plan-filters select:focus {
    border-color: #1545e4;
    outline: none;
    box-shadow: 0 0 0 2px rgba(21, 69, 228, 0.14);
}

.plan-button {
    cursor: pointer;
    padding: 0 12px;
    background: #ffffff;
}

.plan-button:hover:not(:disabled) {
    background: #f4f7fb;
    color: #0a2463;
}

.plan-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.plan-basis {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 14px;
    border: 1px solid #dce4f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
}

.plan-basis label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #0a2463;
}

.plan-basis select {
    height: 30px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #1b2a41;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.plan-kpis,
.plan-quarters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.plan-kpis > div,
.plan-quarters > div,
.plan-card {
    padding: 12px 14px;
    border: 1px solid #dce4f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(154, 169, 188, 0.18);
}

.plan-kpis > div {
    border-top: 4px solid #1545e4;
}

.plan-kpis > div:nth-child(1) { border-top-color: #1545e4; }
.plan-kpis > div:nth-child(2) { border-top-color: #ffbc11; }
.plan-kpis > div:nth-child(3) { border-top-color: #0ea5e9; }
.plan-kpis > div:nth-child(4) { border-top-color: #7c3aed; }

.plan-quarters > div {
    border-top: 3px solid #1545e4;
}

.plan-kpis span,
.plan-quarters span {
    display: block;
    color: #5b6b82;
    font-size: 11px;
    font-weight: 600;
}

.plan-kpis strong,
.plan-quarters strong {
    display: block;
    margin-top: 4px;
    color: #1b2a41;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.plan-kpis small,
.plan-quarters small {
    display: block;
    margin-top: 4px;
    color: #5b6b82;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.plan-execution {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(160px, 1fr) 2fr;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #c7d7f5;
    border-left: 4px solid #1545e4;
    border-radius: 10px;
    background: linear-gradient(180deg, #edf3fd 0%, #e3ecfb 100%);
    box-shadow: 0 2px 6px rgba(154, 169, 188, 0.14);
}

.plan-execution span {
    display: block;
    color: #334e7b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.plan-execution strong {
    display: block;
    margin-top: 3px;
    color: #0a2463;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.plan-execution p {
    margin: 0;
    color: #0a2463;
    font-size: 12px;
    font-weight: 600;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.plan-card h3 {
    margin: 0 0 10px;
    color: #1b2a41;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.plan-chart {
    height: 260px;
}

.plan-table {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #dce4f0;
    border-radius: 8px;
}

.plan-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
}

.plan-table th,
.plan-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #e6ecf5;
    border-right: 1px solid #eef2f8;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.plan-table th:first-child,
.plan-table td:first-child {
    text-align: left;
}

.plan-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0a2463;
    color: #ffffff;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid #071946;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.plan-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.plan-table tbody tr:nth-child(even) {
    background: #f4f7fb;
}

.plan-table tbody tr:hover {
    background: #e8f0fe;
}

.plan-total-row,
.plan-total-row td {
    background: #dce6f4 !important;
    color: #0a2463 !important;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    font-weight: 700 !important;
    border-top: 2px solid #1545e4 !important;
    border-bottom: 2px solid #1545e4 !important;
}

.plan-positive {
    color: #0f766e;
    font-weight: 700;
}

.plan-negative {
    color: #be4568;
    font-weight: 700;
}

.plan-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #5b6b82;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .plan-kpis,
    .plan-quarters,
    .plan-grid,
    .plan-execution {
        grid-template-columns: 1fr;
    }
}
