/* Growth Goals page */
.main-content {
    margin-left: 250px;
    padding: 24px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    background: #f2f2f7;
}

.main-content.sidebar-collapsed {
    margin-left: 80px;
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
}

.goals-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.goals-page-header h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 10px;
}

.goals-page-header h1 i {
    color: #2563eb;
}

.goals-page-subtitle {
    margin: 0;
    max-width: 40rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #6b7280;
}

.goals-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.goals-save-status {
    font-size: 0.8125rem;
    color: #6b7280;
    min-height: 1.2em;
}

.goals-save-status.is-saved {
    color: #059669;
}

.goals-save-status.is-error {
    color: #dc2626;
}

.goals-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;
    transition: background 0.15s ease, transform 0.1s ease;
}

.goals-btn:active {
    transform: scale(0.98);
}

.goals-btn-primary {
    background: #2563eb;
    color: #fff;
}

.goals-btn-primary:hover {
    background: #1d4ed8;
}

.goals-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.goals-btn-secondary:hover {
    background: #f9fafb;
}

.goals-btn-danger {
    background: transparent;
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
    padding: 8px 10px;
}

.goals-btn-danger:hover {
    background: #fef2f2;
}

.goals-profit-toggle {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.goals-profit-toggle-btn {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 650;
    cursor: pointer;
    font-family: inherit;
}

.goals-profit-toggle-btn.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.goals-profit-cash {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 1rem;
    font-weight: 700;
}

.goals-profit-cash.is-manual {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.goals-field-hint {
    font-size: 0.75rem;
    color: #6b7280;
}

.goals-months-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 1100px;
}

.goals-loading {
    padding: 32px;
    text-align: center;
    color: #6b7280;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.goals-month-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgba(15, 39, 66, 0.05);
}

.goals-month-card.is-current {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12), 0 8px 24px rgba(15, 39, 66, 0.05);
}

.goals-month-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.goals-month-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.goals-month-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}

.goals-month-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 999px;
    padding: 3px 8px;
}

.goals-month-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.goals-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Author display:flex overrides the UA [hidden] rule — keep toggled fields actually hidden. */
.goals-field[hidden] {
    display: none !important;
}

.goals-field.goals-field-wide {
    grid-column: 1 / -1;
}

.goals-field label {
    font-size: 0.75rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.goals-field input,
.goals-field select,
.goals-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 0.9375rem;
    color: #111827;
    background: #fff;
}

.goals-field input:focus,
.goals-field select:focus,
.goals-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.goals-field textarea {
    min-height: 42px;
    resize: vertical;
}

@media (max-width: 900px) {
    .goals-month-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .goals-month-fields {
        grid-template-columns: 1fr;
    }
}

.main-content[data-theme="dark"],
body[data-theme="dark"] .main-content {
    background: #0f1115;
}

.main-content[data-theme="dark"] .goals-page-header h1,
.main-content[data-theme="dark"] .goals-month-title,
body[data-theme="dark"] .main-content .goals-page-header h1,
body[data-theme="dark"] .main-content .goals-month-title {
    color: #fff;
}

.main-content[data-theme="dark"] .goals-page-subtitle,
.main-content[data-theme="dark"] .goals-save-status,
.main-content[data-theme="dark"] .goals-field label,
body[data-theme="dark"] .main-content .goals-page-subtitle,
body[data-theme="dark"] .main-content .goals-field label {
    color: rgba(255, 255, 255, 0.65);
}

.main-content[data-theme="dark"] .goals-month-card,
.main-content[data-theme="dark"] .goals-loading,
.main-content[data-theme="dark"] .goals-btn-secondary,
body[data-theme="dark"] .main-content .goals-month-card,
body[data-theme="dark"] .main-content .goals-loading,
body[data-theme="dark"] .main-content .goals-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.main-content[data-theme="dark"] .goals-field-hint,
body[data-theme="dark"] .main-content .goals-field-hint {
    color: rgba(255, 255, 255, 0.65);
}

.main-content[data-theme="dark"] .goals-profit-cash,
body[data-theme="dark"] .main-content .goals-profit-cash {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(96, 165, 250, 0.35);
    color: #93c5fd;
}

.main-content[data-theme="dark"] .goals-field input,
.main-content[data-theme="dark"] .goals-field select,
.main-content[data-theme="dark"] .goals-field textarea,
body[data-theme="dark"] .main-content .goals-field input,
body[data-theme="dark"] .main-content .goals-field select,
body[data-theme="dark"] .main-content .goals-field textarea,
body[data-theme="dark"] .main-content .goals-field select {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.main-content[data-theme="dark"] .goals-profit-cash.is-manual,
body[data-theme="dark"] .main-content .goals-profit-cash.is-manual {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #d1d5db;
}
