:root {
    --brand: #4655A1;
    --brand-dark: #353F7C;
    --brand-light: #6B7AC4;
    --accent: #F6DB1E;
    --accent-dark: #D6BD0E;
    --gray-bg: #F4F5F9;
}

html, body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--gray-bg); }

.brand-bg { background-color: var(--brand) !important; }
.brand-bg-dark { background-color: var(--brand-dark) !important; }
.brand-text { color: var(--brand) !important; }
.brand-border { border-color: var(--brand) !important; }
.accent-bg { background-color: var(--accent) !important; }
.accent-text { color: var(--accent-dark) !important; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border-radius: 0.6rem; font-weight: 600; font-size: 0.875rem; transition: all 0.15s; cursor: pointer; border: 1px solid transparent; line-height: 1.2; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--accent); color: #1f2937; }
.btn-secondary:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: transparent; color: #4b5563; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.card { background: #fff; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03); padding: 1.5rem; }
.card-flush { padding: 0; }

.input, .select, .textarea {
    width: 100%; padding: 0.55rem 0.85rem; border: 1px solid #d1d5db; border-radius: 0.55rem;
    font-size: 0.9rem; background: #fff; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(70,85,161,0.12);
}
.label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 0.3rem; }
.help { font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem; }
.required { color: #dc2626; }

.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table thead th { background: #f9fafb; font-weight: 600; text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid #e5e7eb; color: #374151; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid #f3f4f6; }
.table tbody tr:hover { background: #fafbff; }

.badge { display: inline-block; padding: 0.2rem 0.55rem; border-radius: 0.4rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

.sidebar { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; }
.sidebar a { color: #c5cdee; transition: all 0.15s; }
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,0.12); color: #fff; }
.sidebar a.active { box-shadow: inset 4px 0 0 var(--accent); }
.sidebar a.brand-link { color: inherit; }
.sidebar a.brand-link:hover { background: rgba(255,255,255,0.05); box-shadow: none; }
.sidebar nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.sidebar nav::-webkit-scrollbar { width: 6px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.32); }

.flash { padding: 0.85rem 1.1rem; border-radius: 0.6rem; margin-bottom: 1rem; font-size: 0.875rem; border-left: 4px solid; }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #10b981; }
.flash-error { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.flash-info { background: #eff6ff; color: #1e40af; border-color: #3b82f6; }

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: #e5e7eb; }
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-dot { position: absolute; left: -1.5rem; top: 0.25rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1px #e5e7eb; }

.kpi { display: flex; flex-direction: column; gap: 0.25rem; padding: 1.25rem; background: #fff; border-radius: 1rem; }
.kpi-value { font-size: 2rem; font-weight: 800; color: #111827; line-height: 1.1; }
.kpi-label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

@media print {
    body * { visibility: hidden; }
    .printable, .printable * { visibility: visible; }
    .printable { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
}

.label-print { width: 60mm; height: 30mm; padding: 2mm; border: 1px dashed #999; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; margin: 1mm; page-break-inside: avoid; }
.label-print svg { max-width: 100%; }

.scanner-overlay { border: 4px solid var(--accent); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.5); }

.fade-enter { animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

[x-cloak] { display: none !important; }
