:root {
  --panel: #17181b;
  --panel-tex: #1d1e22;
  --text-hi: #eef0f2;
  --text-lo: #8b8f97;
  --text-faint: #5c6068;
  --header-fg: #b9bcc2;
  --led-busy: #ff3b3b;
  --led-busy-glow: rgba(255,59,59,.55);
  --signed-in: #5eb3ff;
  --mesh: #121212 url('assets/wall-mesh.png') left top repeat fixed;
}

* { box-sizing: border-box; }
html, body { overflow: hidden; }
body {
  margin: 0;
  background: var(--mesh);
  background-size: 390px 844px;
  font-family: 'IBM Plex Sans', -apple-system, Segoe UI, sans-serif;
  user-select: none;
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }

.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2fb956; }
.dot.tone-available, .swatch.tone-available { background: #2fb956; }
.dot.tone-dnd, .swatch.tone-dnd { background: #ff3b3b; }
.dot.tone-orange, .swatch.tone-orange { background: #f5a524; }
.dot.tone-blue, .swatch.tone-blue { background: #4c8dff; }
.dot.tone-purple, .swatch.tone-purple { background: #b57bff; }
.dot.tone-maroon, .swatch.tone-maroon { background: #c45c6a; }
.dot.tone-grey, .swatch.tone-grey { background: #8b8f97; }
.dot.tone-teal, .swatch.tone-teal { background: #2aa8a0; }
.dot.tone-pink, .swatch.tone-pink { background: #e86aa8; }
.dot.tone-yellow, .swatch.tone-yellow { background: #d4b020; }
.tone-text-dnd { color: #ff8a7e; }
.tone-text-orange { color: #f5c26b; }
.tone-text-blue { color: #8eb6ff; }
.tone-text-purple { color: #d2b0ff; }
.tone-text-maroon { color: #e89aa4; }
.tone-text-grey { color: #c4c7cc; }
.tone-text-teal { color: #6ed4cc; }

.status-picker { position: relative; }
.status-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  color: var(--text-hi);
  background: #202227;
  border: 1px solid #5a5e68;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.status-btn:hover { background: #272a30; }
.status-btn .label {
  flex: 1;
  min-width: 0;
  color: var(--text-hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-picker.clearable .status-btn {
  padding-right: 32px;
  cursor: default;
  /* Locked: only the X is clickable. The filled button otherwise eats the hit. */
  pointer-events: none;
}
.status-picker.clearable .status-btn:hover { background: #202227; }
.status-picker.clearable .status-btn::after { display: none; }
.status-btn::after {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--header-fg);
}
.status-clear {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--led-busy);
  cursor: pointer;
  z-index: 6;
  pointer-events: auto;
}
.status-clear[hidden] { display: none; }
.status-clear::before, .status-clear::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 1.8px;
  background: #fff;
  border-radius: 1px;
}
.status-clear::before { transform: translate(-50%, -50%) rotate(45deg); }
.status-clear::after { transform: translate(-50%, -50%) rotate(-45deg); }
.status-clear:hover { background: #ff5c5c; }
.status-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  background: #202227;
  border: 1px solid #5a5e68;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.status-picker.drop-up .status-menu { top: auto; bottom: calc(100% + 4px); }
.status-menu[hidden] { display: none; }
.status-menu button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  font: inherit;
  font-size: 12px;
  text-align: left;
  color: var(--text-hi);
  background: none;
  border: none;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
}
.status-menu button span:last-child { color: var(--text-hi); }
.status-menu button:hover, .status-menu button.current { background: #2c3038; }
.status-menu hr { border: none; border-top: 1px solid #3a3d44; margin: 4px 2px; }

.show-hidden-btn {
  font: inherit;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  color: var(--text-lo);
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  padding: 3px 8px;
  cursor: pointer;
}
.show-hidden-btn:hover { color: var(--text-hi); border-color: rgba(255,255,255,.28); }
.show-hidden-btn[hidden] { display: none; }
.show-hidden-btn.on { color: var(--text-hi); background: rgba(255,255,255,.08); }
