/* TagMyAssets Dynamic QR – theme layer on top of Tabler (MIT) */
:root, [data-bs-theme=light] {
  --tma-plum: #8a2b62;
  --tma-plum-dark: #6e2150;
  --tma-plum-soft: #f6eaf1;
  --tblr-primary: #8a2b62;
  --tblr-primary-rgb: 138, 43, 98;
  --tblr-primary-text-emphasis: #6e2150;
  --tblr-primary-bg-subtle: #f6eaf1;
  --tblr-primary-border-subtle: #e4c3d6;
  --tblr-link-color: #8a2b62;
  --tblr-link-color-rgb: 138, 43, 98;
  --tblr-link-hover-color: #6e2150;
  --tblr-font-sans-serif: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.btn-primary { --tblr-btn-bg: #8a2b62; --tblr-btn-border-color: #8a2b62; --tblr-btn-hover-bg: #6e2150; --tblr-btn-hover-border-color: #6e2150; --tblr-btn-active-bg: #5e1c45; }
.btn-outline-primary { --tblr-btn-color: #8a2b62; --tblr-btn-border-color: #8a2b62; --tblr-btn-hover-bg: #8a2b62; --tblr-btn-hover-border-color: #8a2b62; }
.bg-primary { background-color: #8a2b62 !important; }
.text-primary { color: #8a2b62 !important; }

/* Sidebar */
.navbar-vertical.navbar-dark, .tma-side { background: #2b0f20 !important; }
.tma-side .nav-link { color: rgba(255,255,255,.72); }
.tma-side .nav-item.active > .nav-link, .tma-side .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.tma-side .nav-item.active > .nav-link { box-shadow: inset 3px 0 0 #e7a6c9; }
.tma-side .navbar-brand img { height: 34px; }
.tma-side .side-label { color: rgba(255,255,255,.38); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 1rem 1rem .35rem; }
.tma-proj { background: rgba(255,255,255,.06); border-radius: 8px; margin: .25rem .75rem 1rem; padding: .6rem .75rem; color: #fff; }
.tma-proj small { color: rgba(255,255,255,.5); }

/* KPI tiles */
.kpi .kpi-num { font-size: 1.65rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .kpi-label { color: var(--tblr-secondary); font-size: .8rem; }
.num { font-variant-numeric: tabular-nums; }
.client-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .6rem; border: 1px solid var(--tblr-border-color); border-radius: 999px; background: #fff; font-size: .8rem; }
.client-chip .dot { width: 22px; height: 22px; border-radius: 6px; background: #0f5ea8; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .7rem; }

/* Status badges */
.st { font-weight: 600; }
.st-tagged { background: #e6f4ea !important; color: #1e7b3a !important; }
.st-unassigned { background: #eef1f5 !important; color: #4b5563 !important; }
.st-void { background: #fdecec !important; color: #b42318 !important; }
.st-lost { background: #fff4e5 !important; color: #b54708 !important; }
.st-pending { background: #fff8db !important; color: #8a6100 !important; }
.st-notfar { background: #f3e8ff !important; color: #6b21a8 !important; }

/* Phone mock frame (only when viewed on a wide screen) */
.phone-stage { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; gap: 2.5rem; padding: 2rem 1rem; background: #efe9ed; }
.phone-note { max-width: 300px; padding-top: 3rem; color: #4b3a45; }
.phone { width: 390px; min-height: 800px; background: #f6f7fb; border-radius: 34px; box-shadow: 0 0 0 10px #1c1c1e, 0 30px 60px rgba(0,0,0,.25); overflow: hidden; position: relative; display: flex; flex-direction: column; }
@media (max-width: 760px) {
  .phone-stage { padding: 0; background: #f6f7fb; display: block; }
  .phone-note { display: none; }
  .phone { width: 100%; min-height: 100vh; border-radius: 0; box-shadow: none; }
}
.m-top { background: #8a2b62; color: #fff; padding: .9rem 1rem; display: flex; align-items: center; gap: .75rem; }
.m-top .m-title { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.m-top small { opacity: .75; }
.m-body { flex: 1; padding: 1rem; overflow-y: auto; }
.m-bottom { display: flex; border-top: 1px solid #e5e7eb; background: #fff; }
.m-bottom a { flex: 1; text-align: center; padding: .55rem 0 .65rem; font-size: .7rem; color: #6b7280; text-decoration: none; }
.m-bottom a .ti { display: block; font-size: 1.35rem; margin-bottom: 2px; }
.m-bottom a.active { color: #8a2b62; font-weight: 600; }
.m-bottom a.scan-fab .ti { background: #8a2b62; color: #fff; width: 48px; height: 48px; line-height: 48px; border-radius: 50%; margin: -22px auto 2px; box-shadow: 0 6px 14px rgba(138,43,98,.4); font-size: 1.5rem; }

.viewfinder { position: relative; aspect-ratio: 1 / 1; border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 45%, #3a3a3c, #111 75%); }
.viewfinder .frame { position: absolute; inset: 18%; border-radius: 14px; }
.viewfinder .frame::before, .viewfinder .frame::after { content: ""; position: absolute; inset: 0; border: 4px solid #fff; border-radius: 14px; clip-path: polygon(0 0, 28% 0, 28% 4px, 4px 4px, 4px 28%, 0 28%, 0 72%, 4px 72%, 4px calc(100% - 4px), 28% calc(100% - 4px), 28% 100%, 72% 100%, 72% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 72%, 100% 72%, 100% 28%, calc(100% - 4px) 28%, calc(100% - 4px) 4px, 72% 4px, 72% 0, 100% 0, 100% 100%, 0 100%); }
.viewfinder .laser { position: absolute; left: 20%; right: 20%; height: 2px; background: #ff5fa8; box-shadow: 0 0 12px #ff5fa8; animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0%, 100% { top: 22%; } 50% { top: 76%; } }
@media (prefers-reduced-motion: reduce) { .viewfinder .laser { animation: none; top: 50%; } }
.viewfinder .fake-qr { position: absolute; inset: 30%; background: #fff; border-radius: 6px; padding: 8%; opacity: .9; }
.vf-tools { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.vf-tools .btn { border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; border: 0; backdrop-filter: blur(4px); }

.big-btn { padding: .85rem 1rem; font-size: 1rem; font-weight: 600; border-radius: 12px; }
.step-dots { display: flex; gap: 6px; }
.step-dots span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.step-dots span.on { background: #fff; }
.photo-slot { border: 2px dashed #d7c2cf; border-radius: 12px; aspect-ratio: 4/3; display: grid; place-items: center; color: #8a2b62; background: #fbf6f9; text-align: center; font-size: .8rem; }
.photo-slot.filled { border-style: solid; border-color: #e5e7eb; background: linear-gradient(135deg, #c9b8a6, #8f7a66); color: #fff; }

/* Asset photos placeholders */
.ph { border-radius: 10px; aspect-ratio: 4/3; display: grid; place-items: center; color: #fff; font-size: .8rem; }
.ph-a { background: linear-gradient(135deg, #9aa5b1, #52606d); }
.ph-b { background: linear-gradient(135deg, #d9cbb8, #9c8466); }
.map-ph { border-radius: 10px; height: 170px; background:
  linear-gradient(90deg, rgba(255,255,255,.55) 1px, transparent 1px) 0 0/28px 28px,
  linear-gradient(rgba(255,255,255,.55) 1px, transparent 1px) 0 0/28px 28px, #d9ead3; position: relative; }
.map-ph .pin { position: absolute; left: 52%; top: 40%; color: #b42318; font-size: 2rem; transform: translate(-50%, -100%); }

/* Timeline */
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { position: relative; padding: 0 0 1rem 1.6rem; }
.tl li::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--tblr-border-color); }
.tl li:last-child::before { display: none; }
.tl li .d { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #8a2b62; }

/* Sign-in (layout after 21st.dev "Split Sign In Form") */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: #fff; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(1.5rem, 6vw, 6rem); }
.auth-form .inner { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-side { position: relative; margin: 14px; border-radius: 22px; overflow: hidden; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 80% at 100% 0%, #b0447f 0%, transparent 60%), radial-gradient(90% 70% at 0% 100%, #4a1236 0%, transparent 60%), #8a2b62; }
.auth-side .grid-bg { position: absolute; inset: 0; opacity: .12; background:
  linear-gradient(90deg, #fff 1px, transparent 1px) 0 0/44px 44px, linear-gradient(#fff 1px, transparent 1px) 0 0/44px 44px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); }
.auth-side > * { position: relative; }
.auth-card { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 1.25rem; backdrop-filter: blur(6px); }
.auth-stat { font-size: 1.6rem; font-weight: 700; }
.auth .form-control { padding: .7rem .85rem; border-radius: 10px; }
.auth .btn-primary { padding: .75rem; border-radius: 10px; font-weight: 600; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* Public page */
.pub-hero { background: linear-gradient(160deg, #8a2b62, #5e1c45); color: #fff; padding: 1.5rem 1.25rem 3.5rem; }
.pub-card { margin: -2.5rem 1rem 1rem; }
.verified-badge { display: inline-flex; align-items: center; gap: .35rem; background: rgba(255,255,255,.16); border-radius: 999px; padding: .25rem .7rem; font-size: .78rem; }

/* Design index */
.shot { border: 1px solid var(--tblr-border-color); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s; display: block; color: inherit; text-decoration: none; }
.shot:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); transform: translateY(-2px); color: inherit; }
.shot .top { height: 120px; display: grid; place-items: center; font-size: 2.6rem; color: #8a2b62; background: #f6eaf1; }

/* ---- Live app (phone pages) ---- */
body.m-app { background: #e9e4e8; }
body.m-app .phone { width: 100%; max-width: 480px; min-height: 100vh; margin: 0 auto; border-radius: 0; box-shadow: 0 0 30px rgba(0,0,0,.08); }
body.m-app .m-bottom { position: sticky; bottom: 0; z-index: 5; padding-bottom: env(safe-area-inset-bottom); }
.m-bottom .m-out { flex: 1; border: 0; background: none; font-size: .7rem; color: #6b7280; padding: .55rem 0 .65rem; }
.m-bottom .m-out .ti { display: block; font-size: 1.35rem; margin-bottom: 2px; }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf-msg { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); z-index: 2; }
.viewfinder .frame, .viewfinder .laser, .vf-tools { z-index: 3; }
.viewfinder .laser[hidden] { display: none; }
.photo-input { position: relative; }
.photo-input input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-input img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.form-label.required::after { content: " *"; color: #d63939; }
.pub-wrap { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f6f7fb; }
#formBadge:empty { display: none; }
