/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #646cff;
    box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.select-input:focus {
    border-color: #646cff;
    box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.15);
}

.select-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.select-input option {
    background-color: #1a1a1a;
}

.button-group {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #646cff;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
    flex: 1;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.validation-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.warning-message {
    background-color: #78350f;
    border: 1px solid #d97706;
    color: #fde68a;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.output-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.goal-reached-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.goal-reached-message h3 {
    font-size: 20px;
    font-weight: 600;
    color: #6ee7b7;
    margin-bottom: 8px;
}

.goal-reached-message p {
    font-size: 14px;
    color: #a7f3d0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 20px 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: border-color 150ms ease;
}

.stat-card:hover {
    border-color: #374151;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: #646cff;
}

.progress-track {
    width: 100%;
    height: 12px;
    background-color: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #646cff;
    border-radius: 6px;
    width: 0%;
    transition: width 600ms ease;
}

.progress-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.chart-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.chart-container {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    aspect-ratio: 2 / 1;
}

.chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.table-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.table-wrapper {
    overflow-x: auto;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.breakdown-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.breakdown-table th {
    background-color: #1a1a1a;
    color: #9ca3af;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.breakdown-table td {
    padding: 12px 16px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
}

.breakdown-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

.breakdown-table tbody tr:nth-child(even) {
    background-color: #0f0f0f;
}

.breakdown-table tbody tr:hover {
    background-color: #1a1a1a;
}

.breakdown-table tfoot td {
    background-color: #1a1a1a;
    font-weight: 700;
    color: #ffffff;
    border-top: 1px solid #374151;
    border-bottom: none;
}

.align-right {
    text-align: right;
}

.copy-section {
    display: flex;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #141414;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    opacity: 0;
    transition: opacity 300ms ease;
    pointer-events: none;
}

.toast.toast-visible {
    opacity: 1;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid #374151;
}

.pro-feature-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    opacity: 0.6;
    transition: opacity 150ms ease;
}

.pro-feature-block.unlocked {
    opacity: 1;
}

.pro-feature-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pro-feature-header .section-title {
    font-size: 16px;
    margin: 0;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.goals-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goal-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
    border-left: 3px solid #646cff;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.goal-card:hover {
    background-color: #222222;
}

.goal-card.status-on-track {
    border-left-color: #10b981;
}

.goal-card.status-behind {
    border-left-color: #f59e0b;
}

.goal-card.status-ahead {
    border-left-color: #646cff;
}

.goal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.goal-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
}

.goal-card-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 150ms ease;
}

.goal-card-remove:hover {
    color: #ef4444;
}

.goal-card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

.goal-card-monthly {
    font-weight: 600;
    color: #646cff;
}

.goal-card-progress {
    width: 100%;
    height: 4px;
    background-color: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.goal-card-progress-fill {
    height: 100%;
    background-color: #646cff;
    border-radius: 2px;
    transition: width 400ms ease;
}

.goals-limit-message {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
    padding: 8px;
}

.variable-contributions-config {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.variable-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

.variable-starting {
    font-size: 14px;
    color: #e5e7eb;
}

.variable-starting span {
    font-weight: 700;
    color: #646cff;
}

.variable-breakdown {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #9ca3af;
}

.inflation-config {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inflation-results {
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

.inflation-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inflation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.inflation-label {
    font-size: 13px;
    color: #9ca3af;
}

.inflation-value {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.priority-ranker {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.priority-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid #2a2a2a;
}

.priority-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.priority-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.priority-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #646cff;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.priority-name {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.priority-score {
    font-size: 12px;
    color: #9ca3af;
}

.priority-allocation {
    font-size: 14px;
    font-weight: 600;
    color: #646cff;
    flex-shrink: 0;
}

.priority-comparison h4 {
    font-size: 15px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 12px;
}

.comparison-strategies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.export-actions {
    display: flex;
    gap: 12px;
}

.export-actions .button-secondary {
    flex: 1;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 150ms ease;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 18px;
    }

    .output-section {
        gap: 24px;
    }

    .button-group {
        flex-direction: column;
    }

    .button-primary,
    .button-secondary {
        width: 100%;
    }

    .export-actions {
        flex-direction: column;
    }

    .pro-feature-block {
        padding: 16px;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .chart-container {
        aspect-ratio: 3 / 2;
    }

    .breakdown-table th,
    .breakdown-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .inflation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .goal-card-stats {
        flex-direction: column;
        gap: 4px;
    }

    .priority-item {
        flex-wrap: wrap;
    }

    .priority-allocation {
        width: 100%;
        text-align: right;
    }
}