/* Link4 Cam, link4cam.irrimate.com. The c2.link4cloud.com look (Yen, 2026-10-26: "similar to c2 ... The
   design would be similar"): white top bar, blue gradient page, white cards, orange site titles, muted blue
   row labels, pill tabs in a right hand panel, outlined Admin Settings buttons. Tokens from
   operations/client-fulfillment/engineering/pearl-simulator/public/css/theme.css, which took them from the
   console's own screenshots. */

:root {
  --l4-blue: #1877BD;
  --l4-blue-dark: #14639E;
  --l4-blue-soft: #E8F1F9;
  --l4-orange: #F0932B;
  --page-bg-top: #B2D1EA;
  --page-bg-bottom: #CFE3F3;
  --bar-bg: #FFFFFF;
  --card-bg: #FFFFFF;
  --card-radius: 5px;
  --card-shadow: 0 1px 3px rgba(16, 42, 67, 0.16);
  --card-shadow-hi: 0 3px 10px rgba(16, 42, 67, 0.22);
  --hairline: #E3E8ED;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --text: #333333;
  --heading: #2B3A47;
  --label: #4C7FA8;
  --muted: #6B7A89;
  --alarm: #E2574C;
  --alarm-bg: #FDECEB;
  --alarm-border: #EFA9A3;
  --ok: #2E8B57;
  --ok-bg: #E7F5EC;
  --warn: #B26A00;
  --warn-bg: #FFF4E0;
  --pill-bg: #E9ECEF;
  --pill-text: #3C4858;
  --dark-pill: #2C3E50;
  --offline: #AEB8C2;
  --topbar-h: 78px;
  --gutter: 34px;
  --panel-w: 400px;
  --input-border: #B9C3CC;
}

