/* ============================================================
   ARCO Project Manager — Design System v3
   Dark navy + indigo, geometric sans (Poppins)
   Palette sampled from the reference dashboard design
   ============================================================ */

:root {
  /* surfaces */
  --bg: #181b2e;
  --bg-deep: #14172a;
  --sidebar-bg: #14172a;
  --surface: #23273d;
  --surface-2: #272c45;
  --surface-3: #2e3350;
  --line: #303555;
  --line-strong: #3c4266;

  /* text */
  --ink: #ffffff;
  --ink-2: #b9c0dd;
  --ink-3: #646d95;

  /* accents */
  --accent: #6588f9;
  --accent-hover: #7b9afb;
  --accent-soft: rgba(101, 136, 249, 0.16);
  --green: #3fd88c;
  --green-soft: rgba(63, 216, 140, 0.14);
  --orange: #fe7423;
  --orange-soft: rgba(254, 116, 35, 0.14);
  --coral: #fd7066;
  --coral-soft: rgba(253, 112, 102, 0.14);
  --violet: #9e31f5;
  --violet-soft: rgba(158, 49, 245, 0.16);
  --sky: #62c2fd;
  --sky-soft: rgba(98, 194, 253, 0.14);

  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 12px 32px rgba(0, 0, 0, 0.22);
  --shadow-accent: 0 10px 26px rgba(101, 136, 249, 0.32);
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-soft); }

/* thin dark scrollbars */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; }
*::-webkit-scrollbar-thumb:hover { background: #4b5280; }

/* ---------- generic ---------- */

.label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--ink-3); }

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646d95' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 32px;
}
select option { background: var(--surface); color: var(--ink); }

.btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s, transform 0.06s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.btn-danger { background: transparent; color: var(--coral); border-color: transparent; }
.btn-danger:hover:not(:disabled) { background: var(--coral-soft); }
.btn-sm { padding: 6px 14px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }

.alert {
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-error { color: var(--coral); background: var(--coral-soft); }
.alert-ok { color: var(--green); background: var(--green-soft); }
.hidden { display: none !important; }

/* ---------- login page ---------- */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}

.login-hero {
  margin: 16px;
  border-radius: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(110% 120% at 85% 5%, rgba(101, 136, 249, 0.5) 0%, rgba(101, 136, 249, 0) 52%),
    radial-gradient(90% 110% at 5% 100%, rgba(158, 49, 245, 0.35) 0%, rgba(158, 49, 245, 0) 55%),
    linear-gradient(150deg, #262c4c 0%, #1b1f36 55%, #14172a 100%);
}
/* faint blueprint grid over the gradient */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  pointer-events: none;
}
.login-hero > * { position: relative; }

.login-hero .brand-mark { font-size: 19px; font-weight: 700; letter-spacing: 0.14em; }
.login-hero .brand-mark span { color: rgba(255, 255, 255, 0.4); }
.login-hero h1 { font-size: 34px; font-weight: 700; line-height: 1.25; max-width: 460px; letter-spacing: -0.01em; }
.login-hero p { color: var(--ink-2); margin-top: 14px; max-width: 400px; font-size: 14.5px; }
.login-hero .hero-foot { color: rgba(255, 255, 255, 0.34); font-size: 12px; letter-spacing: 0.08em; }

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 26px; font-weight: 700; margin-bottom: 5px; letter-spacing: -0.01em; }
.login-card .sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 30px; }
.login-card .field { margin-bottom: 18px; }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}

/* ---------- app layout ---------- */

.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand {
  padding: 26px 24px 20px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}
.sidebar .brand span { color: var(--ink-3); }

.nav { flex: 1; padding: 4px 14px; display: flex; flex-direction: column; gap: 3px; }

