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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.content {
    padding: 40px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.form-section h3 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

input, select, textarea {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.line-items {
    margin-top: 20px;
}

.line-item {
    display: grid;
    grid-template-columns: 2fr 100px 120px 120px 50px;
    gap: 10px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
}

.line-item button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.line-item button:hover {
    background: #dc2626;
}

.add-line-item {
    background: #059669;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

.add-line-item:hover {
    background: #047857;
}

.generate-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 10px;
    color: white;
}

.generate-btn {
    background: white;
    color: #059669;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 10px;
}

.generate-btn:hover {
    background: #f3f4f6;
}

.preview-section {
    margin-top: 30px;
    display: none;
}

.preview-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab-content {
    display: none;
}

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

.preview-frame {
    width: 100%;
    height: 600px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .line-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 20px;
    }
}