@import url('/web/fonts/fonts.css');
/*
 * Pure Server's look: an enterprise console. One set of tokens for the Plane,
 * the app host and the Typeset page, light and dark; the theme follows the
 * system unless the person chose one (web/theme.js sets data-theme on <html>).
 *
 * The idiom: a dark global header in both themes, square corners, flush
 * navigation, full-width pages with a header band and a command bar, data
 * grids, neutral greys. Measures: 48px header, 36px rows, 32px controls, 13px
 * text, titles at 16px.
 */
:root {
  --ground: #f2f3f5;
  --sheet: #ffffff;
  --layer: #f7f8f9;
  --chrome: #f7f8f9;
  --ink: #161a1f;
  --ink-2: #3d454e;
  --quiet: #5c6570;
  --faint: #7d8691;
  --rule: #dde1e6;
  --rule-strong: #c1c7cf;
  --hover: #eceef1;
  --selected: #e3ebf6;
  --accent: #0b5cad;
  --accent-ink: #0a4f95;
  --accent-soft: #e5eef8;
  --on-accent: #ffffff;
  --ok: #1e7a46;
  --ok-soft: #e3f1e8;
  --warn: #8e5a00;
  --warn-soft: #fbf1dc;
  --bad: #b3261e;
  --bad-soft: #fbe8e6;
  /* The global header is dark in both themes. */
  --shell: #15191e;
  --shell-2: #20262d;
  --shell-ink: #f1f3f5;
  --shell-quiet: #a7b0ba;
  --shell-rule: #333b44;
  --focus: 0 0 0 2px var(--accent);
  --shadow: 0 2px 6px rgb(0 0 0 / 0.12), 0 12px 32px rgb(0 0 0 / 0.14);
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --serif: "IBM Plex Serif", "Iowan Old Style", Georgia, serif;
  --bar: 48px;
  --row: 36px;
  --control: 32px;
  --radius: 2px;
  color-scheme: light;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--ground);
}
:root[data-theme="dark"] {
  --ground: #121417; --sheet: #1b1e22; --layer: #22262b; --chrome: #1b1e22; --ink: #eceef1; --ink-2: #c6ccd3; --quiet: #9aa3ad; --faint: #77808a;
  --rule: #2e333a; --rule-strong: #434a53; --hover: #262a30; --selected: #1d3149;
  --accent: #5b9be8; --accent-ink: #8ab8f0; --accent-soft: #1a2c42; --on-accent: #0b1726;
  --ok: #62c38c; --ok-soft: #15291d; --warn: #e2ad57; --warn-soft: #2d2311; --bad: #f0857b; --bad-soft: #301816;
  --shell: #0c0e10; --shell-2: #181b1f; --shell-rule: #2a2f35;
  --shadow: 0 2px 6px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { display: flex; flex-direction: column; background: var(--ground); color: var(--ink); -webkit-font-smoothing: antialiased; }
/* Hidden means hidden, whatever display a component sets (drawers, panels and menus close by this). */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
code, pre { font-family: var(--mono); }

/* --- The global header --------------------------------------------------------------- */
.bar {
  position: relative; display: flex; align-items: stretch; height: var(--bar); padding: 0; flex: none;
  background: var(--shell); color: var(--shell-ink); border-bottom: 1px solid var(--shell-rule); font-size: 13px;
}
.bar > * { display: flex; align-items: center; }
.mark { gap: 10px; padding: 0 16px; font-weight: 600; white-space: nowrap; color: var(--shell-ink); text-decoration: none; letter-spacing: 0.01em; }
.mark::before { content: ""; width: 18px; height: 18px; background: var(--shell-ink); clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%); }
.mark:hover { background: var(--shell-2); }
.bar-sep { width: 1px; align-self: center; height: 22px; background: var(--shell-rule); flex: none; }
.app { gap: 10px; padding: 0 14px; color: var(--shell-ink); white-space: nowrap; font-weight: 400; }
.app-icon { width: 22px; height: 22px; display: block; }
.app-icon[hidden] { display: none; }
.doc { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; color: var(--shell-quiet); }
.grow { flex: 1; }
.actions { display: flex; align-items: center; gap: 8px; }
.bar > .actions { align-self: stretch; padding-left: 8px; }
.bar .actions > .actions { align-self: stretch; gap: 0; margin-left: 4px; }
.who { white-space: nowrap; }
.bar .button { background: transparent; border-color: var(--shell-rule); color: var(--shell-ink); }
.bar .button:hover { background: var(--shell-2); }
.bar .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.bar .button.primary:hover { background: var(--accent-ink); }
.bar .button:disabled { opacity: 0.45; }
.bar .link { color: var(--shell-ink); }

