:root {
  --bg: #090a08;
  --topbar: #0c0d0a;
  --panel: #10110e;
  --panel-2: #151611;
  --panel-3: #1b1b15;
  --surface: #12140f;
  --surface-2: #181a13;
  --ink: #f0f1e8;
  --ink-soft: #d6d8ca;
  --muted: #9aa091;
  --faint: #6f7669;
  --line: #2b2f26;
  --line-strong: #3f4637;
  --accent: #65d39e;
  --accent-strong: #25a46f;
  --gold: #ddb75b;
  --blue: #7aa7ff;
  --red: #ef786f;
  --violet: #b78cff;
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
  scrollbar-color: rgba(101, 211, 158, 0.46) #0b0d0a;
  scrollbar-width: thin;
}

[hidden] {
  display: none !important;
}

.remote-auth-pending .shell,
.remote-desktop-offline .shell {
  visibility: hidden;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0b0d0a;
  border-left: 1px solid rgba(63, 70, 55, 0.45);
}

::-webkit-scrollbar-thumb {
  border: 2px solid #0b0d0a;
  border-radius: 999px;
  background: rgba(101, 211, 158, 0.42);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(101, 211, 158, 0.68);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button,
textarea,
input,
select {
  font: inherit;
}

button,
input,
textarea,
select {
  color: var(--ink);
}

button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: var(--panel-3);
  cursor: pointer;
}

button:hover {
  border-color: var(--accent);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.project-tile:focus-visible {
  outline: 2px solid rgba(101, 211, 158, 0.52);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

input,
textarea,
select {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 9px;
  background: #0c0e0b;
  outline: none;
}

textarea {
  padding: 9px 10px;
  line-height: 1.36;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

.locked-field {
  color: var(--muted);
  border-color: rgba(63, 70, 55, 0.72);
  background: #0b0d0a;
  cursor: default;
}

h2,
h3,
p {
  margin: 0;
}

.shell {
  display: grid;
  grid-template-rows: 48px 1fr;
  height: 100vh;
  height: 100dvh;
  min-width: 1080px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.compact-workspace-nav {
  display: none;
}

.remote-login-overlay,
.remote-availability-overlay {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 6, 4, 0.92);
  backdrop-filter: blur(12px);
}

.remote-login-card,
.remote-availability-card {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.remote-login-card img,
.remote-availability-card img {
  width: 160px;
  max-width: 60%;
}

.remote-login-card h1,
.remote-availability-card h1 {
  margin: 4px 0 0;
  font-size: 20px;
}

.remote-login-card p,
.remote-login-status,
.remote-availability-card p,
.remote-availability-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.remote-login-status,
.remote-availability-status {
  min-height: 18px;
  color: var(--gold);
  font-size: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.brand-logo img {
  display: block;
  width: 138px;
  max-width: 34vw;
  max-height: 30px;
  object-fit: contain;
}

.top-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.remote-access-wrap {
  position: relative;
  display: inline-flex;
}

.remote-access-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(101, 211, 158, 0.42);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(101, 211, 158, 0.08);
  font-weight: 900;
}

.remote-access-button:hover,
.remote-access-button[aria-expanded="true"] {
  border-color: var(--accent);
  background: rgba(101, 211, 158, 0.16);
}

.remote-access-panel {
  position: absolute;
  z-index: 120;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 20px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.remote-access-panel-head {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.remote-access-panel label,
.remote-access-status {
  color: var(--muted);
  font-size: 11px;
}

.remote-access-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.04em;
}

.remote-access-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(221, 183, 91, 0.35);
}

.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(101, 211, 158, 0.35);
}

.president-notification-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.president-notification-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(221, 183, 91, 0.42);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(221, 183, 91, 0.08);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.president-notification-bell:hover,
.president-notification-bell[aria-expanded="true"],
.president-notification-bell.has-unread {
  border-color: var(--gold);
  background: rgba(221, 183, 91, 0.16);
}

.president-notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid #0c0d0a;
  border-radius: 999px;
  color: #0c0d0a;
  background: var(--gold);
  font-size: 10px;
  font-weight: 900;
}

.president-notification-panel {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 50;
  width: min(380px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 72px));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0d0f0b;
  box-shadow: var(--shadow);
}

.president-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.president-notification-list {
  display: grid;
  gap: 8px;
  max-height: calc(min(520px, calc(100vh - 72px)) - 36px);
  overflow: auto;
  padding: 10px;
}

.president-notification-empty {
  padding: 16px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.president-notification-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.president-notification-item.unread {
  border-color: rgba(221, 183, 91, 0.58);
  background: rgba(221, 183, 91, 0.08);
}

.president-notification-item.discussed {
  opacity: 0.74;
}

.president-notification-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.president-notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.president-notification-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 790;
  overflow-wrap: anywhere;
}

.president-notification-body {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.president-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.president-notification-action {
  min-height: 26px;
  padding: 0 8px;
  color: var(--muted);
  background: #0d0f0b;
  font-size: 11px;
}

.president-notification-action.primary {
  color: var(--gold);
  border-color: rgba(221, 183, 91, 0.52);
  background: rgba(221, 183, 91, 0.08);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(460px, var(--dashboard-width, 7fr)) 8px minmax(340px, 3fr);
  min-height: 0;
  overflow: hidden;
}

.org-panel,
.ops-panel,
.dashboard-panel,
.detail-panel {
  min-height: 0;
  background: var(--panel);
}

.org-panel {
  display: grid;
  grid-template-rows: 38px auto minmax(120px, 1fr) auto auto auto;
  border-right: 1px solid var(--line);
  overflow: hidden;
}

.ops-panel {
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr);
  min-width: 0;
  background: #0d0f0b;
}

.detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  grid-template-rows: minmax(0, 1fr);
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.detail-panel.inspector-collapsed {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.dashboard-panel {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  min-width: 0;
  background: #0d0f0b;
  overflow: hidden;
}

.dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: #10120d;
}

.main-tab-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(88px, 1fr));
  min-width: 0;
}

