/* 组内远程。墨蓝做字和栏，红表示占用，蓝表示空闲和可以点的东西。 */
:root {
  --ink: #14233b;
  --paper: #f3f5f8;
  --panel: #ffffff;
  --busy: #c8372d;
  --free: #1f5fbf;
  --off: #566173;
  --line: #d3d9e2;
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.6 var(--font); color: var(--ink); background: var(--paper); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
[hidden] { display: none !important; }

.btn { border: 2px solid var(--ink); background: var(--panel); padding: 6px 16px; border-radius: 4px; font-weight: 600; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.primary { background: var(--free); border-color: var(--free); color: #fff; }
.btn.primary:hover { background: #174a97; border-color: #174a97; }
.btn.danger { border-color: var(--busy); color: var(--busy); }
.btn.danger:hover { background: var(--busy); color: #fff; }
.btn.small { padding: 2px 10px; font-weight: 500; border-width: 1px; }
.btn:disabled { opacity: .45; cursor: default; }
a.btn { text-decoration: none; display: inline-block; }
a { color: var(--free); }

/* 顶栏 */
.top { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 20px; padding: 0 28px; height: 56px; }
.top h1 { font-size: 20px; margin: 0; letter-spacing: .08em; }
.top .grow { flex: 1; }
.top button { background: none; border: 1px solid rgba(255,255,255,.55); color: #fff; border-radius: 4px; padding: 3px 12px; }
.top button:hover { background: #fff; color: var(--ink); }

main { max-width: 1040px; margin: 0 auto; padding: 28px; }
h2 { font-size: 22px; margin: 36px 0 12px; }

/* 登录 */
.auth { max-width: 380px; margin: 9vh auto 0; background: var(--panel); border: 1px solid var(--line); border-top: 6px solid var(--free); padding: 28px 32px 32px; }
.auth h2 { margin: 0 0 4px; font-size: 26px; }
.auth p { margin: 0 0 20px; }
.auth label { display: block; margin-top: 14px; font-weight: 600; }
.auth input { display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: 1px solid #8793a5; border-radius: 4px; background: #fff; }
.auth .row { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.auth .switch { background: none; border: none; color: var(--free); text-decoration: underline; padding: 0; }
.notice { background: #fff4d6; border-left: 8px solid #e0a100; padding: 12px 18px; margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.notice a { margin-left: 8px; }
tr.wait td { background: #fff4d6; }
.msg { color: var(--busy); font-weight: 600; min-height: 1.6em; margin: 10px 0 0; }

/* 电脑列表：一台一行，左边一条色带说明状态 */
.board { display: grid; gap: 14px; }
.pc { display: grid; grid-template-columns: 10px minmax(150px, 1.1fr) minmax(200px, 2fr) 172px; align-items: center; background: var(--panel); border: 1px solid var(--line); min-height: 104px; }
.pc .band { align-self: stretch; background: var(--off); }
.pc.free .band { background: var(--free); }
.pc.busy .band { background: var(--busy); }
.pc .name { padding: 16px 20px; font-size: 22px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.pc .name small { display: block; font-size: 15px; font-weight: 500; color: var(--off); }
.pc .who { padding: 12px 8px; }
.pc .who .big { font-size: 30px; font-weight: 800; line-height: 1.25; }
.pc.free .who .big { color: var(--free); }
.pc.busy .who .big { color: var(--busy); }
.pc.off .who .big { color: var(--off); font-size: 22px; }
.pc .who .sub { font-size: 15px; }
.pc .act { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pc .act .btn { text-align: center; text-decoration: none; display: block; }
.pc .adm { display: flex; gap: 6px; justify-content: flex-end; }
.empty { background: var(--panel); border: 1px dashed #8793a5; padding: 28px; }

table { border-collapse: collapse; width: 100%; background: var(--panel); border: 1px solid var(--line); }
th, td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); }
th { background: #e6eaf0; font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; }
.tools { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; }

@media (max-width: 720px) {
  main { padding: 16px; }
  .top { padding: 0 16px; }
  .pc { grid-template-columns: 10px 1fr; }
  .pc .who, .pc .act { grid-column: 2; padding: 4px 20px 14px; }
}

/* 控制页 */
body.view { background: #000; color: #fff; overflow: hidden; }
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; min-height: 40px; background: var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 4px 12px; font-size: 15px; transition: transform .15s; }
.bar b { font-weight: 700; }
.bar .ctl b { color: #ff8f86; }
.bar .grow { flex: 1; }
.bar a { color: #fff; }
.bar select, .bar button { background: #22365a; color: #fff; border: 1px solid #5f7397; border-radius: 4px; padding: 2px 8px; font-size: 15px; }
.bar button:hover:not(:disabled), .bar select:hover:not(:disabled) { background: #fff; color: var(--ink); }
.bar select:disabled { opacity: .55; }
.bar button.go { background: var(--free); border-color: var(--free); font-weight: 700; }
.bar button.stop { background: var(--busy); border-color: var(--busy); font-weight: 700; }
.bar .meter { font-variant-numeric: tabular-nums; min-width: 17em; }
body.full .bar { transform: translateY(-100%); }
body.full.peek .bar { transform: none; }
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }

.stage { position: fixed; inset: 40px 0 0 0; }
body.full .stage { inset: 0; }
#screen { width: 100%; height: 100%; object-fit: contain; display: block; outline: none; touch-action: none; }
#ghost { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid #fff; border-radius: 50%; background: var(--busy); pointer-events: none; box-shadow: 0 0 0 1px #000; }
.veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.72); font-size: 22px; text-align: center; padding: 24px; white-space: pre-line; }
.ask { position: fixed; z-index: 6; top: 52px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); border-left: 8px solid var(--busy); padding: 12px 18px; display: flex; gap: 12px; align-items: center; font-size: 17px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.toast { position: fixed; z-index: 6; bottom: 28px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); padding: 10px 18px; border-left: 8px solid var(--free); font-size: 17px; max-width: 80vw; }
