:root {
  color-scheme: dark;
  --ink: #f5f6fb;
  --muted: #979fb5;
  --muted-strong: #bec4d4;
  --night: #070914;
  --panel: #0c1020;
  --panel-raised: #12182b;
  --panel-soft: #0f1426;
  --line: rgba(159, 168, 199, .15);
  --purple: #9170ff;
  --purple-deep: #6845df;
  --cyan: #52dded;
  --green: #43dfbd;
  --danger: #ff7085;
  --shadow: 0 22px 70px rgba(0, 0, 0, .34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(82, 221, 237, .09), transparent 26%),
    radial-gradient(circle at 88% 12%, rgba(145, 112, 255, .13), transparent 27%),
    var(--night);
}

button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: #070914;
}

.login-glow { position: fixed; width: 440px; height: 440px; border-radius: 50%; filter: blur(110px); opacity: .19; }
.login-glow-one { top: -190px; right: -110px; background: var(--purple); }
.login-glow-two { bottom: -220px; left: -120px; background: var(--cyan); }

.login-card {
  position: relative;
  width: min(100%, 470px);
  padding: 40px;
  border: 1px solid rgba(160, 171, 207, .18);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(20, 25, 45, .98), rgba(10, 14, 28, .98));
  box-shadow: var(--shadow);
}

.login-logo { width: 76px; height: 76px; object-fit: contain; margin-bottom: 22px; }
.login-theme-button { position: absolute; top: 22px; right: 22px; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.login-card h1 { margin: 0 0 12px; font-size: clamp(28px, 5vw, 38px); line-height: 1.08; letter-spacing: -.04em; }
.login-intro, .privacy-note { color: var(--muted-strong); line-height: 1.55; }
.login-intro { margin: 0 0 28px; }
.privacy-note { margin: 18px 0 0; font-size: 13px; }
.login-card label { display: block; margin: 18px 0 8px; color: #dce0ec; font-size: 13px; font-weight: 750; }
.login-card input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(160, 171, 207, .3);
  border-radius: 15px;
  outline: 0;
  background: rgba(5, 8, 18, .72);
}
.login-card input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(145, 112, 255, .14); }
.password-requirements { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.primary-button {
  width: 100%;
  margin-top: 22px;
  padding: 15px 20px;
  border: 0;
  border-radius: 15px;
  color: #080913;
  background: linear-gradient(105deg, var(--cyan), #a486ff 72%);
  font-weight: 850;
}
.primary-button:disabled { cursor: wait; opacity: .55; }
.secondary-button {
  display: inline-grid;
  padding: 11px 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted-strong);
  background: var(--panel-soft);
  text-decoration: none;
  font-weight: 750;
}
.form-error { min-height: 20px; margin: 12px 0 0; color: #ff9aa8; font-size: 13px; }

.app-shell {
  display: flex;
  width: 100vw;
  height: 100dvh;
  min-height: 460px;
  background: rgba(6, 9, 19, .78);
  backdrop-filter: blur(24px);
}

.workspace-rail {
  position: relative;
  z-index: 7;
  display: flex;
  width: 78px;
  flex: 0 0 78px;
  padding: 13px 8px 10px;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border-right: 1px solid var(--line);
  background: #080b17;
}
.workspace-logo { width: 45px; height: 45px; margin-bottom: 8px; object-fit: contain; }
.workspace-button {
  position: relative;
  display: grid;
  width: 60px;
  min-height: 57px;
  padding: 6px 3px;
  place-items: center;
  gap: 1px;
  border: 0;
  border-radius: 17px;
  color: var(--muted);
  background: transparent;
}
.workspace-button span { font-size: 22px; font-weight: 850; line-height: 1; }
.workspace-button small { font-size: 10px; font-weight: 750; }
.workspace-button:hover, .workspace-button:focus-visible, .workspace-button.active {
  color: #effdff;
  outline: 0;
  background: linear-gradient(145deg, rgba(145,112,255,.24), rgba(82,221,237,.12));
}
.workspace-button.active::before {
  position: absolute;
  left: -8px;
  width: 3px;
  height: 28px;
  border-radius: 0 8px 8px 0;
  background: var(--cyan);
  content: "";
}
.workspace-button b {
  position: absolute;
  top: 2px;
  right: 3px;
  min-width: 18px;
  padding: 3px 5px;
  border: 2px solid #080b17;
  border-radius: 99px;
  color: #fff;
  background: var(--danger);
  font-size: 8px;
}
.workspace-spacer { flex: 1; }

.sidebar {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 clamp(330px, 29vw, 430px);
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--line);
  background: rgba(10, 14, 28, .97);
}

.sidebar-header, .chat-header {
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup { display: flex; align-items: center; min-width: 0; gap: 11px; }
.brand-logo { width: 43px; height: 43px; flex: none; object-fit: contain; }
.brand-lockup div { display: grid; min-width: 0; }
.brand-lockup strong { font-size: 20px; letter-spacing: -.025em; }
.brand-lockup span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.presence-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(67, 223, 189, .65); }

.header-actions { display: flex; margin-left: auto; gap: 6px; }
.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 24px;
}
.icon-button:hover, .icon-button:focus-visible { color: var(--ink); background: rgba(145, 112, 255, .13); outline: 0; }

