:root { --primary: #2c3e50; --accent: #34495e; }
body { font-family: 'Segoe UI', Arial, sans-serif; margin: 0; display: flex; background: #f0f2f5; }

.container { display: flex; width: 100%; height: 100vh; }

.editor-panel { 
    width: 350px; background: #fff; padding: 20px; 
    border-right: 1px solid #ddd; overflow-y: auto; 
}

.input-group { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
input { width: 90%; padding: 8px; margin-bottom: 8px; border: 1px solid #ccc; border-radius: 4px; }

.preview-panel { flex-grow: 1; display: flex; justify-content: center; padding: 40px; overflow-y: auto; }

.invoice-box { 
    width: 210mm; min-height: 297mm; background: white; 
    padding: 60px; box-shadow: 0 0 20px rgba(0,0,0,0.1); box-sizing: border-box; 
}

header { display: flex; justify-content: space-between; border-bottom: 3px solid var(--primary); padding-bottom: 20px; }
.invoice-meta h2 { margin: 0; color: var(--primary); }

.items-table { width: 100%; border-collapse: collapse; margin-top: 30px; }
.items-table th { background: #f8f9fa; padding: 10px; border-bottom: 2px solid #ddd; text-align: left; }
.items-table td { padding: 10px; border-bottom: 1px solid #eee; }

.footer-totals { margin-left: auto; width: 250px; margin-top: 30px; }
.totals-row { display: flex; justify-content: space-between; padding: 5px 0; }
.grand-total { font-weight: bold; font-size: 1.2em; border-top: 2px solid var(--primary); padding-top: 10px; }

.btn-download { 
    width: 100%; padding: 15px; background: #27ae60; color: white; 
    border: none; border-radius: 5px; cursor: pointer; font-weight: bold; 
}