.monthly-targets-page { overflow: auto; height: auto; min-height: 100vh; background: #f4f7fa; }
.monthly-targets-page .app-container { height: auto; min-height: 100vh; overflow: visible; }
.monthly-targets-page .cp-header { height: auto; min-height: 58px; flex-wrap: wrap; }
.targets-main { max-width: 1320px; margin: 0 auto; padding: 30px 28px 50px; color: #163047; }
.targets-back { color: #52677b; font-size: 13px; text-decoration: none; }
.targets-heading { margin: 28px 0 18px; }
.targets-eyebrow { color: #0284c7; font-size: 11px; letter-spacing: .14em; font-weight: 800; }
.targets-heading h1 { margin: 8px 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.targets-heading p, .targets-note { color: #52677b; font-size: 14px; line-height: 1.7; }
.targets-note { max-width: 920px; margin-bottom: 26px; }
.targets-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; background: white; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.targets-main label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; }
.targets-main input, .targets-main select { background: white; color: #163047; border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px 12px; font: inherit; min-height: 40px; width: 100%; box-sizing: border-box; }
.targets-main input:focus, .targets-main select:focus { outline: 2px solid #0284c7; outline-offset: 2px; }
.targets-main button { border: 1px solid #cbd5e1; border-radius: 7px; background: white; color: #163047; padding: 11px 18px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.targets-main button:disabled { opacity: .5; cursor: wait; }
.targets-search { margin-left: auto; min-width: 240px; }
#targetsStatus { min-height: 24px; margin: 18px 0 12px; font-size: 13px; color: #52677b; }
#targetsStatus[data-error="true"] { color: #b91c1c; }
.targets-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 12px; background: white; }
.targets-table { border-collapse: collapse; width: 100%; min-width: 850px; font-size: 13px; }
.targets-table th { text-align: left; color: #52677b; font-size: 11px; padding: 16px; background: #f8fafc; }
.targets-table td { padding: 14px 16px; border-top: 1px solid #edf2f7; }
.targets-table td:first-child { min-width: 230px; font-weight: 600; }
.targets-table td:nth-child(2) { color: #64748b; white-space: nowrap; }
.targets-table input { min-width: 110px; }
.targets-table select { min-width: 175px; }
.targets-table input:disabled { background: #f8fafc; color: #94a3b8; }
.targets-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 12px; color: #64748b; }
#targetsSave { background: #0284c7; color: white; border-color: #0284c7; }
@media (max-width: 700px) { .targets-main { padding: 22px 16px; } .targets-search { margin-left: 0; width: 100%; } }

.targets-main { max-width: 1600px; padding: 18px 24px 30px; }
.targets-toolbar { padding: 0 0 16px; gap: 16px; background: transparent; border: 0; border-radius: 0; }
.targets-heading { margin: 0 auto 0 0; }
.targets-heading h1 { font-size: 22px; margin: 0 0 4px; }
.targets-heading span { font-size: 12px; color: #64748b; }
.targets-search { margin-left: 0; min-width: 180px; }
.targets-main input, .targets-main select { padding: 8px 10px; min-height: 36px; }
.targets-table td { padding: 10px 14px; }
.targets-table th { padding: 12px 14px; }
.targets-table input { text-align: right; font-variant-numeric: tabular-nums; }
.targets-table input:disabled { color: #475569; }
.targets-origin { display: inline-block; margin-top: 5px; padding: 2px 7px; border: 1px solid #e2e8f0; border-radius: 5px; font-size: 10px; font-weight: 500; color: #64748b; background: #f8fafc; }
.targets-origin[data-kind="plan"] { color: #166534; border-color: #bbdfc8; background: #f1f8f3; }
.targets-origin[data-kind="history"] { color: #52677b; border-color: #d7e1ec; background: #f1f5f9; }
.targets-origin[data-kind="manual"] { color: #075985; border-color: #c4dfed; background: #f0f8fc; }
.targets-origin[data-kind="recommendation"], .targets-origin[data-kind="technical"] { color: #80623c; border-color: #e6dac6; background: #faf7f0; }
#targetsStatus[hidden] { display: none; }
.targets-footer { padding: 12px 0; }

.targets-branch-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid #dbe3ef; border-radius: 8px; background: #f8fafc; }
.targets-filter-label { color: #64748b; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.targets-branch-switcher { display: flex; flex-wrap: wrap; gap: 4px; background: #e2e8f0; padding: 3px; border-radius: 8px; }
.targets-main .targets-branch-switcher button { border: 0; background: transparent; border-radius: 6px; padding: 6px 12px; color: #475569; font-size: 12px; }
.targets-main .targets-branch-switcher button.active { background: #fff; color: #0284c7; box-shadow: 0 1px 2px #00000014; }
.targets-branch-switcher button:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
#targetsVisibleCount { margin-left: auto; font-size: 12px; color: #64748b; }
.targets-row-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.targets-row-badges .targets-origin { margin-top: 0; }
.targets-row-badges .kpi-branch-badge { font-size: 10px; }
#targetsEmpty { color: #64748b; font-size: 13px; padding: 14px; }

/* Keep the same column geometry when filtering rows. */
html:has(.monthly-targets-page) { scrollbar-gutter: stable; }
.targets-table { table-layout: fixed; }
.targets-col-name { width: 32%; }
.targets-col-unit { width: 7%; }
.targets-col-type { width: 23%; }
.targets-col-value { width: 19%; }
.targets-table td:first-child { min-width: 0; overflow-wrap: anywhere; }
.targets-table input, .targets-table select { min-width: 0; max-width: 100%; }
