:root {
  --ink: #18201c;
  --muted: #747d77;
  --line: #dce1dc;
  --paper: #f4f5f1;
  --white: #fff;
  --green: #2e7758;
  --green-soft: #dfece4;
  --dark: #171b19;
  --dark-soft: #222825;
  --orange: #e87642;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Segoe UI", "Microsoft YaHei UI", system-ui, sans-serif; }
button, select { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 16px; height: 16px; stroke-width: 1.8; }
.observer-shell { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr) 296px; }
.observer-sidebar { position: fixed; inset: 0 auto 0 0; width: 218px; height: 100vh; display: flex; flex-direction: column; padding: 26px 20px 22px; border-right: 1px solid #2b302e; background: var(--dark); color: #eef1ef; }
.observer-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.observer-brand > span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: #e8efe9; color: var(--green); font: 19px Georgia, serif; }
.observer-sidebar nav { display: grid; gap: 4px; margin-top: 48px; }
.observer-sidebar nav a { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 11px; border-radius: 7px; color: #8f9993; font-size: 11px; }
.observer-sidebar nav a.active { background: var(--dark-soft); color: #f3f6f4; }
.device-brief { margin-top: auto; padding: 15px 13px; border: 1px solid #303633; border-radius: 8px; background: #1c211f; }
.device-brief p { margin: 0 0 7px; color: #6f7973; font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.device-brief strong { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.device-brief > span { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #849089; }
.device-brief button { margin: 11px 0 0; padding: 0; border: 0; background: transparent; color: #68736d; font-size: 8px; cursor: pointer; }
.device-brief button:hover { color: #b8c3bc; }
.device-brief i, .live-indicator i, #socketStatus i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #7b837e; }
.device-brief.online i, #socketStatus.online i { background: #54a878; box-shadow: 0 0 0 4px rgba(84,168,120,.1); }
.device-brief b { font-size: 8px; font-weight: 500; }
.observer-main { grid-column: 2; min-width: 0; padding: 30px 34px 36px; }
.observer-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.observer-header p, .rail-heading p { margin: 0 0 6px; color: var(--green); font-size: 8px; font-weight: 750; letter-spacing: .17em; }
h1 { margin: 0; font: 500 27px Georgia, "Songti SC", serif; }
.header-actions { display: flex; align-items: flex-end; gap: 8px; }
.device-select span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; }
.device-select select { width: 190px; height: 35px; padding: 0 9px; border: 1px solid #d4dad5; border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: 10px; }
.icon-button { display: grid; place-items: center; width: 35px; height: 35px; padding: 0; border: 1px solid #d6dcd7; border-radius: 7px; background: #fff; color: #667169; cursor: pointer; }
.icon-button:hover { border-color: #b8c3ba; color: var(--ink); }
.screen-stage { overflow: hidden; border: 1px solid #272d2a; border-radius: 10px; background: var(--dark); box-shadow: 0 18px 50px rgba(22, 31, 26, .12); }
.screen-toolbar, .screen-footer { display: flex; align-items: center; gap: 16px; min-height: 42px; padding: 0 15px; color: #818b85; font: 8px Consolas, monospace; }
.screen-toolbar time { margin-left: auto; }
.live-indicator { display: flex; align-items: center; gap: 7px; color: #bdc7c1; font-weight: 700; letter-spacing: .1em; }
.live-indicator i { background: var(--orange); box-shadow: 0 0 0 4px rgba(232, 118, 66, .1); }
.screen-frame { position: relative; display: grid; place-items: center; min-height: min(65vh, 650px); border-block: 1px solid #2b312e; background: #0e110f; }
.screen-frame > img { display: block; width: 100%; height: 100%; max-height: min(72vh, 760px); object-fit: contain; }
.empty-screen { max-width: 340px; padding: 54px 24px; color: #77817b; text-align: center; }
.empty-screen > span { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 18px; border: 1px solid #333a36; border-radius: 12px; background: #181d1a; }
.empty-screen svg { width: 22px; height: 22px; }
.empty-screen h2 { margin: 0; color: #aab4ae; font: 500 18px Georgia, "Songti SC", serif; }
.empty-screen p { margin: 10px 0 0; font-size: 9px; line-height: 1.7; }
.screen-footer { justify-content: space-between; }
.screen-footer span { display: flex; align-items: center; gap: 7px; }
.screen-footer svg { width: 13px; height: 13px; color: #6e957d; }
.activity-rail { position: fixed; inset: 0 0 0 auto; width: 296px; height: 100vh; display: flex; flex-direction: column; padding: 30px 22px 22px; border-left: 1px solid var(--line); background: #f8f9f6; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; }
.rail-heading h2 { margin: 0; font: 500 20px Georgia, "Songti SC", serif; }
.timeline-empty { display: grid; place-items: center; gap: 10px; margin-top: 22px; padding: 40px 18px; border: 1px dashed #ccd3cd; border-radius: 8px; color: #99a19b; text-align: center; }
.timeline-empty p { margin: 0; font-size: 9px; line-height: 1.6; }
.timeline-list { display: grid; gap: 12px; margin-top: 20px; overflow: auto; }
.timeline-item { width: 100%; padding: 0; overflow: hidden; border: 1px solid #d8ded9; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.timeline-item:hover { border-color: #aebbb1; }
.timeline-thumb { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid #e1e5e1; background: #171b19; color: #707a74; }
.timeline-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.timeline-thumb svg { width: 18px; height: 18px; }
.timeline-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; }
.timeline-meta strong { overflow: hidden; font: 9px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.timeline-meta span { flex: 0 0 auto; color: #929a94; font-size: 8px; }
.rail-status { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 17px; border-top: 1px solid var(--line); color: #858e88; font-size: 8px; }
#socketStatus { display: flex; align-items: center; gap: 6px; color: #6f7872; font-size: 8px; }
.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(13, 17, 15, .86); backdrop-filter: blur(12px); }
.auth-card { width: min(390px, 100%); padding: 34px; border: 1px solid #d9dfda; border-radius: 12px; background: #f8faf7; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.auth-mark { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 22px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.auth-mark svg { width: 20px; height: 20px; }
.auth-card > p { margin: 0 0 8px; color: var(--green); font-size: 8px; font-weight: 750; letter-spacing: .16em; }
.auth-card h2 { margin: 0; font: 500 25px Georgia, "Songti SC", serif; }
.auth-card > span:not(.auth-mark) { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.auth-card label { display: block; margin-top: 24px; }
.auth-card label b { display: block; margin-bottom: 7px; font-size: 9px; }
.auth-card input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid #cfd6d0; border-radius: 7px; outline: none; background: #fff; color: var(--ink); font: 11px Consolas, monospace; }
.auth-card input:focus { border-color: #6f957d; box-shadow: 0 0 0 3px rgba(46,119,88,.1); }
.auth-card button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; margin-top: 12px; border: 0; border-radius: 7px; background: var(--green); color: #fff; font-size: 10px; font-weight: 650; cursor: pointer; }
.auth-card button:hover { background: #245f46; }
.auth-card small { display: block; min-height: 14px; margin-top: 10px; color: #ae543c; font-size: 9px; line-height: 1.5; }
@media (max-width: 1050px) { .observer-shell { grid-template-columns: 190px minmax(0, 1fr); } .observer-sidebar { width: 190px; } .activity-rail { position: static; grid-column: 2; width: auto; height: auto; min-height: 280px; border-top: 1px solid var(--line); border-left: 0; } .timeline-list { grid-template-columns: repeat(3, 1fr); } .rail-status { margin-top: 30px; } }
@media (max-width: 700px) { .observer-shell { display: block; } .observer-sidebar { position: static; width: 100%; height: auto; flex-direction: row; align-items: center; padding: 13px 16px; } .observer-sidebar nav { display: flex; margin: 0 0 0 auto; } .observer-sidebar nav a { width: 36px; padding: 0; justify-content: center; } .observer-sidebar nav a span, .observer-sidebar nav a { font-size: 0; } .device-brief { display: none; } .observer-main { padding: 24px 16px; } .observer-header { align-items: flex-start; flex-direction: column; } .header-actions, .device-select, .device-select select { width: 100%; } .screen-frame { min-height: 55vh; } .activity-rail { padding-inline: 16px; } }