.main-tab-button {
  min-width: 0;
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 820;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-tab-button:hover,
.main-tab-button.active,
.main-tab-button[aria-selected="true"] {
  color: var(--ink);
  background: rgba(101, 211, 158, 0.07);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.dashboard-scroll {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.main-tab-panel {
  display: none;
  min-width: 0;
  min-height: 0;
}

.main-tab-panel.active {
  display: grid;
  align-content: start;
  gap: 12px;
}

.workspace-splitter {
  position: relative;
  z-index: 4;
  min-width: 8px;
  background: #080907;
  cursor: col-resize;
  outline: 0;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.workspace-splitter::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: -18px;
  right: -18px;
}

.workspace-splitter::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(63, 70, 55, 0.95);
}

html.workspace-resize-active,
html.workspace-resize-active * {
  cursor: col-resize !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

html.workspace-resize-active::after {
  content: "";
  position: fixed;
  z-index: 2147483646;
  inset: 0;
  cursor: col-resize;
  touch-action: none;
}

.workspace-splitter:hover::before,
.workspace-splitter:focus-visible::before,
.workspace.is-resizing .workspace-splitter::before {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(101, 211, 158, 0.12);
}

.synth-rail {
  grid-column: 2;
  display: grid;
  grid-auto-rows: 40px;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 6px;
  border-left: 1px solid var(--line);
  background: #090a08;
  overflow: auto;
}

.synth-rail-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.synth-rail-button:hover,
.synth-rail-button.selected {
  border-color: transparent;
  color: var(--ink);
  background: #202319;
}

.synth-rail-button.running {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 2px rgba(101, 211, 158, 0.22), 0 0 16px rgba(101, 211, 158, 0.32);
}

.synth-rail-button.root {
  border-color: transparent;
  color: var(--gold);
  box-shadow: none;
}

.synth-rail-button.root.running {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(101, 211, 158, 0.22), 0 0 16px rgba(101, 211, 158, 0.32);
}

.synth-rail-button.root.selected {
  color: var(--gold);
  background: rgba(221, 183, 91, 0.08);
}

.synth-rail-button.root.selected.running {
  color: var(--accent);
  background: var(--surface-2);
}

.synth-rail-empty {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px dashed var(--line);
  border-radius: 50%;
  color: var(--faint);
  font-weight: 800;
}

.panel-title {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
  text-transform: uppercase;
}

.ops-title {
  background: #10120d;
}

.ops-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.context-create-button {
  min-height: 26px;
  border-color: rgba(101, 211, 158, 0.4);
  color: #06100d;
  background: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.context-create-button:hover,
.context-create-button.active,
.context-create-button[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent);
}

.ghost-action {
  min-height: 28px;
  color: var(--muted);
  background: #0d0f0b;
  font-size: 11px;
}

.cycle-signal {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 190px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #0d0f0b;
  font-size: 11px;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cycle-signal.running {
  color: var(--gold);
  border-color: rgba(221, 183, 91, 0.48);
  background: rgba(221, 183, 91, 0.09);
}

.cycle-signal.done {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.45);
  background: rgba(101, 211, 158, 0.09);
}

.cycle-signal.error {
  color: var(--red);
  border-color: rgba(239, 120, 111, 0.5);
  background: rgba(239, 120, 111, 0.1);
}

.org-chart {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.org-create-panel {
  border-bottom: 1px solid var(--line);
  background: #0d0f0b;
}

.org-create-head {
  min-height: 36px;
  padding: 6px 8px 6px 12px;
}

.org-create-body {
  padding: 10px 12px 12px;
}

.org-create-grid {
  grid-template-columns: 54px minmax(0, 1fr);
}

.org-create-action {
  margin-top: 8px;
}

.org-tree,
.org-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.org-tree ul {
  margin-left: 18px;
  padding-left: 18px;
}

.org-tree li {
  position: relative;
  padding-left: 18px;
  margin: 0 0 11px;
}

.org-tree li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: -12px;
  width: 2px;
  background: var(--line-strong);
}

.org-tree li:last-child::before {
  display: none;
}

.org-tree li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 24px;
  width: 12px;
  height: 2px;
  background: var(--line-strong);
}

.org-tree > li {
  padding-left: 0;
}

.org-tree > li::before,
.org-tree > li::after {
  display: none;
}

.synth-node {
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  text-align: left;
  background: var(--surface-2);
}

.synth-node.root {
  border-color: rgba(221, 183, 91, 0.72);
  box-shadow: inset 0 0 0 1px rgba(221, 183, 91, 0.14);
}

.synth-node.selected {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.synth-node.root.selected {
  border-color: var(--gold);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(221, 183, 91, 0.22);
}

.synth-identity {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.synth-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  background: rgba(240, 241, 232, 0.04);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.synth-node.root .synth-avatar {
  border-color: transparent;
  color: var(--gold);
  background: rgba(221, 183, 91, 0.06);
}

.synth-node.running .synth-avatar {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(101, 211, 158, 0.08);
  box-shadow: 0 0 0 2px rgba(101, 211, 158, 0.2), 0 0 16px rgba(101, 211, 158, 0.28);
}

.synth-node.root.running .synth-avatar {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(101, 211, 158, 0.08);
  box-shadow: 0 0 0 2px rgba(101, 211, 158, 0.2), 0 0 16px rgba(101, 211, 158, 0.28);
}

.synth-copy {
  min-width: 0;
}

.synth-name {
  display: block;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.synth-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.synth-role,
.synth-status,
.synth-authority,
.synth-department {
  display: inline-flex;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.synth-authority {
  padding: 1px 5px;
  border: 1px solid rgba(101, 211, 158, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(101, 211, 158, 0.06);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.synth-authority.authority-root {
  border-color: rgba(221, 183, 91, 0.42);
  color: var(--gold);
  background: rgba(221, 183, 91, 0.08);
}

.synth-department {
  display: block;
  margin-top: 4px;
  color: var(--faint);
}

.side-section {
  max-height: 38vh;
  overflow: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #0d0f0b;
}

.mini-title {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 740;
  text-transform: uppercase;
}

.workload-board {
  display: grid;
  gap: 8px;
}

.workload-item {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workload-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.workload-top strong,
.workload-role,
.workload-tasks {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workload-top span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  color: #07110c;
  background: var(--accent);
  font-weight: 780;
}

.workload-role,
.workload-tasks {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.codex-usage-section {
  max-height: 265px;
}

.codex-usage-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.codex-usage-report {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.usage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.usage-summary strong {
  color: var(--ink-soft);
  font-weight: 760;
}

.usage-source {
  max-width: 118px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-card {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.usage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.usage-card-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-kind {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.usage-limit-row {
  display: grid;
  grid-template-columns: minmax(54px, 72px) minmax(0, 1fr) minmax(48px, auto);
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 7px;
}

.usage-window {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-track {
  height: 6px;
  min-width: 0;
  border-radius: 999px;
  background: #080a07;
  overflow: hidden;
}

.usage-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.usage-limit-row.low .usage-bar {
  background: var(--gold);
}

.usage-limit-row.critical .usage-bar {
  background: var(--red);
}

.usage-percent {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 780;
  text-align: right;
  white-space: nowrap;
}

.usage-detail {
  grid-column: 2 / 4;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.usage-error {
  color: var(--red);
  font-size: 11px;
  line-height: 1.35;
}

.finance-mvp-section {
  max-height: 285px;
}

.finance-mvp-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.finance-mvp-report {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.finance-summary {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.28;
}

.finance-summary strong {
  color: var(--ink-soft);
  font-weight: 780;
}

.finance-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.finance-card.ready {
  border-color: rgba(101, 211, 158, 0.28);
}

.finance-card.pending {
  border-color: rgba(221, 183, 91, 0.28);
}

.finance-card.warn {
  border-color: rgba(221, 183, 91, 0.44);
  background: rgba(221, 183, 91, 0.06);
}

.finance-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.finance-card-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.finance-card-head strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 780;
  text-align: right;
  white-space: nowrap;
}

.finance-card-meta,
.finance-footnote {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.finance-footnote {
  padding-top: 2px;
}

.corporate-band {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.finance-band,
.organization-band {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.organization-layout {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.organization-band .org-chart {
  min-height: 340px;
  max-height: calc(100vh - 235px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.organization-band .org-tree {
  min-width: 560px;
}

.organization-band .org-tree li::before,
.organization-band .org-tree li::after {
  background: rgba(101, 211, 158, 0.34);
}

.workload-panel {
  min-width: 0;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.finance-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  align-items: start;
  gap: 12px;
}

.finance-dashboard-panel {
  min-width: 0;
  max-height: none;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.future-cost-report {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.corporate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.phone-management-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.phone-management-panel[hidden] {
  display: none;
}

.phone-management-panel[aria-busy="true"] {
  cursor: progress;
}

.phone-management-head,
.phone-management-card-head,
.phone-management-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.phone-management-head h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 13px;
}

.phone-management-summary,
.phone-management-status,
.phone-management-empty {
  color: var(--muted);
  font-size: 11px;
}

.phone-management-status {
  min-height: 18px;
  padding: 7px 9px;
  border: 1px solid rgba(101, 211, 158, 0.18);
  border-radius: 7px;
  background: rgba(101, 211, 158, 0.04);
}

.phone-management-status.error {
  color: var(--red);
  border-color: rgba(239, 120, 111, 0.36);
  background: rgba(239, 120, 111, 0.06);
}

.phone-management-create,
.phone-management-capabilities-editor,
.phone-management-capability-list {
  min-width: 0;
}

.phone-management-create {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.phone-management-create > summary,
.phone-management-capabilities-editor > summary,
.phone-management-capability-list > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.phone-management-create > summary {
  padding: 10px 12px;
}

.phone-management-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.phone-management-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.phone-management-select {
  min-width: 0;
}

.phone-management-check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.phone-management-check input {
  width: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
}

.phone-management-capabilities-editor {
  grid-column: 1 / -1;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.phone-management-capabilities-editor > .phone-management-select {
  margin: 8px 0;
}

.phone-management-capability-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.phone-management-capability-form > button {
  justify-self: start;
}

.phone-management-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 12px;
  max-height: 220px;
  padding: 4px;
  overflow: auto;
}

.phone-management-advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 8px;
}

.phone-management-primary {
  color: #08100b;
  border-color: var(--accent);
  background: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.phone-management-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.phone-management-head > .phone-management-actions {
  justify-content: flex-end;
}

.phone-management-actions .phone-management-select {
  width: auto;
  min-width: 190px;
  flex: 1 1 190px;
}

.phone-management-actions .danger {
  color: var(--red);
  border-color: rgba(239, 120, 111, 0.4);
  background: rgba(239, 120, 111, 0.07);
}

.phone-management-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 10px;
  min-width: 0;
}

.phone-management-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.phone-management-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  background: var(--surface);
}

.phone-management-card.online {
  border-left-color: var(--accent);
}

.phone-management-card.error,
.phone-management-card.unauthorized {
  border-left-color: var(--red);
}

.phone-management-card-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.phone-management-card-head strong,
.phone-management-card-head code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-management-card-head code {
  color: var(--muted);
  font-size: 10px;
}

.phone-management-assignee {
  display: flex !important;
  align-items: baseline;
  gap: 6px !important;
  color: var(--muted);
  font-size: 10px;
}

.phone-management-assignee strong {
  color: var(--accent);
  font-size: 11px;
}

.phone-management-state,
.phone-management-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid rgba(101, 211, 158, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(101, 211, 158, 0.05);
  font-size: 9px;
}

.phone-management-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.phone-management-number-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 8px;
}

.phone-management-fact {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(63, 70, 55, 0.66);
  border-radius: 6px;
  background: #0c0e0b;
}

.phone-management-fact span {
  color: var(--muted);
  font-size: 9px;
}

.phone-management-fact strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-management-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 7px;
}

.phone-pairing-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(221, 183, 91, 0.35);
  border-radius: 8px;
  background: rgba(221, 183, 91, 0.05);
}

.phone-pairing-panel > strong,
.phone-pairing-panel > .phone-management-actions,
.phone-pairing-guidance {
  grid-column: 1 / -1;
}

.phone-pairing-guidance {
  padding: 9px;
  border: 1px solid rgba(221, 183, 91, 0.24);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(221, 183, 91, 0.035);
  font-size: 11px;
  line-height: 1.4;
}

.phone-pairing-code {
  letter-spacing: 0.2em;
}

@media (max-width: 860px) {
  .phone-management-form,
  .phone-management-capability-grid,
  .phone-management-advanced-grid,
  .phone-management-facts,
  .phone-pairing-panel {
    grid-template-columns: 1fr;
  }

  .phone-management-head,
  .phone-management-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .phone-management-number-form {
    grid-template-columns: 1fr;
  }

  .phone-pairing-panel > strong,
  .phone-pairing-panel > .phone-management-actions {
    grid-column: auto;
  }
}

.corporate-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.corporate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.corporate-panel-head h3 {
  color: var(--ink);
  font-size: 12px;
}

.corporate-badge {
  flex: 0 0 auto;
  max-width: 128px;
  padding: 4px 7px;
  border: 1px solid rgba(101, 211, 158, 0.25);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(101, 211, 158, 0.06);
  font-size: 10px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.corporate-summary {
  display: grid;
  gap: 9px;
}

.corporate-field-grid,
.corporate-resource-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.skills-band {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.skills-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.skills-metric,
.skills-grant-flag {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.skills-metric span,
.skills-grant-flag span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.skills-metric strong,
.skills-grant-flag strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.skills-grant-flag strong {
  color: var(--accent);
}

.skills-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1fr) minmax(320px, 1.25fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.skills-panel {
  display: grid;
  gap: 9px;
  min-width: 0;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.skills-sector-list,
.skills-list,
.skills-detail {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.skills-search-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
}

.skills-search-input:focus {
  outline: 2px solid rgba(43, 127, 94, 0.22);
  border-color: rgba(43, 127, 94, 0.52);
}

.skills-sector-card,
.skills-card,
.skills-detail-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.skills-sector-card,
.skills-detail-card {
  padding: 10px;
}

.skills-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 116px;
  padding: 10px;
  text-align: left;
}

.skills-card:hover,
.skills-card.selected {
  border-color: rgba(101, 211, 158, 0.58);
  background: rgba(101, 211, 158, 0.07);
}

.skills-card-head,
.skills-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.skills-card h3,
.skills-detail-card h3 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.skills-card-summary,
.skills-detail-summary {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.skills-sector-head,
.skills-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.skills-sector-head strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.skills-sector-head span,
.skills-sector-meta {
  color: var(--muted);
  font-size: 11px;
}

.skills-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.skills-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(63, 70, 55, 0.72);
  border-radius: 7px;
  background: #0b0d0a;
}

.skills-field-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.skills-field-value {
  color: var(--ink-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.skills-detail-card {
  display: grid;
  gap: 10px;
}

.skills-detail-card h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
  text-transform: uppercase;
}

.skills-body-preview {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: #090b08;
  font: inherit;
  font-size: 12px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.skills-event-list {
  display: grid;
  gap: 6px;
}

.skills-event-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(63, 70, 55, 0.72);
  border-radius: 7px;
  background: #0b0d0a;
}

.skills-event-row strong {
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.skills-event-row span {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.corporate-field {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.corporate-field-title {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.corporate-field-value {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.corporate-note {
  padding: 8px;
  border: 1px solid rgba(221, 183, 91, 0.25);
  border-radius: 7px;
  color: var(--ink-soft);
  background: rgba(221, 183, 91, 0.06);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.corporate-resource-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.corporate-resource-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.corporate-resource-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.corporate-resource-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.corporate-resource-head span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.corporate-resource-meta,
.corporate-resource-capabilities,
.corporate-resource-policy {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.corporate-resource-capabilities {
  color: var(--ink-soft);
}

.corporate-resource-policy {
  color: var(--gold);
}

.credential-list {
  display: grid;
  gap: 7px;
}

.credential-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.credential-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.credential-card-head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-card-head span {
  padding: 2px 6px;
  border: 1px solid rgba(221, 183, 91, 0.32);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(221, 183, 91, 0.06);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
  white-space: nowrap;
}

.credential-card-meta,
.credential-card-access,
.credential-card-approval {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.credential-card-access {
  color: var(--ink-soft);
}

.credential-card-approval {
  color: var(--gold);
}

.workload-track,
.progress-track {
  height: 6px;
  border-radius: 999px;
  background: #080a07;
  overflow: hidden;
}

.workload-track {
  margin-top: 8px;
}

.workload-bar,
.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.ops-scroll {
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.strategy-band,
.unit-band,
.board-region {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.strategy-band,
.unit-band,
.board-region {
  padding: 10px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2,
.detail-tab h2 {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  font-weight: 780;
  text-transform: uppercase;
}

.section-status {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.strategy-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.unit-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.unit-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 104px;
  padding: 10px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
}

.unit-card:hover,
.unit-card.selected {
  border-color: rgba(101, 211, 158, 0.58);
  background: rgba(101, 211, 158, 0.07);
}

.unit-card.selected {
  box-shadow: var(--shadow);
}

.unit-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.unit-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.unit-edit-button,
.unit-save-button,
.unit-cancel-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 800;
}

.unit-project-count {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.unit-name {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.unit-mission,
.unit-resources,
.unit-note {
  display: -webkit-box;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.34;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.unit-resources {
  color: #315f57;
  font-weight: 700;
}

.unit-note {
  color: var(--muted);
}

.unit-edit-form {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  cursor: default;
}

.unit-edit-field {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.unit-edit-field input,
.unit-edit-field select,
.unit-edit-field textarea {
  width: 100%;
  min-width: 0;
  text-transform: none;
  font-size: 12px;
  font-weight: 600;
}

.unit-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.objective-card,
.project-tile,
.task-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.objective-card,
.task-card {
  padding: 10px;
}

.objective-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  align-content: start;
}

.objective-card.priority-urgent,
.project-tile.priority-urgent,
.task-card.priority-urgent {
  border-color: rgba(239, 120, 111, 0.54);
}

.objective-card.priority-high,
.project-tile.priority-high,
.task-card.priority-high {
  border-color: rgba(221, 183, 91, 0.5);
}

.objective-card.objective-completed {
  border-color: rgba(101, 211, 158, 0.42);
  background: linear-gradient(180deg, rgba(101, 211, 158, 0.055), var(--surface-2) 55%);
  box-shadow: inset 0 0 0 1px rgba(101, 211, 158, 0.06);
}

.objective-card-head,
.task-card-head,
.project-tile-top,
.summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #0c0e0b;
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
  white-space: nowrap;
}

.chip-status.chip-active,
.chip-status.chip-in_progress,
.chip-status.chip-assigned {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.4);
  background: rgba(101, 211, 158, 0.08);
}

.chip-status.chip-idea,
.chip-status.chip-planned,
.chip-status.chip-backlog,
.chip-horizon {
  color: var(--blue);
  border-color: rgba(122, 167, 255, 0.35);
  background: rgba(122, 167, 255, 0.08);
}

.chip-status.chip-blocked,
.chip-priority.chip-urgent {
  color: var(--red);
  border-color: rgba(239, 120, 111, 0.45);
  background: rgba(239, 120, 111, 0.09);
}

.chip-status.chip-in_review,
.chip-priority.chip-high {
  color: var(--gold);
  border-color: rgba(221, 183, 91, 0.42);
  background: rgba(221, 183, 91, 0.09);
}

.chip-status.chip-waiting,
.chip-status.chip-completed,
.chip-status.chip-cancelled,
.chip-status.chip-abandoned,
.chip-status.chip-archived {
  color: var(--muted);
  border-color: var(--line);
  background: #0f100d;
}

.objective-card.objective-completed .chip-status.chip-completed {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.42);
  background: rgba(101, 211, 158, 0.08);
}

.objective-card h3,
.project-tile h3,
.task-card h3 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.meta-line span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.objective-card-body,
.project-tile-body,
.project-tile-note,
.task-card-body,
.project-objective,
.project-note {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.38;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.objective-card-body {
  max-height: 78px;
  overflow: hidden;
}

.objective-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.objective-attachment {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(122, 167, 255, 0.35);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(122, 167, 255, 0.08);
  font-size: 10px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(460px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.project-region,
.task-region {
  display: grid;
  align-content: start;
}

.project-region {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.task-region {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.project-summary {
  min-height: 0;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 11, 0.72);
}

.project-summary-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.project-summary-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.project-summary-name {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.project-objective,
.project-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.34;
}

.project-note {
  color: var(--ink-soft);
}

.project-note-form {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.project-note-input {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  resize: vertical;
}

.project-note-actions {
  display: flex;
  justify-content: flex-end;
}

.project-note-save {
  min-height: 30px;
}

.project-summary-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 8px;
}

.project-summary-meta-item {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.25;
}

.project-summary-meta-item > span {
  text-transform: uppercase;
}

.project-summary-meta-item > strong {
  min-width: 0;
  color: var(--muted);
  font-weight: 690;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-slot {
  display: grid;
  gap: 8px;
}

.project-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin: 0 0 8px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 10, 7, 0.54);
}

.project-view-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 28px;
  padding: 0 6px;
  border-color: transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 780;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-view-tab:hover,
.project-view-tab.active {
  border-color: var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface-2);
}

.project-view-tab[aria-selected="true"] {
  border-color: rgba(101, 211, 158, 0.54);
  color: var(--ink);
}

.project-view-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  color: var(--bg);
  background: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.project-view-tab[aria-selected="true"] .project-view-count {
  background: var(--accent);
}

.project-board {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.project-tile {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 10px;
  cursor: pointer;
}

.project-tile.selected {
  border-color: var(--accent);
  background: rgba(101, 211, 158, 0.07);
  box-shadow: var(--shadow);
}

.project-tile-body,
.project-tile-note {
  max-height: 48px;
  overflow: hidden;
}

.project-tile-note {
  color: var(--muted);
}

.progress-track {
  margin-top: 2px;
}

.progress-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
}

.task-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
  align-items: start;
}

.task-board-empty {
  grid-column: 1 / -1;
}

.task-lane {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0f0b;
}

.task-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-lane-head h3 {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 780;
  text-transform: uppercase;
}

.lane-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--panel-3);
  font-size: 11px;
  font-weight: 760;
}

.lane-empty {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
}

.task-card {
  display: grid;
  gap: 8px;
}

.task-card-body {
  max-height: 92px;
  overflow: hidden;
}

.objective-actions,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.objective-action,
.task-action {
  min-height: 27px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  background: #0d0f0b;
}

.objective-action:hover,
.task-action:hover {
  color: var(--ink);
}

.objective-action.primary {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.45);
  background: rgba(101, 211, 158, 0.08);
}

.objective-done-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 0 9px 0 8px;
  color: var(--faint);
  border-color: rgba(111, 118, 105, 0.44);
  background: #0b0d0a;
}

.objective-done-toggle:hover {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: #10120e;
}

.objective-done-dot {
  width: 13px;
  height: 13px;
  border: 1.5px solid #596154;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(9, 10, 8, 0.95);
}

.objective-done-label {
  font-size: 10px;
  font-weight: 780;
  text-transform: uppercase;
}

.objective-done-toggle.is-complete {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.62);
  background: rgba(101, 211, 158, 0.11);
  box-shadow: 0 0 0 1px rgba(101, 211, 158, 0.08), 0 0 22px rgba(101, 211, 158, 0.12);
  cursor: default;
}

.objective-done-toggle.is-complete:hover {
  color: var(--accent);
  border-color: rgba(101, 211, 158, 0.7);
  background: rgba(101, 211, 158, 0.13);
}

.objective-done-toggle.is-complete .objective-done-dot {
  border-color: var(--accent);
  background: radial-gradient(circle at 35% 30%, #c8f8dc 0 20%, var(--accent) 38%, var(--accent-strong) 100%);
  box-shadow: 0 0 0 3px rgba(101, 211, 158, 0.16), 0 0 16px rgba(101, 211, 158, 0.38);
}

.objective-action.danger {
  color: var(--red);
  border-color: rgba(239, 120, 111, 0.4);
  background: rgba(239, 120, 111, 0.07);
}

.objective-edit {
  display: grid;
  gap: 8px;
}

.objective-edit > input,
.objective-edit select,
.objective-edit textarea {
  width: 100%;
}

.objective-edit-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
}

.objective-edit-grid label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.quick-create {
  display: block;
  margin-bottom: 10px;
}

.create-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 7px;
  border-bottom: 1px solid var(--line);
}

.create-title {
  color: var(--accent);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.close-create-button {
  width: 30px;
  min-width: 30px;
  min-height: 28px;
  color: var(--muted);
  font-size: 12px;
  background: #0d0f0b;
}

.quick-body {
  padding: 10px;
}

.create-form {
  display: none;
}

.create-form.active {
  display: block;
}

.create-context {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.project-textarea {
  margin-top: 8px;
  resize: vertical;
}

.objective-attach-row {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.chat-panel {
  --chat-composer-height: 176px;
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) 8px var(--chat-composer-height);
  min-height: 0;
  border-bottom: 0;
  background: var(--panel);
  box-shadow: none;
}

.chat-presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink-soft);
}

.chat-presence-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--line-strong);
  box-shadow: none;
}

.chat-presence-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(101, 211, 158, 0.12), 0 0 14px rgba(101, 211, 158, 0.45);
}

.message-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
  padding: 12px;
  background: #0b0d0a;
}

.message {
  width: min(90%, 680px);
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.load-older-button {
  display: block;
  width: fit-content;
  min-height: 28px;
  margin: 0 auto 12px;
  color: var(--muted);
  background: #0d0f0b;
  font-size: 11px;
}

.message.human {
  margin-left: auto;
  border-color: rgba(101, 211, 158, 0.35);
  background: rgba(101, 211, 158, 0.08);
}

.message.synth {
  border-color: rgba(122, 167, 255, 0.28);
}

.message.pending {
  color: var(--muted);
  border-style: dashed;
  background: rgba(122, 167, 255, 0.08);
}

.message.failed {
  border-color: rgba(239, 120, 111, 0.55);
  border-style: dashed;
  background: rgba(239, 120, 111, 0.08);
}

.message.has-browser,
.message.has-phone {
  width: min(100%, 1060px);
  max-width: 100%;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px auto;
  gap: 8px;
  align-items: start;
  height: 100%;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.composer-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.composer textarea {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  resize: none;
}

.composer .attachment-list:empty {
  display: none;
}

.chat-composer-resizer {
  position: relative;
  z-index: 4;
  min-height: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid rgba(101, 211, 158, 0.08);
  background: #0a0c09;
  cursor: row-resize;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
}

.chat-composer-resizer::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -18px;
  right: 0;
  bottom: -18px;
  left: 0;
}

.chat-composer-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
  transform: translate(-50%, -50%);
  transition: background 120ms ease, width 120ms ease;
}

.chat-composer-resizer:hover::after,
.chat-composer-resizer:focus-visible::after,
.chat-panel.is-composer-resizing .chat-composer-resizer::after {
  width: 58px;
  background: var(--accent);
}

html.chat-composer-resize-active,
html.chat-composer-resize-active * {
  cursor: row-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

html.chat-composer-resize-active body::after {
  content: "";
  position: fixed;
  z-index: 9999;
  inset: 0;
}

.attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.attachment-list[hidden] {
  display: none;
}

.attachment-chip,
.message-attachment {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 23px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0c0e0b;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.attachment-chip {
  gap: 5px;
  padding: 0 4px 0 8px;
}

.attachment-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove,
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.attachment-remove {
  width: 18px;
  min-height: 18px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  font-size: 18px;
  font-weight: 700;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.message-attachment {
  padding: 0 8px;
}

.message-outputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.message-output {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(101, 211, 158, 0.24);
  border-radius: 8px;
  background: rgba(16, 19, 15, 0.62);
}

.message-output.output-image {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.message-output img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.22);
}

.message-output.output-error {
  border-color: rgba(218, 89, 89, 0.38);
}

.message-output-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.message-output-info strong,
.message-output-info span,
.message-output-info p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.message-output-info span {
  color: var(--muted);
  font-size: 12px;
}

.message-output-info p {
  margin: 2px 0 0;
  color: var(--muted);
}

.message-output-actions {
  display: flex;
  justify-content: flex-end;
}

.message-output-open {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(101, 211, 158, 0.32);
  border-radius: 8px;
  background: rgba(101, 211, 158, 0.13);
  color: var(--text);
  font-weight: 700;
}

.provider-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-top: 9px;
  white-space: normal;
}

.provider-preview.compact-preview {
  gap: 5px;
}

.provider-preview-card {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(122, 167, 255, 0.26);
  border-radius: 8px;
  background: rgba(13, 15, 11, 0.78);
}

.compact-preview .provider-preview-card {
  gap: 4px;
  padding: 6px 7px;
}

.provider-preview-card.preview-focus {
  border-color: rgba(101, 211, 158, 0.32);
}

.provider-preview-card.preview-reasoning {
  border-color: rgba(221, 183, 91, 0.32);
}

.provider-preview-card.preview-action {
  border-color: rgba(122, 167, 255, 0.32);
}

.provider-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 790;
  text-transform: uppercase;
}

.provider-preview-status {
  min-width: 0;
  color: var(--faint);
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
}

.provider-preview-body {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.compact-preview .provider-preview-body {
  max-height: 2.8em;
  color: var(--faint);
  font-size: 10px;
}

.browser-card {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  max-width: 100%;
  padding: 9px;
  border: 1px solid rgba(122, 167, 255, 0.34);
  border-radius: 8px;
  background: #0d0f0c;
  overflow: hidden;
  white-space: normal;
}

.browser-card.routed {
  border-color: rgba(101, 211, 158, 0.38);
}

.browser-card.warning {
  border-color: rgba(221, 183, 91, 0.42);
}

.browser-card.blocked {
  border-color: rgba(239, 120, 111, 0.48);
}

.browser-card.closed {
  border-color: rgba(63, 70, 55, 0.92);
}

.browser-card-head,
.browser-card-title,
.browser-card-metrics {
  display: flex;
  align-items: center;
  min-width: 0;
}

.browser-card-head {
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 7px;
}

.browser-card-title {
  flex: 1 1 auto;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.browser-card-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 14px rgba(122, 167, 255, 0.48);
}

.browser-card.routed .browser-card-dot {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(101, 211, 158, 0.48);
}

.browser-card.blocked .browser-card-dot {
  background: var(--red);
  box-shadow: 0 0 14px rgba(239, 120, 111, 0.48);
}

.browser-card-status {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  text-transform: none;
}

.browser-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.browser-frame {
  width: min(100%, 880px);
  margin: 0 auto;
  border: 1px solid #20251f;
  border-radius: 7px;
  background: #11140f;
  overflow: hidden;
}

.browser-frame-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid #cfd4cc;
  background: #e6e9e3;
}

.browser-frame-dots {
  display: inline-flex;
  gap: 5px;
}

.browser-frame-dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #90978d;
}

.browser-frame-address {
  display: block;
  min-width: 0;
  height: 22px;
  padding: 3px 9px;
  border: 1px solid #c6ccc2;
  border-radius: 5px;
  color: #253025;
  background: #ffffff;
  font-size: 11px;
  line-height: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-card-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: min(495px, calc(100vh - 220px));
  border: 0;
  border-radius: 0;
  background: #f5f6f2;
  overflow: hidden;
}

.browser-native-host {
  background: #ffffff;
}

.browser-remote-media-host,
.phone-remote-media-host {
  background: #050705;
}

.browser-remote-media-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #f5f6f2;
  object-fit: contain;
  pointer-events: none;
}

.remote-media-waiting {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  padding: 20px;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 50% 18%, rgba(65, 111, 78, 0.18), transparent 42%),
    rgba(5, 7, 5, 0.94);
  font-size: 11px;
  text-align: center;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.browser-remote-media-host.has-frame .remote-media-waiting,
.phone-remote-media-host.has-frame .remote-media-waiting {
  opacity: 0;
}

.browser-native-placeholder {
  width: 100%;
  height: 100%;
  background: #ffffff;
}

.browser-card.closed .browser-card-viewport {
  height: clamp(110px, 18vh, 160px);
  min-height: 108px;
  max-height: 160px;
}

.phone-card {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  max-width: 100%;
  padding: 9px;
  border: 1px solid rgba(101, 211, 158, 0.38);
  border-radius: 8px;
  background: #0d0f0c;
  overflow: hidden;
  white-space: normal;
}

.phone-card.warning {
  border-color: rgba(221, 183, 91, 0.48);
}

.phone-card.blocked {
  border-color: rgba(239, 120, 111, 0.52);
}

.phone-card.offline {
  border-color: rgba(63, 70, 55, 0.92);
}

.phone-card-head,
.phone-card-title,
.phone-card-metrics,
.phone-card-facts,
.phone-card-action {
  display: flex;
  align-items: center;
  min-width: 0;
}

.phone-card-head {
  justify-content: space-between;
  gap: 8px;
}

.phone-card-title {
  flex: 1 1 auto;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  text-transform: uppercase;
}

.phone-card-device {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.phone-card-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(101, 211, 158, 0.48);
}

.phone-card.warning .phone-card-dot {
  background: var(--gold);
  box-shadow: 0 0 14px rgba(221, 183, 91, 0.46);
}

.phone-card.blocked .phone-card-dot,
.phone-card.offline .phone-card-dot {
  background: var(--red);
  box-shadow: 0 0 14px rgba(239, 120, 111, 0.42);
}

.phone-card-status {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
}

.phone-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}

.phone-frame {
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 7px;
  border: 1px solid #2d342c;
  border-radius: 22px;
  background: #050705;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.phone-card-mode {
  padding: 6px 4px 1px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.phone-card-viewport {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  min-width: 180px;
  min-height: 320px;
  max-height: min(58vh, 560px);
  border: 0;
  border-radius: 15px;
  background: #050705;
  overflow: hidden;
}

.phone-native-host {
  background: #050705;
}

.phone-live-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #05070b;
  object-fit: contain;
  pointer-events: none;
}

.phone-live-waiting,
.phone-live-error,
.phone-live-action {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.phone-live-waiting {
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 24px;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 50% 18%, rgba(65, 111, 78, 0.18), transparent 42%),
    #050705;
  text-align: center;
  transition: opacity 140ms ease;
}

.phone-live-waiting small {
  color: var(--faint);
}

.phone-native-host.has-frame .phone-live-waiting {
  opacity: 0;
}

.phone-live-error {
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: none;
  padding: 7px 9px;
  border: 1px solid rgba(239, 120, 111, 0.52);
  border-radius: 7px;
  color: #ffd0cc;
  background: rgba(31, 8, 7, 0.9);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.phone-live-error.visible {
  display: block;
}

.phone-live-action {
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 16px);
  padding: 5px 8px;
  border: 1px solid rgba(101, 211, 158, 0.44);
  border-radius: 999px;
  color: #e4f8ea;
  background: rgba(5, 12, 7, 0.82);
  font-size: 9px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.phone-live-action strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-live-action-marker {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(101, 211, 158, 0.16);
}

.phone-card-placeholder {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.phone-card-placeholder strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.phone-card-placeholder small {
  color: var(--faint);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.phone-card-metrics {
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.phone-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #0b0d0a;
  font-size: 10px;
}

.phone-card-metric strong {
  color: var(--ink-soft);
}

.phone-card-facts,
.phone-card-action {
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.phone-card-facts strong,
.phone-card-action strong {
  color: var(--ink-soft);
}

.browser-card-viewport.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 2px solid var(--blue);
  opacity: 0.74;
}

.browser-card-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.browser-card-title .browser-card-metric {
  min-height: 20px;
  text-transform: none;
}

.browser-operation-strip {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 16px);
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(11, 13, 10, 0.3);
  border-radius: 999px;
  color: #0b0d0a;
  background: rgba(247, 255, 249, 0.88);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.browser-operation-strip strong,
.browser-operation-strip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-operation-strip strong {
  max-width: 92px;
  font-weight: 850;
  text-transform: uppercase;
}

.browser-operation-strip span {
  max-width: 150px;
}

.browser-card-placeholder {
  display: grid;
  align-content: center;
  gap: 5px;
  height: 100%;
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
}

.browser-card-placeholder small {
  color: var(--faint);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.browser-card-facts {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.browser-card-metrics {
  flex-wrap: wrap;
  gap: 5px;
}

.browser-card-metric {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0a0c09;
  color: var(--faint);
  font-size: 10px;
}

.browser-card-metric strong {
  color: var(--ink-soft);
  font-weight: 760;
}

.browser-card-alert,
.browser-card-lifecycle {
  min-width: 0;
  border: 1px solid rgba(63, 70, 55, 0.78);
  border-radius: 6px;
  background: rgba(21, 22, 17, 0.72);
}

.browser-card-alert {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px;
  color: var(--muted);
  font-size: 11px;
}

.browser-card-alert strong {
  color: var(--ink-soft);
}

.browser-card-lifecycle {
  display: grid;
  gap: 3px;
  padding: 6px 7px;
  color: var(--muted);
  font-size: 10px;
}

.browser-card-lifecycle strong {
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

#sendButton {
  align-self: start;
  min-width: 78px;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #06100d;
  font-weight: 760;
}

#sendButton.is-running {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 94px;
}

#sendButton.is-running::before {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 2px solid rgba(6, 16, 13, 0.34);
  border-top-color: #06100d;
  border-radius: 50%;
  content: "";
  animation: send-button-spin 720ms linear infinite;
}

@keyframes send-button-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #sendButton.is-running::before {
    animation-duration: 1.6s;
  }
}

#sendButton:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.inspector {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 32px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0d0f0b;
  border-top: 1px solid rgba(101, 211, 158, 0.14);
}

.inspector.is-collapsed {
  grid-template-rows: minmax(0, 1fr) 32px;
}

.tab-strip {
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: #090a08;
}

.tab-button {
  min-height: 32px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0 6px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 740;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button.active {
  color: var(--accent);
  background: rgba(101, 211, 158, 0.08);
  box-shadow: inset 0 2px 0 var(--accent);
}

.detail-tab {
  grid-row: 1;
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.detail-tab.active {
  display: block;
}

.detail-tab.chat-panel {
  padding: 0;
  overflow: hidden;
}

.detail-tab.chat-panel.active {
  display: grid;
}

.detail-tab h2 {
  margin: 14px 0 9px;
}

.detail-tab h2:first-child,
.detail-head + h2 {
  margin-top: 0;
}

.detail-tab h3 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(86px, auto) 1fr;
  gap: 6px 10px;
  margin: 0 0 14px;
}

.status-grid dt {
  color: var(--muted);
}

.status-grid dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 660;
}

.settings-row,
.provider-grid,
.form-grid {
  display: grid;
  align-items: center;
  gap: 7px;
}

.settings-row {
  grid-template-columns: auto minmax(70px, 1fr) auto;
}

.provider-grid,
.form-grid {
  grid-template-columns: 76px minmax(0, 1fr);
}

.provider-grid {
  grid-template-columns: 132px minmax(0, 1fr);
}

.check-field {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.check-field input {
  width: 15px;
  min-height: 15px;
  padding: 0;
}

.settings-row label,
.settings-row span,
.provider-grid label,
.form-grid label,
.auto-cycle-status,
.path-line {
  color: var(--muted);
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}

.single-action {
  grid-template-columns: 1fr;
}

#toggleAutoCycleButton.running {
  border-color: rgba(221, 183, 91, 0.45);
  color: var(--gold);
  background: rgba(221, 183, 91, 0.08);
}

.auto-cycle-status,
.path-line {
  margin-top: 8px;
  min-height: 18px;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cycle-box,
.last-response,
.cycle-summary,
.memory-summary {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cycle-summary {
  margin-bottom: 9px;
  border-color: rgba(101, 211, 158, 0.22);
  background: rgba(101, 211, 158, 0.06);
  line-height: 1.42;
}

.cycle-box,
.memory-summary {
  max-height: 260px;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.last-response {
  max-height: 320px;
  line-height: 1.45;
}

.context-page {
  display: grid;
  gap: 10px;
}

.context-hero {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(101, 211, 158, 0.28);
  border-radius: 8px;
  background: rgba(101, 211, 158, 0.06);
}

.context-hero h2 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
}

.context-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.context-mark {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 30px;
  border: 1px solid rgba(221, 183, 91, 0.42);
  border-radius: 7px;
  color: var(--gold);
  background: rgba(221, 183, 91, 0.08);
  font-size: 11px;
  font-weight: 830;
}

.context-mark.authority-standard {
  border-color: rgba(101, 211, 158, 0.28);
  color: var(--accent);
  background: rgba(101, 211, 158, 0.06);
}

.context-section {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.context-section h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
}

.locked-grid {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.locked-grid label {
  color: var(--muted);
  font-size: 11px;
}

.locked-field {
  opacity: 1;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.locked-field:disabled {
  opacity: 1;
  cursor: default;
}

.locked-field.locked-checkbox {
  justify-self: start;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.context-list {
  display: grid;
  gap: 6px;
}

.context-stack {
  display: grid;
  gap: 7px;
}

.context-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.context-item-title {
  color: var(--muted);
  font-size: 11px;
}

.context-item-body {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.context-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.context-card-title {
  color: var(--ink);
  font-size: 11px;
  font-weight: 740;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.context-card-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.context-card-body {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.continuity-grid {
  display: grid;
  gap: 10px;
}

.compact-list {
  display: grid;
  gap: 7px;
}

.compact-item {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.compact-item-title {
  font-weight: 690;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.compact-item-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.compact-item-body {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.empty-state,
.empty-inline {
  color: var(--muted);
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #0d0f0b;
  overflow-wrap: anywhere;
}

.empty-inline {
  padding: 8px;
  font-size: 12px;
}

@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: minmax(440px, var(--dashboard-width, 7fr)) 8px minmax(340px, 3fr);
  }

  .finance-dashboard-grid,
  .skills-summary,
  .skills-dashboard-grid,
  .corporate-grid {
    grid-template-columns: 1fr;
  }

  .board-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .shell {
    min-width: 0;
  }

  .workspace {
    grid-template-columns: 100% 100%;
    grid-template-rows: minmax(0, 1fr);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .workspace::-webkit-scrollbar {
    display: none;
  }

  .dashboard-panel,
  .detail-panel {
    min-width: 0;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .workspace-splitter {
    display: none;
  }

  .detail-panel {
    display: grid;
    border-left: 0;
  }

  .compact-workspace-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 190px;
    height: 34px;
    padding: 2px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #090a08;
  }

  .compact-workspace-button {
    min-width: 0;
    min-height: 28px;
    border: 0;
    border-radius: 6px;
    padding: 0 10px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 800;
  }

  .compact-workspace-button.active,
  .compact-workspace-button[aria-selected="true"] {
    color: var(--ink);
    background: var(--panel-3);
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .task-lanes {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .message,
  .message.has-browser {
    width: 100%;
  }

  .browser-card-viewport {
    max-height: min(430px, calc(100vh - 210px));
  }
}

@media (max-width: 760px) {
  button,
  input,
  textarea,
  select {
    min-height: 44px;
  }

  .topbar {
    gap: 8px;
    padding-right: max(10px, env(safe-area-inset-right, 0px));
    padding-left: max(10px, env(safe-area-inset-left, 0px));
  }

  .brand-logo img {
    width: 108px;
  }

  .compact-workspace-nav {
    min-width: 0;
    width: min(190px, 52vw);
  }

  .compact-workspace-button {
    min-height: 28px;
    padding: 0 6px;
    font-size: 10px;
  }

  .workspace {
    grid-template-columns: 100% 100%;
  }

  .dashboard-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .dashboard-head .ops-actions {
    display: none;
  }

  .main-tab-strip {
    grid-template-columns: repeat(6, minmax(112px, 1fr));
    overflow-x: auto;
  }

  .main-tab-button {
    font-size: 10px;
  }

  .dashboard-scroll {
    padding: 9px max(9px, env(safe-area-inset-right, 0px)) max(9px, env(safe-area-inset-bottom, 0px)) max(9px, env(safe-area-inset-left, 0px));
  }

  .organization-band .org-chart {
    min-height: 280px;
    max-height: none;
  }

  .organization-band .org-tree {
    min-width: 480px;
  }

  .strategy-board,
  .skills-summary,
  .skills-dashboard-grid,
  .skills-field-grid,
  .corporate-field-grid,
  .corporate-resource-counts,
  .corporate-resource-list,
  .finance-dashboard-grid,
  .corporate-grid,
  .task-lanes {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ops-actions {
    width: 100%;
    justify-content: space-between;
  }

  .message-list {
    padding: 8px;
  }

  .composer {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }

  .browser-card {
    padding: 7px;
  }

  .browser-frame {
    width: 100%;
  }

  .browser-card-viewport {
    max-height: min(360px, calc(100vh - 190px));
  }
}
