:root {
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 40px 20px;
    line-height: 1.5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sticky-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-color);
    padding: 20px 0 10px 0;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Profile Menu */
.profile-menu {
    position: absolute;
    top: 0;
    right: 0;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.profile-dropdown {
    position: absolute;
    top: 56px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFade 0.2s ease;
}

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

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

.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.profile-avatar-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.profile-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
}

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

.profile-divider {
    height: 1px;
    background: var(--border-color);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.profile-menu-item:hover {
    background: #f1f5f9;
}

.profile-menu-item:last-child {
    color: #dc2626;
}

.profile-menu-item:last-child:hover {
    background: #fef2f2;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: #f3f4f6;
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

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

.tab-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
}

.tab-actions .btn-primary {
    flex: 1;
    max-width: 300px;
}

.btn-calculate {
    font-size: 1.1rem;
    padding: 16px 24px;
}

h2 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2,
.section-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.9em;
}

input,
select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: box-shadow 0.2s;
    background: #f9fafb;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    width: 100%;
    font-size: 1.1rem;
    padding: 14px;
}

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

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.earner-row,
.bank-row {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e5e7eb;
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 24px 0;
}

.hidden {
    display: none !important;
}

small {
    color: var(--text-muted);
    font-size: 0.8em;
    margin-top: 4px;
}

/* Results */
.result-container {
    background: #1e1e24;
    color: white;
    padding: 30px;
    border-radius: var(--radius);
    margin-top: 40px;
}

.result-container h2 {
    color: white;
    border-bottom-color: #3f3f46;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    background: #27272a;
    padding: 15px;
    border-radius: 8px;
}

.summary-item .label {
    font-size: 0.85em;
    color: #a1a1aa;
    margin-bottom: 5px;
}

.summary-item .value {
    font-size: 1.25em;
    font-weight: 600;
}

.summary-item.total {
    background: #2563eb;
    grid-column: 1 / -1;
}

.summary-item.total .value {
    font-size: 1.75em;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}

.breakdown-table th {
    text-align: left;
    color: #a1a1aa;
    padding-bottom: 8px;
    border-bottom: 1px solid #3f3f46;
}

.breakdown-table td {
    padding: 8px 0;
    border-bottom: 1px solid #2d2d33;
}

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

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ========================================
   LANDING PAGE - Complete Redesign
   ======================================== */

.landing-wrapper {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 0;
    margin: 0;
}

/* Hero Section */
.landing-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: white;
    padding: 80px 40px 100px;
}

.landing-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-text-content {
    max-width: 600px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.landing-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero .hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #94a3b8;
    margin-bottom: 40px;
    max-width: 100%;
}

.hero-cta-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e40af;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.btn-hero svg {
    flex-shrink: 0;
}

.hero-cta-note {
    color: #64748b;
    font-size: 0.875rem;
}

/* Hero Visual Preview */
.hero-visual {
    display: flex;
    justify-content: flex-end;
}

.hero-card-preview {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.preview-header {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #475569;
}

.preview-dot:first-child {
    background: #ef4444;
}

.preview-dot:nth-child(2) {
    background: #eab308;
}

.preview-dot:nth-child(3) {
    background: #22c55e;
}

.preview-content {
    padding: 24px;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 1rem;
    color: #94a3b8;
}

.preview-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.preview-divider {
    height: 1px;
    background: #334155;
    margin: 8px 0;
}

.text-red {
    color: #f87171;
}

.text-green {
    color: #4ade80;
}

/* Trust Badges */
.landing-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #334155;
    font-size: 1rem;
}

.badge-icon {
    font-size: 1.25rem;
}

/* Features Section */
.landing-features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
}

.landing-section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
    border-bottom: none;
    padding-bottom: 0;
}

.landing-section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon-wrapper span {
    font-size: 1.75rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
    text-transform: none;
    letter-spacing: normal;
}

.feature-card p {
    color: #64748b;
    line-height: 1.7;
    font-size: 1rem;
    margin: 0;
}

/* Landing Footer */
.landing-footer {
    text-align: center;
    padding: 40px 20px;
    background: #0f172a;
    color: #64748b;
    font-size: 0.9rem;
}

.landing-footer p {
    margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .landing-hero-inner {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .hero-text-content {
        max-width: 100%;
    }

    .hero-cta-container {
        align-items: center;
    }

    .hero-visual {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 60px 20px 80px;
    }

    .landing-hero h1 {
        font-size: 2.5rem;
    }

    .landing-hero .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-card-preview {
        max-width: 100%;
    }

    .landing-badges {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

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

    .landing-features {
        padding: 60px 20px;
    }

    .landing-section-title {
        font-size: 2rem;
    }
}