﻿/* INDIANMARK EXPO — Event Management. Corporate, app-like UI: sidebar on desktop,
   off-canvas drawer on phones. No external fonts or frameworks (works on an offline LAN). */
:root {
  --brand: #1f5f99; --brand-600: #174c7c; --brand-50: #eaf2fa;
  --side: #0f2a44; --side-2: #163a5c; --side-ink: #c9d6e3;
  --ink: #17212b; --muted: #5d6b7a; --line: #dfe5ec; --bg: #f3f5f8; --card: #fff;
  --ok: #157347; --ok-50: #e7f5ee; --warn: #b76e00; --warn-50: #fff4e0; --err: #b42318; --err-50: #fdecea;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
  --sidebar-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--brand); }
h1 { font-size: 1.35rem; margin: 0 0 12px; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
h3 { font-size: .95rem; margin: 16px 0 8px; }
code { background: #eef2f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── shell ───────────────────────────────────────────────────────── */
.nav-toggle { display: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; }
.sb-brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 14px; }
.sb-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #2f7fc4, #1f5f99); color: #fff; font-weight: 800; display: grid; place-items: center; letter-spacing: .02em; }
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sb-brand-text b { color: #fff; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-brand-text small { font-size: .75rem; opacity: .75; }
.sb-event { margin: 0 12px 10px; padding: 10px 12px; border-radius: 10px; background: var(--side-2); color: #fff; text-decoration: none; display: grid; grid-template-columns: 1fr auto; align-items: center; }
.sb-event small { grid-column: 1; font-size: .72rem; color: var(--side-ink); text-transform: uppercase; letter-spacing: .06em; }
.sb-event b { grid-column: 1; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-event svg { grid-column: 2; grid-row: 1 / span 2; opacity: .7; }
.sb-event:hover { background: #1d4670; }
.sb-nav { flex: 1; padding: 4px 8px 12px; }
.sb-group { margin-top: 10px; }
.sb-group-title { display: block; padding: 6px 10px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #7f97ad; }
.sb-nav a { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: .92rem; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-nav a.active { background: var(--brand); color: #fff; font-weight: 600; }
.sb-foot { padding: 12px 18px; font-size: .7rem; letter-spacing: .08em; color: #6d8499; }
.scrim { display: none; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--line); }
.appbar-title { font-size: 1.1rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }
.user-name { font-size: .9rem; color: var(--muted); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.hamburger { display: none; }
.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 35; }
  .main { margin-left: 0; }
  .hamburger { display: grid; }
  .user-name { display: none; }
  .appbar { padding: 0 10px; height: 56px; }
  .page { padding: 14px 12px 28px; }
}

/* ── building blocks ─────────────────────────────────────────────── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.card.notice { border-left: 4px solid var(--brand); }
.card-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.head-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile .n { font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.tile span:last-child { color: var(--muted); font-size: .88rem; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #eef2f6; color: var(--muted); }
.badge.ok { background: var(--ok-50); color: var(--ok); }
.badge.warn { background: var(--warn-50); color: var(--warn); }
.badge.err { background: var(--err-50); color: var(--err); }
.badge.brand { background: var(--brand-50); color: var(--brand); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.split-wide { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .split, .split-wide { grid-template-columns: 1fr; } }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
.grid th, .grid td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: #fafbfc; }
.grid tr:hover td { background: #fafcff; }
.grid input.link { width: 100%; min-width: 220px; font: inherit; font-size: .85rem; padding: 5px 7px; border: 1px solid var(--line); border-radius: 6px; }
.grid .num { text-align: right; font-variant-numeric: tabular-nums; }
.grid .actions-cell { white-space: nowrap; text-align: right; }
.pager { display: flex; gap: 6px; justify-content: flex-end; align-items: center; margin-top: 12px; font-size: .9rem; }
.pager a, .pager span { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); text-decoration: none; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* lists (mobile-friendly rows) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .sub { color: var(--muted); font-size: .85rem; }
.event-list { list-style: none; padding: 0; margin: 0; }
.event-list li a { display: block; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; text-decoration: none; color: var(--ink); background: #fff; }
.event-list li a:hover { border-color: var(--brand); }
.event-list .muted { display: block; font-size: .85rem; }

/* forms */
.fld { margin-bottom: 14px; }
.fld label, .fld legend, .fld .label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .9rem; }
.fld fieldset { border: 0; padding: 0; margin: 0; }
.fld input:not([type=radio]):not([type=checkbox]):not([type=submit]):not([type=color]), .fld select, .fld textarea {
  width: 100%; font: inherit; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
.fld textarea { min-height: 90px; resize: vertical; }
.fld input[type=color] { width: 56px; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.fld .opt { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; }
.fld .help { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.fld .err { color: var(--err); font-size: .85rem; margin-top: 3px; }
.fld.has-error input, .fld.has-error select { border-color: var(--err); }
.fld[hidden] { display: none; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 8px 0; }
.check input { width: 18px; height: 18px; }
.req { color: var(--err); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; width: 100%; padding: 11px 16px; font: inherit; font-weight: 700; color: #fff; background: var(--brand);
       border: 1px solid var(--brand); border-radius: 9px; cursor: pointer; text-align: center; text-decoration: none; }
.btn:hover { background: var(--brand-600); }
.btn-inline, .btn-small, .page-head .btn, .card-head .btn, .form-actions .btn { width: auto; }
.btn-small { padding: 6px 11px; font-size: .84rem; border-radius: 7px; }
.btn-outline { background: #fff; color: var(--brand); }
.btn-outline:hover { background: var(--brand-50); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-danger { background: #fff; color: var(--err); border-color: #f1b8b2; }
.btn-danger:hover { background: var(--err-50); }
.btn:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: default; }

.msg { background: var(--brand-50); border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; }
.msg-ok { background: var(--ok-50); color: var(--ok); }
.msg-err { background: var(--err-50); color: var(--err); }
.fineprint { color: var(--muted); font-size: .8rem; }

/* login */
.login-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 16px; background: linear-gradient(160deg, #0f2a44 0%, #1f5f99 55%, #f3f5f8 55.1%); }
.login { width: 100%; max-width: 400px; }
.login .sb-mark { margin-bottom: 12px; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-size: .78rem; margin: 0; }

/* charts (pure CSS bars) */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bars .bar { flex: 1 0 18px; min-width: 18px; max-width: 56px; background: linear-gradient(180deg, #3b8ad0, var(--brand)); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--muted); }
.bar-labels { display: flex; gap: 6px; overflow-x: auto; }
.bar-labels span { flex: 1 0 18px; min-width: 18px; max-width: 56px; font-size: .65rem; color: var(--muted); text-align: center; }
.hbar { height: 8px; border-radius: 4px; background: var(--brand-50); overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--brand); }

/* scanner */
.scanner { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .scanner { grid-template-columns: 1fr 1fr; } .scanner .result, .scanner .print-frame { grid-column: 2; grid-row: 1 / span 2; } }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; display: flex; gap: 6px; align-items: center; font-weight: 600; }
.video-wrap { position: relative; background: #000; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; margin-bottom: 10px; }
.video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.aim { position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.75); border-radius: 14px; pointer-events: none; }
.cam-buttons { display: flex; gap: 8px; margin-bottom: 12px; }
.cam-buttons select { flex: 1; font: inherit; border-radius: 9px; border: 1px solid var(--line); }
.manual label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.manual input { width: 100%; font: 1rem Consolas, monospace; padding: 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; }
.result { border-left: 8px solid var(--line); }
.result.ok { border-left-color: var(--ok); }
.result.warn { border-left-color: var(--warn); }
.result.bad { border-left-color: var(--err); background: #fff8f7; }
.result-status { font-size: 1.3rem; font-weight: 800; }
.result.ok .result-status { color: var(--ok); }
.result.warn .result-status { color: var(--warn); }
.result.bad .result-status { color: var(--err); }
.result-name { font-size: 1.45rem; font-weight: 700; margin-top: 6px; }
.result-sub, .result-meta { color: var(--muted); }
.result .btn { margin-top: 12px; }
.print-frame { width: 100%; height: 440px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-top: 12px; }

/* form builder */
.field-row { display: flex; gap: 10px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.field-row.off { opacity: .5; }
.field-row .grow { flex: 1; min-width: 0; }
.field-row .key { font-family: Consolas, monospace; font-size: .8rem; color: var(--muted); }
.field-row .tools { display: flex; gap: 4px; }
.field-row.selected { background: var(--brand-50); border-radius: 8px; }
.preview-frame { width: 100%; min-height: 560px; border: 1px solid var(--line); border-radius: 10px; background: #e9edf2; }

@media print {
  .sidebar, .appbar, .no-print, .scrim { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
/* compact editors inside tables (print layout lines) */
.grid td select, .grid td input[type=text], .grid td input:not([type]) { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .88rem; background: #fff; }
.grid td select { max-width: 170px; }
.grid td input[type=text], .grid td input:not([type]) { width: 60px; }
.grid td:first-child { white-space: nowrap; }

/* shared additions: search row, key/value rows, button rows, invitation canvas, exhibitor / platform accents */
.search-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.search-row input[type=text], .search-row input:not([type]) { flex: 1 1 240px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.search-row select { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv b { text-align: right; word-break: break-word; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sub.pre { white-space: pre-line; }
.list li.off { opacity: .55; }
.invite-canvas { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 2px 10px rgba(16,24,40,.18); }
body.exhibitor { --brand: #166534; --brand-50: #e8f5ec; --side: #0b2a17; --side-2: #14432a; }
body.platform { --brand: #4338ca; --brand-50: #eef0fd; --side: #1b1f3b; --side-2: #2b3064; }
input.link { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .88rem; background: #f8fafc; }
/* uploaded logos */
.sb-mark.sb-logo { width: auto; min-width: 36px; max-width: 120px; padding: 3px 5px; background: #fff; }
.sb-logo img { display: block; max-height: 30px; max-width: 110px; object-fit: contain; }
.login .login-logo { display: block; max-height: 64px; max-width: 220px; object-fit: contain; margin-bottom: 12px; }
.logo-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 14px; margin: 10px 0 14px;
  border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.logo-preview img { max-height: 96px; max-width: 100%; object-fit: contain; }
