/* Growth Projection page */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-container .main-content.gp-page {
    flex: 1;
    margin-left: calc(240px + var(--sidebar-layout-offset, 0px) - var(--sidebar-main-seam, 0px));
    padding: 20px;
    background: #f2f2f7;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.app-container.sidebar-collapsed .main-content.gp-page {
    margin-left: calc(60px + var(--sidebar-layout-offset, 0px) - var(--sidebar-main-seam, 0px));
}

@media (max-width: 768px) {
    .app-container .main-content.gp-page {
        margin-left: 0;
        padding: 12px;
    }
}

.gp-container {
    max-width: 1280px;
    margin: 0 auto;
}

.gp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 18px;
}

.gp-header-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.gp-header-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
}

.gp-header h1 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.gp-header p {
    margin: 0;
    max-width: 42rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #6b7280;
}

.gp-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gp-save-status {
    font-size: 0.8125rem;
    color: #6b7280;
    min-height: 1.2em;
}

.gp-save-status.is-saved {
    color: #059669;
}

.gp-save-status.is-error {
    color: #dc2626;
}

.gp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, transform 0.1s ease;
}

.gp-btn:active {
    transform: scale(0.98);
}

.gp-btn-sm {
    padding: 8px 12px;
    font-size: 0.8125rem;
}

.gp-btn-primary {
    background: #2563eb;
    color: #fff;
}

.gp-btn-primary:hover {
    background: #1d4ed8;
}

.gp-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.gp-btn-secondary:hover {
    background: #f9fafb;
}

.gp-btn-icon {
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 6px 8px;
    border-radius: 8px;
}

.gp-btn-icon:hover {
    background: #fef2f2;
    color: #dc2626;
}

.gp-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.gp-kpi {
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gp-kpi-accent {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, #eff6ff 0%, #fff 70%);
}

.gp-kpi-label {
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.gp-kpi-value {
    font-size: 1.35rem;
    font-weight: 750;
    color: #111827;
    letter-spacing: -0.02em;
}

.gp-kpi-value.is-pos {
    color: #059669;
}

.gp-kpi-value.is-neg,
.gp-kpi-neg {
    color: #dc2626;
}

.gp-kpi-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.gp-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.gp-layout-2 {
    grid-template-columns: 1fr 1fr;
}

.gp-card {
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    padding: 18px 20px 8px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(15, 39, 66, 0.04);
}

.gp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.gp-card-header h2 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-card-header h2 i {
    color: #2563eb;
}

.gp-card-header p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.gp-mismatch {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.8125rem;
}

.gp-table-wrap {
    overflow-x: auto;
    margin: 0 -4px 12px;
}

.gp-table-scroll {
    max-height: 420px;
    overflow: auto;
}

.gp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.gp-table th,
.gp-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.gp-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.gp-table tfoot th,
.gp-table tfoot td {
    font-weight: 700;
    border-bottom: none;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.gp-table input,
.gp-table select {
    width: 100%;
    min-width: 88px;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    font-family: inherit;
}

.gp-table input:focus,
.gp-table select:focus,
.gp-field input:focus,
.gp-field select:focus,
.gp-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.gp-table .gp-name-input {
    min-width: 140px;
}

.gp-col-actions {
    width: 44px;
}

.gp-contrib-pos {
    color: #059669;
    font-weight: 650;
}

.gp-contrib-neg {
    color: #dc2626;
    font-weight: 650;
}

.gp-empty {
    text-align: center;
    color: #9ca3af;
    padding: 28px 12px !important;
}

.gp-clients-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gp-search {
    position: relative;
    display: flex;
    align-items: center;
}

.gp-search i {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 0.8125rem;
    pointer-events: none;
}

.gp-search input {
    width: 240px;
    max-width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 12px 9px 34px;
    font-size: 0.875rem;
    background: #fff;
}

.gp-card-growth {
    padding-bottom: 16px;
}

.gp-growth-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

.gp-growth-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gp-slider-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gp-slider-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.gp-slider-label-row label {
    font-size: 0.8125rem;
    font-weight: 650;
    color: #374151;
}

.gp-slider-label-row input[type="number"] {
    width: 88px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: right;
}

.gp-slider-field input[type="range"] {
    width: 100%;
    accent-color: #2563eb;
}

.gp-growth-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gp-field label {
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.gp-field input,
.gp-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    font-family: inherit;
}

.gp-growth-formula {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 0.875rem;
    line-height: 1.45;
}

.gp-chart-wrap {
    min-height: 280px;
    height: 320px;
    position: relative;
}

.gp-field-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

.gp-unit-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.gp-unit-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 12px;
}

.gp-unit-stat {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
}

.gp-unit-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 4px;
}

.gp-unit-stat-value {
    font-size: 1.05rem;
    font-weight: 750;
    color: #111827;
}

.gp-unit-stat-note {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: #6b7280;
}

.gp-hire-row td {
    background: #fff7ed;
}

.gp-hire-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #c2410c;
    background: #ffedd5;
    border-radius: 999px;
    padding: 2px 7px;
}

.gp-projection-now td {
    background: #ecfdf5;
    font-weight: 650;
}

@media (max-width: 1100px) {
    .gp-kpi-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .gp-growth-grid,
    .gp-layout-2 {
        grid-template-columns: 1fr;
    }

    .gp-search input {
        width: 180px;
    }
}

@media (max-width: 640px) {
    .gp-kpi-row {
        grid-template-columns: 1fr 1fr;
    }

    .gp-growth-fields {
        grid-template-columns: 1fr;
    }

    .gp-header-actions {
        width: 100%;
    }
}