.conversation-tools { padding: 16px 16px 10px; }
.search-box {
  display: flex;
  align-items: center;
  height: 45px;
  padding: 0 14px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: #12172a;
}
.search-box:focus-within { border-color: rgba(145, 112, 255, .75); }
.search-box span { font-size: 25px; line-height: 1; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.search-box input::placeholder, textarea::placeholder { color: #7e879e; }
.filter-row { display: flex; margin-top: 12px; gap: 7px; overflow: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
}
.filter-chip.active { border-color: rgba(82, 221, 237, .32); color: #dffcff; background: rgba(82, 221, 237, .12); }
.conversation-summary { display: flex; justify-content: space-between; padding: 2px 20px 10px; color: var(--muted); font-size: 12px; }
.conversation-summary strong { color: var(--muted-strong); }

.conversation-list { flex: 1; min-height: 0; padding: 0 9px 12px; overflow-x: hidden; overflow-y: auto; scrollbar-color: #333a54 transparent; scrollbar-width: thin; }
.skeleton-list { display: grid; gap: 9px; }
.conversation-skeleton { padding: 8px 2px; }
.member-skeleton { padding: 2px 0; }
.message-skeleton { width: 100%; padding: 4px 0; }
.skeleton-item { display: flex; min-height: 68px; padding: 10px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 15px; background: rgba(145,112,255,.025); }
.message-skeleton .skeleton-item { width: min(72%, 700px); min-height: 82px; align-self: start; }
.thread-messages .message-skeleton .skeleton-item { width: 100%; }
.skeleton-avatar, .skeleton-line { background: linear-gradient(100deg, rgba(145,112,255,.08) 20%, rgba(82,221,237,.18) 45%, rgba(145,112,255,.08) 70%); background-size: 220% 100%; animation: skeleton-shimmer 1.35s ease-in-out infinite; }
.skeleton-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; }
.skeleton-lines { display: grid; min-width: 0; flex: 1; gap: 9px; }
.skeleton-line { display: block; height: 10px; border-radius: 999px; }
.skeleton-line-title { width: 62%; }
.skeleton-line-copy { width: 88%; opacity: .72; }
@keyframes skeleton-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.conversation-section {
  display: flex;
  width: 100%;
  padding: 16px 10px 5px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.conversation-section:hover, .conversation-section:focus-visible { color: var(--ink); outline: 0; }
.conversation-section span { letter-spacing: 0; }
.conversation-section-title { display: flex; align-items: center; gap: 6px; }
.conversation-section-chevron { display: inline-block; font-size: 15px; transform: rotate(0); transition: transform .14s ease; }
.conversation-section.collapsed .conversation-section-chevron { transform: rotate(-90deg); }
.conversation-section-icon { display: inline-grid; width: 19px; height: 19px; place-items: center; border-radius: 5px; color: var(--cyan); background: rgba(82,221,237,.08); font-size: 11px; }
.conversation-section-count { display: flex; align-items: center; gap: 6px; }
.conversation-section-count b { min-width: 18px; padding: 2px 5px; border-radius: 999px; color: #071019; background: var(--cyan); text-align: center; font-size: 8px; }
.conversation-row {
  display: grid;
  width: 100%;
  min-height: 78px;
  padding: 11px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 17px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.conversation-row:hover, .conversation-row:focus-within { background: rgba(255, 255, 255, .055); }
.conversation-row:focus-within { box-shadow: inset 0 0 0 2px var(--cyan); }
.conversation-row.active { border-color: rgba(145, 112, 255, .22); background: linear-gradient(110deg, rgba(145,112,255,.15), rgba(82,221,237,.045)); }
.conversation-main { min-width: 0; }
.conversation-open { display: block; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; text-align: left; }
.conversation-open:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.conversation-line { display: flex; min-width: 0; align-items: center; gap: 7px; }
.conversation-kind { display: inline-grid; width: 18px; height: 18px; flex: none; place-items: center; border-radius: 5px; color: var(--muted-strong); background: rgba(255,255,255,.04); font-size: 10px; font-weight: 850; }
.conversation-kind-office { color: #d5c9ff; background: rgba(145,112,255,.12); }
.conversation-kind-channels { color: var(--cyan); background: rgba(82,221,237,.09); }
.conversation-kind-missions { color: #ffbd72; background: rgba(255,189,114,.1); }
.conversation-kind-meetings { color: #78e6b4; background: rgba(120,230,180,.09); }
.favorite-star { flex: none; color: #ffd66b; font-size: 12px; filter: drop-shadow(0 0 7px rgba(255,214,107,.28)); }
.conversation-line strong { overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.conversation-line time { flex: none; color: #727b92; font-size: 11px; }
.conversation-preview { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-meta { display: flex; min-height: 20px; margin-top: 5px; align-items: center; gap: 6px; color: #7f89a3; font-size: 11px; }
.status-pill { overflow: hidden; max-width: 260px; padding: 3px 7px; border-radius: 999px; color: #bfb1ff; background: rgba(145,112,255,.1); text-overflow: ellipsis; white-space: nowrap; }
.estimate-pill { overflow: hidden; max-width: 190px; padding: 3px 7px; border-radius: 999px; color: #a9f5e3; background: rgba(67,223,189,.09); text-overflow: ellipsis; white-space: nowrap; }
.estimate-pill.paused { color: #ffd29a; background: rgba(255,184,92,.1); }
.presence-pill { padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.presence-pill.busy { color: #ffb3bd; background: rgba(255,112,133,.13); }
.inline-profile-link { padding: 0; border: 0; color: var(--cyan); background: transparent; font-size: 10px; font-weight: 750; }
.inline-profile-link:hover, .inline-profile-link:focus-visible { outline: 0; text-decoration: underline; text-underline-offset: 3px; }
.unread-badge { min-width: 23px; padding: 4px 7px; border-radius: 999px; color: #061116; background: var(--cyan); text-align: center; font-size: 11px; font-weight: 900; }

.notification-row { display: grid; width: 100%; min-height: 92px; padding: 12px 10px; grid-template-columns: 42px minmax(0, 1fr) 8px; align-items: center; gap: 9px; border: 1px solid transparent; border-radius: 17px; color: inherit; background: transparent; text-align: left; }
.notification-row:hover, .notification-row:focus-visible { outline: 0; background: rgba(255,255,255,.035); }
.notification-row.unread { border-color: rgba(145,112,255,.18); background: linear-gradient(110deg, rgba(145,112,255,.12), rgba(82,221,237,.035)); }
.notification-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(82,221,237,.2); border-radius: 13px; color: var(--cyan); background: rgba(82,221,237,.07); font-size: 18px; font-weight: 900; }
.notification-main { display: grid; min-width: 0; }
.notification-heading { display: flex; min-width: 0; align-items: center; gap: 8px; }
.notification-heading strong { overflow: hidden; flex: 1; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.notification-heading time { flex: none; color: var(--muted); font-size: 11px; }
.notification-preview { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.notification-meta { display: flex; margin-top: 7px; align-items: center; gap: 7px; }
.notification-kind { padding: 3px 6px; border-radius: 999px; color: #cbbfff; background: rgba(145,112,255,.1); font-size: 10px; font-weight: 800; }
.notification-kind.urgent { color: #ffb2bd; background: rgba(255,112,133,.12); }
.notification-action { overflow: hidden; color: #8edfeb; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.notification-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(82,221,237,.48); }

.avatar {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: none;
  place-items: center;
  overflow: visible;
  border: 2px solid rgba(145, 112, 255, .8);
  border-radius: 50%;
  color: #eefaff;
  background: linear-gradient(145deg, #242d48, #121729);
  font-size: 13px;
  font-weight: 850;
}
.avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.avatar::after { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid #101426; border-radius: 50%; background: #687087; content: ""; }
.avatar.online::after { background: var(--green); }
.avatar.busy::after { background: var(--danger); box-shadow: 0 0 10px rgba(255,112,133,.58); }
.avatar.group { border-color: rgba(82, 221, 237, .7); }
.avatar-trigger { display: grid; width: fit-content; padding: 0; border: 0; border-radius: 50%; color: inherit; background: transparent; cursor: pointer; }
.avatar-trigger:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.sidebar-footer { display: flex; min-height: 42px; padding: 10px 17px; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); color: #767f95; font-size: 10px; }
.network-indicator { color: var(--muted-strong); white-space: nowrap; }
.network-indicator i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: var(--green); }
.network-indicator.offline i { background: var(--danger); }

.chat-pane { position: relative; display: flex; flex: 1; min-width: 0; background: #080b17; }
.chat-pane::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image: radial-gradient(rgba(145, 112, 255, .15) .8px, transparent .8px);
  background-size: 23px 23px;
  content: "";
}
.empty-chat { position: relative; display: grid; width: min(620px, 80%); margin: auto; place-items: center; text-align: center; }
.empty-logo { width: 104px; height: 104px; margin-bottom: 25px; object-fit: contain; filter: drop-shadow(0 0 32px rgba(145,112,255,.3)); }
.empty-chat h2 { margin: 0; font-size: 29px; letter-spacing: -.03em; }
.empty-chat p { max-width: 560px; margin: 13px 0 26px; color: var(--muted); line-height: 1.6; }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.trust-row span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: 11px; }
.active-chat { position: relative; z-index: 1; display: flex; width: 100%; min-width: 0; flex-direction: column; container: active-chat / inline-size; }
.active-chat.file-dragging::after {
  position: absolute;
  z-index: 20;
  inset: 88px 28px 88px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--cyan);
  border-radius: 26px;
  color: var(--cyan);
  background: rgba(8, 12, 25, .9);
  content: "Déposez le fichier dans ce salon";
  font-size: 18px;
  font-weight: 850;
  pointer-events: none;
}
.chat-header { background: rgba(13, 17, 32, .93); backdrop-filter: blur(20px); }
.mobile-back { display: none; }
#chat-header-avatar .avatar { width: 44px; height: 44px; margin-right: 11px; }
#chat-header-avatar[role="button"] { cursor: pointer; }
.chat-identity { display: grid; min-width: 0; padding: 4px 5px; border: 0; text-align: left; background: transparent; }
.chat-identity strong, .chat-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-identity strong { font-size: 15px; }
.chat-identity span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.message-search-panel { display: flex; padding: 10px 18px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); background: var(--panel); }
.message-search-panel .search-box { flex: 1; }
.text-button { padding: 9px 12px; border: 0; color: #bdb0ff; background: transparent; font-size: 12px; }
.mission-strip { display: grid; padding: 9px 19px; grid-template-columns: minmax(0, 1fr) 100px 76px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: rgba(15, 20, 38, .96); }
.mission-strip div:first-child { display: grid; min-width: 0; }
.mission-strip strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mission-strip span, .mission-strip b { color: var(--muted); font-size: 10px; font-weight: 600; }
.mission-strip b { white-space: nowrap; }
.mission-progress { height: 4px; overflow: hidden; border-radius: 99px; background: #252b42; }
.mission-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--cyan)); transition: width .3s ease; }

.notification-workspace { display: grid; flex: 1; min-height: 0; padding: 40px; place-content: center; justify-items: center; text-align: center; background: radial-gradient(circle at 50% 42%, rgba(82,221,237,.08), transparent 31%); }
.notification-workspace-mark, .notification-header-mark { display: grid; place-items: center; border: 1px solid rgba(82,221,237,.28); color: var(--cyan); background: rgba(82,221,237,.08); }
.notification-workspace-mark { width: 72px; height: 72px; margin-bottom: 18px; border-radius: 24px; font-size: 28px; box-shadow: 0 18px 45px rgba(0,0,0,.14); }
.notification-header-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 16px; }
.notification-workspace h2 { margin: 0; font-size: clamp(19px, 2.2vw, 28px); }
.notification-workspace p { max-width: 520px; margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.active-chat.notification-workspace-open .messages,
.active-chat.notification-workspace-open .composer,
.active-chat.notification-workspace-open .mission-strip,
.active-chat.notification-workspace-open .message-search-panel { display: none !important; }

.organization-workspace { flex: 1; min-height: 0; padding: 26px clamp(18px, 3vw, 42px) 40px; overflow-y: auto; background: radial-gradient(circle at 88% 8%, rgba(145,112,255,.1), transparent 29%); }
.active-chat.organization-workspace-open .messages,
.active-chat.organization-workspace-open .composer,
.active-chat.organization-workspace-open .mission-strip,
.active-chat.organization-workspace-open .message-search-panel { display: none !important; }
.active-chat.secretariat-workspace-open .messages,
.active-chat.secretariat-workspace-open .composer,
.active-chat.secretariat-workspace-open .mission-strip,
.active-chat.secretariat-workspace-open .message-search-panel { display: none !important; }
.active-chat.direction-workspace-open .messages,
.active-chat.direction-workspace-open .composer,
.active-chat.direction-workspace-open .mission-strip,
.active-chat.direction-workspace-open .message-search-panel { display: none !important; }
.active-chat:not(.direction-workspace-open) .direction-workspace { display: none !important; }
.active-chat.longrun-workspace-open .messages,
.active-chat.longrun-workspace-open .composer,
.active-chat.longrun-workspace-open .mission-strip,
.active-chat.longrun-workspace-open .message-search-panel { display: none !important; }
.active-chat.controlcenter-workspace-open .messages,
.active-chat.controlcenter-workspace-open .composer,
.active-chat.controlcenter-workspace-open .mission-strip,
.active-chat.controlcenter-workspace-open .message-search-panel { display: none !important; }
.active-chat.lyra-access-workspace-open .messages,
.active-chat.lyra-access-workspace-open .composer,
.active-chat.lyra-access-workspace-open .mission-strip,
.active-chat.lyra-access-workspace-open .message-search-panel { display: none !important; }
.controlcenter-workspace, .lyra-access-workspace {
  flex: 1;
  min-height: 0;
  padding: 26px clamp(18px, 3vw, 42px) 42px;
  overflow-y: auto;
  background: radial-gradient(circle at 88% 8%, rgba(82,221,237,.09), transparent 30%);
}
.lyra-access-grid .controlcenter-list { max-height: 460px; }
.lyra-access-row.unavailable { border-color: rgba(255,184,92,.25); }
.lyra-access-row .cc-row-main small { white-space: normal; line-height: 1.45; }
.lyra-source-health { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(67,223,189,.36); }
.lyra-source-health.warning { background: #ffb85c; box-shadow: 0 0 8px rgba(255,184,92,.32); }
.lyra-source-health.error { background: var(--danger); box-shadow: 0 0 8px rgba(255,112,133,.32); }
.lyra-evidence { display: grid; margin-top: 9px; gap: 6px; }
.lyra-source-badges, .lyra-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lyra-source-badge { padding: 4px 8px; border: 1px solid rgba(82,221,237,.22); border-radius: 999px; color: #bceef4; background: rgba(82,221,237,.07); font-size: 10px; font-weight: 750; }
.lyra-details-toggle, .lyra-quick-action, .lyra-refresh-sources { width: fit-content; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--cyan); background: transparent; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.lyra-details { display: grid; gap: 7px; padding: 10px; border: 1px solid rgba(82,221,237,.16); border-radius: 11px; background: rgba(82,221,237,.04); }
.lyra-detail-row { display: grid; gap: 2px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.lyra-detail-row strong { color: var(--text); font-size: 11px; }
.lyra-answer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; }
.lyra-answer-card { display: grid; gap: 4px; padding: 9px 10px; border: 1px solid rgba(82,221,237,.18); border-radius: 11px; background: rgba(82,221,237,.045); }
.lyra-answer-card strong { font-size: 11px; }
.lyra-answer-card span, .lyra-answer-card small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.controlcenter-heading { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 24px; }
.controlcenter-heading > div { max-width: 760px; }
.controlcenter-heading span, .controlcenter-grid article header span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.controlcenter-heading h2 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }
.controlcenter-heading p { margin: 0; color: var(--muted-strong); font-size: 14px; line-height: 1.55; }
.controlcenter-safety { flex: none; padding: 13px 16px; border: 1px solid rgba(82,221,237,.28); border-radius: 14px; color: #dffcff; background: rgba(82,221,237,.09); font-size: 13px; font-weight: 800; }
.controlcenter-safety small { display: block; margin-top: 3px; font-weight: 600; color: var(--muted); }
.controlcenter-status { margin: 12px 0; padding: 12px 15px; border: 1px solid rgba(67,223,189,.25); border-radius: 14px; color: #bdf9e9; background: rgba(67,223,189,.07); font-size: 13px; line-height: 1.5; }
.controlcenter-status.warning { border-color: rgba(255,184,92,.28); color: #ffd9a9; background: rgba(255,184,92,.08); }
.controlcenter-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1.35fr); gap: 12px; align-items: stretch; }
.controlcenter-action-buttons, .controlcenter-mission-form { display: flex; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); }
.controlcenter-action-buttons { flex-wrap: wrap; align-content: center; }
.controlcenter-actions button { min-height: 38px; padding: 8px 12px; border: 1px solid rgba(82,221,237,.28); border-radius: 10px; color: var(--text); background: rgba(82,221,237,.09); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.controlcenter-actions button:hover { border-color: var(--cyan); }
.controlcenter-actions button:disabled { cursor: not-allowed; opacity: .42; }
.controlcenter-actions button.danger { border-color: rgba(255,100,125,.35); color: #ffc3cd; background: rgba(255,100,125,.09); }
.controlcenter-mission-form { display: grid; grid-template-columns: minmax(140px, 1fr) auto auto; }
.controlcenter-mission-form label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.controlcenter-mission-form input, .controlcenter-mission-form select { min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel); font: inherit; font-size: 13px; }
.controlcenter-metrics { display: grid; margin: 15px 0; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 9px; }
.controlcenter-grid { display: grid; margin-top: 16px; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.controlcenter-grid article { padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-soft); }
.controlcenter-grid article header h3 { margin: 3px 0 0; font-size: 15px; }
.controlcenter-list { display: grid; gap: 7px; max-height: 340px; overflow-y: auto; margin-top: 12px; }
.cc-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.cc-row-main { display: grid; min-width: 0; }
.cc-row-main strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-row-main small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-badge { flex: none; padding: 3px 8px; border-radius: 999px; background: rgba(82,221,237,.14); color: #dffcff; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.cc-row-actions { display: flex; flex: none; gap: 5px; margin-left: auto; }
.cc-row-actions button, .cc-row-actions a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: transparent; text-decoration: none; font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.secretariat-workspace {
  flex: 1;
  min-height: 0;
  padding: 26px clamp(18px, 3vw, 42px) 42px;
  overflow-y: auto;
  background: radial-gradient(circle at 88% 8%, rgba(82,221,237,.09), transparent 30%);
}
.direction-workspace { flex: 1; min-height: 0; padding: 26px clamp(18px, 3vw, 42px) 42px; overflow-y: auto; background: radial-gradient(circle at 88% 8%, rgba(145,112,255,.12), transparent 30%); }
.direction-heading { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 24px; }
.direction-heading > div { max-width: 760px; }.direction-heading span, .direction-grid article header span { color: #cfc3ff; font-size: 11px; font-weight: 850; letter-spacing: .1em; }.direction-heading h2 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }.direction-heading p { margin: 0; color: var(--muted-strong); font-size: 14px; line-height: 1.55; }
.direction-safety, .direction-status { padding: 12px 15px; border: 1px solid rgba(145,112,255,.28); border-radius: 14px; color: #e0d9ff; background: rgba(145,112,255,.1); font-size: 13px; line-height: 1.5; }.direction-safety { flex: none; text-align: right; }.direction-safety small { color: var(--muted); }.direction-status { margin: 12px 0; }
.direction-metrics { display: grid; margin: 15px 0; grid-template-columns: repeat(5, minmax(105px, 1fr)); gap: 9px; }.direction-metric { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); }.direction-metric strong { font-size: 20px; }.direction-metric small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.direction-create { display: grid; grid-template-columns: 1fr 1fr 130px auto; gap: 8px; margin: 14px 0; }.direction-create label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }.direction-create input, .direction-create select { min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--panel); font: inherit; font-size: 13px; }.direction-create button, .direction-action { padding: 9px 12px; border: 1px solid rgba(145,112,255,.4); border-radius: 10px; color: #eeeaff; background: rgba(145,112,255,.15); font: inherit; font-weight: 800; cursor: pointer; }
.direction-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }.direction-grid article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--panel-soft); }.direction-grid article > header { display: flex; padding: 16px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }.direction-grid article h3 { margin: 3px 0 0; font-size: 18px; }.direction-grid article header b { display: grid; min-width: 30px; height: 30px; padding: 0 8px; place-items: center; border-radius: 99px; color: #dccfff; background: rgba(145,112,255,.14); font-size: 12px; }.direction-list { display: grid; max-height: 470px; padding: 8px; gap: 8px; overflow-y: auto; }.direction-item { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }.direction-item-head { display: flex; gap: 8px; justify-content: space-between; align-items: start; }.direction-item p, .direction-item small { margin: 0; color: var(--muted-strong); font-size: 12px; line-height: 1.45; }.direction-item small { color: var(--muted); font-size: 11px; }.direction-badge { flex: none; padding: 4px 7px; border-radius: 999px; background: rgba(145,112,255,.14); color: #dcd3ff; font-size: 10px; font-weight: 800; }.direction-badge.blocked { color: #ffd0a2; background: rgba(255,184,92,.13); }.direction-badge.done { color: #bdf9e9; background: rgba(67,223,189,.1); }.direction-action { justify-self: start; font-size: 11px; }.direction-empty { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.secretariat-heading { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 24px; }
.secretariat-heading > div { max-width: 760px; }
.secretariat-heading span, .secretariat-grid article header span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.secretariat-heading h2 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }
.secretariat-heading p { margin: 0; color: var(--muted-strong); font-size: 14px; line-height: 1.55; }
.secretariat-agenda-link {
  flex: none; padding: 13px 16px; border: 1px solid rgba(82,221,237,.28); border-radius: 14px;
  color: #dffcff; background: rgba(82,221,237,.09); text-decoration: none; font-size: 13px; font-weight: 800;
}
.secretariat-status, .secretariat-capability { margin: 12px 0; padding: 12px 15px; border: 1px solid rgba(67,223,189,.25); border-radius: 14px; color: #bdf9e9; background: rgba(67,223,189,.07); font-size: 13px; line-height: 1.5; }
.secretariat-status.warning, .secretariat-capability.warning { border-color: rgba(255,184,92,.28); color: #ffd9a9; background: rgba(255,184,92,.08); }
.secretariat-metrics { display: grid; margin: 15px 0; grid-template-columns: repeat(6, minmax(105px, 1fr)); gap: 9px; }
.secretariat-metric { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); }
.secretariat-metric strong { font-size: 20px; }
.secretariat-metric small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.secretariat-actions { display: flex; margin: 14px 0; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.secretariat-actions a { flex: none; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--panel-raised); font-size: 13px; font-weight: 800; text-decoration: none; }
.secretariat-actions a:hover, .secretariat-actions a:focus-visible { border-color: rgba(145,112,255,.5); outline: 0; background: rgba(145,112,255,.14); }
.secretariat-grid { display: grid; margin-top: 16px; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.secretariat-grid article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(15,20,38,.88); }
.secretariat-grid article > header { display: flex; padding: 16px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.secretariat-grid article h3 { margin: 3px 0 0; font-size: 18px; }
.secretariat-grid article header b { display: grid; min-width: 30px; height: 30px; padding: 0 8px; place-items: center; border-radius: 99px; color: #dccfff; background: rgba(145,112,255,.14); font-size: 12px; }
.secretariat-list { max-height: 330px; padding: 8px; overflow-y: auto; }
.secretariat-item { display: flex; min-width: 0; padding: 11px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.secretariat-item[href]:hover, .secretariat-item[href]:focus-visible { border-radius: 12px; outline: 0; background: rgba(145,112,255,.1); }
.secretariat-item:last-child { border-bottom: 0; }
.secretariat-item-copy { display: grid; min-width: 0; flex: 1; }
.secretariat-item-copy strong, .secretariat-item-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secretariat-item-copy strong { font-size: 14px; }
.secretariat-item-copy span { margin-top: 3px; color: var(--muted-strong); font-size: 12px; }
.secretariat-item-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.secretariat-item-badge { flex: none; max-width: 130px; padding: 6px 8px; border-radius: 99px; color: #cfc3ff; background: rgba(145,112,255,.12); font-size: 10px; }
.secretariat-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.secretariat-header-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(82,221,237,.3); border-radius: 13px; color: var(--cyan); background: rgba(82,221,237,.1); }
.secretariat-sidebar-row { display: flex; width: calc(100% - 14px); margin: 3px 7px; padding: 12px; align-items: center; gap: 11px; border: 0; border-radius: 14px; color: inherit; background: transparent; text-align: left; }
.secretariat-sidebar-row:hover, .secretariat-sidebar-row:focus-visible { outline: 0; background: rgba(145,112,255,.1); }
.secretariat-sidebar-icon { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border-radius: 13px; color: var(--cyan); background: rgba(82,221,237,.1); font-size: 18px; }
.secretariat-sidebar-row > span:last-child { display: grid; min-width: 0; }
.secretariat-sidebar-row strong { font-size: 14px; }
.secretariat-sidebar-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.secretariat-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 13px; }
.secretariat-fields textarea, .secretariat-fields .dialog-check { grid-column: 1 / -1; }
.billing-panel { margin-top: 18px; padding: 18px; border: 1px solid rgba(82,221,237,.22); border-radius: 20px; background: rgba(9,14,29,.68); }
.billing-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.billing-heading span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.billing-heading h3, .billing-list-heading h3 { margin: 4px 0 0; font-size: 20px; }
.billing-heading p { max-width: 720px; margin: 7px 0 0; color: var(--muted-strong); font-size: 13px; line-height: 1.5; }
.billing-fast-create { display: grid; margin-top: 16px; }
.billing-fast-create label { margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
.billing-fast-create textarea { width: 100%; min-height: 92px; padding: 12px 13px; resize: vertical; border: 1px solid rgba(159,168,199,.23); border-radius: 13px; outline: none; color: var(--ink); background: #11172a; font: inherit; line-height: 1.45; }
.billing-fast-create textarea:focus-visible { border-color: var(--cyan); outline: 2px solid var(--cyan); outline-offset: 2px; }
.billing-fast-create > p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.billing-fast-create-actions { display: flex; margin-top: 12px; align-items: center; gap: 12px; }
.billing-fast-create-actions > span { color: var(--green); font-size: 12px; line-height: 1.45; }
.billing-fast-create-actions > span.error, .billing-feedback.error { color: #ffb9c0; }
.billing-action { min-height: 44px; padding: 9px 12px; border: 1px solid rgba(82,221,237,.32); border-radius: 11px; color: #dffcff; background: rgba(82,221,237,.1); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.billing-action:hover { border-color: rgba(82,221,237,.65); background: rgba(82,221,237,.17); }
.billing-action:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.billing-action:disabled { cursor: not-allowed; opacity: .6; }
.billing-action[aria-disabled="true"] { cursor: progress; opacity: .7; }
.billing-create-action { min-width: 165px; color: #09121b; background: var(--cyan); }
.billing-list-heading { display: flex; margin: 22px 0 8px; align-items: center; justify-content: space-between; gap: 12px; }
.billing-list-heading b { display: grid; min-width: 30px; height: 30px; padding: 0 8px; place-items: center; border-radius: 99px; color: #dccfff; background: rgba(145,112,255,.14); font-size: 12px; }
.billing-feedback { min-height: 20px; color: var(--muted-strong); font-size: 12px; line-height: 1.45; }
.billing-retry { margin: 4px 0 10px; }
.billing-invoice-grid { display: grid; margin-top: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.billing-invoice-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); }
.billing-invoice-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.billing-invoice-heading small { color: var(--cyan); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.billing-invoice-heading h4 { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 16px; }
.billing-invoice-status { flex: none; padding: 5px 8px; border-radius: 99px; color: #cfc3ff; background: rgba(145,112,255,.12); font-size: 10px; font-weight: 800; }
.billing-invoice-facts { display: grid; margin: 13px 0 0; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.billing-invoice-facts div { display: grid; min-width: 0; }
.billing-invoice-facts dt { color: var(--muted); font-size: 10px; }
.billing-invoice-facts dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 800; }
.billing-invoice-facts div:last-child { text-align: right; }
.billing-invoice-dates { min-height: 18px; margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.billing-invoice-actions { display: flex; margin-top: 12px; flex-wrap: wrap; gap: 7px; }
.billing-invoice-actions .billing-action { flex: 1 1 145px; }
.billing-empty { grid-column: 1 / -1; margin: 0; padding: 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 13px; text-align: center; }
.longrun-workspace {
  flex: 1; min-height: 0; padding: 26px clamp(18px, 3vw, 42px) 42px; overflow-y: auto;
  background: radial-gradient(circle at 88% 8%, rgba(145,112,255,.1), transparent 30%);
}
.longrun-heading { display: flex; margin-bottom: 18px; align-items: end; justify-content: space-between; gap: 24px; }
.longrun-heading > div:first-child { max-width: 760px; }
.longrun-heading span, .longrun-grid > article > header span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.longrun-heading h2 { margin: 5px 0 7px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.035em; }
.longrun-heading p { margin: 0; color: var(--muted-strong); font-size: 14px; line-height: 1.55; }
.longrun-safety { flex: none; padding: 12px 15px; border: 1px solid rgba(67,223,189,.25); border-radius: 14px; color: #bdf9e9; background: rgba(67,223,189,.07); text-align: right; font-size: 13px; font-weight: 800; }
.longrun-safety small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.longrun-status { margin: 12px 0; padding: 12px 15px; border: 1px solid rgba(67,223,189,.25); border-radius: 14px; color: #bdf9e9; background: rgba(67,223,189,.07); font-size: 13px; line-height: 1.5; }
.longrun-status.warning { border-color: rgba(255,184,92,.28); color: #ffd9a9; background: rgba(255,184,92,.08); }
.longrun-metrics { display: grid; margin: 15px 0; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 9px; }
.longrun-metric { display: grid; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel-soft); }
.longrun-metric strong { font-size: 21px; }
.longrun-metric small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.25; }
.longrun-quota { grid-column: 1 / -1; padding: 10px 13px; border-radius: 12px; color: var(--muted-strong); background: rgba(145,112,255,.07); font-size: 12px; line-height: 1.4; }
.longrun-grid { display: grid; margin-top: 16px; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; }
.longrun-grid > article { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: rgba(15,20,38,.88); }
.longrun-grid > article > header { display: flex; padding: 16px 17px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.longrun-grid > article > header h3 { margin: 3px 0 0; font-size: 18px; }
.longrun-list { display: grid; max-height: 480px; padding: 9px; gap: 8px; overflow-y: auto; }
.longrun-item { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.longrun-item-heading { display: flex; min-width: 0; align-items: start; justify-content: space-between; gap: 10px; }
.longrun-item-heading strong { overflow: hidden; font-size: 14px; line-height: 1.35; text-overflow: ellipsis; }
.longrun-item p { margin: 8px 0 0; color: var(--muted-strong); font-size: 12px; line-height: 1.45; }
.longrun-item > small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.longrun-badge { flex: none; padding: 5px 8px; border-radius: 99px; color: #d9ceff; background: rgba(145,112,255,.14); font-size: 10px; font-weight: 800; }
.longrun-badge.decision, .longrun-badge.danger, .longrun-badge.state-waiting_approval, .longrun-badge.state-failed_internal { color: #ffd1d8; background: rgba(242,99,118,.13); }
.longrun-badge.success, .longrun-badge.state-completed, .longrun-badge.state-candidate_ready { color: #adf5df; background: rgba(67,223,189,.12); }
.longrun-progress { display: flex; margin-top: 10px; align-items: center; gap: 10px; }
.longrun-progress-track { height: 5px; overflow: hidden; flex: 1; border-radius: 99px; background: #252b42; }
.longrun-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--cyan)); }
.longrun-progress b { width: 42px; color: var(--muted-strong); text-align: right; font-size: 11px; }
.longrun-progress-unknown { margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.longrun-meta { display: flex; margin-top: 9px; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.longrun-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.longrun-header-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(145,112,255,.3); border-radius: 13px; color: #cfc3ff; background: rgba(145,112,255,.1); }
.longrun-sidebar-row { display: flex; width: calc(100% - 14px); margin: 3px 7px; padding: 12px; align-items: center; gap: 11px; border-radius: 14px; }
.longrun-sidebar-icon { display: grid; width: 39px; height: 39px; flex: none; place-items: center; border-radius: 13px; color: var(--cyan); background: rgba(82,221,237,.1); font-size: 17px; }
.longrun-sidebar-row > span:last-child { display: grid; min-width: 0; }
.longrun-sidebar-row strong, .longrun-sidebar-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.longrun-sidebar-row strong { font-size: 14px; }
.longrun-sidebar-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.organization-header-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(145,112,255,.3); border-radius: 13px; color: #cdbfff; background: rgba(145,112,255,.1); font-size: 18px; }
.organization-heading { display: flex; margin-bottom: 24px; align-items: end; justify-content: space-between; gap: 24px; }
.organization-heading > div:first-child { max-width: 680px; }
.organization-heading span, .direction-card-header span, .direction-section-label { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .09em; }
.organization-heading h2 { margin: 5px 0 7px; font-size: clamp(22px, 3vw, 35px); letter-spacing: -.035em; }
.organization-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.organization-counts { display: flex; flex: none; gap: 8px; }
.organization-count { display: grid; min-width: 92px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-soft); text-align: center; }
.organization-count strong { font-size: 18px; }
.organization-count small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.executive-leadership { margin-bottom: 18px; }
.executive-card { display: grid; padding: 18px; grid-template-columns: minmax(240px, 1fr) minmax(300px, .8fr) auto; align-items: center; gap: 17px; overflow: hidden; border: 1px solid rgba(145,112,255,.38); border-radius: 22px; background: linear-gradient(120deg, rgba(145,112,255,.16), rgba(82,221,237,.06)); box-shadow: 0 17px 44px rgba(0,0,0,.13); }
.executive-copy span { color: var(--cyan); font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.executive-copy h3 { margin: 5px 0; font-size: 23px; }
.executive-copy p { max-width: 660px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.organization-person.general-director { padding: 10px; border-radius: 16px; background: rgba(145,112,255,.09); }
.organization-person.general-director .avatar { width: 58px; height: 58px; }
.executive-office-button { padding: 12px 15px; border: 0; border-radius: 13px; color: #090b14; background: linear-gradient(120deg, var(--cyan), #a486ff); font-size: 12px; font-weight: 850; white-space: nowrap; }
.organization-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 16px; }
.direction-card { overflow: hidden; border: 1px solid color-mix(in srgb, var(--direction-color) 34%, var(--line)); border-radius: 20px; background: rgba(15,20,38,.88); box-shadow: 0 15px 42px rgba(0,0,0,.11); }
.direction-card::before { display: block; height: 4px; background: linear-gradient(90deg, var(--direction-color), transparent); content: ""; }
.direction-card-header { padding: 18px 18px 10px; }
.direction-card-header h3 { margin: 4px 0; font-size: 18px; }
.direction-card-header p { margin: 0; color: var(--muted); font-size: 12px; }
.direction-services, .direction-team { padding: 13px 16px 16px; border-top: 1px solid var(--line); }
.direction-section-label { display: block; margin-bottom: 8px; }
.organization-person { display: flex; width: 100%; min-width: 0; padding: 10px; align-items: center; gap: 10px; border: 0; border-radius: 14px; color: inherit; background: transparent; text-align: left; }
.organization-person:hover, .organization-person:focus-visible { outline: 0; background: rgba(145,112,255,.1); }
.organization-person .avatar { width: 42px; height: 42px; flex: none; }
.organization-person.director { margin: 3px 16px 16px; width: calc(100% - 32px); padding: 13px; border: 1px solid color-mix(in srgb, var(--direction-color) 28%, var(--line)); background: color-mix(in srgb, var(--direction-color) 8%, transparent); }
.organization-person.director .avatar { width: 56px; height: 56px; }
.organization-person-copy { display: grid; min-width: 0; flex: 1; }
.organization-person-copy strong, .organization-person-copy > span, .organization-person-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-person-copy strong { font-size: 14px; }
.organization-person-copy > span { margin-top: 2px; color: var(--muted-strong); font-size: 12px; line-height: 1.3; }
.organization-person-copy small { margin-top: 4px; font-size: 11px; }
.organization-presence.available { color: var(--green); }
.organization-presence.busy { color: var(--danger); }
.organization-presence.offline { color: var(--muted); }
.organization-profile-action { flex: none; color: #bbaaff; font-size: 11px; font-weight: 750; }
.organization-vacancy { display: grid; width: 42px; height: 42px; place-items: center; border: 1px dashed var(--line); border-radius: 50%; color: var(--muted); font-size: 0; }
.organization-vacancy::after { content: "?"; font-size: 14px; }
.organization-team-list { display: flex; flex-wrap: wrap; gap: 5px; }
.organization-person.team-member { width: calc(50% - 3px); padding: 7px; }
.organization-person.team-member .avatar { width: 32px; height: 32px; }
.organization-person.team-member .organization-profile-action { display: none; }
.organization-empty { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.conversation-list > .organization-person { margin: 2px 8px; width: calc(100% - 16px); padding: 9px; }
.conversation-list > .organization-person.sidebar-director { background: rgba(145,112,255,.08); }
.profile-reports { display: grid; margin-top: 8px; gap: 3px; }
.profile-reports .organization-person { padding: 7px; }
.profile-reports .organization-person .avatar { width: 34px; height: 34px; }
.profile-reports .organization-profile-action { display: none; }

.mission-overview > p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.mission-facts { display: grid; margin-bottom: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.mission-fact { display: grid; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
.mission-fact small { color: var(--muted); font-size: 11px; }
.mission-fact strong { margin-top: 2px; font-size: 13px; }
.mission-task-list { display: grid; gap: 5px; }
.mission-task { display: flex; width: 100%; padding: 8px; align-items: center; gap: 8px; border: 0; border-radius: 10px; color: inherit; background: var(--panel-soft); text-align: left; }
.mission-task i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--muted); }
.mission-task i.busy { background: var(--danger); box-shadow: 0 0 0 4px rgba(255,112,133,.1); }
.mission-task i.done { background: var(--green); }
.mission-task span { display: grid; min-width: 0; }
.mission-task strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mission-task small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.approval-list { display: grid; margin-top: 12px; gap: 8px; }
.approval-heading { color: #ffc1ca; font-size: 13px; }
.approval-card { display: grid; padding: 12px; gap: 6px; border: 1px solid rgba(255,112,133,.25); border-radius: 12px; background: rgba(255,112,133,.07); }
.approval-card > strong { font-size: 14px; }
.approval-card p { margin: 0; color: var(--muted-strong); font-size: 12px; line-height: 1.5; }
.approval-level { color: #ff9cab; font-size: 11px; font-weight: 850; }
.approval-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.approval-actions .primary-button { margin: 0; padding: 9px; }
.approval-actions .secondary-button { padding: 9px; font-size: 12px; }
.approval-clear { margin: 0; padding: 10px; border-radius: 10px; color: var(--green); background: rgba(67,223,189,.07); font-size: 12px; }

.messages { flex: 1; min-height: 0; padding: 22px clamp(20px, 7vw, 100px) 14px; overflow-y: auto; scroll-behavior: smooth; scrollbar-color: #353b53 transparent; scrollbar-width: thin; }
#message-list { display: flex; flex-direction: column; gap: 4px; }
.older-button { display: block; margin: 0 auto 20px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); background: rgba(16,21,39,.88); font-size: 11px; }
.date-divider { align-self: center; margin: 12px 0; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; color: #aeb5c8; background: rgba(16, 21, 39, .88); font-size: 10px; }
.message-line { display: flex; max-width: min(76%, 760px); margin-bottom: 8px; align-items: end; gap: 8px; }
.message-line.human { align-self: flex-end; }
.message-line.agent, .message-line.system { align-self: flex-start; }
.message-line .avatar { width: 35px; height: 35px; border-width: 1px; font-size: 10px; }
.bubble { position: relative; min-width: 110px; padding: 11px 14px 8px; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; background: linear-gradient(145deg, #141a2d, #101526); box-shadow: 0 10px 28px rgba(0,0,0,.09); }
.human .bubble { border-color: rgba(145,112,255,.28); border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, #5132a7, #3a267a); }
.message-author { display: block; width: fit-content; margin-bottom: 5px; padding: 0; border: 0; color: var(--cyan); background: transparent; text-align: left; font-size: 11px; font-weight: 800; }
button.message-author { cursor: pointer; }
button.message-author:hover, button.message-author:focus-visible { text-decoration: underline; text-underline-offset: 3px; outline: 0; }
.message-author.identity-color, .participant strong.identity-color { color: var(--identity-dark); }
.message-role { color: var(--muted); font-weight: 600; }
.reply-quote { display: block; width: 100%; margin: 2px 0 7px; padding: 7px 9px; overflow: hidden; border: 0; border-left: 2px solid var(--cyan); border-radius: 5px; color: #bdc4d4; background: rgba(0,0,0,.16); text-align: left; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.message-content { color: #eef0f8; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.quality-summary { padding-left: 12px; border-left: 3px solid var(--purple); }
.expandable-copy { white-space: pre-wrap; }
.inline-expand { display: block; margin: 9px 0 0; padding: 5px 0; border: 0; color: var(--cyan); background: transparent; font-size: 12px; font-weight: 800; }
.inline-expand:hover, .inline-expand:focus-visible { outline: 0; text-decoration: underline; text-underline-offset: 3px; }
.technical-toggle { margin: 9px 0 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted-strong); background: var(--panel-soft); font-size: 12px; font-weight: 750; }
.technical-message { max-height: 280px; margin-top: 8px; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: rgba(0,0,0,.12); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.report-link { width: 100%; cursor: pointer; text-align: left; }
.artifact-report-viewer { display: grid; gap: 12px; }
.artifact-report-notice { padding: 10px 12px; border: 1px solid rgba(82,221,237,.2); border-radius: 11px; color: var(--muted-strong); background: rgba(82,221,237,.07); font-size: 12px; }
.artifact-report-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.artifact-report-content { max-height: min(68vh, 760px); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--panel-soft); font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.artifact-report-summary { font-size: 15px; line-height: 1.72; }
.artifact-report-technical { color: var(--muted-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.message-foot { display: flex; margin-top: 5px; justify-content: flex-end; align-items: center; gap: 5px; color: rgba(219, 224, 240, .58); font-size: 9px; }
.message-state.pending { color: #ddd4ff; }
.message-state.failed { color: #ff9baa; }
.message-type { align-self: flex-start; margin-bottom: 6px; padding: 3px 7px; border-radius: 99px; color: #d8ceff; background: rgba(145,112,255,.13); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.artifact-link { display: flex; margin-top: 9px; padding: 9px 10px; gap: 8px; border: 1px solid rgba(82,221,237,.16); border-radius: 10px; color: #bceef4; background: rgba(82,221,237,.06); font-size: 11px; }
.file-link { align-items: center; text-decoration: none; }
.file-link strong, .file-link small { display: block; }
.file-link small { margin-top: 2px; color: var(--muted); }
.attachment-preview { display: block; width: min(100%, 620px); margin-top: 9px; padding: 0; overflow: hidden; border: 1px solid rgba(82,221,237,.18); border-radius: 13px; background: rgba(0,0,0,.2); }
.image-preview { cursor: zoom-in; }
.image-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; background: #070a13; }
.attachment-caption { display: block; padding: 8px 11px; overflow: hidden; color: var(--muted-strong); font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.media-preview { max-height: 440px; }
.audio-preview { min-width: min(360px, 100%); padding: 8px; }
.document-attachment-preview { padding: 14px 16px; color: #bceef4; text-align: left; text-decoration: none; font-weight: 800; cursor: pointer; }
.document-attachment-preview::before { margin-right: 8px; content: "▣"; }
.archive-preview::before { content: "▦"; }
.office-preview::before { content: "▤"; }
.message-actions {
  position: absolute;
  z-index: 3;
  top: -17px;
  right: 9px;
  display: flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  opacity: 0;
  background: var(--panel-raised);
  box-shadow: 0 7px 20px rgba(0,0,0,.16);
  transition: opacity .15s ease;
}
.message-line:hover .message-actions, .message-line:focus-within .message-actions { opacity: 1; }
.message-action { min-width: 27px; height: 25px; padding: 0 6px; border: 0; border-radius: 7px; color: var(--muted-strong); background: transparent; font-size: 12px; }
.message-action:hover, .message-action.active { color: var(--ink); background: rgba(145,112,255,.14); }
.reaction-row { display: flex; margin-top: 7px; flex-wrap: wrap; gap: 5px; }
.reaction-chip, .thread-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted-strong);
  background: rgba(145,112,255,.06);
  font-size: 10px;
}
.reaction-chip.active { border-color: rgba(82,221,237,.45); color: var(--ink); background: rgba(82,221,237,.13); }
.thread-chip { margin-top: 7px; color: var(--cyan); }
.pinned-mark { margin-right: auto; color: var(--purple); font-weight: 800; }
.highlighted-message .bubble { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(82,221,237,.13), 0 10px 28px rgba(0,0,0,.09); }

.typing { display: flex; width: fit-content; margin: 3px 0 7px 43px; padding: 10px 14px; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: #13192c; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--purple); animation: pulse-dot 1.15s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
.typing em { margin-left: 6px; color: var(--muted); font-size: 10px; font-style: normal; }
@keyframes pulse-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-3px); opacity: 1; } }

.composer { position: relative; display: flex; min-height: 74px; padding: 12px clamp(18px, 5vw, 70px); flex-wrap: wrap; align-items: end; gap: 10px; border-top: 1px solid var(--line); background: rgba(11, 15, 29, .97); }
.composer textarea { flex: 1; max-height: 150px; padding: 13px 15px; resize: none; border: 1px solid rgba(159,168,199,.23); border-radius: 18px; outline: 0; background: #11172a; line-height: 1.45; }
.composer textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(145,112,255,.12); }
.send-button { display: grid; width: 46px; height: 46px; flex: none; padding: 0 0 1px 2px; place-items: center; border: 0; border-radius: 15px; color: #090b14; background: linear-gradient(135deg, var(--purple), var(--cyan)); font-size: 20px; font-weight: 900; }
.send-button:disabled { opacity: .35; }
.draft-saved { position: absolute; right: 76px; bottom: 62px; padding: 5px 8px; border-radius: 7px; color: var(--muted-strong); background: #1b2135; font-size: 9px; }
.composer-tool { display: grid; width: 42px; height: 42px; flex: none; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 14px; color: var(--muted-strong); background: transparent; font-size: 20px; }
.composer-tool:hover, .composer-tool:focus-visible { border-color: rgba(145,112,255,.42); color: var(--ink); outline: 0; background: rgba(145,112,255,.1); }
.replying-banner, .mention-strip { display: flex; width: 100%; flex: 1 0 100%; }
.replying-banner { padding: 8px 11px; align-items: center; justify-content: space-between; border-left: 3px solid var(--cyan); border-radius: 10px; background: rgba(82,221,237,.07); }
.replying-banner span { display: grid; min-width: 0; text-align: left; }
.replying-banner strong { font-size: 11px; }
.replying-banner small { overflow: hidden; margin-top: 2px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.replying-banner button { border: 0; color: var(--muted); background: transparent; font-size: 20px; }
.mention-strip { padding: 3px 0; overflow-x: auto; gap: 6px; }
.mention-strip[hidden] { display: none; }
.mention-chip { display: flex; padding: 5px 9px 5px 6px; flex: none; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted-strong); background: var(--panel-soft); font-size: 10px; text-align: left; }
.mention-chip.active, .mention-chip:hover, .mention-chip:focus-visible { border-color: var(--cyan); background: rgba(82,221,237,.12); outline: none; }
.mention-chip.service-mention { padding-left: 9px; color: #83e7f2; border-color: rgba(82,221,237,.25); }
.mention-chip .avatar { width: 24px; height: 24px; border-width: 1px; font-size: 7px; }
.mention-kind { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 8px; color: var(--cyan); background: rgba(82,221,237,.12); font-size: 13px; font-weight: 800; }
.mention-option-copy { display: grid; gap: 1px; }
.mention-option-copy strong { color: var(--text); font-size: 11px; }
.mention-option-copy small { max-width: 220px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.mention-empty { padding: 7px 10px; color: var(--muted); font-size: 11px; }
.message-mention { display: inline; margin: 0 1px; padding: 1px 4px; border: 0; border-radius: 5px; color: #aeeff5; background: rgba(82,221,237,.14); font: inherit; font-weight: 750; line-height: inherit; cursor: pointer; }
.message-mention:hover, .message-mention:focus-visible { color: #fff; background: rgba(82,221,237,.28); outline: 2px solid rgba(82,221,237,.48); outline-offset: 1px; }

.details-panel { position: relative; z-index: 6; display: flex; flex: 0 0 min(340px, 28vw); flex-direction: column; border-left: 1px solid var(--line); background: #0d1120; box-shadow: -24px 0 50px rgba(0,0,0,.18); }
.details-panel header { display: flex; min-height: 76px; padding: 12px 16px; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.details-panel header .icon-button { font-size: 28px; }
.details-content { padding: 26px 21px; overflow-y: auto; text-align: center; }
.details-content > #details-avatar .avatar { width: 78px; height: 78px; margin: 0 auto 14px; font-size: 20px; }
.details-content h2 { margin: 0; font-size: 21px; }
.details-content > p { margin: 8px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.detail-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); text-align: left; }
.detail-block > strong { font-size: 13px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; }
.detail-heading strong { font-size: 13px; }
.detail-heading span { min-width: 23px; padding: 3px 6px; border-radius: 99px; color: var(--muted-strong); background: var(--panel-soft); text-align: center; font-size: 11px; }
.compact-list { display: grid; margin-top: 8px; gap: 6px; }
.compact-item { display: grid; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted-strong); background: var(--panel-soft); text-align: left; text-decoration: none; }
.compact-item strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.compact-item small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.compact-empty { color: var(--muted); font-size: 12px; }
.media-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-item { display: flex; min-height: 72px; padding: 7px; align-items: center; gap: 8px; overflow: hidden; }
.media-item img { width: 56px; height: 56px; flex: none; border-radius: 8px; object-fit: cover; background: #070a13; }
.media-item-icon { display: grid; width: 45px; height: 45px; flex: none; place-items: center; border-radius: 10px; color: var(--cyan); background: rgba(82,221,237,.08); font-size: 12px; font-weight: 850; }
.media-item-description { display: grid; min-width: 0; }
.meeting-control { display: grid; gap: 12px; }
.meeting-control > span { display: grid; }
.meeting-control small { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.meeting-control button { padding: 10px 12px; border: 1px solid rgba(82,221,237,.25); border-radius: 11px; color: var(--cyan); background: rgba(82,221,237,.08); font-size: 12px; font-weight: 800; }
.meeting-control button.danger { border-color: rgba(255,112,133,.25); color: #ff9cab; background: rgba(255,112,133,.08); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.setting-row span { display: grid; text-align: left; }
.setting-row strong { font-size: 12px; }
.setting-row small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.setting-row button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted-strong); background: var(--panel-soft); font-size: 11px; }
.setting-row button.active { color: #251364; border-color: #c4b4ff; background: #dcd4ff; font-weight: 800; }
.participant { display: flex; width: 100%; margin-top: 8px; padding: 8px; align-items: center; gap: 10px; border: 0; border-radius: 12px; color: inherit; background: transparent; text-align: left; }
.participant:hover, .participant:focus-visible { outline: 0; background: rgba(145,112,255,.09); }
.participant .avatar { width: 42px; height: 42px; }
.participant div { display: grid; min-width: 0; flex: 1; }
.participant strong, .participant span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant strong { font-size: 13px; }
.participant span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.participant-role-line { display: flex; align-items: center; gap: 5px; }
.participant-open { margin-left: auto; color: var(--muted); font-size: 22px !important; }
.role-badge { padding: 3px 6px; border: 1px solid rgba(145,112,255,.22); border-radius: 99px; color: #c8baff; background: rgba(145,112,255,.09); font-size: 10px; font-style: normal; font-weight: 800; }
.reassurance { padding: 16px; border: 1px solid rgba(82,221,237,.13); border-radius: 14px; background: rgba(82,221,237,.05); }
.reassurance p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.profile-panel { position: relative; z-index: 10; display: flex; width: min(420px, 34vw); flex: 0 0 min(420px, 34vw); flex-direction: column; border-left: 1px solid var(--line); background: #0d1120; box-shadow: -24px 0 50px rgba(0,0,0,.2); }
.profile-panel header { display: flex; min-height: 76px; padding: 12px 16px; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.profile-panel header .icon-button { font-size: 28px; }
.profile-content { padding: 25px 22px 32px; overflow-y: auto; text-align: center; }
.profile-content > #profile-avatar .avatar { width: 98px; height: 98px; margin: 0 auto 14px; font-size: 24px; box-shadow: 0 0 0 5px rgba(145,112,255,.09); }
.profile-content h2 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.profile-content > p { margin: 7px 0 13px; color: var(--muted-strong); font-size: 14px; line-height: 1.4; }
.profile-badges { display: flex; margin-bottom: 15px; flex-wrap: wrap; justify-content: center; gap: 6px; }
.profile-badge, .profile-skill { padding: 6px 9px; border: 1px solid rgba(145,112,255,.2); border-radius: 999px; color: #cfc4ff; background: rgba(145,112,255,.08); font-size: 11px; font-weight: 700; }
.profile-direct-button { width: 100%; margin: 2px 0 22px; }
.profile-section { padding: 17px 0; border-top: 1px solid var(--line); text-align: left; }
.profile-section > strong { font-size: 14px; }
.profile-section > p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.profile-assignments { display: grid; gap: 9px; margin-top: 10px; }
.profile-assignment {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-soft); color: var(--text); text-align: left; display: grid; gap: 6px;
}
.profile-assignment:not(:disabled) { cursor: pointer; }
.profile-assignment:not(:disabled):hover { border-color: var(--accent); }
.profile-assignment:disabled { opacity: 1; }
.profile-assignment > span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.profile-assignment-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-assignment-heading strong { color: var(--text); font-size: 14px; }
.profile-assignment-heading b, .profile-assignment-remaining { color: var(--accent) !important; font-weight: 700; }
.profile-facts { display: grid; margin-bottom: 17px; padding: 13px; gap: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-soft); }
.profile-fact { display: flex; align-items: start; justify-content: space-between; gap: 16px; text-align: left; }
.profile-fact span { color: var(--muted); font-size: 12px; }
.profile-fact strong { max-width: 64%; text-align: right; font-size: 12px; line-height: 1.4; }
.profile-skills { display: flex; margin-top: 10px; flex-wrap: wrap; gap: 6px; }
.profile-skill { color: #a8edf4; border-color: rgba(82,221,237,.2); background: rgba(82,221,237,.06); font-weight: 600; }
.profile-management-section > p { margin-bottom: 12px; }
.management-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.management-summary-item { display: grid; min-width: 0; padding: 11px; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.management-summary-item span { color: var(--muted); font-size: 11px; }
.management-summary-item strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.current-absence { display: grid; grid-column: 1 / -1; padding: 12px; gap: 4px; border: 1px solid rgba(255,180,84,.25); border-radius: 12px; color: #ffd19a; background: rgba(255,180,84,.08); }
.current-absence strong { font-size: 13px; }
.current-absence span { font-size: 11px; line-height: 1.4; }
.management-actions { display: grid; margin: 11px 0 15px; gap: 7px; }
.management-actions button { padding: 10px 12px; border: 1px solid rgba(145,112,255,.25); border-radius: 11px; color: #d3c9ff; background: rgba(145,112,255,.08); font-size: 12px; font-weight: 800; text-align: left; }
.management-actions button:last-child { border-color: rgba(82,221,237,.22); color: #a8edf4; background: rgba(82,221,237,.06); }
.management-history { display: grid; gap: 7px; }
.management-history-title { margin: 2px 0 3px; font-size: 12px; }
.management-entry { display: flex; padding: 10px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.management-entry.cancelled { opacity: .58; }
.management-entry-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.management-entry-copy strong { font-size: 12px; }
.management-entry-copy span { color: var(--muted-strong); font-size: 11px; line-height: 1.4; }
.management-entry-copy small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.management-cancel { flex: none; padding: 6px 8px; border: 1px solid rgba(255,112,133,.22); border-radius: 8px; color: #ff9cab; background: rgba(255,112,133,.06); font-size: 10px; font-weight: 750; }
.management-empty { margin: 0; color: var(--muted); font-size: 11px; }

.thread-panel { position: relative; z-index: 8; display: flex; width: min(380px, 31vw); flex: 0 0 min(380px, 31vw); flex-direction: column; border-left: 1px solid var(--line); background: #0d1120; box-shadow: -24px 0 50px rgba(0,0,0,.18); }
.thread-panel header { display: flex; min-height: 76px; padding: 12px 14px 12px 18px; align-items: center; border-bottom: 1px solid var(--line); }
.thread-panel header div { display: grid; }
.thread-panel header strong { font-size: 14px; }
.thread-panel header span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.thread-panel header .icon-button { margin-left: auto; }
.thread-messages { flex: 1; min-height: 0; padding: 18px 12px; overflow-y: auto; }
.thread-messages .message-line { max-width: 100%; }
.thread-messages .message-actions, .thread-messages .thread-chip { display: none; }
.thread-composer { display: flex; padding: 11px; align-items: end; gap: 8px; border-top: 1px solid var(--line); }
.thread-composer textarea { min-width: 0; flex: 1; padding: 10px 11px; resize: none; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: var(--panel-soft); }
.thread-composer .send-button { width: 41px; height: 41px; border-radius: 13px; }

.member-panel { position: relative; z-index: 5; display: flex; width: 310px; flex: 0 0 310px; flex-direction: column; border-left: 1px solid var(--line); background: #0a0e1b; }
.details-panel:not([hidden]) ~ .member-panel,
.profile-panel:not([hidden]) ~ .member-panel,
.thread-panel:not([hidden]) ~ .member-panel { display: none; }
.member-panel header { display: flex; min-height: 68px; padding: 13px 18px; align-items: center; border-bottom: 1px solid var(--line); }
.member-panel header div { display: grid; }
.member-panel header strong { font-size: 16px; }
.member-panel header span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.member-tools { padding: 12px 11px 7px; border-bottom: 1px solid var(--line); }
.member-search { display: flex; height: 39px; padding: 0 11px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-soft); }
.member-search span { color: var(--muted); font-size: 18px; }
.member-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.member-filters { display: flex; margin-top: 8px; gap: 5px; overflow-x: auto; scrollbar-width: none; }
.member-filters::-webkit-scrollbar { display: none; }
.member-filters button { flex: none; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); background: transparent; font-size: 9px; font-weight: 750; }
.member-filters button.active { border-color: rgba(82,221,237,.3); color: var(--cyan); background: rgba(82,221,237,.08); }
.member-list { padding: 12px 11px 26px; overflow-y: auto; }
.member-group + .member-group { margin-top: 21px; }
.member-group-title { display: block; padding: 0 9px 7px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.member-row { display: flex; width: 100%; padding: 9px; align-items: center; gap: 11px; border: 0; border-radius: 13px; color: inherit; background: transparent; text-align: left; }
.member-row:hover, .member-row:focus-visible { outline: 0; background: rgba(145,112,255,.1); }
.member-row .avatar { width: 43px; height: 43px; border-width: 1px; }
.member-copy { display: grid; min-width: 0; flex: 1; }
.member-copy strong, .member-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-copy strong { font-size: 13px; }
.member-copy span { display: -webkit-box; margin-top: 2px; overflow: hidden; color: var(--muted-strong); font-size: 11px; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.member-copy small { margin-top: 4px; font-size: 10px; }
.member-status.available { color: var(--green); }
.member-status.busy { color: var(--danger); }
.member-status.offline { color: var(--muted); }

.business-dialog, .media-dialog {
  width: min(620px, calc(100vw - 36px));
  max-height: min(820px, calc(100dvh - 36px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.business-dialog::backdrop, .media-dialog::backdrop { background: rgba(3,5,12,.74); backdrop-filter: blur(8px); }
.business-dialog form { display: grid; padding: 24px; gap: 10px; }
.business-dialog header, .media-dialog header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.business-dialog header small, .media-dialog header small { color: var(--cyan); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.business-dialog h2, .media-dialog h2 { margin: 4px 0 0; font-size: 22px; }
.business-dialog p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.business-dialog label { margin-top: 7px; font-size: 11px; font-weight: 800; }
.business-dialog input, .business-dialog textarea, .business-dialog select { width: 100%; padding: 12px 13px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: var(--panel-soft); font: inherit; }
.business-dialog input:focus, .business-dialog textarea:focus, .business-dialog select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(145,112,255,.11); }
.business-dialog .dialog-check { display: flex; margin-top: 10px; align-items: center; gap: 9px; color: var(--muted-strong); font-size: 12px; font-weight: 650; }
.business-dialog .dialog-check input { width: 18px; height: 18px; flex: none; }
.business-dialog footer { display: flex; margin-top: 8px; justify-content: flex-end; gap: 9px; }
.business-dialog footer .primary-button { width: auto; margin: 0; padding: 11px 16px; }
.media-dialog { width: min(980px, calc(100vw - 32px)); }
.media-dialog > header { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.media-dialog-content { display: grid; min-height: 260px; max-height: calc(100dvh - 190px); overflow: auto; place-items: center; background: #070a13; }
.media-dialog-content > img, .media-dialog-content > video { display: block; max-width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; }
.media-dialog-content > audio { width: min(560px, calc(100% - 40px)); }
.media-dialog-content > iframe { width: 100%; height: min(72dvh, 820px); border: 0; background: #fff; }
.document-preview { display: grid; max-width: 460px; padding: 50px 30px; place-items: center; color: #eef0f8; text-align: center; }
.document-preview > span { display: grid; width: 78px; height: 78px; margin-bottom: 18px; place-items: center; border-radius: 22px; color: var(--cyan); background: rgba(82,221,237,.1); font-size: 25px; }
.document-preview p { color: #aeb6cb; line-height: 1.55; }
.media-dialog > footer { display: flex; padding: 13px 18px; align-items: center; justify-content: space-between; gap: 12px; }
.media-dialog > footer span { color: var(--muted); font-size: 11px; }

.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: min(390px, calc(100vw - 44px)); padding: 12px 16px; border: 1px solid rgba(145,112,255,.32); border-radius: 13px; color: #f4f2ff; background: #1a1d32; box-shadow: var(--shadow); font-size: 12px; }
.empty-list { padding: 50px 25px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.6; }

[data-theme="light"] {
  color-scheme: light;
  --ink: #172039;
  --muted: #69738b;
  --muted-strong: #46516b;
  --night: #f3f6fc;
  --panel: #ffffff;
  --panel-raised: #ffffff;
  --panel-soft: #f4f6fb;
  --line: rgba(57, 70, 112, .14);
  --purple: #7252dc;
  --purple-deep: #5b39c8;
  --cyan: #168fa8;
  --green: #0a9a75;
  --danger: #ce4059;
  --shadow: 0 24px 70px rgba(48, 61, 99, .14);
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 10% 5%, rgba(50, 197, 218, .16), transparent 28%),
    radial-gradient(circle at 90% 5%, rgba(114, 82, 220, .13), transparent 29%),
    #edf2fa;
}

[data-theme="light"] .login-screen {
  background: linear-gradient(145deg, #f8faff, #edf2fb);
}

[data-theme="light"] .login-glow { opacity: .13; }
[data-theme="light"] .login-card {
  border-color: rgba(75, 89, 134, .13);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(246,248,253,.98));
  box-shadow: 0 28px 90px rgba(56, 70, 110, .16);
}
[data-theme="light"] .login-card label { color: #303a54; }
[data-theme="light"] .login-card input {
  border-color: rgba(68, 80, 119, .22);
  color: #172039;
  background: #f7f9fd;
}
[data-theme="light"] .login-card input::placeholder { color: #8a93a8; }
[data-theme="light"] .primary-button {
  color: #fff;
  background: linear-gradient(105deg, #5d3dcc, #258ea8);
  box-shadow: 0 10px 25px rgba(94, 62, 204, .2);
}
[data-theme="light"] .form-error { color: #b62f48; }

[data-theme="light"] .app-shell { background: rgba(241, 245, 252, .84); }
[data-theme="light"] .workspace-rail { background: #eef2f9; }
[data-theme="light"] .workspace-button:hover,
[data-theme="light"] .workspace-button:focus-visible,
[data-theme="light"] .workspace-button.active { color: #5135b5; background: linear-gradient(145deg, rgba(114,82,220,.14), rgba(22,143,168,.09)); }
[data-theme="light"] .workspace-button b { border-color: #eef2f9; }
[data-theme="light"] .sidebar { background: rgba(255, 255, 255, .97); }
[data-theme="light"] .sidebar-header,
[data-theme="light"] .chat-header { border-bottom-color: var(--line); }
[data-theme="light"] .icon-button:hover,
[data-theme="light"] .icon-button:focus-visible {
  color: #5939bd;
  background: rgba(114, 82, 220, .09);
}
[data-theme="light"] .search-box { color: #6d7790; background: #f0f3f9; }
[data-theme="light"] .filter-chip { border-color: rgba(67, 80, 119, .17); background: #fff; }
[data-theme="light"] .filter-chip.active {
  border-color: rgba(22, 143, 168, .25);
  color: #09677a;
  background: #e3f6f8;
}
[data-theme="light"] .conversation-list { scrollbar-color: #c7cedd transparent; }
[data-theme="light"] .conversation-row:hover { background: #f6f8fc; }
[data-theme="light"] .conversation-row:focus-within { box-shadow: inset 0 0 0 2px #593aae; }
[data-theme="light"] .conversation-open:focus-visible { outline-color: #593aae; }
[data-theme="light"] .conversation-row.active {
  border-color: rgba(114, 82, 220, .17);
  background: linear-gradient(110deg, rgba(114,82,220,.1), rgba(22,143,168,.055));
}
[data-theme="light"] .conversation-line time { color: #8992a7; }
[data-theme="light"] .status-pill { color: #6545c6; background: rgba(114,82,220,.09); }
[data-theme="light"] .estimate-pill { color: #12705e; background: #e8f8f3; }
[data-theme="light"] .estimate-pill.paused { color: #8a4d00; background: #fff2df; }
[data-theme="light"] .unread-badge { color: #fff; background: #168fa8; }
[data-theme="light"] .notification-row:hover, [data-theme="light"] .notification-row:focus-visible { background: #f6f8fc; }
[data-theme="light"] .notification-row.unread { border-color: rgba(114,82,220,.14); background: linear-gradient(110deg, rgba(114,82,220,.09), rgba(22,143,168,.035)); }
[data-theme="light"] .notification-icon { color: #087589; background: #eaf8fa; }
[data-theme="light"] .notification-kind { color: #593aae; background: #f1edff; }
[data-theme="light"] .notification-action { color: #087589; }
[data-theme="light"] .avatar {
  border-color: rgba(114, 82, 220, .72);
  color: #27324e;
  background: linear-gradient(145deg, #f9faff, #e4e9f3);
}
[data-theme="light"] .avatar::after { border-color: #fff; background: #9aa3b7; }
[data-theme="light"] .avatar.online::after { background: var(--green); }
[data-theme="light"] .avatar.busy::after { background: var(--danger); }
[data-theme="light"] .sidebar-footer { background: #fbfcfe; }

[data-theme="light"] .chat-pane { background: #edf1f8; }
[data-theme="light"] .chat-pane::before {
  opacity: .36;
  background-image: radial-gradient(rgba(91, 72, 160, .12) .8px, transparent .8px);
}
[data-theme="light"] .empty-logo { filter: drop-shadow(0 0 28px rgba(114,82,220,.16)); }
[data-theme="light"] .trust-row span { background: rgba(255,255,255,.64); }
[data-theme="light"] .chat-header { background: rgba(255, 255, 255, .94); }
[data-theme="light"] .message-search-panel { background: rgba(255, 255, 255, .97); }
[data-theme="light"] .text-button { color: #6543c4; }
[data-theme="light"] .mission-strip { background: rgba(248, 249, 253, .97); }
[data-theme="light"] .mission-progress { background: #dce2ed; }
[data-theme="light"] .secretariat-workspace { background: radial-gradient(circle at 88% 8%, rgba(22,143,168,.08), transparent 30%), #edf1f8; }
[data-theme="light"] .secretariat-agenda-link { color: #09677a; background: #e6f7f9; }
[data-theme="light"] .secretariat-status, [data-theme="light"] .secretariat-capability { color: #14705d; background: #eaf8f4; }
[data-theme="light"] .secretariat-status.warning, [data-theme="light"] .secretariat-capability.warning { color: #8a4d00; background: #fff4e3; }
[data-theme="light"] .secretariat-metric, [data-theme="light"] .secretariat-actions button, [data-theme="light"] .secretariat-grid article { background: rgba(255,255,255,.9); }
[data-theme="light"] .billing-panel { background: rgba(255,255,255,.72); }
[data-theme="light"] .billing-invoice-card { background: rgba(255,255,255,.92); }
[data-theme="light"] .billing-fast-create textarea { border-color: rgba(66,80,119,.18); background: #f4f6fa; }
[data-theme="light"] .billing-action { color: #09677a; background: #e6f7f9; }
[data-theme="light"] .billing-create-action { color: #fff; background: #087d94; }
[data-theme="light"] .billing-fast-create-actions > span.error, [data-theme="light"] .billing-feedback.error { color: #a12635; }
[data-theme="light"] .longrun-workspace { background: radial-gradient(circle at 88% 8%, rgba(114,82,220,.08), transparent 30%), #edf1f8; }
[data-theme="light"] .longrun-safety, [data-theme="light"] .longrun-status { color: #14705d; background: #eaf8f4; }
[data-theme="light"] .longrun-status.warning { color: #8a4d00; background: #fff4e3; }
[data-theme="light"] .longrun-metric, [data-theme="light"] .longrun-grid > article, [data-theme="light"] .longrun-item { background: rgba(255,255,255,.92); }
[data-theme="light"] .longrun-progress-track { background: #dce2ed; }
[data-theme="light"] .messages { scrollbar-color: #c3cad9 transparent; }
[data-theme="light"] .older-button,
[data-theme="light"] .date-divider {
  color: #5d667c;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 5px 18px rgba(55,68,105,.06);
}
[data-theme="light"] .bubble {
  border-color: rgba(69, 82, 122, .12);
  background: linear-gradient(145deg, #ffffff, #f9faff);
  box-shadow: 0 9px 26px rgba(58, 69, 104, .08);
}
[data-theme="light"] .human .bubble {
  border-color: rgba(93, 61, 204, .24);
  background: linear-gradient(135deg, #7654dd, #5b3dbb);
  box-shadow: 0 10px 28px rgba(84, 55, 178, .15);
}
[data-theme="light"] .message-author { color: #087b91; }
[data-theme="light"] .message-author.identity-color,
[data-theme="light"] .participant strong.identity-color { color: var(--identity-light); }
[data-theme="light"] .role-badge { color: #5438a8; border-color: rgba(91,65,179,.2); background: rgba(108,78,207,.08); }
[data-theme="light"] .message-role { color: #667188; }
[data-theme="light"] .message-content { color: #1e2841; }
[data-theme="light"] .human .message-content { color: #fff; }
[data-theme="light"] .message-foot { color: #8991a4; }
[data-theme="light"] .human .message-foot { color: rgba(255,255,255,.7); }
[data-theme="light"] .human .message-state.pending { color: #f1edff; }
[data-theme="light"] .reply-quote { color: #526078; background: #f0f3f9; }
[data-theme="light"] .human .reply-quote { color: #f2efff; background: rgba(28,15,76,.18); }
[data-theme="light"] .message-type { color: #6243bd; background: rgba(114,82,220,.09); }
[data-theme="light"] .technical-message { background: #f4f6fa; }
[data-theme="light"] .human .message-type { color: #f5f2ff; background: rgba(255,255,255,.12); }
[data-theme="light"] .artifact-link { color: #08788c; background: #eaf8fa; }
[data-theme="light"] .attachment-preview { border-color: rgba(22,143,168,.2); background: #edf3f8; }
[data-theme="light"] .image-preview img { background: #eef2f7; }
[data-theme="light"] .pdf-preview { color: #08788c; }
[data-theme="light"] .message-actions { background: #fff; box-shadow: 0 7px 20px rgba(48,61,99,.12); }
[data-theme="light"] .reaction-chip, [data-theme="light"] .thread-chip { background: #f4f2fb; }
[data-theme="light"] .reaction-chip.active { color: #09677a; background: #e3f6f8; }
[data-theme="light"] .typing { background: #fff; box-shadow: 0 8px 24px rgba(55,68,105,.08); }
[data-theme="light"] .composer { background: rgba(255, 255, 255, .96); }
[data-theme="light"] .composer textarea { border-color: rgba(66,80,119,.18); background: #f4f6fa; }
[data-theme="light"] .send-button { color: #fff; background: linear-gradient(135deg, #7252dc, #168fa8); }
[data-theme="light"] .draft-saved { color: #58637b; background: #e9edf5; }
[data-theme="light"] .details-panel { background: #fff; box-shadow: -24px 0 50px rgba(50,62,96,.1); }
[data-theme="light"] .profile-panel { background: #fff; box-shadow: -24px 0 50px rgba(50,62,96,.1); }
[data-theme="light"] .thread-panel { background: #fff; box-shadow: -24px 0 50px rgba(50,62,96,.1); }
[data-theme="light"] .member-panel { background: #f8faff; }
[data-theme="light"] .direction-card { background: rgba(255,255,255,.94); box-shadow: 0 15px 42px rgba(47,58,91,.08); }
[data-theme="light"] .executive-card { background: linear-gradient(120deg, #f3efff, #eefafb); box-shadow: 0 15px 42px rgba(47,58,91,.08); }
[data-theme="light"] .organization-person.director { background: color-mix(in srgb, var(--direction-color) 6%, white); }
[data-theme="light"] .profile-badge { color: #5638ad; background: #f1edff; }
[data-theme="light"] .profile-skill { color: #087589; background: #eaf8fa; }
[data-theme="light"] .management-actions button { color: #5638ad; background: #f1edff; }
[data-theme="light"] .management-actions button:last-child { color: #087589; background: #eaf8fa; }
[data-theme="light"] .current-absence { color: #8a5312; background: #fff7e9; }
[data-theme="light"] .reassurance { border-color: rgba(22,143,168,.16); background: #edf9fa; }
[data-theme="light"] .active-chat.file-dragging::after { color: #087589; background: rgba(247,250,255,.92); }
[data-theme="light"] .business-dialog, [data-theme="light"] .media-dialog { background: #fff; }
[data-theme="light"] .media-item img { background: #edf2f7; }
[data-theme="light"] .toast {
  border-color: rgba(114,82,220,.2);
  color: #28314a;
  background: #fff;
  box-shadow: 0 18px 55px rgba(47,58,91,.17);
}

@media (max-width: 1080px) {
  .member-panel { display: none; }
  .details-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 90vw); flex-basis: auto; }
  .profile-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); flex-basis: auto; }
  .thread-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); flex-basis: auto; }
  .messages { padding-right: clamp(20px, 5vw, 62px); padding-left: clamp(20px, 5vw, 62px); }
}

@container active-chat (max-width: 720px) {
  .organization-heading, .secretariat-heading, .longrun-heading { align-items: stretch; flex-direction: column; }
  .organization-counts { width: 100%; flex-wrap: wrap; }
  .organization-count { min-width: 0; flex: 1 1 120px; }
  .executive-card { grid-template-columns: 1fr; }
  .executive-office-button { width: 100%; }
  .organization-grid, .secretariat-grid, .longrun-grid { grid-template-columns: 1fr; }
  .secretariat-metrics, .longrun-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-invoice-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1440px) {
  .sidebar { flex-basis: clamp(430px, 25vw, 480px); }
  .conversation-summary { font-size: 13px; }
  .conversation-section { font-size: 12px; }
  .conversation-line strong { font-size: 16px; }
  .conversation-line time { font-size: 12px; }
  .conversation-preview { font-size: 14px; }
  .conversation-meta { font-size: 12px; }
  .inline-profile-link { font-size: 11px; }
  .member-panel { width: 350px; flex-basis: 350px; }
  .member-panel header span { font-size: 12px; }
  .member-search input { font-size: 13px; }
  .member-filters button { font-size: 11px; }
  .member-group-title { font-size: 11px; }
  .member-copy strong { font-size: 15px; }
  .member-copy span { font-size: 13px; }
  .member-copy small { font-size: 12px; }
}

@media (max-width: 760px) {
  .login-card { padding: 28px 23px; border-radius: 24px; }
  .app-shell { display: block; }
  .workspace-rail { position: fixed; z-index: 10; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 8px; display: grid; width: auto; height: 62px; padding: 5px 6px; grid-template-columns: repeat(12, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 20px; background: rgba(8,11,23,.96); box-shadow: 0 15px 40px rgba(0,0,0,.3); }
  .workspace-logo, .workspace-spacer, .workspace-rail .theme-button { display: none; }
  .workspace-button { width: 100%; min-height: 49px; padding: 4px 1px; border-radius: 14px; }
  .workspace-button small { font-size: 7px; }
  .workspace-button.active::before { inset: auto 14px -5px; width: auto; height: 3px; border-radius: 8px 8px 0 0; }
  [data-theme="light"] .workspace-rail { background: rgba(255,255,255,.97); }
  .sidebar { width: 100%; height: 100%; border: 0; }
  .chat-pane { position: absolute; inset: 0; z-index: 8; display: none; }
  .chat-open .sidebar { display: none; }
  .chat-open .chat-pane { display: flex; }
  .mobile-back { display: grid; margin-right: 4px; }
  .messages { padding: 18px 12px 10px; }
  .message-line { max-width: 91%; }
  .message-line .avatar { display: none; }
  .message-avatar-trigger, .message-avatar-static { display: none; }
  .typing { margin-left: 0; }
  .composer { min-height: 68px; padding: 10px; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .sidebar-footer { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .organization-workspace { padding: 18px 12px 90px; }
  .secretariat-workspace { padding: 18px 12px 90px; }
  .direction-workspace { padding: 18px 12px 90px; }
  .longrun-workspace { padding: 18px 12px 90px; }
  .controlcenter-workspace { padding: 18px 12px 90px; }
  .lyra-access-workspace { padding: 18px 12px 90px; }
  .controlcenter-heading { align-items: stretch; flex-direction: column; }
  .direction-heading { align-items: stretch; flex-direction: column; }
  .direction-safety { text-align: left; }
  .direction-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .direction-create { grid-template-columns: 1fr; }
  .direction-create label { grid-column: auto; }
  .direction-grid { grid-template-columns: 1fr; }
  .controlcenter-safety { text-align: left; }
  .controlcenter-actions { grid-template-columns: 1fr; }
  .controlcenter-mission-form { grid-template-columns: 1fr; }
  .controlcenter-mission-form label { grid-column: auto; }
  .controlcenter-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controlcenter-grid { grid-template-columns: 1fr; }
  .cc-row { align-items: flex-start; flex-wrap: wrap; }
  .cc-row-main { flex: 1; }
  .cc-row-actions { width: 100%; margin-left: 0; }
  .longrun-safety { text-align: left; }
  .secretariat-heading { align-items: stretch; flex-direction: column; }
  .secretariat-agenda-link { text-align: center; }
  .secretariat-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .secretariat-grid { grid-template-columns: 1fr; }
  .secretariat-fields { grid-template-columns: 1fr; }
  .secretariat-fields textarea, .secretariat-fields .dialog-check { grid-column: auto; }
  .billing-panel { padding: 15px; }
  .billing-invoice-grid { grid-template-columns: 1fr; }
  .billing-fast-create-actions { align-items: stretch; flex-direction: column; }
  .billing-fast-create-actions > span { min-height: 18px; }
  .organization-heading { align-items: start; flex-direction: column; }
  .organization-counts { width: 100%; }
  .organization-count { min-width: 0; flex: 1; }
  .organization-grid { grid-template-columns: 1fr; }
  .executive-card { grid-template-columns: 1fr; }
  .organization-person.team-member { width: 100%; }
  .mission-strip { grid-template-columns: minmax(0, 1fr) 65px 70px; padding-right: 11px; padding-left: 11px; }
  .details-panel { z-index: 12; width: 100%; max-width: none; }
  .profile-panel { z-index: 16; width: 100%; max-width: none; }
  .thread-panel { z-index: 14; width: 100%; max-width: none; }
  .media-library { grid-template-columns: 1fr; }
  .image-preview img { max-height: 220px; }
  .business-dialog { width: calc(100vw - 18px); }
  .business-dialog form { padding: 18px; }
  .chat-header { min-height: 68px; padding: 9px 8px; }
  .sidebar-header { padding-top: max(13px, env(safe-area-inset-top)); }
}

@media (hover: none) {
  .message-actions { position: static; width: fit-content; margin: -3px -5px 6px auto; opacity: 1; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton-avatar, .skeleton-line { animation: none !important; background-position: 0 0; }
}
