/* 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;
    margin-top: 60px;
}

.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,
.input-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;
    width: 100%;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

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

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

select.text-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

.text-input-prefixed {
    padding-left: 32px;
}

.input-hint {
    font-size: 13px;
    color: #6b7280;
}

.input-error {
    font-size: 13px;
    color: #ef4444;
}

.text-input[type="number"]::-webkit-outer-spin-button,
.text-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.text-input[type="number"] {
    -moz-appearance: textfield;
}

.tax-code-row {
    display: flex;
    gap: 8px;
}

.tax-code-row .text-input {
    flex: 1;
    text-transform: uppercase;
}

.tax-code-help-btn {
    width: 44px;
    flex-shrink: 0;
    padding: 12px;
}

.tax-code-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rate-btn {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
}

.rate-btn:hover {
    background-color: #374151;
    border-color: #374151;
}

.rate-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.mode-toggle {
    display: flex;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.mode-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.mode-btn:hover {
    color: #e5e7eb;
}

.mode-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #d1d5db;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #3b82f6;
    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;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.tax-year-badge {
    background-color: #1a1a1a;
    color: #9ca3af;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

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

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

.stat-card-large {
    padding: 24px 20px;
}

.stat-card-highlight {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

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

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #e5e7eb;
    line-height: 1.2;
}

.stat-card-value.stat-total {
    color: #10b981;
}

.stat-card-sub {
    font-size: 13px;
    color: #6b7280;
}

.deductions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deductions-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 4px;
}

.deduction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.deduction-label {
    font-size: 14px;
    color: #d1d5db;
}

.deduction-value {
    font-size: 14px;
    font-weight: 600;
    color: #ef4444;
    font-variant-numeric: tabular-nums;
}

.deduction-total {
    background-color: #0f0f0f;
    border: 1px solid #374151;
}

.deduction-total .deduction-label {
    font-weight: 600;
}

.deduction-total .deduction-value {
    font-size: 16px;
}

.tax-bands-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tax-bands-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #d1d5db;
}

.tax-bands-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tax-band-row {
    display: grid;
    grid-template-columns: 1fr 80px 100px 100px;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
    font-size: 13px;
}

.tax-band-row.tax-band-header {
    background-color: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tax-band-name {
    color: #d1d5db;
}

.tax-band-rate {
    text-align: center;
    color: #9ca3af;
}

.tax-band-taxable {
    text-align: right;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.tax-band-tax {
    text-align: right;
    color: #ef4444;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

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

.period-comparison h4 {
    font-size: 16px;
    font-weight: 600;
    color: #d1d5db;
}

.comparison-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comparison-header,
.comparison-row {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
}

.comparison-header {
    color: #6b7280;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comparison-row {
    background-color: #1a1a1a;
    border-radius: 6px;
}

.comparison-row span:first-child {
    color: #9ca3af;
}

.comparison-row span:not(:first-child) {
    text-align: right;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.comparison-row-highlight {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.comparison-row-highlight span:not(:first-child) {
    color: #10b981;
    font-weight: 600;
}

.copy-row {
    display: flex;
}

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

.lock-icon {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lock-icon.section-hidden {
    display: none;
}

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

.pro-feature-block {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.pro-feature-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.pro-feature-desc {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}

.pro-feature-btn {
    position: relative;
}

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

.salary-comparison-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid #374151;
    padding-top: 16px;
}

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

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #374151;
}

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

.modal-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 150ms ease;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    padding: 24px;
}

.tax-code-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    margin-top: 20px;
    margin-bottom: 12px;
}

.tax-code-info h4:first-child {
    margin-top: 0;
}

.tax-code-info p {
    font-size: 14px;
    color: #d1d5db;
    line-height: 1.6;
    margin-bottom: 8px;
}

.tax-code-info p strong {
    color: #3b82f6;
}

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

.toast.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-success {
    border-color: #059669;
}

.toast.toast-error {
    border-color: #dc2626;
}

@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-card-value {
        font-size: 24px;
    }

    .output-section {
        padding: 16px;
    }

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

    .action-buttons {
        flex-direction: column;
    }

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

    .tax-code-buttons {
        gap: 6px;
    }

    .rate-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .tax-band-row {
        grid-template-columns: 1fr 60px 80px 80px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .comparison-header,
    .comparison-row {
        grid-template-columns: 60px repeat(3, 1fr);
        font-size: 12px;
        padding: 8px 12px;
    }

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

    .mode-toggle {
        flex-wrap: wrap;
    }

    .mode-btn {
        flex: 1 1 calc(33% - 4px);
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .tax-band-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tax-band-row.tax-band-header {
        display: none;
    }

    .tax-band-row:not(.tax-band-header) {
        flex-wrap: wrap;
    }

    .comparison-header,
    .comparison-row {
        grid-template-columns: 50px repeat(3, 1fr);
        gap: 4px;
        font-size: 11px;
        padding: 8px;
    }
}