:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}



/* Social Proof */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    gap: 10px;
}

.testimonial {
    text-align: left;
    flex: 2;
}

.testimonial p {
    font-style: italic;
    font-size: 0.85rem;
    margin: 4px 0;
    color: var(--text-main);
}

.testimonial small {
    color: var(--text-muted);
}

.user-count {
    text-align: center;
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.user-count strong {
    display: block;
    font-size: 1.5rem;
    color: var(--success);
}

/* Savings Goal (Gamification) */
.savings-goal-box {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
}

.savings-goal-box h4 {
    margin: 0 0 0.5rem 0;
    color: #065f46;
}

/* Contract Reminder Badges */
.reminder-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 2px;
}

.reminder-badge.urgent {
    background: #fef2f2;
    color: #b91c1c;
    font-weight: bold;
}

.reminder-badge.warning {
    background: #fffbeb;
    color: #d97706;
}

.reminder-badge.info {
    background: #f0f9ff;
    color: #0284c7;
}

.contract-item.urgent {
    background: #fef2f2 !important;
    border-left: 3px solid #ef4444;
}

.contract-item.warning {
    background: #fffbeb !important;
    border-left: 3px solid #f59e0b;
}

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

html {
    font-size: 100%;
    /* Defaults to 16px usually */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    font-size: 1rem;
    /* Standard 16px */
    line-height: 1.5;
}

/* Fix for Mobile Safari Zoom on Inputs */
input,
select,
textarea,
button {
    font-size: 1rem;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 120px;
    /* Space for fixed account bar */
}

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    margin-bottom: 1rem;
    /* Spacing between cards */
}

h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Hero Card */
.hero-card {
    text-align: center;
}

.hero-card h1 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

/* Rule Explanation */
.rule-explanation {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.rule-item {
    text-align: center;
}

/* Ratio Input (New) */
.ratio-input {
    display: block;
    width: 60px;
    margin: 0 auto;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.ratio-input:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

/* Specific Colors */
#ratioNeeds {
    color: #ff6b6b;
}

#ratioWants {
    color: #4ecdc4;
}

#ratioSavings {
    color: #45b7d1;
}

.rule-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Input Label */
.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Expandable Sections */
.expand-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
}

.expand-btn:hover {
    color: var(--primary-color);
}

.expand-icon {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
}

.expandable-section {
    display: none;
}

/* Input Section */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.currency-input {
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.currency-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    font-size: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    text-decoration: none;
}

/* Settings / Custom Percentages (Hidden by default) */
.settings-panel {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: left;
    display: none;
    /* Toggled via JS */
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Premium Toolbar (New) */
.toolbar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.btn-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 4px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: white;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 70px;
    /* Fixed height for uniformity */
}

.btn-toolbar:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-toolbar .icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

/* Specific Toolbar Colors on Hover */
.btn-toolbar.save:hover {
    border-color: #059669;
    color: #059669;
    background: #ecfdf5;
}

.btn-toolbar.pdf:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

.btn-toolbar.excel:hover {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

@media (max-width: 400px) {
    .toolbar-grid {
        grid-template-columns: repeat(3, 1fr);
        /* Wrap on very small screens */
    }
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.setting-row label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setting-row input {
    width: 60px;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
}

/* Results Section */
#results {
    display: none;
    margin-top: 0;
    text-align: left;
}

.chart-container {
    position: relative;
    height: 250px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Upsell Box */
.upsell-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    text-align: center;
}

.upsell-title {
    color: #92400e;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.upsell-text {
    font-size: 0.9rem;
    color: #b45309;
    margin-bottom: 1rem;
}

.upsell-btn {
    background-color: #059669;
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.upsell-btn:hover {
    background-color: #047857;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Expense Tracker Styles */
.expense-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    display: none;
    /* Visible after calculation */
}

.expense-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr auto;
    gap: 8px;
    margin-bottom: 1.5rem;
    align-items: center;
}

.expense-input {
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    width: 100%;
    /* Reset flex width issues */
    height: 42px;
    /* Fixed height for alignment */
    background: #f9fafb;
}

.expense-input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Specific styling for Select to match inputs */
select.expense-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
}

#addExpenseBtn {
    height: 42px;
    width: 42px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .expense-form {
        grid-template-columns: 1fr 1fr !important;
    }

    #descInput {
        grid-column: 1 / -1;
    }

    #addExpenseBtn {
        width: 100%;
    }
}

.expense-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    animation: fadeIn 0.3s ease;
}

.expense-item:last-child {
    border-bottom: none;
}

.expense-details {
    display: flex;
    flex-direction: column;
}

