:root {
    --primary: #2563eb; --bg-light: #f1f5f9; --text-dark: #1e293b; --sidebar-w: 250px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg-light); color: var(--text-dark); }
.app-container { display: flex; height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: #1e293b; color: white; padding: 1rem; display: flex; flex-direction: column; }
.sidebar .logo { padding-bottom: 2rem; border-bottom: 1px solid #334155; margin-bottom: 1rem; }
.sidebar .menu li { list-style: none; padding: 0.75rem 1rem; cursor: pointer; border-radius: 6px; margin-bottom: 0.5rem; transition: 0.2s; }
.sidebar .menu li:hover, .sidebar .menu li.active { background: var(--primary); }

/* Content */
.content-area { flex: 1; padding: 2rem; overflow-y: auto; }
header { margin-bottom: 2rem; }
.card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); margin-bottom: 2rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
input { width: 100%; padding: 0.75rem; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 1rem; }
.btn-primary { background: var(--primary); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; cursor: pointer; font-weight: bold; width: 100%; }
.btn-primary:hover { opacity: 0.9; }
.costo-preview { font-size: 1.5rem; text-align: right; color: var(--primary); font-weight: bold; margin: 1rem 0; }

/* Tablas */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid #e2e8f0; }
th { background: #f8fafc; }

/* === ESTILOS FACTURA PDF === */
.invoice-box {
    max-width: 800px; margin: auto; padding: 30px; border: 1px solid #eee;
    font-size: 16px; line-height: 24px; font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; color: #555;
    background: white; /* Importante para el PDF */
}
.invoice-box .header { display: flex; justify-content: space-between; margin-bottom: 40px; }
.invoice-box .company-details { text-align: right; }
.invoice-box .info-section { display: flex; justify-content: space-between; margin-bottom: 30px; border-top: 2px solid #f1f5f9; padding-top: 20px; }
.invoice-box .invoice-meta { text-align: right; }
.invoice-box h3 { font-size: 14px; color: #94a3b8; margin-bottom: 5px; text-transform: uppercase; }

.invoice-table { width: 100%; line-height: inherit; text-align: left; border-collapse: collapse; }
.invoice-table th { background: #1e293b; color: white; font-weight: bold; padding: 12px 15px; font-size: 14px; }
.invoice-table td { padding: 12px 15px; vertical-align: top; border-bottom: 1px solid #eee; }
.invoice-table tr.item:last-child td { border-bottom: none; }

.footer-section { display: flex; justify-content: space-between; margin-top: 40px; border-top: 2px solid #2563eb; padding-top: 20px; }
.footer-section .observaciones { flex: 2; padding-right: 40px; font-size: 14px; }
.footer-section .totals { flex: 1; }

.footer-legal { margin-top: 50px; text-align: center; font-size: 12px; color: #94a3b8; border-top: 1px solid #eee; padding-top: 15px; }