/* The console renders light only. A dark preference only dims the page so it is not glaring. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --page-bg-top: #8FB4D2; --page-bg-bottom: #A6C6DE; }
}
:root[data-theme="dark"] { --page-bg-top: #8FB4D2; --page-bg-bottom: #A6C6DE; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: linear-gradient(180deg, var(--page-bg-top) 0%, var(--page-bg-bottom) 55%) fixed;
  background-color: var(--page-bg-bottom);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--l4-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--l4-blue); outline-offset: 2px; border-radius: 3px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h); background: var(--bar-bg);
  display: flex; align-items: stretch; box-shadow: 0 1px 2px rgba(16, 42, 67, 0.12);
}
.brand {
  display: flex; flex-direction: column; justify-content: center; padding: 0 12px;
  border-right: 1px solid var(--hairline); min-width: 94px; color: inherit;
}
.brand:hover { text-decoration: none; }
.brand img { width: 70px; height: auto; display: block; }
.brand .cam-tag { font-size: 9px; font-weight: 700; letter-spacing: 0.12em; color: var(--l4-orange); margin-top: 2px; }
.brand .ver { font-size: 9px; color: var(--muted); }
.nav { display: flex; align-items: stretch; margin-left: 18px; }
.nav a {
  display: flex; align-items: center; padding: 0 20px; font-size: 16px; color: var(--heading);
  border-bottom: 3px solid transparent; margin-top: 3px;
}
.nav a:hover { text-decoration: none; color: var(--l4-blue); }
.nav a.on { color: var(--l4-blue); border-bottom-color: var(--l4-blue); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; padding-right: 18px; }
.acct-pick { position: relative; text-align: center; }
.acct-pill {
  border: none; background: var(--dark-pill); color: #fff; border-radius: 12px; padding: 3px 12px;
  font-size: 12px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-role { font-size: 12px; color: var(--muted); margin-top: 3px; }
.acct-menu {
  position: absolute; right: 0; top: 46px; background: #fff; border-radius: var(--card-radius);
  box-shadow: var(--card-shadow-hi); min-width: 240px; padding: 6px 0; text-align: left; z-index: 30;
}
.acct-menu button {
  display: flex; justify-content: space-between; gap: 16px; width: 100%; border: none; background: none;
  padding: 9px 16px; text-align: left; color: var(--text);
}
.acct-menu button:hover, .acct-menu button.on { background: var(--l4-blue-soft); }
.acct-menu .role { color: var(--muted); font-size: 12px; }
.circle {
  width: 34px; height: 34px; border-radius: 50%; border: none; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 17px; color: #fff; position: relative; flex: none;
}
.circle:hover { text-decoration: none; filter: brightness(1.08); }
.circle.alarm { background: var(--alarm); }
.circle.alarm.quiet { background: #C9D2DA; }
.circle.help { background: var(--l4-blue); }
.circle.gear { background: none; color: #5B6B7A; font-size: 22px; }
.circle.avatar { background: #DDE7F0; color: #3B4E7A; font-size: 13px; }
.badge {
  position: absolute; top: -5px; right: -6px; background: #fff; color: var(--alarm); border: 1px solid var(--alarm);
  border-radius: 9px; font-size: 10px; min-width: 17px; height: 17px; line-height: 15px; padding: 0 3px;
}

/* ------------------------------------------------------------------ page */
.page { display: flex; gap: 18px; padding: 16px var(--gutter) 40px; align-items: flex-start; }
.main { flex: 1; min-width: 0; }
.panel {
  width: var(--panel-w); flex: none; background: var(--card-bg); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); padding: 16px; position: sticky; top: calc(var(--topbar-h) + 16px);
}
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--heading); min-height: 28px; }
.crumbs a { color: var(--heading); }
.crumbs .sep { color: var(--muted); }
.crumbs .icon { font-size: 18px; padding: 0 2px; }
h1.title { font-size: 34px; color: var(--heading); margin: 10px 0 6px; font-weight: 700; }
.subline { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 14px; }
.views { display: flex; gap: 8px; }
.views button {
  width: 44px; height: 38px; border: none; border-radius: var(--card-radius); background: #fff; color: var(--heading);
  box-shadow: var(--card-shadow); font-size: 16px;
}
.views button.on { background: var(--l4-blue); color: #fff; }

.card { background: var(--card-bg); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 18px 20px; margin-bottom: 18px; }
.card h2 { font-size: 17px; color: var(--heading); margin: 0 0 14px; }
.card h3 { font-size: 14px; color: var(--heading); margin: 18px 0 8px; }

/* Tiles: a site's title is orange, as on the c2 Sites screen; a camera's is dark with a status square. */
.tiles { display: flex; flex-wrap: wrap; gap: 24px; }
.tile {
  width: 260px; background: var(--card-bg); border-radius: var(--card-radius); box-shadow: var(--card-shadow);
  overflow: hidden; color: inherit; display: flex; flex-direction: column; cursor: pointer;
}
.tile:hover { text-decoration: none; box-shadow: var(--card-shadow-hi); }
.tile-head { padding: 16px 16px 6px; }
.tile-title { font-size: 17px; font-weight: 700; color: var(--l4-orange); display: flex; align-items: center; gap: 8px; }
.tile.zone .tile-title { color: var(--heading); }
.sq { width: 11px; height: 11px; display: inline-block; flex: none; background: var(--offline); }
.sq.on { background: var(--l4-blue); }
.sq.live { background: var(--alarm); border-radius: 50%; }
.rows { padding: 4px 16px 14px; }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.row .k { color: var(--label); }
.row .v { text-align: right; }
.thumb { background: #E6ECF1; aspect-ratio: 16 / 9; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .none {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px;
  background: repeating-linear-gradient(135deg, #E3E9EE 0 14px, #EDF1F4 14px 28px);
}
.thumb .age { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 3px; }

/* The health strip, styled like c2's Weather Station card. */
.strip { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; }
.strip .name { font-size: 17px; font-weight: 700; color: var(--heading); min-width: 120px; }
.metric .k { font-size: 12px; color: var(--label); }
.metric .v { font-size: 19px; color: var(--heading); }
.metric .u { font-size: 12px; color: var(--muted); }
.metric.hot .v { color: var(--alarm); }
.metric.warm .v { color: var(--warn); }

/* ------------------------------------------------------------------ pills (the right panel's tabs) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill {
  border: none; background: var(--pill-bg); color: var(--pill-text); border-radius: 18px; padding: 9px 16px; font-size: 14px;
}
.pill.on { background: var(--l4-blue); color: #fff; }
.pill:disabled { opacity: 0.5; cursor: default; }
.panel h4 { font-size: 13px; color: #6F7E8C; margin: 0 0 10px; font-weight: 700; }

/* ------------------------------------------------------------------ live view */
.live { position: relative; background: #0E151B; border-radius: var(--card-radius); overflow: hidden; box-shadow: var(--card-shadow); }
.live .viewport { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.live .viewport.tall { aspect-ratio: 9 / 16; max-height: 78vh; }
.live img.feed { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: center; transition: transform 0.15s; }
.live .label {
  position: absolute; left: 0; top: 0; background: rgba(0,0,0,0.72); color: #fff; padding: 7px 12px; font-size: 14px; font-weight: 600;
}
.live .state {
  position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,0.6); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 12px;
  display: flex; align-items: center; gap: 6px;
}
.live .state .dot { width: 8px; height: 8px; border-radius: 50%; background: #9AA5AF; }
.live .state.on .dot { background: #FF4D4D; }
.live .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #C7D0D8; text-align: center; padding: 20px; }
.live .zoomtag { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,0.6); color: #FFC84D; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.live .note { position: absolute; left: 10px; bottom: 36px; right: 190px; color: #FFC84D; font-size: 13px; text-shadow: 0 1px 2px #000; }

/* The pan and tilt pad, the same one the Pi's own windows draw: arrows, click to step, hold to move. */
.pad { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: flex-end; gap: 12px; user-select: none; -webkit-user-select: none; touch-action: none; }
.pad .zoom { display: flex; flex-direction: column; gap: 8px; }
.pad .zoom button, .pad .dpad button {
  width: 44px; height: 44px; border-radius: 8px; border: 2px solid rgba(235,235,235,0.85); background: rgba(0,0,0,0.45);
  color: #EBEBEB; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0;
}
.pad .dpad { display: grid; grid-template-columns: 44px 44px 44px; grid-template-rows: 44px 44px 44px; gap: 4px; padding: 6px;
  background: rgba(0,0,0,0.35); border-radius: 50%; }
.pad .dpad button { border-radius: 50%; border-color: transparent; background: transparent; font-size: 20px; }
.pad .dpad button.on, .pad .zoom button.on { color: #00C8FF; border-color: #00C8FF; }
.pad .dpad .up { grid-column: 2; grid-row: 1; }
.pad .dpad .left { grid-column: 1; grid-row: 2; }
.pad .dpad .right { grid-column: 3; grid-row: 2; }
.pad .dpad .down { grid-column: 2; grid-row: 3; }
.pad .dpad .mid { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.4); font-size: 11px; }
.under { display: flex; gap: 28px; flex-wrap: wrap; padding: 12px 4px 0; }
.under .metric .v { font-size: 16px; }
.zone-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }

/* ------------------------------------------------------------------ forms and tables */
label.f { display: block; font-size: 12px; font-weight: 600; color: #4A5562; margin: 12px 0 5px; }
input.t, select.t {
  width: 100%; height: 40px; border: 1px solid var(--input-border); border-radius: 6px; padding: 0 12px; background: #fff; color: var(--text);
}
input.t:focus, select.t:focus { border-color: var(--l4-blue); outline: none; box-shadow: 0 0 0 3px rgba(24,119,189,0.15); }
select.t.inline, input.t.inline { width: auto; height: 34px; }
.btn {
  height: 38px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--l4-blue); background: var(--l4-blue); color: #fff; font-weight: 600;
}
.btn:hover { background: var(--l4-blue-dark); }
.btn:disabled { background: #A9B2BA; border-color: #A9B2BA; cursor: default; }
.btn.ghost { background: #fff; color: var(--l4-blue); }
.btn.ghost:hover { background: var(--l4-blue-soft); }
.btn.danger { background: #fff; color: var(--alarm); border-color: var(--alarm-border); }
.btn.danger:hover { background: var(--alarm-bg); }
.btn.small { height: 30px; padding: 0 12px; font-weight: 500; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.msg { border-radius: 6px; padding: 10px 12px; margin: 12px 0; font-size: 13px; }
.msg.err { background: var(--alarm-bg); border: 1px solid var(--alarm-border); color: #9B2C22; }
.msg.ok { background: var(--ok-bg); border: 1px solid #A9D8BC; color: #1D5E3A; }
.msg.info { background: var(--l4-blue-soft); border: 1px solid #B9D4EA; color: #1F4F75; }
.msg.warn { background: var(--warn-bg); border: 1px solid #F2C988; color: #7A4A00; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: 12px; color: var(--label); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.grid td { padding: 10px; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
table.grid tr:last-child td { border-bottom: none; }
table.grid td.c, table.grid th.c { text-align: center; }
.tag { display: inline-block; border-radius: 10px; padding: 2px 9px; font-size: 12px; background: var(--pill-bg); color: var(--pill-text); }
.tag.owner { background: #FDF0E1; color: #9A5A12; }
.tag.admin { background: var(--l4-blue-soft); color: var(--l4-blue-dark); }
.tag.super { background: #2C3E50; color: #fff; }
.tag.on { background: var(--ok-bg); color: #1D5E3A; }
.tag.off { background: var(--pill-bg); color: #6B7A89; }
.tag.bad { background: var(--alarm-bg); color: #9B2C22; }
.scroll-x { overflow-x: auto; }
.settings-list { display: flex; flex-direction: column; gap: 12px; max-width: 300px; }
.settings-list a {
  display: block; text-align: center; border: 1px solid #9AA6B2; border-radius: 6px; padding: 10px; color: var(--heading); background: #fff;
}
.settings-list a:hover { background: var(--l4-blue-soft); text-decoration: none; }
.code-box { font-family: var(--mono); font-size: 26px; letter-spacing: 0.12em; background: #F3F6F9; border-radius: 6px; padding: 10px 16px; display: inline-block; }
pre.cmd { background: #1E2830; color: #E6EDF3; padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #2C3E50; color: #fff; padding: 10px 18px;
  border-radius: 20px; font-size: 13px; z-index: 50; box-shadow: var(--card-shadow-hi); max-width: calc(100vw - 32px);
}
.toast.err { background: #9B2C22; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 17px; height: 17px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.list-plain li:last-child { border-bottom: none; }

/* ------------------------------------------------------------------ sign in, the c2 split screen */
.auth { display: flex; min-height: 100vh; background: #fff; }
.auth .photo { flex: 1; background: url("/img/greenhouse.jpg") center / cover no-repeat; }
.auth .side { flex: 1; display: flex; flex-direction: column; padding: 34px 40px 24px; min-width: 0; }
.auth .side-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth .side-top img { width: 100px; }
.auth .side-top .cam { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--l4-orange); }
.auth .form { width: 100%; max-width: 436px; margin: auto; padding: 30px 0; }
.auth h1 { text-align: center; font-size: 32px; color: #333; margin: 0 0 22px; }
.auth .lead { text-align: center; color: #555; margin: -10px 0 18px; }
.auth .pw { position: relative; }
.auth .pw input { padding-right: 44px; }
.auth .eye { position: absolute; right: 8px; top: 6px; border: none; background: none; color: #555; width: 30px; height: 28px; font-size: 15px; }
.auth .forgot { text-align: right; margin-top: 12px; font-size: 14px; }
.auth .forgot a { text-decoration: underline; }
.auth .go { display: block; margin: 22px auto 0; width: 165px; height: 40px; border-radius: 6px; border: none; background: var(--l4-blue); color: #fff; font-weight: 600; }
.auth .go:disabled { background: #A9A9A9; cursor: default; }
.auth .foot { text-align: center; color: #555; font-size: 13px; line-height: 2; }
.code-in { text-align: center; font-family: var(--mono); font-size: 26px !important; letter-spacing: 0.4em; height: 52px !important; }
.auth .links { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 13px; flex-wrap: wrap; }
.auth .links button { border: none; background: none; color: var(--l4-blue); padding: 0; }
.auth .links button:disabled { color: #9AA5AF; cursor: default; }
.rules { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ------------------------------------------------------------------ narrow screens */
@media (max-width: 1150px) {
  .page { flex-direction: column; }
  .panel { width: 100%; position: static; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; --topbar-h: 62px; }
  .brand { min-width: 70px; padding: 0 8px; }
  .brand img { width: 54px; }
  .brand .ver { display: none; }
  .nav { margin-left: 4px; }
  .nav a { padding: 0 9px; font-size: 14px; }
  .nav a.wide { display: none; }
  .bar-right { gap: 8px; padding-right: 8px; }
  .circle.help, .circle.gear { display: none; }
  .acct-pill { max-width: 96px; }
  .acct-role { display: none; }
  h1.title { font-size: 26px; }
  .tile { width: 100%; }
  .strip { gap: 18px; }
  .auth .photo { display: none; }
  .auth .side { padding: 20px 16px; }
  .pad { position: static; justify-content: flex-end; padding: 10px 12px; gap: 10px; }
  .pad .dpad { grid-template-columns: 38px 38px 38px; grid-template-rows: 38px 38px 38px; }
  .pad .zoom button { width: 38px; height: 38px; }
  .live .note { right: 10px; bottom: 10px; }
  table.grid th, table.grid td { padding: 8px 6px; }
}

/* ------------------------------------------------------------------ the timeline, c2's graph card */
.tl-holder { margin-top: 18px; }
.tl { position: relative; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tl-head h2 { margin: 0; }
.tl-range { font-size: 12px; color: var(--muted); }
.tl-toolbar { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 8px; }
.tl-group { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-btn {
  height: 30px; min-width: 34px; padding: 0 10px; border-radius: 5px; border: 1px solid var(--hairline); background: #F3F6F9;
  color: var(--heading); font-size: 13px;
}
.tl-btn:hover { background: var(--l4-blue-soft); }
.tl-btn.on { background: var(--l4-blue-soft); color: var(--l4-blue-dark); border-color: #B9D4EA; font-weight: 600; }
.tl-btn:disabled { opacity: 0.6; cursor: default; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend .mk { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-sizing: border-box; }
.tl-legend .mk.img { background: var(--l4-blue); }
.tl-legend .mk.noimg { background: #fff; border: 2px solid var(--l4-blue); }
.tl-legend .mk.rev { border: 2px solid var(--ok); background: #fff; width: 14px; height: 14px; }
.tl-legend .mk.sys { background: #8a96a3; border-radius: 1px; transform: rotate(45deg); width: 8px; height: 8px; }
.tl-stage { width: 100%; min-height: 80px; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.tl-svg { display: block; cursor: grab; }
.tl-svg:active { cursor: grabbing; }
.tl-gridline { stroke: #EDF1F4; stroke-width: 1; }
.tl-tick { font-size: 11px; fill: #7B8A99; }
.tl-lane-label { font-size: 12px; fill: var(--text); }
.tl-band { fill: #F7F9FB; }
.tl-count { font-size: 11px; fill: #fff; font-weight: 600; pointer-events: none; }
.tl-mark, .tl-cluster { cursor: pointer; }
.tl-img { fill: var(--l4-blue); stroke: #fff; stroke-width: 2; }
.tl-noimg { fill: #fff; stroke: var(--l4-blue); stroke-width: 2; }
.tl-sys { fill: #8a96a3; stroke: #fff; stroke-width: 1.5; }
.tl-rev { fill: none; stroke: var(--ok); stroke-width: 2; }
.tl-hit { fill: transparent; }
.tl-drop { stroke: #C9D6E2; stroke-width: 1; stroke-dasharray: 2 3; }
.tl-mark:hover .tl-drop, .tl-mark:focus .tl-drop { stroke: var(--l4-blue); stroke-dasharray: none; }
.tl-bubble { fill: var(--l4-blue-soft); stroke: var(--l4-blue); stroke-width: 1.5; }
.tl-bubble-n { font-size: 11px; font-weight: 700; fill: var(--l4-blue-dark); pointer-events: none; }
.tl-nowline { stroke: var(--l4-orange); stroke-width: 1.5; stroke-dasharray: 4 3; }
.tl-now { font-size: 11px; font-weight: 700; fill: var(--heading); }
.tl-tip {
  position: absolute; z-index: 5; background: #fff; border: 1px solid var(--hairline); border-radius: 6px; box-shadow: var(--card-shadow-hi);
  padding: 8px 10px; font-size: 12px; max-width: 280px; pointer-events: none; line-height: 1.5;
}
.tl-row { cursor: pointer; }
.tl-row:hover td { background: var(--l4-blue-soft); }

/* ------------------------------------------------------------------ the event viewer */
.modal-back { position: fixed; inset: 0; background: rgba(16, 32, 48, 0.55); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.35); width: min(1180px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 18px; color: var(--heading); }
.modal-x { border: none; background: none; font-size: 28px; line-height: 1; color: #5B6B7A; width: 36px; height: 36px; }
.modal-body { display: flex; gap: 18px; margin-top: 14px; align-items: flex-start; }
.ev-left { flex: 1; min-width: 0; }
.ev-right { width: 340px; flex: none; }
.modal-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.ev-stage { position: relative; background: #0E151B; border-radius: 5px; overflow: hidden; line-height: 0; }
.ev-img { width: 100%; height: auto; display: block; }
.ev-boxes { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.ev-editor .ev-boxes, #ev-editor ~ .ev-boxes { cursor: crosshair; }
.ev-box { cursor: pointer; pointer-events: all; }
.ev-box-label { font-size: 26px; font-weight: 700; paint-order: stroke; stroke: rgba(0,0,0,0.75); stroke-width: 5px; }
.ev-ghost { fill: rgba(255,255,255,0.15); stroke: #fff; stroke-width: 2; stroke-dasharray: 6 4; }
.ev-nopic { line-height: 1.5; color: #C7D0D8; padding: 60px 20px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.ev-facts .row .v { max-width: 200px; }
.ev-editor { margin-top: 16px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.ev-list li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; }
.ev-list li.sel { background: var(--l4-blue-soft); border-radius: 5px; }
.swatch { width: 12px; height: 12px; border-radius: 2px; flex: none; }
@media (max-width: 900px) {
  .modal-body { flex-direction: column; }
  .ev-right { width: 100%; }
}
.tl-mark:focus, .tl-cluster:focus { outline: none; }
.tl-mark:focus-visible .tl-hit, .tl-cluster:focus-visible .tl-bubble { stroke: var(--l4-blue); stroke-width: 2; }

.tl-stored { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.tl-arch { fill: #fff; stroke: #8a96a3; stroke-width: 2; stroke-dasharray: 3 2; }
.tl-legend .mk.arch { background: #fff; border: 2px dashed #8a96a3; }
.modal.archive { width: min(640px, 100%); }
.storage-total td { font-weight: 700; border-top: 2px solid var(--hairline); }
