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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header .tagline {
    font-size: 1.2em;
    opacity: 0.9;
}

section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #667eea;
}

.problem, .solution, .features, .pricing, .cta {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.problem ul, .solution ul {
    list-style: none;
    margin: 15px 0;
}

.problem li, .solution li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.problem li:before {
    content: "❌";
    position: absolute;
    left: 0;
}

.solution li:before {
    content: "✅";
    position: absolute;
    left: 0;
}

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

.feature {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.feature h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

.pricing {
    background: white;
}

.price-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    border: 2px solid #ddd;
}

.price-card.pro {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    transform: scale(1.05);
}

.price-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.price {
    font-size: 2em;
    color: #667eea;
    margin: 15px 0;
    font-weight: bold;
}

.price-card ul {
    list-style: none;
    text-align: left;
    margin: 20px 0;
}

.price-card li {
    padding: 8px 0;
}

.btn-primary, .btn-secondary, .btn-add, .btn-small, .btn-pro {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
    margin: 10px;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-add {
    background: #28a745;
    color: white;
    margin-bottom: 20px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
    background: #dc3545;
    color: white;
}

.btn-pro {
    background: #667eea;
    color: white;
    margin-top: 15px;
}

.cta {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

footer {
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

/* APP MODE */
.app-mode body {
    background: #f5f5f5;
}

.app-container {
    display: flex;
    height: 100vh;
    gap: 0;
}

.sidebar {
    width: 250px;
    background: #2d3436;
    color: white;
    padding: 20px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 30px;
    color: white;
    font-size: 1.5em;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-btn {
    background: #636e72;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #74b9ff;
}

.nav-btn.active {
    background: #667eea;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.tab {
    display: none;
}

.tab.active {
    display: block;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-card p {
    color: #666;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 1.8em;
    color: #667eea;
}

.recent {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    color: #667eea;
}

.empty {
    text-align: center;
    color: #999;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9em;
}

.status.pending {
    background: #ffe5b4;
    color: #d97706;
}

.status.paid {
    background: #d4edda;
    color: #155724;
}

.ref-link {
    background: #f0f4ff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    cursor: pointer;
    user-select: all;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.pro-feature {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pro-feature ul {
    list-style: none;
    margin: 15px 0;
}

.pro-feature li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.pro-feature li:before {
    content: "✨";
    position: absolute;
    left: 0;
}

.pro-unlock {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #667eea;
    margin-bottom: 20px;
}

.payment-options {
    margin-top: 15px;
}

.payment-option {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.payment-option code {
    display: block;
    background: #e9ecef;
    padding: 8px;
    margin: 8px 0;
    border-radius: 4px;
    word-break: break-all;
    font-size: 0.85em;
}

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

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        gap: 10px;
        padding: 10px;
    }

    nav {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .app-main {
        padding: 15px;
    }

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

    .price-card.pro {
        transform: none;
    }
}