.nav-section {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 18px 10px 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: var(--surface); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.nav-item svg {
  width: 18px; height: 18px; flex-shrink: 0;
  stroke: currentColor; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

.sidebar-foot {
  padding: 16px 20px;
  margin: 0 14px 14px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.sidebar-foot .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; color: #fff; flex-shrink: 0;
}
.sidebar-foot .user-name { color: #fff; font-weight: 600; }
.sidebar-foot .user-role { color: var(--ink-3); font-size: 11.5px; }

/* ---------- main content ---------- */

.main { display: flex; flex-direction: column; min-width: 0; }

.content { padding: 26px 34px 48px; max-width: 1280px; width: 100%; }

/* gradient hero banner (per page) */
.hero {
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 30px 34px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(110% 150% at 88% -15%, rgba(101, 136, 249, 0.55) 0%, rgba(101, 136, 249, 0) 55%),
    radial-gradient(80% 130% at 2% 115%, rgba(158, 49, 245, 0.35) 0%, rgba(158, 49, 245, 0) 58%),
    linear-gradient(135deg, #2a3055 0%, #1d2239 58%, #171b2f 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.hero .hero-sub { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.hero .hero-stat { margin-top: 15px; display: flex; align-items: baseline; gap: 8px; }
.hero .hero-stat b { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.hero .hero-stat span { color: var(--ink-3); font-size: 13px; }
.hero .hero-btn {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 11px 22px;
  box-shadow: var(--shadow-accent);
}
.hero .hero-btn:hover { background: var(--accent-hover); }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-body { padding: 24px; }

/* toolbar (search + filters) */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .search-wrap { position: relative; }
.toolbar .search-wrap svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--ink-3); fill: none;
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}
.toolbar .search-input { width: 250px; padding: 8px 14px 8px 36px; font-size: 13px; border-radius: 100px; }
.toolbar select { width: auto; padding: 8px 32px 8px 13px; font-size: 13px; border-radius: 100px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat .ico {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat .ico svg { width: 19px; height: 19px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.stat .ico.i-accent { background: var(--accent-soft); }
.stat .ico.i-accent svg { stroke: var(--accent); }
.stat .ico.i-green { background: var(--green-soft); }
.stat .ico.i-green svg { stroke: var(--green); }
.stat .ico.i-orange { background: var(--orange-soft); }
.stat .ico.i-orange svg { stroke: var(--orange); }
.stat .ico.i-violet { background: var(--violet-soft); }
.stat .ico.i-violet svg { stroke: var(--violet); }
.stat .num { font-size: 25px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.stat .cap { font-size: 12.5px; color: var(--ink-3); }

/* table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 14px 24px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
td b { color: #fff; font-weight: 600; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* pill badges */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: 100px;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
}
.badge.role-admin { background: var(--accent-soft); color: var(--accent); }
.badge.st-on { background: var(--green-soft); color: var(--green); }
.badge.st-off { background: var(--coral-soft); color: var(--coral); }
.badge.st-warn { background: var(--orange-soft); color: var(--orange); }
.badge.st-dark { background: var(--sky-soft); color: var(--sky); }
.badge.st-violet { background: var(--violet-soft); color: var(--violet); }

.row-actions { display: flex; gap: 5px; justify-content: flex-end; }

/* forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { min-width: 0; }
.form-foot { display: flex; gap: 10px; margin-top: 22px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 22, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* force change password overlay */
.force-pass {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.force-pass .card { width: 100%; max-width: 430px; }

/* toast */
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 11px 26px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-accent);
}
#toast.show { opacity: 1; }

.empty { text-align: center; color: var(--ink-3); padding: 44px 20px; font-size: 13px; }

@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content { padding: 16px 16px 40px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
}

/* ============================================================
   project structure tree (buildings / floors / sections)
   ============================================================ */

.tree { display: flex; flex-direction: column; gap: 10px; }

.node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  overflow: hidden;
}
.node-floor { background: var(--surface-2); }
.node-section { background: var(--surface); }

.node-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
}
.node-row:hover { background: rgba(255, 255, 255, 0.022); }

.node-twist {
  width: 22px; height: 22px; flex-shrink: 0;
  border: none; background: var(--surface-3); color: var(--ink-2);
  border-radius: 7px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; padding: 0;
  transition: transform 0.16s, background 0.14s;
}
.node-twist:hover { background: var(--line-strong); color: #fff; }
.node-twist svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.node-twist.open { transform: rotate(90deg); }
.node-twist.leaf { visibility: hidden; }

.node-ico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.node-ico svg { width: 16px; height: 16px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.node-ico.i-building { background: var(--accent-soft); }
.node-ico.i-building svg { stroke: var(--accent); }
.node-ico.i-floor { background: var(--sky-soft); }
.node-ico.i-floor svg { stroke: var(--sky); }
.node-ico.i-section { background: var(--violet-soft); }
.node-ico.i-section svg { stroke: var(--violet); }

.node-label { min-width: 0; flex: 1; }
.node-label .name { font-weight: 600; color: #fff; font-size: 13.5px; }
.node-label .meta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 9px; flex-wrap: wrap; }

/* generated codes read as identifiers, so give them a mono face */
.code-chip {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  background: var(--surface-3);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.node-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.node-children { padding: 0 14px 12px 48px; display: flex; flex-direction: column; gap: 8px; }
.node-children .empty { padding: 14px 4px; text-align: left; }

.btn-open {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  line-height: 1;
}
.btn-open:hover:not(:disabled) { background: var(--accent); color: #fff; }
.btn-open svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.code-preview {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 9px;
  padding: 9px 13px;
}

/* ============================================================
   CAD workspace
   ============================================================ */

.ws-body { overflow: hidden; }

.ws {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg-deep);
}

/* --- top bar --- */
.ws-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--line);
  /* the tool cluster drops to its own row rather than overflowing off-screen */
  flex-wrap: wrap;
}

.ws-back {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.14s, color 0.14s;
}
.ws-back:hover { background: var(--surface-3); color: #fff; }
.ws-back svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ws-title { min-width: 0; flex: 1 1 200px; }
.ws-crumb {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #fff; }
.ws-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 8px;
}

.ws-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ws-group { display: flex; align-items: center; gap: 8px; }
.ws-group-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.ws-select { width: auto; padding: 7px 30px 7px 12px; font-size: 12.5px; border-radius: 9px; background: var(--surface); }
.ws-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }

.ws-btn {
  height: 34px;
  min-width: 34px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.ws-btn:hover:not(:disabled) { background: var(--surface-3); color: #fff; }
.ws-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ws-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ws-btn-wide { padding: 0 13px; }
.ws-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* --- drawing stage --- */
.ws-stage { position: relative; overflow: hidden; background: #151827; }
.ws-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  /* AutoCAD hides the arrow pointer and draws its own crosshair */
  cursor: none;
  touch-action: none;
  outline: none;
}
.ws-stage canvas.pannable { cursor: grab; }
.ws-stage canvas.panning { cursor: grabbing; }
.ws-stage canvas.picking { cursor: none; }

.ws-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: rgba(20, 23, 42, 0.86);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
  padding: 7px 16px;
  border-radius: 100px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.6s;
}
.ws-hint.fade { opacity: 0; }

.ws-command {
  position: absolute;
  left: 16px;
  top: 16px;
  background: rgba(20, 23, 42, 0.92);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  padding: 9px 15px;
  border-radius: 9px;
  pointer-events: none;
  max-width: 60ch;
}

/* --- status bar --- */
.ws-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--sidebar-bg);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  flex-wrap: wrap;
}

.ws-coords {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  border-radius: 9px;
  padding: 5px 12px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.14s;
}
.ws-coords:hover { border-color: var(--line-strong); }
.ws-coords #ws-coord-text {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
  /* fixed width so the bar does not jitter as digits change */
  min-width: 19ch;
  text-align: left;
}
.ws-coord-mode {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 6px;
}

.ws-status-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.ws-status-spacer { flex: 1; }

.ws-toggle {
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.14s, color 0.14s;
}
.ws-toggle span { font-size: 9px; font-weight: 500; color: var(--ink-3); opacity: 0.7; }
.ws-toggle:hover { background: var(--surface); color: var(--ink-2); }
.ws-toggle.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(101, 136, 249, 0.32); }
.ws-toggle.on span { color: var(--accent); }

.ws-status-item { padding: 0 9px; white-space: nowrap; }
.ws-status-item b {
  color: var(--ink-2);
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.ws-ucs b { color: var(--accent); }

@media (max-width: 1100px) {
  .ws-tools .ws-btn-wide { padding: 0 9px; font-size: 0; gap: 0; }
  .ws-group-label { display: none; }
  .ws-hint { display: none; }
}
