@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{
  --primary:#4A8AC7; --primary-d:#3a6fa3; --primary-50:#e8f2fc; --accent:#6db3e3; --accent-l:#9ecaef;
  --bg:#f8fafc; --card:#ffffff; --line:#e2e8f0; --text:#1e293b; --muted:#64748b; --grey:#94a3b8;
  --green:#16a34a; --amber:#d97706; --red:#dc2626; --purple:#7c3aed;
  --shadow:none;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter',system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
::-webkit-scrollbar{width:7px;height:7px}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}::-webkit-scrollbar-track{background:transparent}
.app{display:flex;min-height:100vh}
.sidebar{width:256px;background:#fff;border-right:1px solid var(--line);position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;z-index:20}
.brand{display:flex;align-items:center;gap:10px;padding:20px 22px 16px}
.brand .logo{width:32px;height:32px;border-radius:9px;background:linear-gradient(135deg,var(--primary),var(--accent-l));display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:16px}
.brand b{font-size:16px}.brand small{display:block;color:var(--muted);font-size:11px;font-weight:500;margin-top:-2px}
.nav{overflow-y:auto;padding:6px 12px 20px;flex:1}
.nav .grp{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--grey);font-weight:700;padding:14px 12px 6px}
.nav a{display:flex;align-items:center;gap:11px;padding:8px 12px;border-radius:9px;color:#475569;font-weight:500;font-size:13px;cursor:pointer;margin-bottom:2px}
.nav a svg{width:17px;height:17px;flex:0 0 17px;opacity:.9}
.nav a:hover{background:#f1f5f9;color:var(--text)}
.nav a.active{background:var(--primary-50);color:var(--primary);font-weight:600}
.nav a.active svg{opacity:1}
.nav a .badge{margin-left:auto;background:#f1f5f9;color:var(--muted);font-size:10px;font-weight:700;border-radius:20px;padding:1px 7px}
.nav a.active .badge{background:#fff;color:var(--primary)}
.main{margin-left:256px;flex:1;display:flex;flex-direction:column;min-width:0}
.topbar{height:60px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;padding:0 22px;position:sticky;top:0;z-index:10}
.evt-sel{display:flex;align-items:center;gap:9px;background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:7px 13px;font-weight:600}
.evt-sel .dot{width:8px;height:8px;border-radius:50%;background:var(--green)}
.evt-sel small{color:var(--muted);font-weight:500}
.topbar .spacer{flex:1}
.pill{background:var(--primary-50);border-radius:20px;padding:5px 13px;font-size:12px;font-weight:600;color:var(--primary)}
.avatar{width:36px;height:36px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.content{padding:26px 28px;max-width:1240px}
.page-h{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px}
.page-h h1{font-size:22px;font-weight:700;letter-spacing:-.01em}
.page-h p{color:var(--muted);font-size:13px;margin-top:3px}
.btn{display:inline-flex;align-items:center;gap:7px;background:var(--primary);color:#fff;border:none;border-radius:9px;padding:9px 16px;font-size:13px;font-weight:600;cursor:pointer;transition:background .15s}
.btn:hover{background:var(--primary-d)}
.btn.ghost{background:#fff;color:#475569;border:1px solid var(--line)}
.btn.ghost:hover{background:#f1f5f9}
.btn.sm{padding:7px 12px;font-size:12px}
.btn svg{width:15px;height:15px}
.grid{display:grid;gap:18px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px}
.card .ch{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.card .ch h3{font-size:14.5px;font-weight:700}.card .ch a{font-size:12px;color:var(--primary);font-weight:600}
.card .ch a.btn{color:#fff;font-size:12px}.card .ch a.btn.ghost{color:#475569}
.card .cb{padding:18px 20px}
.kpis{grid-template-columns:repeat(4,1fr)}
.kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px 20px}
.kpi .ic{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;margin-bottom:12px;color:#fff;font-size:17px;font-weight:700}
.kpi .v{font-size:24px;font-weight:800;letter-spacing:-.02em}
.kpi .l{color:var(--muted);font-size:12.5px;margin-top:2px}
.kpi .t{font-size:11.5px;font-weight:700;margin-top:8px;display:inline-flex;align-items:center;gap:3px}
.t.up{color:var(--green)}.t.dn{color:var(--red)}
table{width:100%;border-collapse:collapse}
th{text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--grey);font-weight:700;padding:11px 16px;border-bottom:1px solid var(--line)}
td{padding:13px 16px;border-bottom:1px solid #f1f5f9;font-size:13px;vertical-align:middle}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:#f8fafc}
.tag{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:3px 10px;border-radius:20px}
.tag::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.9}
.tag.green{color:#15803d;background:#dcfce7}.tag.amber{color:#b45309;background:#fef3c7}
.tag.red{color:#b91c1c;background:#fee2e2}.tag.blue{color:#2563eb;background:#dbeafe}
.tag.purple{color:#6d28d9;background:#ede9fe}.tag.grey{color:#475569;background:#f1f5f9}
.tag.cyan{color:#0e7490;background:#cffafe}
.avatar-sm{width:30px;height:30px;border-radius:8px;background:var(--primary-50);color:var(--primary);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:11px;margin-right:9px}
.company{display:flex;align-items:center}
.muted{color:var(--muted)}
.hr{height:1px;background:var(--line);margin:18px 0}
.prog{height:8px;background:#eef2f7;border-radius:20px;overflow:hidden}.prog i{display:block;height:100%;border-radius:20px}
.blk{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #f1f5f9}.blk:last-child{border:none}
.blk b{font-weight:600}.blk small{color:var(--muted)}
.two{grid-template-columns:1fr 1fr}.three{grid-template-columns:repeat(3,1fr)}
.bar-row{margin-bottom:15px}.bar-row .t{display:flex;justify-content:space-between;font-size:13px;margin-bottom:6px}
.timeline .ti{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid #f1f5f9}.timeline .ti:last-child{border:none}
.dotline{display:flex;flex-direction:column;align-items:center}
.dotline .d{width:10px;height:10px;border-radius:50%;border:2px solid var(--primary);margin-top:4px}
.dotline .ln{flex:1;width:2px;background:var(--line);margin:3px 0}
.field{margin-bottom:15px}
.field label{display:block;font-size:12px;font-weight:600;margin-bottom:6px;color:#475569}
.field input,.field select,.field textarea{width:100%;border:1px solid var(--line);border-radius:11px;padding:10px 12px;font-size:13px;background:#f8fafc;transition:.15s;font-family:inherit;color:var(--ink)}
.field textarea{resize:vertical;min-height:80px;line-height:1.5}
.field input::placeholder,.field textarea::placeholder{color:#9aa7b6}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px rgba(74,138,199,.15)}
.field input[type=color]{padding:3px;height:40px;cursor:pointer}
.field input[type=checkbox]{width:auto}

/* App-wide baseline: every bare text input / select / textarea gets the same
   rounded, padded look as .field inputs — no more square browser-default boxes.
   Specialised widgets (checkbox, radio, color, range, file, multiselect, editor)
   are intentionally excluded below. */
.content input[type=text],.content input[type=email],.content input[type=number],
.content input[type=search],.content input[type=tel],.content input[type=url],
.content input[type=password],.content input[type=date],.content input[type=datetime-local],
.content input[type=time],.content input:not([type]),.content select,.content textarea{
  border:1px solid var(--line);border-radius:10px;padding:9px 12px;font-size:13px;
  background:#f8fafc;transition:.15s;font-family:inherit;color:var(--ink);max-width:100%}
.content textarea{resize:vertical;line-height:1.5}
.content input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]):focus,
.content select:focus,.content textarea:focus{outline:none;border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px rgba(74,138,199,.15)}
.content input::placeholder,.content textarea::placeholder{color:#9aa7b6}
/* leave component-internal inputs alone */
.content .ms input,.content .ejs-holder input,.content .ejs-holder textarea,.content .ce-block input{
  border:0;background:transparent;border-radius:0;box-shadow:none;padding:initial}

/* consistent file uploads everywhere (replaces ugly native "Choose File") */
input[type=file]{width:100%;border:1px solid var(--line);border-radius:11px;padding:7px 10px;font-size:13px;background:#f8fafc;color:#64748b;cursor:pointer;font-family:inherit;transition:.15s}
input[type=file]:focus{outline:none;border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px rgba(74,138,199,.15)}
input[type=file]::file-selector-button{background:var(--primary);color:#fff;border:0;border-radius:8px;padding:7px 14px;font-size:12.5px;font-weight:600;cursor:pointer;margin-right:12px;font-family:inherit;transition:background .15s}
input[type=file]::file-selector-button:hover{background:var(--primary-d)}
input[type=file]::-webkit-file-upload-button{background:var(--primary);color:#fff;border:0;border-radius:8px;padding:7px 14px;font-size:12.5px;font-weight:600;cursor:pointer;margin-right:12px;font-family:inherit}
.floor-wrap{display:grid;grid-template-columns:1fr 300px;gap:18px}
.legend{display:flex;flex-wrap:wrap;gap:7px 16px;margin-bottom:14px}
.legend span{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);font-weight:500}
.legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.booth{cursor:pointer;transition:opacity .12s}.booth:hover{opacity:.8}
.booth text{pointer-events:none;font-size:8px;font-weight:700;fill:#fff}
.booth.sel rect{stroke:#0f172a;stroke-width:2.4}
.detail .row{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #f1f5f9;font-size:13px}
.detail .row:last-child{border:none}
.seg{display:flex;background:#f1f5f9;border-radius:10px;padding:3px;gap:3px;margin-bottom:18px;width:fit-content}
.seg button{border:none;background:none;padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.seg button.on{background:#fff;color:var(--primary)}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.5);display:none;align-items:flex-start;justify-content:center;z-index:50;padding:64px 16px}
.modal.open{display:flex}
.modal-box{background:#fff;border-radius:16px;width:100%;max-width:580px;box-shadow:0 24px 64px rgba(0,0,0,.28);animation:fadeIn .15s ease}
.modal-h{padding:16px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.modal-h h3{font-size:15px;font-weight:700}
.modal-h .x{cursor:pointer;color:var(--muted);font-size:22px;line-height:1}
.modal-search{padding:16px 20px}
.modal-results{max-height:54vh;overflow:auto;border-top:1px solid var(--line);border-radius:0 0 16px 16px}
.modal-row{display:flex;align-items:center;gap:12px;padding:11px 20px;border-bottom:1px solid #f1f5f9}
.modal-row:last-child{border-bottom:none}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.view{display:block}
@media(max-width:920px){.kpis{grid-template-columns:repeat(2,1fr)}.floor-wrap,.two,.three{grid-template-columns:1fr}.sidebar{display:none}.main{margin-left:0}}
/* header event dropdown */
.evt-dd{position:relative}
.evt-menu{position:absolute;top:48px;left:0;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 38px rgba(20,50,90,.16);min-width:300px;padding:6px;display:none;z-index:40}
.evt-menu.open{display:block}
.evt-menu a{display:block;padding:9px 12px;border-radius:9px;font-size:13px;color:#475569}
.evt-menu a:hover{background:#f1f5f9}
.evt-menu a.active{background:var(--primary-50);color:var(--primary);font-weight:600}
.evt-menu .div{height:1px;background:var(--line);margin:6px 4px}
/* multiselect */
.ms{display:flex;flex-wrap:wrap;gap:6px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:7px 10px;background:#f8fafc;cursor:text;min-height:44px}
.ms:focus-within{border-color:var(--primary);background:#fff;box-shadow:0 0 0 3px rgba(74,138,199,.15)}
.ms input{border:none;background:transparent;outline:none;flex:1;min-width:140px;font-size:13px;padding:3px}
.ms-chip{display:inline-flex;align-items:center;gap:6px;background:var(--primary-50);color:var(--primary);border-radius:8px;padding:4px 9px;font-size:12.5px;font-weight:600}
.ms-chip .x{cursor:pointer;opacity:.65;font-size:14px}.ms-chip .x:hover{opacity:1}
.ms-drop{position:absolute;top:100%;left:0;right:0;margin-top:4px;background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 12px 30px rgba(20,50,90,.14);padding:6px;display:none;z-index:30;max-height:240px;overflow:auto}
.ms-drop.open{display:block}
.ms-drop a{display:block;padding:8px 10px;border-radius:8px;font-size:13px;cursor:pointer}
.ms-drop a:hover{background:#f1f5f9}
.form-err{background:#fee2e2;color:#b91c1c;border-radius:11px;padding:11px 14px;font-weight:600;font-size:13px;margin-bottom:14px}
/* styled file upload — compact, same height as inputs for consistent rows */
.filebox{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:11px;padding:6px 10px;background:#f8fafc;cursor:pointer;transition:.15s;min-height:42px}
.filebox:hover{border-color:var(--primary);background:#fff}
.filebox input[type=file]{display:none}
.filebox .fb-ic{width:28px;height:28px;border-radius:8px;background:var(--primary-50);color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:14px;flex:0 0 28px}
.filebox .fb-ic svg{width:15px;height:15px}
.filebox .fb-t{font-size:13px;font-weight:600;color:#475569;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.filebox .fb-s{font-size:11px;color:var(--muted);margin-top:0;line-height:1.2}
