:root { --sidebar: #111827; --primary: #4f46e5; --surface: #fff; --canvas: #f4f6fa; --text: #172033; --muted: #667085; }
* { box-sizing: border-box; }
body { background: var(--canvas); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.sidebar { background: linear-gradient(180deg, #111827 0%, #172033 100%); color: #fff; display: flex; flex-direction: column; height: 100vh; left: 0; position: fixed; top: 0; width: 260px; z-index: 1040; }
.sidebar-brand { align-items: center; display: flex; font-size: 1.25rem; font-weight: 700; gap: .75rem; height: 80px; padding: 0 1.5rem; }
.brand-icon, .login-brand { align-items: center; background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 12px; display: inline-flex; justify-content: center; }
.brand-icon { height: 42px; width: 42px; }
.sidebar-nav { padding: 1rem; }
.nav-item { align-items: center; background: transparent; border-radius: 10px; color: #aab3c4; display: flex; gap: .9rem; margin-bottom: .35rem; padding: .85rem 1rem; text-align: left; text-decoration: none; transition: .2s ease; }
.nav-item:hover, .nav-item.active { background: rgba(99, 102, 241, .18); color: #fff; transform: translateX(3px); }
.nav-item.active { box-shadow: inset 3px 0 #818cf8; }
.sidebar-logout { margin-top: auto; padding: 1rem; }
.sidebar-logout .nav-item { color: #fca5a5; }
.app-shell { margin-left: 260px; min-height: 100vh; }
.topbar { align-items: center; background: rgba(255,255,255,.92); border-bottom: 1px solid #e8ebf1; display: flex; height: 80px; padding: 0 2rem; position: sticky; top: 0; backdrop-filter: blur(12px); z-index: 1020; }
.topbar-title { font-size: 1rem; font-weight: 700; }.topbar-subtitle { color: var(--muted); font-size: .75rem; }
.admin-chip { align-items: center; display: flex; gap: .65rem; }.admin-chip small, .admin-chip strong { display: block; }.admin-chip small { color: var(--muted); font-size: .7rem; }.admin-avatar { align-items: center; background: #eef2ff; border-radius: 50%; color: var(--primary); display: flex; height: 40px; justify-content: center; width: 40px; }
.content-area { margin: 0 auto; max-width: 1500px; padding: 2rem; }
.page-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 1.75rem; gap: 1rem; }.page-heading h1 { font-size: 1.8rem; font-weight: 750; margin: 0 0 .3rem; }.page-heading p { color: var(--muted); margin: 0; }.eyebrow { color: var(--primary)!important; font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin-bottom: .45rem!important; text-transform: uppercase; }
.panel, .metric-card { background: var(--surface); border: 1px solid #e9ecf2; border-radius: 16px; box-shadow: 0 6px 24px rgba(16,24,40,.045); }
.metric-card { align-items: center; display: flex; gap: 1rem; padding: 1.35rem; transition: .2s ease; }.metric-card:hover { box-shadow: 0 12px 30px rgba(16,24,40,.09); transform: translateY(-2px); }.metric-card p { color: var(--muted); font-size: .83rem; margin: 0 0 .3rem; }.metric-card h2 { font-size: 1.65rem; font-weight: 750; margin: 0; }
.metric-card h2.metric-date { font-size: 1rem; line-height: 1.35; }
.metric-icon, .quick-action > span { align-items: center; border-radius: 12px; display: flex; flex: 0 0 auto; height: 48px; justify-content: center; width: 48px; }.blue { background: #e8f1ff; color: #2563eb; }.violet { background: #f0eaff; color: #7c3aed; }.green { background: #e8f8ef; color: #16a34a; }.orange { background: #fff1e5; color: #ea580c; }
.panel { padding: 1.5rem; }.panel-heading { align-items: center; border-bottom: 1px solid #edf0f5; display: flex; justify-content: space-between; margin-bottom: .5rem; padding-bottom: 1.15rem; }.panel-heading h3, .results-heading h3 { font-size: 1rem; font-weight: 750; margin: 0 0 .25rem; }.panel-heading p, .results-heading p { color: var(--muted); font-size: .8rem; margin: 0; }
.status-list > div { align-items: center; border-bottom: 1px solid #f0f2f6; display: flex; justify-content: space-between; padding: 1rem .25rem; }.status-list > div:last-child { border: 0; }.status-list span i { color: #818cf8; margin-right: .65rem; }.status-list strong { font-size: .85rem; }
.quick-action { align-items: center; background: transparent; border: 0; border-bottom: 1px solid #f0f2f6; color: var(--text); display: flex; gap: .85rem; padding: .85rem 0; text-align: left; text-decoration: none; width: 100%; }.quick-action:last-child { border: 0; }.quick-action:hover { color: var(--primary); }.quick-action strong, .quick-action small { display: block; }.quick-action small { color: var(--muted); font-size: .75rem; margin-top: .15rem; }.quick-action > span { height: 42px; width: 42px; }
.activity-item { align-items: center; border-bottom: 1px solid #f0f2f6; display: flex; gap: .85rem; padding: .85rem .25rem; }.activity-item:last-child { border-bottom: 0; }.activity-icon { align-items: center; background: #eef2ff; border-radius: 10px; color: var(--primary); display: flex; flex: 0 0 auto; height: 38px; justify-content: center; width: 38px; }.activity-item div { min-width: 0; }.activity-item strong, .activity-item small { display: block; }.activity-item strong { font-size: .82rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.activity-item small { color: var(--muted); font-size: .7rem; margin-top: .2rem; }.activity-empty { align-items: center; color: var(--muted); display: flex; flex-direction: column; gap: .5rem; justify-content: center; min-height: 180px; }.activity-empty i { color: #a5b4fc; font-size: 1.6rem; }
.event-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }.event-card { display: flex; flex-direction: column; }.event-card-heading { align-items: center; display: flex; gap: .85rem; }.event-card-heading h3 { font-size: 1rem; font-weight: 750; margin: 0 0 .2rem; }.event-card-heading p, .event-description { color: var(--muted); font-size: .78rem; margin: 0; }.event-description { margin-top: 1rem; min-height: 2.4em; }.event-stats { border-bottom: 1px solid #edf0f5; border-top: 1px solid #edf0f5; display: flex; gap: 1.5rem; margin-top: 1rem; padding: .8rem 0; }.event-stats span { color: var(--muted); font-size: .75rem; }.event-stats strong { color: var(--text); margin-right: .2rem; }
.public-search-body { background: radial-gradient(circle at 50% 0, #eef2ff 0, transparent 34%), var(--canvas); min-height: 100vh; overflow-x: hidden; }.public-header { align-items: center; background: rgba(255,255,255,.92); border-bottom: 1px solid #e8ebf1; display: flex; justify-content: center; padding: .85rem 1rem; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }.public-brand { align-items: center; color: var(--text); display: flex; gap: .65rem; text-decoration: none; }.public-brand .brand-icon { color: #fff; height: 40px; width: 40px; }.public-search-shell { margin: 0 auto; max-width: 1050px; min-width: 0; overflow-x: clip; padding: 2.25rem 1.25rem 4rem; width: 100%; }.public-hero { margin: 0 auto 1.75rem; max-width: 720px; min-width: 0; text-align: center; }.public-hero-icon { align-items: center; background: #eef2ff; border-radius: 50%; color: var(--primary); display: inline-flex; font-size: 1.25rem; height: 48px; justify-content: center; margin-bottom: .8rem; width: 48px; }.public-hero h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 800; letter-spacing: -.035em; margin: 0 0 .65rem; overflow-wrap: anywhere; }.public-hero > p:last-child { color: var(--muted); font-size: 1rem; line-height: 1.65; margin: 0 auto; max-width: 650px; }.public-workflow { display: grid; gap: 1rem; margin: 0 auto; max-width: 760px; min-width: 0; width: 100%; }.public-step-card { min-width: 0; padding: 1.25rem; width: 100%; }.public-step-heading { align-items: center; display: flex; gap: .8rem; margin-bottom: 1rem; min-width: 0; }.public-step-heading > span { align-items: center; background: var(--primary); border-radius: 50%; color: #fff; display: flex; flex: 0 0 auto; font-size: .75rem; font-weight: 800; height: 30px; justify-content: center; width: 30px; }.public-step-heading > div { min-width: 0; }.public-step-heading h2 { font-size: 1rem; font-weight: 750; margin: 0 0 .15rem; }.public-step-heading p { color: var(--muted); font-size: .76rem; margin: 0; }.event-choice { align-items: center; background: #f8f9ff; border: 1px solid #dfe3ff; border-radius: 12px; color: var(--primary); display: flex; gap: .8rem; margin-top: .75rem; min-width: 0; padding: .7rem .8rem; }.event-choice > div { min-width: 0; }.event-choice strong, .event-choice small { display: block; overflow-wrap: anywhere; }.event-choice strong { color: var(--text); font-size: .86rem; }.event-choice small { color: var(--muted); font-size: .72rem; margin-top: .15rem; }.event-choice-dot { margin: 0 .4rem; }.public-inline-empty { align-items: center; color: var(--muted); display: flex; font-size: .8rem; gap: .5rem; margin-top: .75rem; }.public-source-card { align-items: center; background: #fff; border: 1px solid #dfe3eb; border-radius: 14px; color: var(--text); cursor: pointer; display: flex; flex-direction: column; height: 100%; justify-content: center; min-height: 135px; min-width: 0; padding: 1.1rem; text-align: center; transition: .2s; width: 100%; }.public-source-card:hover, .public-source-card.dragging { background: #f8f9ff; border-color: #818cf8; box-shadow: 0 8px 20px rgba(79,70,229,.08); transform: translateY(-2px); }.public-source-card strong, .public-source-card small { display: block; }.public-source-card small { color: var(--muted); font-size: .72rem; margin-top: .2rem; }.public-source-icon { align-items: center; background: #e8f1ff; border-radius: 50%; color: #2563eb; display: flex; font-size: 1.2rem; height: 44px; justify-content: center; margin-bottom: .55rem; width: 44px; }.public-source-icon.violet { background: #f0eaff; color: #7c3aed; }.public-camera { background: #0f172a; border-radius: 16px; margin-top: 1rem; max-width: 100%; min-width: 0; overflow: hidden; padding: 1rem; }.public-camera > p { color: #cbd5e1; font-size: .76rem; margin: .75rem 0; text-align: center; }.public-photo-preview { align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; display: grid; gap: .8rem 1rem; grid-template-columns: 140px minmax(0, 1fr); margin-top: 1rem; min-width: 0; padding: .8rem; width: 100%; }.public-preview-frame { background: #e2e8f0; border-radius: 10px; grid-row: 1 / 3; height: 112px; min-width: 0; overflow: hidden; }.public-preview-frame img { display: block; height: 100%; object-fit: cover; width: 100%; }.public-preview-info { align-items: center; display: flex; gap: .65rem; min-width: 0; }.public-preview-info > span { color: #16a34a; flex: 0 0 auto; font-size: 1.25rem; }.public-preview-info > div { min-width: 0; }.public-preview-info strong, .public-preview-info small { display: block; overflow-wrap: anywhere; }.public-preview-info strong { line-height: 1.25; }.public-preview-info small { color: var(--muted); font-size: .72rem; margin-top: .15rem; }.public-photo-preview > .d-flex { min-width: 0; }.public-photo-preview .btn { white-space: nowrap; }.public-search-button { justify-self: stretch; max-width: 100%; min-height: 54px; width: 100%; }.public-results { margin-top: 2.5rem; min-width: 0; width: 100%; }.public-results .row { margin-left: 0; margin-right: 0; }.public-results .row > * { min-width: 0; }.public-results h2, .public-no-results h2 { font-size: 1.2rem; font-weight: 750; margin: 0 0 .25rem; }.public-no-results { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; margin-top: 2.5rem; padding: 3rem 1rem; text-align: center; }.public-no-results > span { align-items: center; background: #eef2ff; border-radius: 50%; color: var(--primary); display: inline-flex; font-size: 1.5rem; height: 60px; justify-content: center; margin-bottom: .8rem; width: 60px; }.public-no-results p { color: var(--muted); margin: 0; }
.upload-panel { padding: 2rem; }.upload-zone { align-items: center; border: 2px dashed #cfd5e1; border-radius: 14px; cursor: pointer; display: flex; justify-content: center; min-height: 330px; overflow: hidden; padding: 2rem; text-align: center; transition: .2s; }.upload-zone:hover, .upload-zone.dragging { background: #f8f9ff; border-color: #6366f1; }.upload-zone h3 { font-size: 1rem; margin: 1rem 0 .3rem; }.upload-zone p, .upload-zone small { color: var(--muted); }.upload-icon { align-items: center; background: #eef2ff; border-radius: 50%; color: var(--primary); display: inline-flex; font-size: 1.6rem; height: 64px; justify-content: center; width: 64px; }#preview { border-radius: 10px; display: none; max-height: 350px; max-width: 100%; object-fit: contain; }
.query-source-heading { align-items: center; display: flex; gap: 1rem; justify-content: space-between; margin-bottom: 1.25rem; }.query-source-heading h3 { font-size: 1rem; font-weight: 750; margin: 0 0 .25rem; }.query-source-heading p { color: var(--muted); font-size: .8rem; margin: 0; }.camera-panel { background: #0f172a; border-radius: 16px; padding: 1rem; }.camera-stage { border-radius: 12px; margin: 0 auto; max-width: 760px; overflow: hidden; position: relative; }.camera-stage video { display: block; max-height: 500px; object-fit: cover; transform: scaleX(-1); width: 100%; }.camera-guide { border: 2px dashed rgba(255,255,255,.7); border-radius: 48%; height: 68%; left: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); width: min(42%, 280px); }.camera-tip { color: #cbd5e1; font-size: .8rem; margin: .9rem 0; text-align: center; }.selected-query-actions { align-items: center; background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 10px; color: #166534; display: flex; justify-content: space-between; margin-top: 1rem; padding: .7rem 1rem; }
.results-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 1rem; }.result-card { background: #fff; border: 1px solid #e9ecf2; border-radius: 14px; overflow: hidden; transition: .2s; }.result-card:hover { box-shadow: 0 12px 28px rgba(16,24,40,.1); transform: translateY(-2px); }.result-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }.result-card div { padding: 1rem; }.result-card strong, .result-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.result-card span { color: var(--muted); font-size: .78rem; margin-top: .3rem; }
.rich-results-heading { border-bottom: 1px solid #e5e7eb; padding-bottom: 1rem; }.rich-result-card { background: #e5e7eb; border: 1px solid #e5e7eb; border-radius: 18px; box-shadow: 0 8px 24px rgba(15,23,42,.06); height: 100%; overflow: hidden; transition: .25s ease; }.rich-result-card:hover { box-shadow: 0 18px 40px rgba(15,23,42,.13); transform: translateY(-4px); }.rich-result-card img { aspect-ratio: 4/3; display: block; height: 100%; object-fit: cover; transition: transform .35s ease; width: 100%; }.rich-result-card:hover img { transform: scale(1.025); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }.detail-grid div { border-bottom: 1px solid #f0f2f6; padding: 1.1rem .5rem; }.detail-grid span, .detail-grid strong { display: block; }.detail-grid span { color: var(--muted); font-size: .78rem; margin-bottom: .35rem; }.detail-grid strong { font-size: .88rem; overflow-wrap: anywhere; }
.dataset-upload-zone { align-items: center; border: 2px dashed #cfd5e1; border-radius: 14px; cursor: pointer; display: flex; gap: 1rem; justify-content: center; min-height: 150px; padding: 1.5rem; text-align: left; transition: .2s; }.dataset-upload-zone:hover, .dataset-upload-zone.dragging { background: #f8f9ff; border-color: #6366f1; }.dataset-upload-zone strong, .dataset-upload-zone small { display: block; }.dataset-upload-zone small { color: var(--muted); margin-top: .25rem; }.dataset-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); padding-top: 1rem; }.dataset-card { border: 1px solid #e9ecf2; border-radius: 12px; overflow: hidden; }.dataset-card > img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }.dataset-card-body { align-items: center; display: flex; gap: .75rem; justify-content: space-between; padding: .8rem; }.dataset-card-body > div { min-width: 0; }.dataset-card-body strong, .dataset-card-body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.dataset-card-body strong { font-size: .82rem; }.dataset-card-body small { color: var(--muted); font-size: .7rem; margin-top: .2rem; }.empty-dataset { align-items: center; color: var(--muted); display: flex; flex-direction: column; gap: .4rem; padding: 3rem 1rem; text-align: center; }.empty-dataset i { color: #a5b4fc; font-size: 2rem; }.empty-dataset strong { color: var(--text); }
.setting-row { align-items: center; border-bottom: 1px solid #edf0f5; display: grid; gap: 2rem; grid-template-columns: 1fr 220px; padding: 1.25rem 0; }.setting-row label { font-weight: 700; }.setting-row p { color: var(--muted); font-size: .8rem; margin: .3rem 0 0; }
.btn-primary { background: var(--primary); border-color: var(--primary); }.btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.login-body { align-items: center; background: radial-gradient(circle at top left, #eef2ff, transparent 38%), #f6f7fb; display: flex; justify-content: center; min-height: 100vh; padding: 1.5rem; }.login-panel { background: #fff; border: 1px solid #e7eaf0; border-radius: 20px; box-shadow: 0 24px 70px rgba(30,41,59,.12); max-width: 430px; padding: 2.5rem; width: 100%; }.login-brand { color: #fff; font-size: 1.65rem; height: 58px; margin-bottom: 1.5rem; width: 58px; }.login-panel h1 { font-size: 1.7rem; font-weight: 750; }.login-panel .input-group-text { background: #f8f9fb; border-right: 0; color: #7c8494; }.login-panel .form-control { border-left: 0; }.login-footer { color: var(--muted); font-size: .75rem; margin: 1.5rem 0 0; text-align: center; }
@media (max-width: 991.98px) { .sidebar { box-shadow: 12px 0 35px rgba(2,6,23,.28); position: fixed; width: min(82vw, 300px); z-index: 1045; }.sidebar-brand { height: 72px; padding: 0 1.25rem; }.sidebar-nav { padding: .75rem; }.sidebar-logout { padding: .75rem; }.app-shell { margin-left: 0; }.content-area { padding: 1.25rem; }.topbar { height: 72px; padding: 0 1.25rem; gap: 1rem; }.offcanvas-backdrop { z-index: 1040; } }
@media (max-width: 575.98px) { .page-heading { align-items: stretch; flex-direction: column; }.admin-chip div { display: none; }.content-area { padding: 1rem; }.topbar { padding: 0 1rem; }.topbar-title { font-size: .9rem; }.topbar-subtitle { display: none; }.detail-grid { grid-template-columns: 1fr; }.setting-row { align-items: stretch; grid-template-columns: 1fr; gap: .75rem; }.login-panel { padding: 1.6rem; }.upload-panel { padding: 1rem; }.upload-zone { min-height: 260px; }.query-source-heading { align-items: stretch; flex-direction: column; }.selected-query-actions { align-items: stretch; flex-direction: column; gap: .6rem; }.camera-guide { width: 52%; } }
@media (max-width: 767.98px) { .public-search-shell { padding: 1.35rem .75rem 3rem; }.public-hero { margin-bottom: 1.15rem; }.public-hero h1 { font-size: 1.85rem; }.public-hero > p:last-child { font-size: .9rem; line-height: 1.5; }.public-step-card { padding: .9rem; }.public-photo-preview { grid-template-columns: 92px minmax(0, 1fr); }.public-preview-frame { height: 92px; }.public-photo-preview > .d-flex { grid-column: 1 / -1; }.public-photo-preview .btn { flex: 1 1 calc(50% - .25rem); }.public-results { margin-top: 1.75rem; }.public-results .results-heading { align-items: stretch; flex-direction: column; gap: .8rem; padding-left: .1rem; padding-right: .1rem; }.public-results .results-heading .btn { width: 100%; }.public-results .row { --bs-gutter-x: 0; --bs-gutter-y: 1rem; }.rich-result-card img { aspect-ratio: 4/3; } }
@media (max-width: 420px) { .public-header { padding: .65rem; }.public-brand .brand-icon { height: 36px; width: 36px; }.public-search-shell { padding-left: .6rem; padding-right: .6rem; }.public-step-heading { align-items: flex-start; }.public-photo-preview { gap: .7rem; grid-template-columns: 78px minmax(0, 1fr); padding: .65rem; }.public-preview-frame { height: 78px; }.public-preview-info > span { font-size: 1rem; }.public-preview-info strong { font-size: .86rem; }.public-preview-info small { font-size: .68rem; line-height: 1.3; }.public-photo-preview .btn { flex-basis: 100%; width: 100%; }.public-search-button { font-size: 1rem; }.event-choice-dot { margin: 0 .2rem; } }

.selected-event-bar { align-items: center; background: linear-gradient(135deg, #4f46e5, #6366f1); border-radius: 14px; box-shadow: 0 10px 24px rgba(79,70,229,.16); color: #fff; display: flex; gap: .8rem; padding: .8rem 1rem; }
.selected-event-icon { align-items: center; background: rgba(255,255,255,.16); border-radius: 10px; display: flex; flex: 0 0 auto; font-size: 1.05rem; height: 38px; justify-content: center; width: 38px; }
.selected-event-bar > div { align-items: baseline; display: flex; flex: 1; flex-wrap: wrap; gap: .15rem .55rem; min-width: 0; }
.selected-event-bar small { flex-basis: 100%; font-size: .65rem; opacity: .75; text-transform: uppercase; }
.selected-event-bar strong { font-size: .9rem; overflow-wrap: anywhere; }
.selected-event-bar > div > span { font-size: .72rem; opacity: .8; }
.selected-event-bar .btn { flex: 0 0 auto; }

/* Public portal width and responsive result gallery. */
.public-search-shell { max-width: 1320px; }
.public-workflow { max-width: 1180px; }
.public-result-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.public-result-grid .rich-result-card { height: 100%; min-width: 0; }
.public-result-grid .rich-result-card img { aspect-ratio: 4 / 3; display: block; height: 100%; object-fit: cover; width: 100%; }
@media (max-width: 1199.98px) { .public-result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .public-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .public-result-grid { gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
