:root {
    --primary: #007AFF;
    --primary-dark: #0056b3;
    --bg: #ffffff;
    --text: #1d1d1f;
    --text-muted: #86868b;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.02);
    --border: #d2d2d7;
    --border-light: #f0f0f2;
    --success: #34c759;
    --danger: #ff3b30;
}

/* Base */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.4;
    overflow-x: hidden;
}

/* Layout */
.container { max-width: 1100px; margin: 25px auto; padding: 0 24px; width: 100%; }
.container-narrow { max-width: 600px; margin: 0 auto; width: 100%; }
.container-small { max-width: 480px; margin: 0 auto; width: 100%; }

.flex { display: flex; }
.flex-column { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-auto-fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.card-hover:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.card-dashed { border: 2px dashed var(--border); background: transparent; cursor: pointer; transition: 0.2s; }
.card-dashed:hover { border-color: var(--primary); }
.overflow-hidden { overflow: hidden; }

.stat-box { background: white; border: 1px solid var(--border); padding: 24px; border-radius: 24px; text-align: center; }
.stat-label { text-transform: uppercase; font-size: 10px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; }
.stat-number { font-size: 28px; font-weight: 800; margin-top: 8px; }

.avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }

.tab-pill-container { background: #f1f1f3; padding: 4px; border-radius: 12px; display: flex; gap: 4px; width: fit-content; margin: 0 auto; }
.tab-pill { background: transparent; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #666; cursor: pointer; transition: 0.2s; }
.tab-pill.active { background: white; font-weight: 700; color: var(--text); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }

.gap-5 { gap: 5px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }

/* Spacing Utilities */
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }

.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.p-32 { padding: 32px; }
.p-40 { padding: 40px; }
.p-48 { padding: 48px; }

.hero-p { font-size: 19px; color: var(--text-muted); max-width: 800px; margin: 0 auto 0px; }
.hero-section { display: flex; flex-direction: column; justify-content: center; padding: 0px 0 20px; }
.cta-group { display: flex; flex-direction: column; gap: 12px; align-items: center; margin: 40px 0; }
.input-container { background: #f5f5f7; height: 60px; padding: 0 24px; border-radius: 16px; border: 1px solid var(--border); display: flex; align-items: center; width: 100%; max-width: 360px; }

.min-h-80 { min-height: 80vh; }
.justify-center { justify-content: center; }

@media (min-width: 992px) {
    .cta-group { flex-direction: row; justify-content: center; }
}
h1 { font-size: 42px; font-weight: 800; letter-spacing: -2px; line-height: 1.1; margin-bottom: 24px; }
h1.page-title { font-size: 42px; letter-spacing: -1px; margin-top: 10px; margin-bottom: 12px; }
header { margin-bottom: 48px; }
h2 { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
h3 { font-size: 18px; font-weight: 800; margin: 0; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 12px; }
.text-xs { font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.text-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.gradient-text { background: linear-gradient(90deg, #007AFF, #00C6FF); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px; 
    align-items: start; 
    text-align: center; 
}

.revenue-card {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Navigation */
nav { 
    height: 80px; 
    display: flex; 
    align-items: center; 
    background: rgba(255,255,255,0.95); 
    backdrop-filter: blur(20px); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}
nav .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; text-decoration: none; color: var(--text); }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 25px; }
.nav-links a { text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; transition: 0.2s; }
.nav-links a.btn-primary {color: #ffffff;}
.nav-links a:hover { color: var(--primary); }

.menu-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1100; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text); transition: 0.3s; display: block; }
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }

@media (max-width: 991px) {
    .menu-toggle { display: flex; }
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 80px; 
        left: 0; 
        width: 100%; 
        background: white; 
        flex-direction: column; 
        padding: 40px; 
        border-bottom: 1px solid var(--border); 
        z-index: 1000; 
        gap: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
    .nav-links.active { display: flex; }
}

/* Footer */
footer { padding: 80px 0; border-top: 1px solid var(--border-light); background: #fcfcfd; }

/* Components */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}
a.card { text-decoration: none; color: inherit; display: flex; }
.card-large { border-radius: 32px; }

.badge { background: #e8f2ff; color: var(--primary); padding: 8px 16px; border-radius: 100px; display: inline-block; font-size: 13px; font-weight: 700; margin: 0 auto 24px; }

.w-full { width: 100%; }
.justify-center { justify-content: center; }
.overflow-hidden { overflow: hidden; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    gap: 8px;
    white-space: nowrap;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25); }
.btn-secondary { background-color: var(--border-light); color: var(--text); }
.btn-secondary:hover { background-color: #e5e5ea; transform: translateY(-1px); }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background-color: rgba(0, 122, 255, 0.05); }
.btn-ghost { background-color: transparent; color: var(--primary); }
.btn-ghost:hover { background-color: rgba(0, 122, 255, 0.1); }
.btn-danger { background-color: var(--danger); color: white; }
.btn-full { width: 100%; }

/* Forms */
.form-group { margin-bottom: 24px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    background: white;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-textarea { min-height: 100px; resize: vertical; }

.input-url-wrapper { display: flex; align-items: center; background: #f5f5f7; border-radius: 14px; padding: 2px 14px; border: 1px solid var(--border); }
.url-prefix { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.input-ghost { flex: 1; background: transparent; border: none; padding: 12px 5px; font-size: 16px; font-family: inherit; outline: none; }

/* Tables */
.table-container { background: white; border: 1px solid var(--border); border-radius: 24px; padding: 8px; box-shadow: var(--card-shadow); overflow: hidden; }
.table-container table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-container thead th { text-align: left; padding: 16px 20px; font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); }
.table-container tbody td { padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border-light); }
.table-container tbody tr:last-child td { border-bottom: none; }
.table-container tbody tr:hover { background-color: #f5f5f7; cursor: pointer; }
.table-add { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 16px; border-top: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; }

/* Tabs */
.tab-container { display: flex; justify-content: center; gap: 40px; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; padding: 12px 10px; font-size: 15px; font-weight: 700; color: var(--text-muted); cursor: pointer; position: relative; }
.tab-btn.active { color: var(--primary); }
.tab-btn.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--primary); }

/* Specialized */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.theme-card { border: 2px solid var(--border); border-radius: 16px; padding: 10px; cursor: pointer; text-align: center; transition: 0.2s; }
.theme-card.active { border-color: var(--primary); background: #f8faff; }
.theme-preview-box { height: 50px; border-radius: 10px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; border: 1px solid #eee; }

.upload-zone { border: 2px dashed var(--border); border-radius: 14px; padding: 20px; text-align: center; cursor: pointer; color: var(--text-muted); font-size: 12px; }

.profile-upload-container { text-align: center; margin-bottom: 32px; }
.profile-preview-wrapper { position: relative; width: 100px; height: 100px; margin: 0 auto 12px auto; }
.profile-preview-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #f0f0f2; background: #f8f9fa; }
.upload-icon-badge { position: absolute; bottom: 0; right: 0; background: var(--primary); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.1); color: white; }

.alert-error { background: #fff5f5; border: 1px solid #feb2b2; color: #c53030; padding: 12px 16px; border-radius: 14px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; margin-top: 15px; }

/* Phone Mockup */
.phone-wrapper { width: 280px; height: 560px; background: #1d1d1f; border-radius: 44px; padding: 12px; box-shadow: 0 40px 80px rgba(0,0,0,0.1); border: 4px solid #3a3a3c; margin: 0 auto; position: relative; }
.phone-screen { background: white; height: 100%; border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding: 40px 15px; }

/* Terms Checkbox */
.terms-checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    margin-top: 16px;
    margin-bottom: 16px;
}

.terms-checkbox-container input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.terms-checkbox-container label {
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0;
}

.terms-checkbox-container label a {
    text-decoration: underline;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 991px) {
    .hero-grid { grid-template-columns: 1fr; gap: 60px; }
    .nav-links { display: none; position: absolute; top: 80px; left: 0; width: 100%; background: white; flex-direction: column; padding: 40px; border-bottom: 1px solid var(--border); z-index: 1000; }
    .nav-links.active { display: flex; }
    .theme-grid { grid-template-columns: repeat(2, 1fr); }
    .menu-toggle { display: flex; }
}

@media (max-width: 600px) {
    .theme-grid { grid-template-columns: 1fr !important; }
    .grid-auto-fill .grid-2 { grid-template-columns: 1fr 1fr !important; }
}

@media (min-width: 992px) {
    h1 { font-size: 64px; }
    .hero-section { min-height: calc(100vh - 80px); }
}

/* ==========================================================================
   GLOBAL FORM & EDITOR STYLING
   ========================================================================== */
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.form-control {
    width: 100%; height: 54px; padding: 0 20px;
    background: #ffffff; border: 1px solid var(--border); border-radius: 16px;
    font-size: 15px; transition: all 0.2s; color: var(--text);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.form-control:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.form-label-small {
    font-size: 12px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
    display: block;
}

/* AI Specific Inputs */
.ai-input-group {
    display: flex; gap: 8px; background: rgba(0, 122, 255, 0.04); 
    padding: 8px; border-radius: 20px; border: 1px solid rgba(0, 122, 255, 0.1);
}
.form-control-ai {
    flex-grow: 1; background: transparent; border: none;
    padding: 0 15px; font-size: 15px; outline: none; height: 44px;
}

/* Icon Inputs */
.input-with-icon { position: relative; }
.input-with-icon i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-with-icon input { padding-left: 44px; }

/* Selection Cards (Format/Options) */
.selection-card {
    flex: 1; padding: 24px; border: 2px solid #f1f5f9;
    border-radius: 24px; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 16px; background: white;
    position: relative;
}
.selection-card:hover { border-color: var(--primary-light); }
.selection-card.active { border-color: var(--primary); background: #f0f7ff; }

.selection-icon {
    width: 48px; height: 48px; background: #f1f5f9; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    color: var(--text-muted); transition: 0.2s;
}
.selection-card.active .selection-icon { background: var(--primary); color: white; }

/* Status Indicators */
.status-indicator { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #e2e8f0; }
.status-indicator.active { background: #34C759; }
.pulse-ring {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid #34C759; opacity: 0;
}
.status-indicator.active .pulse-ring { animation: pulse-global 2s infinite; }
@keyframes pulse-global { 
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Modern Sliders */
.modern-slider {
    flex-grow: 1; -webkit-appearance: none; height: 8px; 
    background: #e2e8f0; border-radius: 4px; outline: none;
}
.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 24px; height: 24px; 
    background: var(--primary); border: 4px solid white; border-radius: 50%; 
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Helper Components */
.step-badge {
    width: 32px; height: 32px; background: var(--primary); color: white;
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 900;
}

.shadow-soft { box-shadow: 0 10px 40px rgba(0,0,0,0.04); }
.border-light { border: 1px solid rgba(0,0,0,0.05); }

/* Utility Backgrounds & Text */
.bg-dark { background: #0f172a !important; }
.text-white { color: #ffffff !important; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: 2.5rem; }
.shadow-primary { box-shadow: 0 10px 20px rgba(0, 122, 255, 0.2); }

/* Global Animations */
.animate-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.animate-slide-up { animation: slideUp 0.5s ease-out forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* ==========================================================================
   MARKETPLACE STYLING
   ========================================================================== */
.grid-marketplace {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border-radius: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
a.product-card { text-decoration: none; color: inherit; }

.product-image-container {
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.essentials-library-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-fallback {
    font-size: 64px;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-desc {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}

.badge-commission {
    background: #e1ffe1;
    color: #008000;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
}

.search-container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: #94a3b8;
    font-size: 18px;
}

.search-input-marketplace {
    width: 100%;
    padding: 16px 20px 16px 56px;
    border-radius: 100px;
    border: 2px solid #e2e8f0;
    font-size: 16px;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    outline: none;
}

.search-input-marketplace:focus {
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-card-preview {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 20px 32px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
}

/* ==========================================================================
   SALES LETTER STYLING
   ========================================================================== */
.sales-letter-container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    border: 1px solid var(--border-light);
}

.sales-letter-header {
    background: #1e272e;
    color: #fff;
    padding: 60px 40px;
    text-align: center;
}

.sales-letter-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #fff;
    letter-spacing: -1px;
}

.sales-letter-header p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.sales-letter-content {
    padding: 60px 40px;
}

.sales-letter-content p {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 24px;
    color: #374151;
}

.sales-letter-section-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 48px 0 24px;
    color: #111827;
    line-height: 1.2;
}

.sales-letter-list {
    margin-bottom: 32px;
    padding-left: 0;
    list-style: none;
}

.sales-letter-list li {
    margin-bottom: 16px;
    padding-left: 32px;
    position: relative;
    font-size: 1.1rem;
}

.sales-letter-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 900;
}

.sales-letter-cta-box {
    text-align: center;
    background: #fff9e6;
    padding: 48px;
    border: 2px dashed #ffd32a;
    border-radius: 24px;
    margin: 60px 0;
}

.sales-letter-cta-box h3 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.sales-letter-btn {
    background: #ff7675;
    color: #fff !important;
    padding: 24px 48px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 16px;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.sales-letter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 118, 117, 0.3);
}

.sales-letter-price {
    font-size: 3rem;
    font-weight: 900;
    margin: 24px 0;
    color: #111827;
}

/* ==========================================================================
   MODERN RESPONSIVE INVOICE (MOBILE FIRST)
   ========================================================================== */
.invoice-page { 
    background-color: #ffffff; 
    padding: 0; 
    font-family: 'Inter', -apple-system, sans-serif; 
    color: #1d1d1f;
    line-height: 1.4;
}

.invoice-card { 
    max-width: 800px; 
    margin: 0 auto; 
    padding: 24px 16px;
}

@media (min-width: 768px) {
    .invoice-page { background-color: #f5f5f7; padding: 60px 20px; }
    .invoice-card { 
        background: #ffffff; 
        padding: 60px; 
        border-radius: 24px;
        box-shadow: 0 4px 40px rgba(0,0,0,0.03);
    }
}

.invoice-header { 
    display: flex; 
    flex-direction: column;
    margin-bottom: 32px; 
}

@media (min-width: 600px) {
    .invoice-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.invoice-logo { 
    font-size: 22px; 
    font-weight: 800; 
    letter-spacing: -1px; 
    margin-bottom: 12px;
}
.invoice-logo span { color: #007AFF; }

.invoice-title { 
    font-size: 28px; 
    font-weight: 800; 
    color: #0f172a; 
    margin: 0; 
}

.invoice-status-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #1b5e20;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.invoice-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 24px; 
    margin-bottom: 32px;
    padding-top: 24px;
    border-top: 1px solid #f2f2f7;
}

@media (min-width: 600px) {
    .invoice-grid { grid-template-columns: 1fr 1fr; }
}

.info-block h4 { 
    font-size: 10px; 
    text-transform: uppercase; 
    color: #86868b; 
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.info-block p { font-size: 13px; font-weight: 500; margin: 0; color: #1d1d1f; }

/* Table styling */
.table-responsive { 
    margin: 0 -16px; /* Negativ margin for at lade tabellen gå til kant på mobil */
    padding: 0 16px;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
}

.invoice-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 450px; 
}

.invoice-table th { 
    text-align: left; 
    padding: 10px 0; 
    border-bottom: 1px solid #f2f2f7;
    color: #86868b; 
    font-size: 11px; 
    font-weight: 600;
    text-transform: uppercase;
}

.invoice-table td { 
    padding: 14px 0; 
    border-bottom: 1px solid #f2f2f7; 
    font-size: 13px; 
    vertical-align: top;
}

.invoice-totals { 
    margin-left: auto; 
    width: 100%;
    max-width: 280px;
    padding-top: 16px;
}

.total-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 6px 0; 
    font-size: 13px; 
}

.total-row.grand-total { 
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1.5px solid #1d1d1f;
    font-size: 18px; 
    font-weight: 700; 
}

.invoice-footer { 
    margin-top: 48px; 
    padding-top: 24px; 
    border-top: 1px solid #f2f2f7; 
    text-align: center; 
    color: #86868b; 
    font-size: 11px; 
    line-height: 1.5;
}



/* Utility Classes */ 
.text-right { text-align: right !important; } 
.text-center { text-align: center !important; } 
.text-left { text-align: left !important; } 
.text-bold { font-weight: 700 !important; }

footer a {
    color: var(--text-muted);
    text-decoration: underline;
    opacity: 0.8;
}

footer a:hover {
    opacity: 1;
}