.main-content[data-theme="dark"].gp-page,
body[data-theme="dark"] .gp-page {
    background: #0f1115;
}

.main-content[data-theme="dark"] .gp-header,
.main-content[data-theme="dark"] .gp-kpi,
.main-content[data-theme="dark"] .gp-card,
body[data-theme="dark"] .gp-header,
body[data-theme="dark"] .gp-kpi,
body[data-theme="dark"] .gp-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.main-content[data-theme="dark"] .gp-kpi-accent,
body[data-theme="dark"] .gp-kpi-accent {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.22) 0%, rgba(255, 255, 255, 0.06) 70%);
}

.main-content[data-theme="dark"] .gp-header h1,
.main-content[data-theme="dark"] .gp-card-header h2,
.main-content[data-theme="dark"] .gp-kpi-value,
.main-content[data-theme="dark"] .gp-table,
body[data-theme="dark"] .gp-header h1,
body[data-theme="dark"] .gp-card-header h2,
body[data-theme="dark"] .gp-kpi-value {
    color: #fff;
}

.main-content[data-theme="dark"] .gp-header p,
.main-content[data-theme="dark"] .gp-card-header p,
.main-content[data-theme="dark"] .gp-kpi-label,
.main-content[data-theme="dark"] .gp-kpi-hint,
.main-content[data-theme="dark"] .gp-save-status,
.main-content[data-theme="dark"] .gp-field label,
.main-content[data-theme="dark"] .gp-table thead th,
body[data-theme="dark"] .gp-header p,
body[data-theme="dark"] .gp-card-header p,
body[data-theme="dark"] .gp-kpi-label,
body[data-theme="dark"] .gp-kpi-hint,
body[data-theme="dark"] .gp-save-status {
    color: rgba(255, 255, 255, 0.62);
}

.main-content[data-theme="dark"] .gp-btn-secondary,
.main-content[data-theme="dark"] .gp-table input,
.main-content[data-theme="dark"] .gp-table select,
.main-content[data-theme="dark"] .gp-field input,
.main-content[data-theme="dark"] .gp-field select,
.main-content[data-theme="dark"] .gp-search input,
.main-content[data-theme="dark"] .gp-slider-label-row input,
body[data-theme="dark"] .gp-btn-secondary,
body[data-theme="dark"] .gp-table input,
body[data-theme="dark"] .gp-table select,
body[data-theme="dark"] .gp-field input,
body[data-theme="dark"] .gp-field select,
body[data-theme="dark"] .gp-search input,
body[data-theme="dark"] .gp-slider-label-row input {
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.main-content[data-theme="dark"] .gp-table th,
.main-content[data-theme="dark"] .gp-table td,
body[data-theme="dark"] .gp-table th,
body[data-theme="dark"] .gp-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.main-content[data-theme="dark"] .gp-table thead th,
body[data-theme="dark"] .gp-table thead th {
    background: #1a1d24;
}

.main-content[data-theme="dark"] .gp-table tfoot th,
.main-content[data-theme="dark"] .gp-table tfoot td,
body[data-theme="dark"] .gp-table tfoot th,
body[data-theme="dark"] .gp-table tfoot td {
    background: rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.main-content[data-theme="dark"] .gp-growth-formula,
body[data-theme="dark"] .gp-growth-formula {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(96, 165, 250, 0.28);
    color: #93c5fd;
}

.main-content[data-theme="dark"] .gp-header-icon,
body[data-theme="dark"] .gp-header-icon {
    background: rgba(37, 99, 235, 0.22);
    color: #93c5fd;
}

.main-content[data-theme="dark"] .gp-mismatch,
body[data-theme="dark"] .gp-mismatch {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.main-content[data-theme="dark"] .gp-unit-stat,
body[data-theme="dark"] .gp-unit-stat {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.main-content[data-theme="dark"] .gp-unit-stat-value,
body[data-theme="dark"] .gp-unit-stat-value {
    color: #fff;
}

.main-content[data-theme="dark"] .gp-hire-row td,
body[data-theme="dark"] .gp-hire-row td {
    background: rgba(234, 88, 12, 0.16);
}

.main-content[data-theme="dark"] .gp-projection-now td,
body[data-theme="dark"] .gp-projection-now td {
    background: rgba(5, 150, 105, 0.16);
}

.main-content[data-theme="dark"] .gp-hire-tag,
body[data-theme="dark"] .gp-hire-tag {
    background: rgba(234, 88, 12, 0.28);
    color: #fdba74;
}

.main-content[data-theme="dark"] .gp-field-hint,
.main-content[data-theme="dark"] .gp-unit-stat-label,
.main-content[data-theme="dark"] .gp-unit-stat-note,
body[data-theme="dark"] .gp-field-hint,
body[data-theme="dark"] .gp-unit-stat-label,
body[data-theme="dark"] .gp-unit-stat-note {
    color: rgba(255, 255, 255, 0.55);
}

.main-content[data-theme="dark"] .gp-kpi-value.is-pos,
body[data-theme="dark"] .gp-kpi-value.is-pos {
    color: #34d399;
}

.main-content[data-theme="dark"] .gp-kpi-value.is-neg,
.main-content[data-theme="dark"] .gp-kpi-neg,
body[data-theme="dark"] .gp-kpi-value.is-neg,
body[data-theme="dark"] .gp-kpi-neg {
    color: #f87171;
}
