/* Orq OS mockup styles — derived from frontend/app/globals.css "Editorial Intelligence" light theme */
:root {
  --bg: #faf9f5;
  --shell: #e2e3da;
  --surface: #f4f4f0;
  --surface-high: #e9e8e4;
  --raised: #dfe1d7;
  --border: #c5c7bf;
  --text: #1b1c1a;
  --muted: #5c5f58;
  --faint: #757871;
  --accent: #3c4437;
  --accent-light: #596153;
  --accent-strong: #535b4d;
  --accent-fg: #ffffff;
  --success: #3a7a4a;
  --warning: #8a6a20;
  --danger: #ba1a1a;
  --assistant: #ffffff;
  --user: #e9e8e4;
  --code-bg: #141614;
  --code-text: #d8e0d4;
  --ghost: rgba(69, 72, 65, 0.12);
  --ghost-strong: rgba(69, 72, 65, 0.22);
  --shadow: 0 2px 10px rgba(27, 28, 26, 0.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--shell);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* ---- gallery chrome (not part of the product UI) ---- */
.gallery { max-width: 1340px; margin: 0 auto; padding: 32px 24px 80px; }
.gallery-header { max-width: 820px; margin-bottom: 36px; }
.gallery-header h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.gallery-header p { color: var(--muted); margin-bottom: 8px; }
.gallery-header .crumb { font-size: 12px; margin-bottom: 18px; display: block; }
.screen-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--faint); margin: 40px 0 10px;
}
.screen-label b { color: var(--accent); }
.frame {
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 30px rgba(27, 28, 26, 0.1); overflow: hidden; position: relative;
}
.legend { margin-top: 14px; display: grid; gap: 6px; max-width: 860px; }
.legend li { list-style: none; display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.legend .dot { flex: none; margin-top: 1px; }

/* numbered annotation pins */
.dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  color: var(--accent-fg); font-size: 10.5px; font-weight: 700;
}
.pin { position: absolute; z-index: 40; filter: drop-shadow(0 1px 3px rgba(27,28,26,.35)); }

/* ---- app frame ---- */
.app { display: flex; height: 780px; background: var(--bg); }

/* icon rail */
.rail {
  width: 56px; flex: none; background: var(--shell); border-right: 1px solid var(--ghost);
  display: flex; flex-direction: column; align-items: center; padding: 12px 0;
}
.rail .logo {
  width: 32px; height: 32px; border-radius: 8px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.rail button {
  position: relative; width: 40px; height: 40px; border: 0; background: transparent;
  border-radius: 8px; color: var(--faint); margin-bottom: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.rail button.active { background: var(--surface-high); color: var(--accent); }
.rail button.active::before {
  content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.rail .spacer { flex: 1; }
.rail .conn { width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-bottom: 8px; }
.rail svg { width: 20px; height: 20px; }

/* sidebar */
.sidebar {
  width: 264px; flex: none; background: var(--bg); border-right: 1px solid var(--ghost);
  display: flex; flex-direction: column;
}
.sidebar .brand {
  padding: 16px 20px 4px; font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar .brand .os { color: var(--accent-light); }
.micro {
  font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted);
}
.sidebar .section-head { padding: 14px 20px 6px; display: flex; gap: 14px; align-items: baseline; }
.sidebar .section-head .tab { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding-bottom: 2px; }
.sidebar .section-head .tab.on { color: var(--text); border-bottom: 2px solid var(--accent); }
.sidebar .section-head .count { font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); }
.slist { padding: 6px 8px; overflow: hidden; }
.sitem { display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; align-items: flex-start; }
.sitem:hover { background: var(--surface); }
.sitem.on { background: var(--surface-high); }
.sitem .tone { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }
.sitem .t { font-size: 13px; font-weight: 600; line-height: 1.25; }
.sitem .m { font-size: 11px; color: var(--faint); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--ghost-strong);
  border-radius: 999px; padding: 0 7px; height: 17px; font-size: 10px; color: var(--muted);
  background: var(--surface); white-space: nowrap;
}
.sdivider { border-top: 1px solid var(--ghost); margin: 8px 12px; }

/* main pane */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main-head {
  padding: 14px 24px; border-bottom: 1px solid var(--ghost);
  display: flex; align-items: center; gap: 12px;
}
.main-head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.btn {
  border: 1px solid var(--ghost-strong); background: var(--surface); color: var(--text);
  font-size: 12px; font-weight: 600; border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.sm { font-size: 11px; padding: 3px 9px; border-radius: 6px; }

/* status dots + badges */
.st { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st.ok { background: var(--success); }
.st.warn { background: var(--warning); }
.st.bad { background: var(--danger); }
.st.off { background: var(--border); }
.badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 2px 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
}
.badge.standalone { background: #e7ebe2; color: var(--accent); }
.badge.heartbeat { background: #f3ead6; color: var(--warning); }
.badge.dedicated { background: #e3ecf3; color: #2d5a7a; }
.badge.new { background: var(--accent); color: var(--accent-fg); font-size: 9px; letter-spacing: 0.1em; }

/* chat */
.chatscroll { flex: 1; overflow: hidden; padding: 18px 0; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 680px; margin: 0 auto; width: calc(100% - 96px); position: relative; }
.msg .who { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.bubble { border-radius: 12px; padding: 12px 16px; font-size: 13.5px; }
.msg.user .bubble { background: var(--user); }
.msg.assistant .bubble { background: var(--assistant); border: 1px solid var(--ghost); box-shadow: var(--shadow); }
.bubble p + p { margin-top: 8px; }
.bubble code { font-family: ui-monospace, monospace; font-size: 12px; background: var(--surface-high); border-radius: 4px; padding: 1px 5px; }
.composer { padding: 14px 48px 20px; }
.composer .box {
  max-width: 680px; margin: 0 auto; background: #fff; border: 1px solid var(--ghost-strong);
  border-radius: 14px; box-shadow: var(--shadow); padding: 12px 16px; color: var(--faint);
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
}
.composer .box .grow { flex: 1; }
.iconbtn { color: var(--faint); display: inline-flex; }
.iconbtn svg { width: 17px; height: 17px; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 9.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--ghost-strong);
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--ghost); vertical-align: middle; }
.tbl tr.rowon td { background: var(--surface); }
.tbl .name { font-weight: 650; }
.tbl .sub { font-size: 11px; color: var(--faint); margin-top: 2px; }
.mono { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }

/* toggle */
.tgl { width: 30px; height: 17px; border-radius: 999px; background: var(--accent); position: relative; display: inline-block; }
.tgl::after { content: ""; position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.tgl.off { background: var(--border); }
.tgl.off::after { right: auto; left: 2px; }

/* cards */
.card { background: var(--assistant); border: 1px solid var(--ghost); border-radius: 12px; box-shadow: var(--shadow); }
.spot { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
