/* The conductor's console, in the Lanyard apps' look (desktop/start.html,
   and the PC's own console in web/static/app.css): the list down the side,
   the one picked beside it in cards of rows; one column on a phone. */
:root {
  --bg: #0b0d10; --side: #111419; --card: rgba(255, 255, 255, .04); --hover: rgba(255, 255, 255, .06); --press: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .09); --text: #e6e8eb; --muted: #8b939e; --accent: #4cc2ff; --ok: #3ddc84; --warn: #ffb347; --bad: #ff5c5c;
  --field: #050608; --field-line: rgba(255, 255, 255, .15);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif; font-size: 14px; -webkit-tap-highlight-color: transparent; }
button, select, input { font: inherit; color: inherit; border: 1px solid transparent; }
button { height: 32px; padding: 0 12px; white-space: nowrap; border-radius: 4px; background: rgba(255, 255, 255, .07); cursor: default; }
button:hover { background: rgba(255, 255, 255, .11); }
button:disabled, button:disabled:hover { opacity: .5; }
button.primary { background: var(--accent); color: var(--bg); font-weight: 600; }
button.primary:hover { background: #7ad3ff; }
button.danger { color: var(--bad); }
button.danger:hover { background: rgba(255, 92, 92, .14); border-color: rgba(255, 92, 92, .45); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select { height: 32px; min-width: 150px; max-width: 100%; padding: 0 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); }
select option { background: #1b1f25; }
select:disabled { opacity: .5; }
input[type=text] { width: 220px; max-width: 100%; height: 32px; padding: 0 10px; border-radius: 4px; background: var(--field); border: 1px solid var(--field-line); }
input[type=text]:disabled { opacity: .5; }
.muted { color: var(--muted); }

/* signing in */
.signin { display: flex; align-items: center; justify-content: center; min-height: 100%; padding: 24px 16px; }
.signcard { width: 100%; max-width: 420px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.signcard h1 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.signcard p { margin: 0 0 18px; line-height: 1.45; }
.signcard .note { margin: 14px 0 0; color: var(--muted); }
.signcard .note.bad { color: var(--bad); }

/* the list and the one picked */
.cons { position: fixed; inset: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.conside { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 14px 8px; background: var(--side); border-right: 1px solid var(--line); }
.conorg { padding: 2px 10px 14px; }
.conorg .n1 { font-size: 16px; font-weight: 600; }
.conorg .n2 { margin-top: 2px; font-size: 12px; color: var(--muted); }
.consecs { display: flex; flex-direction: column; gap: 2px; }
.consecs button { position: relative; display: flex; align-items: center; gap: 10px; height: auto; min-height: 36px; padding: 6px 10px 6px 14px;
  text-align: left; background: none; border: 0; color: var(--text); }
.consecs button:hover { background: var(--hover); }
.consecs button.sel { background: var(--press); font-weight: 600; }
.consecs button.sel::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.consecs .grow { flex: 1; min-width: 0; }
.consecs .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.conhead { margin: 14px 0 4px; padding: 0 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.conbadge { font-size: 12px; font-weight: 600; color: var(--accent); }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--ok); }
.conside .foot { margin-top: auto; padding: 14px 6px 0; }
.conmain { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.consec { max-width: 760px; margin: 0 auto; padding: 24px 32px 48px; }
.consec h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.consec .lede { margin: 0; color: var(--muted); }
.congroup { margin: 20px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.concard { background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.conrow { display: flex; align-items: center; gap: 8px 16px; min-height: 44px; padding: 8px 14px; }
.conrow + .conrow { border-top: 1px solid var(--line); }
.conrow > .left { flex: 1; min-width: 0; }
.conrow .l1 { overflow-wrap: anywhere; }
.conrow .l2 { margin-top: 1px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.conrow .l2.apply { color: #a9b4c0; }
.conrow .l2.why { color: var(--warn); }
.conrow .l2.bad, .connote.bad { color: var(--bad); }
.conrow .l2.ok { color: var(--ok); }
.conrow .ctl { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; }
.conrow.fact { align-items: flex-start; }
.conrow.fact .lab { flex: none; width: 130px; color: var(--muted); }
.conrow.fact .val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.conrow.click:hover { background: var(--hover); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.conlock { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 12px; color: var(--warn); }
.connote { margin: 8px 0 0; color: var(--muted); }
.connote.why { color: var(--warn); }
.conbtns { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.conswitch { -webkit-appearance: none; appearance: none; flex: none; position: relative; width: 40px; height: 20px; margin: 0;
  border: 1px solid var(--muted); border-radius: 10px; background: transparent; }
.conswitch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: transform .1s; }
.conswitch:checked { background: var(--accent); border-color: var(--accent); }
.conswitch:checked::after { transform: translateX(20px); background: var(--bg); }
.conswitch:disabled { opacity: .45; }
.conspin { flex: none; display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(76, 194, 255, .3); border-top-color: var(--accent); border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 16px;
  background: #1b1f25; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.toast.bad { border-color: rgba(255, 92, 92, .6); }

@media (max-width: 900px) { .conrow.wraps { flex-wrap: wrap; } .conrow.wraps > .left { flex-basis: 100%; } .conrow.wraps > .ctl { justify-content: flex-start; } }
@media (max-width: 700px) {
  .cons { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .conside { max-height: 40vh; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); border-right: 0; border-bottom: 1px solid var(--line); }
  .conside .foot { margin-top: 8px; padding-top: 6px; }
  .consec { padding: 16px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
  .conrow.fact { flex-wrap: wrap; }
  .conrow.fact .lab { width: 100%; }
  input[type=text] { width: 100%; flex: 1 1 160px; }
}