.expense-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.delete-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.delete-btn:hover {
    opacity: 1;
}

/* Progress Bar Overlays */
.progress-container {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    transition: width 0.5s ease;
}

/* Phase 5: Wealth & Contracts */
.wealth-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.wealth-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.wealth-input {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
    padding: 12px;
    outline: none;
    margin: 10px 0;
}

.wealth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.contracts-section {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 360px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Account Bar */
.account-bar {
    position: fixed;
    bottom: 45px;
    /* Increased to make room for legal footer */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 0.8rem !important;
    margin: 0 !important;
    white-space: nowrap;
    text-decoration: none;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-link:hover {
    color: var(--primary-color);
}

/* Premium Soft-Gating */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.premium-teaser {
    position: relative;
    cursor: pointer;
}

.premium-teaser::after {
    content: "🔒";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.btn-premium {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: "🪙";
    margin-right: 6px;
}

/* Safe to Spend Grid Layout */
.safe-to-spend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.safe-to-spend.warning {
    background: linear-gradient(135deg, #fff1f2, #ffe4e6);
    border-color: #fecdd3;
    box-shadow: 0 4px 6px rgba(244, 63, 94, 0.1);
}

.safe-spend-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.safe-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.safe-divider {
    width: 1px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

.safe-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #065f46;
    /* Default Dark Green */
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.safe-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #047857;
    /* Default Green */
}

/* Warning Colors */
.safe-to-spend.warning .safe-label {
    color: #9f1239;
}

.safe-to-spend.warning .safe-amount {
    color: #be123c;
}

.safe-footer {
    font-size: 0.8rem;
    color: rgba(6, 95, 70, 0.7);
    margin-top: 8px;
    border-top: 1px dashed rgba(6, 95, 70, 0.2);
    padding-top: 8px;
}

.safe-to-spend.warning .safe-footer {
    color: rgba(159, 18, 57, 0.7);
    border-top-color: rgba(159, 18, 57, 0.2);
}

/* Credits Display in App */
.credits-display {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #6366f1;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Credits Modal */
.credits-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.credits-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.credits-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.credits-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.credits-modal-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.credits-modal-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.credits-modal-balance {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.credits-modal-balance strong {
    color: #6366f1;
    font-size: 1.1rem;
}

.credits-modal-actions {
    display: flex;
    gap: 10px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: white;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Streak Badge */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    animation: streak-pulse 2s ease-in-out infinite;
}

@keyframes streak-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

/* Safe-to-Spend Box */
.safe-to-spend {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 2px solid #a7f3d0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    margin: 1rem 0;
}

.safe-to-spend .label {
    font-size: 0.85rem;
    color: #047857;
    margin-bottom: 0.25rem;
}

.safe-to-spend .amount {
    font-size: 1.75rem;
    font-weight: 800;
    color: #059669;
}

.safe-to-spend.warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}

.safe-to-spend.warning .label,
.safe-to-spend.warning .amount {
    color: #b45309;
}

/* Confetti Animation */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* Comparison Table for Pro Page */
.comparison-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.comparison-box h3 {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.comparison-row .value {
    font-weight: 600;
}

.comparison-row .value.good {
    color: #059669;
}

.comparison-row .value.bad {
    color: #ef4444;
    text-decoration: line-through;
}

/* Runway Box (Financial Freedom) */
.runway-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 8px;
    text-align: center;
    border: 2px solid transparent;
    display: flex;
    /* Initially handled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.runway-box .amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.runway-box .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.runway-box.good {
    background: #ecfdf5;
    border-color: #34d399;
}

.runway-box.good .amount {
    color: #059669;
}

.runway-box.good .label {
    color: #047857;
}

.runway-box.warning {
    background: #fffbeb;
    border-color: #fbbf24;
}

.runway-box.warning .amount {
    color: #d97706;
}

.runway-box.warning .label {
    color: #b45309;
}

/* =========================================
   PRO / SALES PAGE STYLES (Shared)
   ========================================= */
.pro-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Sales Hero */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 3.5rem;
    }
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Feature Cards (Sales) */
.features-section {
    margin-bottom: 3rem;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-main);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: #e5e7eb;
}

.feature-card .icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 12px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Pricing Cards */
.pricing-section {
    margin-bottom: 4rem;
    text-align: center;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}

.pricing-section h2 {
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    /* Default border */
    position: relative;
    max-width: 350px;
    width: 100%;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .pricing-card {
        padding: 1.5rem 1rem;
        /* Compact padding on mobile */
    }

    .price-tag {
        font-size: 2.5rem;
        /* Smaller price */
    }

    .pricing-badge {
        font-size: 0.7rem;
        padding: 3px 12px;
    }

    .price-period {
        margin-bottom: 1rem;
    }
}

.pricing-card.highlight {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.pricing-card:hover {
    transform: scale(1.03);
}

.pricing-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
    margin-bottom: 1rem;
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 1rem 0 0.5rem 0;
    display: block;
}

.price-period {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 2rem;
}

.price-list {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 2rem;
}

.price-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 0.95rem;
}

.price-list li::before {
    content: "✓";
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.btn-buy-lg {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-buy-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

/* Trust Badges */
.trust-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.trust-item {
    padding: 1rem;
}

.trust-item strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 4px;
}

.trust-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.problem-solution {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.problem-solution .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.problem-solution h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.problem-solution p {
    color: var(--text-muted);
    margin: 0;
}

/* Legal Footer */
.legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 8px 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid #e5e7eb;
    z-index: 9999;
}

.legal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 8px;
}

.legal-footer a:hover {
    color: var(--primary-color);
}

/* =========================================
   PROFILE PAGE STYLES (Moved from profile.html)
   ========================================= */
.profile-container {
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid #e5e7eb;
}

.avatar-upload:hover {
    background: #f3f4f6;
}

.avatar-upload input {
    display: none;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.field-group {
    margin-bottom: 1rem;
}

.field-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.field-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.field-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-save {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-save:hover {
    background: var(--primary-hover);
}

.danger-zone {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.danger-zone .section-title {
    color: #b91c1c;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-danger:hover {
    background: #dc2626;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
    z-index: 1000;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

/* =========================================
   PRO PAGE / WIZARD STYLES (Moved from pro.html)
   ========================================= */
.wizard-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.wizard-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.wizard-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.wizard-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.wizard-group {
    margin-bottom: 1rem;
}

.wizard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .wizard-grid {
        grid-template-columns: 1fr;
    }
}

.wizard-section {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.wizard-section-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-breadcrumbs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

.wizard-crumb {
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.2s;
}

.wizard-crumb.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.wizard-crumb.completed {
    background: #dcfce7;
    color: #16a34a;
}

.wizard-crumb.inactive {
    color: #94a3b8;
}

.result-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.result-row:last-child {
    border-bottom: none;
}

.result-total {
    font-size: 1.3rem;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #e2e8f0;
}

.info-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    color: #92400e;
    margin-bottom: 1rem;
}

/* Checklist Styles */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.checklist-item:hover {
    border-color: #8b5cf6;
}

.checklist-item input[type="checkbox"] {
    display: none;
}

.checklist-item .checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
}

.checklist-item input:checked+.checkmark {
    background: #16a34a;
    border-color: #16a34a;
}

.checklist-item input:checked+.checkmark::after {
    content: "✓";
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.checklist-item input:checked~.checklist-content strong {
    text-decoration: line-through;
    color: #9ca3af;
}

.checklist-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.checklist-content strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.checklist-content span {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.3;
}

/* Resource Grid Styles */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .resource-grid {
        grid-template-columns: 1fr;
    }
}

.resource-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.resource-card:hover {
    border-color: #8b5cf6;
    background: #faf5ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.resource-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.resource-info strong {
    font-size: 0.9rem;
    color: #1e293b;
}

.resource-info span {
    font-size: 0.75rem;
    color: #64748b;
}

.resource-arrow {
    color: #8b5cf6;
    font-weight: bold;
    font-size: 1.2rem;
}

.locked-overlay {
    position: relative;
}

.locked-overlay::after {
    content: '🔒 Pro/Max erforderlich';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 12px;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.checkbox-row input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
}

.checkbox-row label {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
}

/* Wizard Navigation Buttons Override */
.wizard-step .btn-primary,
.wizard-step .btn-secondary {
    width: auto;
    min-width: 140px;
    padding: 12px 24px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.wizard-step div[style*="justify-content: space-between"] {
    gap: 1rem;
}

/* =========================================
   MOBILE RESPONSIVENESS FIXES
   ========================================= */
@media (max-width: 640px) {

    /* Gain more space on mobile */
    .card {
        padding: 1.5rem;
    }

    /* Fix long titles like "Datenschutzerklärung" */
    h1 {
        font-size: 1.5rem;
        word-break: break-word;
        hyphens: auto;
    }

    /* TrustBadges / Features Grid Fix */
    .trust-section {
        gap: 0.5rem;
        padding: 0 5px;
        /* Ensure no horizontal scroll */
        overflow-x: hidden;
    }

    .trust-item {
        padding: 0.5rem;
    }

    .trust-item strong {
        font-size: 0.85rem;
    }

    .trust-item span {
        font-size: 0.75rem;
    }
}