html { scroll-behavior: smooth; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
input, select, textarea, button { outline: none; }
input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
input:focus, select:focus, textarea:focus { border-color: #f97316 !important; box-shadow: 0 0 0 4px rgba(249, 115, 22, .12); }
table { border-collapse: collapse; }

.brand-mark { display:inline-flex; height:2.75rem; width:2.75rem; align-items:center; justify-content:center; border-radius:1rem; background:linear-gradient(135deg,#f97316,#fb923c); color:white; font-weight:900; letter-spacing:.02em; box-shadow:0 18px 35px rgba(249,115,22,.22); }
.nav-link { display:flex; align-items:center; gap:.75rem; border-radius:1rem; padding:.75rem .85rem; font-size:.875rem; transition: all .18s ease; }
.nav-link-active { background:#fff; color:#020617; box-shadow:0 12px 30px rgba(0,0,0,.18); }
.nav-link-idle { color:#cbd5e1; }
.nav-link-idle:hover { background:rgba(255,255,255,.08); color:#fff; }
.nav-icon { display:inline-flex; height:2.15rem; width:2.15rem; align-items:center; justify-content:center; flex:none; border-radius:.9rem; background:rgba(255,255,255,.08); font-size:1rem; }
.nav-link-active .nav-icon { background:#fff7ed; }

.btn-primary, .btn-secondary, .btn-dark { display:inline-flex; align-items:center; justify-content:center; gap:.45rem; border-radius:1rem; padding:.7rem 1rem; font-size:.875rem; font-weight:900; transition: all .18s ease; white-space:nowrap; }
.btn-primary { background:#f97316; color:white; box-shadow:0 16px 30px rgba(249,115,22,.22); }
.btn-primary:hover { background:#ea580c; transform:translateY(-1px); }
.btn-secondary { border:1px solid #e2e8f0; background:white; color:#334155; }
.btn-secondary:hover { background:#f8fafc; border-color:#cbd5e1; }
.btn-dark { background:#020617; color:#fff; }
.btn-dark:hover { background:#1e293b; }

.stat-card { border:1px solid #e2e8f0; background:rgba(255,255,255,.92); border-radius:1.5rem; padding:1.1rem; box-shadow:0 1px 2px rgba(15,23,42,.04), 0 18px 45px rgba(15,23,42,.04); transition: transform .18s ease, box-shadow .18s ease; }
.stat-card:hover { transform:translateY(-2px); box-shadow:0 18px 45px rgba(15,23,42,.08); }
.stat-icon { display:inline-flex; height:3rem; width:3rem; align-items:center; justify-content:center; flex:none; border-radius:1rem; background:#f8fafc; font-size:1.35rem; box-shadow: inset 0 0 0 1px #e2e8f0; }

.flash-message { margin-bottom:1rem; display:flex; align-items:flex-start; gap:.75rem; border-radius:1.25rem; border:1px solid; padding:1rem; font-size:.9rem; font-weight:700; }
.flash-success { border-color:#bbf7d0; background:#f0fdf4; color:#166534; }
.flash-error { border-color:#fecaca; background:#fef2f2; color:#991b1b; }

.data-panel { border:1px solid #e2e8f0; background:white; border-radius:1.5rem; box-shadow:0 1px 2px rgba(15,23,42,.04), 0 18px 45px rgba(15,23,42,.04); overflow:hidden; }
.table-modern thead { background:#f8fafc; color:#64748b; font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; }
.table-modern th { padding:.85rem 1rem; font-weight:900; }
.table-modern td { padding:.9rem 1rem; vertical-align:top; }
.table-modern tbody tr { border-top:1px solid #f1f5f9; transition:background-color .15s ease; }
.table-modern tbody tr:hover { background:#fff7ed; }
.form-help { margin-top:.35rem; font-size:.75rem; color:#64748b; }

.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.6) transparent; }
.custom-scrollbar::-webkit-scrollbar { width:8px; }
.custom-scrollbar::-webkit-scrollbar-track { background:transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background:rgba(148,163,184,.4); border-radius:999px; }

.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
@media (max-width: 640px) {
  .stat-card { border-radius:1.25rem; padding:1rem; }
  .btn-primary, .btn-secondary, .btn-dark { border-radius:.9rem; }
  table { font-size:.82rem; }
}
@media print {
  body { background:#fff !important; }
  aside, header, .no-print { display:none !important; }
  main, section { padding:0 !important; }
  .shadow-sm, .shadow-xl, .shadow-2xl { box-shadow:none !important; }
}

.nav-icon svg, .stat-icon svg, .btn-primary svg, .btn-secondary svg, .btn-dark svg { display:block; }
.signature-pad { width:100%; height:180px; border:1px dashed #cbd5e1; border-radius:1rem; background:#fff; touch-action:none; }
.scan-video { width:100%; max-height:420px; border-radius:1.25rem; background:#020617; object-fit:cover; }
.qr-card { display:flex; align-items:center; justify-content:center; min-height:150px; border:1px dashed #cbd5e1; border-radius:1.25rem; background:#f8fafc; }
.compact-action { display:inline-flex; align-items:center; justify-content:center; gap:.35rem; border-radius:.85rem; padding:.55rem .75rem; font-size:.78rem; font-weight:900; border:1px solid #e2e8f0; background:#fff; transition: all .15s ease; white-space:nowrap; }
.compact-action:hover { background:#fff7ed; border-color:#fed7aa; color:#c2410c; }