/* --- Controls --------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 500; height: var(--control); padding: 0 14px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); white-space: nowrap; text-decoration: none;
}
.button:hover { background: var(--hover); }
.button:disabled { opacity: 0.5; cursor: default; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.button.ghost { border-color: transparent; background: transparent; color: var(--accent-ink); }
.button.ghost:hover { background: var(--hover); }
.button.small { height: 26px; padding: 0 10px; font-size: 12px; }
.button.danger { color: var(--bad); }
.link { font: inherit; font-size: 13px; background: none; border: none; color: var(--accent-ink); cursor: pointer; padding: 0; text-decoration: none; }
.link:hover { text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--ink); }
.field, .admin input:not([type="checkbox"]):not([type="radio"]), .admin select, .filters select, .filters input {
  height: var(--control); font-size: 13px; padding: 0 10px; border: 1px solid var(--rule-strong); border-bottom-color: var(--faint);
  border-radius: var(--radius); background: var(--sheet); color: var(--ink); min-width: 0;
}
.admin input:focus, .admin select:focus, .filters select:focus, .filters input:focus, .field:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.switch { appearance: none; width: 32px; height: 16px; border-radius: 8px; background: var(--rule-strong); position: relative; cursor: pointer; margin: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 0.12s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(16px); }

/* Status: a square swatch and a word, never a pill. */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 6px; border-radius: var(--radius); font-size: 12px; font-weight: 500; white-space: nowrap; color: var(--ink-2); background: var(--layer); border: 1px solid var(--rule); }
.tag::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }
.tag.plain::before { display: none; }
.tag.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tag.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.tag.accent { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }

/* Menus (theme, user): drop down from the header */
.menu { position: relative; display: flex; align-items: stretch; height: 100%; }
.menu-pop { position: absolute; right: 0; top: 100%; min-width: 240px; background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-top: none; box-shadow: var(--shadow); padding: 4px 0; z-index: 50; }
.menu-pop[hidden] { display: none; }
.menu-head { padding: 12px 16px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.menu-head strong { display: block; font-size: 13px; font-weight: 600; }
.menu-head span { color: var(--quiet); font-size: 12px; }
.menu-label { padding: 8px 16px 6px; color: var(--quiet); font-size: 12px; font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 16px; border: none; background: none; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; text-decoration: none; }
.menu-item:hover { background: var(--hover); }
.segmented { display: flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; height: 30px; margin: 2px 16px 12px; }
.segmented button { flex: 1; font: inherit; font-size: 12px; border: none; background: var(--sheet); color: var(--ink-2); padding: 0 12px; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--rule-strong); }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 600; color: var(--shell); background: #c9d6e6; flex: none; }
.user-button { display: inline-flex; align-items: center; gap: 10px; height: 100%; padding: 0 14px; border: none; border-left: 1px solid var(--shell-rule); background: none; cursor: pointer; font: inherit; color: var(--shell-ink); }
.user-button:hover, .user-button[aria-expanded="true"] { background: var(--shell-2); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 100%; border: none; background: none; color: var(--shell-ink); cursor: pointer; }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--shell-2); }
.icon-button svg, .nav-icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; flex: none; }

/* The app switcher (web/switcher.js): every bar's way to any other app, and to open one beside this */
.switcher { position: relative; display: flex; align-items: stretch; }
.switcher-button { display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; background: transparent; color: var(--shell-ink); font: inherit; font-size: 13px; cursor: pointer; opacity: 0.85; }
.switcher-button:hover, .switcher-button[aria-expanded="true"] { background: var(--shell-2); opacity: 1; }
.switcher-pop { position: absolute; left: 0; top: 100%; z-index: 90; width: min(380px, calc(100vw - 24px)); background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.switcher-search { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); color: var(--ink); }
.switcher-list { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 520px); overflow-y: auto; }
.switcher-list li { display: flex; align-items: center; }
.switcher-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.switcher-item:hover, .switcher-item:focus-visible { background: var(--hover); outline: none; }
.switcher-item.current { background: var(--selected); }
.switcher-icon { width: 26px; height: 26px; flex: none; border-radius: 7px; }
.switcher-icon.page { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 14px; color: var(--sheet); background: var(--ink); }
.switcher-text { display: flex; flex-direction: column; min-width: 0; }
.switcher-text strong { font-weight: 500; }
.switcher-text span { font-size: 12px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The desk's split placement (shell desk/SplitPlacement.tsx): two halves of one split icon, each a target */
.placement { display: inline-flex; flex: none; align-items: center; border-radius: 6px; color: var(--ink); }
.placement button { display: grid; place-items: center; width: 20px; height: 30px; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.placement button:first-child { border-radius: 6px 0 0 6px; }
.placement button:last-child { border-radius: 0 6px 6px 0; }
.placement span { width: 10px; height: 15px; border: 1px solid currentColor; opacity: .65; }
.placement button:first-child span { border-radius: 3px 0 0 3px; margin-right: -8px; }
.placement button:last-child span { border-radius: 0 3px 3px 0; margin-left: -8px; }
.placement button:hover, .placement button:focus-visible { background: var(--hover); color: var(--accent-ink); }
.placement button:hover span, .placement button:focus-visible span { background: currentColor; opacity: 1; }
.placement button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.switcher-foot { margin: 2px 4px 0; font-size: 11.5px; color: var(--quiet); }
/* Inside a split pane, the outer page carries the mark and the person's menu */
html.embedded .bar .mark, html.embedded .bar .bar-sep, html.embedded #bar-end { display: none !important; }
html.embedded .switcher-label { display: none; }
/* The close for one side of a split, at the end of that side's bar; it sits over the bar's end so a crowded bar never pushes it out of reach */
html.embedded .bar { padding-right: 44px; }
.pane-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 0; border-radius: var(--radius); background: transparent; color: var(--shell-quiet); cursor: pointer; flex: none; z-index: 1; }
.pane-close:hover { background: var(--shell-2); color: var(--shell-ink); }
.pane-close svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }

/* The person's own choices in their menu (web/chrome.js ownSettings), where the organisation leaves them to people. */
.menu-setting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.menu-setting .segmented { display: inline-flex; margin: 0; }
.menu-setting .link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; }
