/* ---- D'Art brand font (self-hosted, works offline) ---- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/inter/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/inter/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/inter/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/inter/inter-700.woff2') format('woff2'); }

:root {
    --vms-primary: #e3262e;   /* D'Art red */
    --vms-dark: #141414;      /* near-black */
    --vms-ink: #16181d;
    --vms-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --vms-sidebar-w: 250px;
    --bs-border-radius: .4rem;
    --bs-border-radius-sm: .3rem;
    --bs-border-radius-lg: .55rem;
}
body { background: #f4f5f7; font-size: .95rem; font-family: var(--vms-font); color: #1f2430; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--vms-font); font-weight: 700; letter-spacing: -.01em; }
.btn { font-family: var(--vms-font); font-weight: 600; border-radius: .35rem; }
.form-control, .form-select { border-radius: .35rem; }
a { color: var(--vms-primary); }
.btn-primary, .btn-primary:hover, .btn-primary:focus { background: var(--vms-primary); border-color: var(--vms-primary); }
.btn-primary:hover { filter: brightness(.92); }
.btn-outline-primary { color: var(--vms-primary); border-color: var(--vms-primary); }
.btn-outline-primary:hover { background: var(--vms-primary); border-color: var(--vms-primary); color: #fff; }
.text-primary { color: var(--vms-primary) !important; }
.bg-primary, .text-bg-primary { background-color: var(--vms-primary) !important; }
.form-check-input:checked { background-color: var(--vms-primary); border-color: var(--vms-primary); }
.page-link { color: var(--vms-primary); }
.active > .page-link, .page-link.active { background: var(--vms-primary); border-color: var(--vms-primary); }

/* Layout */
.vms-topbar { background: var(--vms-dark); }
.vms-sidebar, .vms-sidebar.offcanvas-lg { background: var(--vms-dark) !important; color: #cfd5e2; }
@media (min-width: 992px) {
    .vms-sidebar { width: var(--vms-sidebar-w); min-height: 100vh; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
    .vms-sidebar .offcanvas-header { display: flex; padding: 1rem; }
}
.vms-sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--vms-dark); --bs-offcanvas-width: 270px; }
.vms-sidebar .nav-link { color: #cfd5e2; padding: .6rem 1.1rem; display: flex; align-items: center; gap: .65rem; border-left: 3px solid transparent; }
.vms-sidebar .nav-link i { font-size: 1.1rem; width: 1.3rem; text-align: center; }
.vms-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.vms-sidebar .nav-link.active { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--vms-primary); }
.vms-sidebar .nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #7d879c; padding: 1rem 1.1rem .3rem; }
.vms-main { min-width: 0; padding-bottom: 70px; }
@media (min-width: 992px) { .vms-main { padding-bottom: 0; } }

/* Bottom nav (mobile) */
.vms-bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #fff; border-top: 1px solid #e3e6ee; display: flex; padding-bottom: env(safe-area-inset-bottom); }
.vms-bottomnav a { flex: 1; text-align: center; padding: .45rem 0 .35rem; color: #6c757d; text-decoration: none; font-size: .7rem; display: flex; flex-direction: column; align-items: center; }
.vms-bottomnav a i { font-size: 1.35rem; }
.vms-bottomnav a.active { color: var(--vms-primary); }

/* Cards */
.card { border: 1px solid #ebedf1; box-shadow: 0 1px 2px rgba(20, 20, 20, .05); border-radius: .5rem; }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: .5rem .5rem 0 0 !important; }
.stat-card { transition: border-color .15s, box-shadow .15s; }
.stat-card:hover { border-color: var(--vms-primary); box-shadow: 0 2px 10px rgba(227,38,46,.08); }
.stat-card .icon { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; font-size: 1.4rem; }
.stat-card .value { font-size: 1.7rem; font-weight: 700; line-height: 1; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6c757d; font-weight: 600; background: #f8f9fb; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e9ecef; display: inline-grid; place-items: center; color: #6c757d; font-weight: 600; flex-shrink: 0; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.required::after { content: " *"; color: #dc3545; }
.dl-grid { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: .35rem 1rem; margin: 0; }
.dl-grid dt { color: #6c757d; font-weight: 500; }
.dl-grid dd { margin: 0; word-break: break-word; }

/* Mobile list cards instead of wide tables */
@media (max-width: 767.98px) {
    .table-mobile thead { display: none; }
    .table-mobile tr { display: block; border-bottom: 1px solid #e9ecef; padding: .5rem 0; }
    .table-mobile td { display: flex; justify-content: space-between; border: 0 !important; padding: .2rem .75rem !important; gap: 1rem; }
    .table-mobile td::before { content: attr(data-label); color: #6c757d; font-size: .8rem; flex-shrink: 0; }
    .table-mobile td[data-label=""]::before { content: none; }
}

/* Scanner */
#reader { width: 100%; max-width: 480px; margin: auto; border-radius: 12px; overflow: hidden; background: #000; }
#reader video { border-radius: 12px; }

/* Camera capture */
.camera-box video, .camera-box img { width: 100%; max-width: 320px; border-radius: 10px; background: #000; }

/* Guest / pass */
.vms-guest { background: radial-gradient(1200px 600px at 110% -10%, rgba(227,38,46,.22), transparent 60%), linear-gradient(145deg, #0f0f10 0%, #17171a 55%, #201012 100%); min-height: 100vh; }
.pass-card { max-width: 440px; margin: auto; border-radius: .9rem; overflow: hidden; }
.pass-head { background: var(--vms-primary); color: #fff; padding: 1.25rem; text-align: center; }
.pass-qr svg { width: 230px; height: 230px; }
.drag-handle { cursor: grab; color: #adb5bd; }
.sortable-ghost { opacity: .4; background: #fff3cd; }
@media print {
    .vms-sidebar, .vms-topbar, .vms-bottomnav, .no-print { display: none !important; }
    body, .vms-guest { background: #fff !important; }
}
