/* Plyvo stylesheet layer 1. Load in the order declared in views/layout/head.php. */
:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.45;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-strong: #3730a3;
  --primary-soft: #eef2ff;
  --primary-soft-hover: #e0e7ff;
  --energy: #b7f34a;
  --energy-ink: #263408;
  --teal: #14b8a6;
  --ink: #111827;
  --text: #293142;
  --text-muted: #727b8d;
  --background: #f4f5f9;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-subtle: #f8f9fc;
  --border: #e4e7ee;
  --border-strong: #d3d8e4;
  --danger: #c4323d;
  --danger-border: #f0b7bd;
  --warning: #8a5b08;
  --sidebar: #101626;
  --sidebar-surface: #181f31;
  --sidebar-border: #293145;
  --shadow-sm: 0 3px 10px rgba(17, 24, 39, .045);
  --shadow: 0 16px 40px rgba(17, 24, 39, .075);
  color: var(--text);
  background: var(--background);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-width: 320px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 95% 0%, rgba(183, 243, 74, .08), transparent 21rem),
    var(--background);
}

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

button,
select,
input,
textarea {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  transition: border-color .16s, box-shadow .16s, background .16s, color .16s, transform .16s;
}

button {
  cursor: pointer;
  font-weight: 750;
}

button:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
  background: var(--primary-soft);
}

button:active { transform: translateY(1px); }

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  border-color: var(--primary);
  outline: 3px solid rgba(79, 70, 229, .2);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 264px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 24px 18px 18px;
  border-right: 1px solid var(--sidebar-border);
  color: #f8fafc;
  background:
    radial-gradient(circle at 12% 0%, rgba(79, 70, 229, .3), transparent 18rem),
    var(--sidebar);
}

.sidebar-toggle {
  position: absolute;
  z-index: 3;
  top: 84px;
  right: -15px;
  display: grid;
  width: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--sidebar-border);
  border-radius: 999px;
  color: #cbd5e1;
  background: var(--sidebar-surface);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
}
.sidebar-toggle:hover { border-color: var(--energy); color: var(--energy); background: var(--sidebar-surface); }
.sidebar-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }

@media (min-width: 761px) {
  .app-shell, .app-sidebar { transition: grid-template-columns .22s ease, padding .22s ease; }
  .app-shell.is-sidebar-collapsed { grid-template-columns: 78px minmax(0, 1fr); }
  .app-shell.is-sidebar-collapsed .app-sidebar { padding-inline: 10px; }
  .app-shell.is-sidebar-collapsed .sidebar-top { justify-content: center; padding-inline: 0; }
.app-shell.is-sidebar-collapsed .brand-copy,
.app-shell.is-sidebar-collapsed .tab > span,
.app-shell.is-sidebar-collapsed .platform-nav-section,
.app-shell.is-sidebar-collapsed .sidebar-footer-copy { display: none; }
  .app-shell.is-sidebar-collapsed .brand { justify-content: center; }
  .app-shell.is-sidebar-collapsed .brand-mark { width: 42px; height: 42px; }
  .app-shell.is-sidebar-collapsed .tabs { align-items: center; }
  .app-shell.is-sidebar-collapsed .tab { position: relative; width: 52px; justify-content: center; padding-inline: 0; }
  .app-shell.is-sidebar-collapsed .tab svg { flex-basis: auto; }
  .app-shell.is-sidebar-collapsed .sidebar-footer { justify-content: center; padding-inline: 0; }
  .app-shell.is-sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
}

.sidebar-top {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 4px 24px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  gap: 11px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}

.brand-copy { display: grid; min-width: 0; }

.brand-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.brand-name {
  color: #fff;
  font-size: 1.72rem;
  font-weight: 830;
  letter-spacing: -.055em;
  line-height: 1;
}

.brand-tagline {
  margin-top: 5px;
  color: #aeb7c7;
  font-size: .66rem;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
}

.internal-brand-badge {
  padding: 3px 7px;
  border: 1px solid rgba(183, 243, 74, .28);
  border-radius: 999px;
  color: var(--energy);
  background: rgba(183, 243, 74, .1);
  font-size: .52rem;
  font-weight: 850;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 39px;
  min-height: 39px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border-color: var(--sidebar-border);
  color: #f8fafc;
  background: rgba(255, 255, 255, .055);
  font-size: 1rem;
}

.icon-button:hover {
  border-color: #515b72;
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.workspace-switcher {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--sidebar-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .035);
}

.sidebar-label,
.card-kicker,
.eyebrow {
  color: var(--primary);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.sidebar-label { color: #8f99ad; }

.workspace-switcher label {
  display: grid;
  gap: 5px;
  color: #aeb7c7;
  font-size: .74rem;
  font-weight: 700;
}

.workspace-switcher select {
  width: 100%;
  min-height: 40px;
  border-color: #343d52;
  color: #f8fafc;
  background: var(--sidebar-surface);
  font-size: .86rem;
}

.tabs {
  display: grid;
  gap: 5px;
  margin-top: 22px;
}
.platform-nav-section {
  display: block;
  margin: 14px 12px 3px;
  color: #8f9aaf;
  font-size: .62rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.platform-nav-section::before { content: ''; display: block; margin-bottom: 12px; border-top: 1px solid var(--sidebar-border); }

.platform-system-nav { display: grid; gap: 3px; }
.platform-nav-parent {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  color: #aeb7c7;
  background: transparent;
  text-align: left;
}
.platform-nav-parent > svg:first-child { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.platform-nav-parent:hover,
.platform-system-nav:has(.tab.active) .platform-nav-parent { color: #fff; background: rgba(255, 255, 255, .065); }
.platform-nav-chevron { width: 16px; height: 16px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .18s ease; }
.platform-nav-parent[aria-expanded="false"] .platform-nav-chevron { transform: rotate(-90deg); }
.platform-nav-submenu {
  position: fixed;
  z-index: 70;
  display: grid;
  width: 210px;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--sidebar-border);
  border-radius: 14px;
  background: var(--sidebar);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}
.platform-nav-submenu::before { content: 'System'; padding: 4px 7px 6px; color: #8f9aaf; font-size: .6rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.platform-nav-child.tab { position: relative; min-height: 38px; gap: 9px; padding: 8px 12px; border-radius: 10px; font-size: .82rem; }
.platform-nav-child-marker { position: relative; z-index: 1; width: 7px; height: 7px; flex: 0 0 auto; border: 2px solid currentColor; border-radius: 50%; background: var(--sidebar); }
.platform-nav-child.active .platform-nav-child-marker { background: currentColor; }

.tab {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  color: #aeb7c7;
  background: transparent;
  text-align: left;
}

.tab svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, .065);
}

.tab.active {
  color: var(--energy);
  background: rgba(183, 243, 74, .105);
  box-shadow: inset 3px 0 var(--energy);
}

.platform-admin-tab { margin-bottom: 0; border: 0; }

.sidebar-footer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: auto;
  padding: 15px 12px 4px;
  border-top: 1px solid var(--sidebar-border);
  color: #d7dce5;
  font-size: .76rem;
}

.sidebar-footer-copy { display: grid; min-width: 0; gap: 2px; }
.sidebar-footer small { color: #8791a5; font-size: .67rem; }
.sidebar-staff-account {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 16px;
  gap: 11px;
  align-items: center;
  min-height: 72px;
  flex: 0 0 auto;
  width: 100%;
  margin-top: auto;
  padding: 11px;
  overflow: hidden;
  border: 1px solid var(--sidebar-border);
  border-radius: 15px;
  color: #f8fafc;
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
  text-align: left;
}
.sidebar-staff-hub { display: grid; grid-template-columns: minmax(0, 1fr) 44px; flex: 0 0 auto; margin-top: auto; margin-bottom: 8px; overflow: visible; border: 1px solid var(--sidebar-border); border-radius: 14px; background: rgba(255,255,255,.035); }
.sidebar-staff-hub:has(> .sidebar-notification-menu[hidden]) { display: none; }
.sidebar-staff-hub .sidebar-staff-account { grid-template-columns: 34px minmax(0, 1fr); min-height: 48px; margin: 0; padding: 6px 8px; border: 0; border-radius: 13px 0 0 13px; background: transparent; }
.sidebar-staff-hub .sidebar-staff-photo { width: 34px; height: 34px; font-size: .8rem; }
.sidebar-staff-hub .sidebar-staff-copy { gap: 0; }
.sidebar-staff-hub .sidebar-staff-copy strong { font-size: .78rem; }
.sidebar-staff-hub .sidebar-staff-account:hover,
.sidebar-staff-hub .sidebar-staff-account.is-active { border-color: var(--sidebar-border); background: rgba(255,255,255,.075); }
.sidebar-staff-account:hover,
.sidebar-staff-account.is-active { border-color: rgba(183, 243, 74, .45); color: #fff; background: rgba(255, 255, 255, .095); }
.sidebar-staff-photo { display: grid; width: 48px; height: 48px; overflow: hidden; place-items: center; border: 2px solid rgba(255, 255, 255, .2); border-radius: 14px; color: var(--energy-ink); background: var(--energy); font-size: 1rem; font-weight: 900; }
.sidebar-staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-staff-copy { display: grid; min-width: 0; gap: 2px; }
.sidebar-staff-copy small { color: #8f9aaf; font-size: .6rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.sidebar-staff-copy strong,
.sidebar-staff-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-staff-copy strong { color: #fff; font-size: .82rem; }
.sidebar-staff-copy > span { color: #aeb7c7; font-size: .65rem; }
.sidebar-staff-chevron { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.sidebar-staff-account:not([hidden]) + .sidebar-footer { margin-top: 8px; }
.sidebar-settings-button { width: 34px; min-height: 34px; margin: -7px -7px 0 auto; padding: 0; flex: 0 0 auto; justify-content: center; border-radius: 10px; color: #8791a5; background: transparent; }
.sidebar-settings-button svg { width: 18px; flex-basis: auto; }
.sidebar-settings-button:hover,
.sidebar-settings-button.active { color: var(--energy); background: rgba(183, 243, 74, .105); box-shadow: none; }
.app-shell.is-sidebar-collapsed .sidebar-settings-button { margin: 0; }

@media (min-width: 761px) {
  .app-sidebar .tabs { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(174, 183, 199, .35) transparent; }
  .app-shell.is-sidebar-collapsed .platform-system-nav { justify-items: center; }
  .app-shell.is-sidebar-collapsed .platform-nav-parent { width: 52px; justify-content: center; padding-inline: 0; }
  .app-shell.is-sidebar-collapsed .platform-nav-parent > span,
  .app-shell.is-sidebar-collapsed .platform-nav-chevron,
  .app-shell.is-sidebar-collapsed .platform-nav-submenu { display: none; }
  .app-shell.is-sidebar-collapsed .sidebar-staff-hub { grid-template-columns: 52px; width: 52px; justify-self: center; }
  .app-shell.is-sidebar-collapsed .sidebar-staff-account { grid-template-columns: 1fr; width: 52px; padding: 2px; border-color: transparent; background: transparent; }
  .app-shell.is-sidebar-collapsed .sidebar-staff-photo { width: 46px; height: 46px; }
  .app-shell.is-sidebar-collapsed .sidebar-staff-copy,
  .app-shell.is-sidebar-collapsed .sidebar-staff-chevron { display: none; }
  .app-shell.is-sidebar-collapsed .sidebar-notification-menu { width: 52px; border-top: 1px solid var(--sidebar-border); border-left: 0; }
  .app-shell.is-sidebar-collapsed .sidebar-notification-button { width: 50px; min-height: 38px; border-radius: 0 0 13px 13px; }
  body.platform-staff-active .header-actions { display: none; }
}

.status-dot,
.context-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--energy);
  box-shadow: 0 0 0 4px rgba(183, 243, 74, .11);
}

.app-content {
  width: 100%;
  max-width: 1580px;
  min-width: 0;
  margin: 0 auto;
  padding: 34px clamp(24px, 3.2vw, 50px) 64px;
}

.content-header {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

body.platform-admin-active .content-header { display: none; }

.page-team-context {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  margin: -8px 0 18px;
  padding: 11px 14px 11px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-team-context > div { display: grid; gap: 2px; }
.page-team-context > div > strong { color: var(--ink); font-size: .88rem; }
.page-team-context .page-team-actions { display: flex; gap: 9px; align-items: center; }
.page-team-context label { display: flex; gap: 10px; align-items: center; color: var(--text-muted); font-size: .72rem; font-weight: 750; }
.page-team-context select { min-width: 210px; min-height: 38px; color: var(--ink); background: var(--surface-raised); font-weight: 750; }
.page-team-form { width: 100%; margin: 1px 0 0; padding-top: 11px; border-top: 1px solid var(--border); }

.header-actions {
  display: flex;
  gap: 0;
  align-items: center;
  padding: 4px;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-sm);
}

.account-button {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 5px 10px 5px 11px;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.account-button:hover {
  border-color: var(--border);
  color: var(--text);
  background: var(--primary-soft);
}
.account-button.is-active { color: var(--primary-strong); background: var(--primary-soft); }

.header-actions .icon-button {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0 11px 11px 0;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
}

.header-actions .icon-button:hover {
  border-color: var(--border);
  color: var(--ink);
  background: var(--primary-soft);
}

.account-button > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--primary-strong);
  background: var(--primary-soft);
  font-weight: 850;
}

.account-button > span:last-child { display: grid; }
.account-button strong { color: var(--ink); font-size: .78rem; line-height: 1.2; }
.account-button small { color: var(--text-muted); font-size: .65rem; font-weight: 650; }
.account-page { display: grid; gap: 16px; }
.account-page[hidden] { display: none; }
.account-profile-card { min-height: 360px; }
.account-page-grid { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr); gap: 24px; margin-top: 20px; }
.account-staff-grid { grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); align-items: start; }
.account-staff-data { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.account-staff-profile-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr); gap: 20px; align-items: start; margin-top: 20px; }
.account-staff-profile-data { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.account-staff-headline { margin-top: 3px; color: var(--primary-strong); font-size: .7rem; font-weight: 750; }
.account-staff-system-panel { display: grid; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.account-staff-system-panel h3 { margin: 3px 0 0; color: var(--ink); font-size: 1rem; }
.account-profile-dialog-panel { width: min(760px, calc(100vw - 32px)); }
.account-profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.account-profile-form label { display: grid; gap: 6px; color: var(--text-muted); font-size: .76rem; font-weight: 750; }
.account-profile-form :is(input, select) { width: 100%; }
.account-profile-form .form-message,
.account-profile-form .form-actions { grid-column: 1 / -1; }
.account-profile-identity { display: flex; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.account-profile-identity > div { display: grid; gap: 3px; }
.account-profile-identity strong { color: var(--ink); font-size: 1rem; }
.account-profile-identity small { color: var(--text-muted); }
.account-profile-avatar { display: grid; width: 46px; height: 46px; overflow: hidden; flex: 0 0 auto; place-items: center; border-radius: 14px; color: var(--primary-strong); background: var(--primary-soft); font-size: 1.1rem; font-weight: 850; }
.account-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-editor { display: flex; grid-column: 1 / -1; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-subtle); }
.account-avatar-editor > div { display: grid; gap: 4px; }
.account-avatar-editor strong { color: var(--ink); font-size: .85rem; }
.account-avatar-editor small { color: var(--text-muted); font-size: .7rem; font-weight: 500; }
.account-avatar-preview { width: 64px; height: 64px; border-radius: 18px; }
.account-avatar-actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.account-avatar-actions .button-like { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; width: auto; padding: 7px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); background: var(--surface); font-size: .76rem; font-weight: 800; cursor: pointer; }
.account-avatar-actions .button-like:hover { border-color: var(--primary); }
.account-avatar-actions [hidden] { display: none !important; }
.account-profile-ids { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0 18px; }
.account-profile-ids > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; }
.account-profile-ids dt { color: var(--text-muted); font-size: .7rem; font-weight: 750; }
.account-profile-ids dd { margin: 3px 0 0; overflow: hidden; color: var(--ink); font-size: .76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-profile-address { display: grid; gap: 6px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.account-profile-address > strong { color: var(--ink); font-size: .82rem; }
.account-profile-address address { display: grid; gap: 2px; color: var(--text-muted); font-size: .78rem; font-style: normal; }
.account-profile-address address span:empty { display: none; }
.account-profile-section h3 { margin: 3px 0 10px; color: var(--ink); font-size: 1rem; }
.account-membership-list { display: grid; gap: 8px; }
.account-membership { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-subtle); }
.account-membership strong { color: var(--ink); }
.account-membership small { grid-column: 1 / -1; color: var(--text-muted); }
.account-membership-status { align-self: start; padding: 4px 7px; border-radius: 999px; color: var(--primary-strong); background: var(--primary-soft); font-size: .68rem; font-weight: 750; }
.account-security-panel { margin-top: 16px; }
.account-preference-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-subtle); }
.account-preference-row > span { display: grid; gap: 3px; }
.account-preference-row strong { color: var(--ink); font-size: .84rem; }
.account-preference-row small { color: var(--text-muted); font-size: .72rem; }
.account-member-link { align-items: flex-start; }
.account-member-link-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-member-link-controls select { min-width: 250px; }
.account-member-link .form-message { flex-basis: 100%; margin: 0; }
.account-theme-toggle { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.account-theme-toggle > span:first-child { font-size: 1rem; }
.account-security-card > div:first-child h2 { margin: 3px 0 5px; font-size: 1.05rem; }
.account-page-logout { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.account-page-logout > span { display: grid; gap: 3px; }
.account-page-logout strong { color: var(--ink); font-size: .84rem; }
.account-page-logout small { color: var(--text-muted); font-size: .72rem; }

.nav-count { min-width: 20px; padding: 2px 6px; margin-left: auto; border-radius: 999px; color: #101626; background: var(--energy); font-size: .65rem; font-weight: 900; text-align: center; }
.app-shell.is-sidebar-collapsed .nav-count { position: absolute; top: 3px; right: 2px; }
.messages-tab { position: relative; }
.header-message-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.header-message-button .nav-count { position: absolute; top: -7px; right: -7px; margin: 0; border: 2px solid var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.header-message-button.is-active { color: var(--energy); border-color: color-mix(in srgb, var(--energy) 55%, var(--border)); background: color-mix(in srgb, var(--energy) 10%, transparent); }
.staff-notification-menu { position: relative; }
.sidebar-notification-menu { width: 44px; margin: 0; border-left: 1px solid var(--sidebar-border); }
.sidebar-notification-button { position: relative; display: grid; width: 43px; min-height: 48px; place-items: center; padding: 0; border: 0; border-radius: 0 13px 13px 0; color: #d7dce5; background: transparent; box-shadow: none; }
.sidebar-notification-button svg { width: 18px; height: 18px; }
.sidebar-notification-button:hover,
.sidebar-notification-button[aria-expanded="true"] { border-color: rgba(183,243,74,.38); color: #fff; background: rgba(255,255,255,.09); }
.sidebar-notification-button > span { overflow: hidden; font-size: .75rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-notification-button > .nav-count { position: static; margin: 0; border: 0; box-shadow: none; }
.sidebar-notification-menu .staff-notification-panel { top: auto; right: auto; bottom: 0; left: calc(100% + 14px); }
.header-actions .staff-notification-button { position: relative; border-radius: 0; }
.staff-notification-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.staff-notification-button .nav-count { position: absolute; top: -7px; right: -7px; margin: 0; border: 2px solid var(--surface); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.staff-notification-panel { position: absolute; z-index: 120; top: calc(100% + 12px); right: -145px; width: min(430px, calc(100vw - 30px)); overflow: hidden; border: 1px solid var(--border); border-radius: 18px; color: var(--text); background: var(--surface); box-shadow: 0 24px 64px rgba(4, 40, 48, .22); }
.staff-notification-panel > header { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 18px 18px 13px; }
.staff-notification-panel > header > div { display: grid; gap: 3px; }
.staff-notification-panel > header small { color: var(--primary-strong); font-size: .62rem; font-weight: 900; letter-spacing: .08em; }
.staff-notification-panel > header strong { color: var(--ink); font-size: .98rem; }
.staff-notification-panel > header button { padding: 6px 8px; border: 0; color: var(--primary-strong); background: transparent; font-size: .68rem; box-shadow: none; }
.staff-notification-filters { display: flex; gap: 7px; padding: 0 18px 13px; border-bottom: 1px solid var(--border); }
.staff-notification-filters button { display: inline-flex; gap: 5px; align-items: center; min-height: 31px; padding: 6px 9px; border-radius: 999px; color: var(--text-muted); background: var(--surface-subtle); font-size: .68rem; box-shadow: none; }
.staff-notification-filters button[aria-pressed="true"] { color: var(--primary-strong); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }
.staff-notification-filters span { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 999px; color: var(--ink); background: var(--surface); font-size: .6rem; font-weight: 850; }
.staff-notification-list { max-height: min(570px, calc(100vh - 190px)); overflow-y: auto; }
.staff-notification-item { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) 20px; gap: 11px; align-items: start; width: 100%; padding: 13px 17px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text); background: transparent; box-shadow: none; text-align: left; }
.staff-notification-item:hover { color: var(--text); background: var(--surface-subtle); }
.staff-notification-item.is-unread { background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface)); }
.staff-notification-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--primary-strong); background: var(--primary-soft); }
.staff-notification-icon.is-board { color: #315fc6; background: #edf2ff; }
.staff-notification-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.staff-notification-copy { display: grid; min-width: 0; gap: 3px; }
.staff-notification-copy strong, .staff-notification-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-notification-copy strong { color: var(--ink); font-size: .78rem; }
.staff-notification-copy > span { color: var(--text); font-size: .72rem; }
.staff-notification-copy small { color: var(--text-muted); font-size: .63rem; }
.staff-notification-state { display: grid; min-width: 9px; height: 9px; margin-top: 7px; place-items: center; border-radius: 999px; color: #fff; background: var(--primary); font-size: .56rem; font-weight: 900; }
.staff-notification-state:empty { width: 9px; min-width: 9px; }
.staff-notification-item:not(.is-unread) .staff-notification-state { visibility: hidden; }
.staff-notification-empty { display: grid; gap: 5px; padding: 38px 20px; color: var(--text-muted); text-align: center; }
.staff-notification-empty strong { color: var(--ink); }
.staff-notification-empty span { font-size: .75rem; }
@media (max-width: 640px) { .staff-notification-panel { position: fixed; top: 82px; right: 15px; left: 15px; width: auto; } }
.message-center-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.message-center-tabs button.selected { color: #101626; border-color: var(--energy); background: var(--energy); }
.message-center-layout { display: grid; grid-template-columns: minmax(250px, .72fr) minmax(420px, 1.6fr); gap: 16px; min-height: 610px; }
.conversation-sidebar, .conversation-thread { min-width: 0; margin: 0; }
.conversation-sidebar { padding: 18px 0 0; overflow: hidden; }
.conversation-sidebar .section-heading { padding-inline: 18px; }
.conversation-sidebar-actions { display: flex; gap: 7px; }
.conversation-sidebar-actions button.selected { color: #101626; border-color: var(--energy); background: var(--energy); }
.conversation-list { display: grid; max-height: 535px; overflow-y: auto; }
.conversation-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 13px 18px; border: 0; border-top: 1px solid var(--border); border-radius: 0; color: var(--text); background: transparent; text-align: left; }
.conversation-item:hover, .conversation-item.selected { background: color-mix(in srgb, var(--energy) 9%, transparent); }
.conversation-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #101626; background: var(--energy); font-weight: 900; }
.conversation-copy { display: grid; gap: 3px; min-width: 0; }
.conversation-copy strong, .conversation-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-copy small, .conversation-time, .conversation-header small { color: var(--text-muted); font-size: .7rem; }
.conversation-meta { display: grid; justify-items: end; gap: 5px; }
.conversation-unread { min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #101626; background: var(--energy); font-size: .65rem; font-weight: 900; text-align: center; }
.conversation-thread { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 0; overflow: hidden; }
.conversation-header { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.conversation-header h2 { margin: 3px 0; }
.conversation-context-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conversation-status { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--energy) 42%, var(--border)); border-radius: 999px; color: var(--energy); background: color-mix(in srgb, var(--energy) 10%, transparent); font-size: .68rem; font-weight: 800; }
.message-list { display: flex; flex-direction: column; gap: 10px; padding: 20px; overflow-y: auto; background: color-mix(in srgb, var(--surface-raised) 62%, transparent); }
.message-bubble { align-self: flex-start; width: fit-content; max-width: min(78%, 620px); padding: 10px 13px; border: 1px solid var(--border); border-radius: 4px 15px 15px; background: var(--surface); }
.message-bubble.is-own { align-self: flex-end; border-color: color-mix(in srgb, var(--energy) 40%, var(--border)); border-radius: 15px 4px 15px 15px; background: color-mix(in srgb, var(--energy) 12%, var(--surface)); }
.message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble small { display: block; margin-top: 5px; color: var(--text-muted); font-size: .65rem; }
.message-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.message-composer textarea { min-height: 46px; max-height: 150px; resize: vertical; }
.notification-panel, .message-settings-panel { max-width: 880px; }
.notification-list { display: grid; }
.notification-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--border); }
.notification-item:first-child { border-top: 0; }
.notification-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.notification-item.is-unread .notification-dot { background: var(--energy); }
.notification-copy { display: grid; gap: 3px; }
.notification-copy small { color: var(--text-muted); }
.message-settings-form { display: grid; gap: 14px; max-width: 620px; }
.setting-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.setting-choice > span { display: grid; gap: 3px; }
.setting-choice small { color: var(--text-muted); }
.message-dialog-panel { max-width: 560px; }

@media (max-width: 850px) {
  .message-center-layout { grid-template-columns: 1fr; min-height: 0; }
  .conversation-list { max-height: 280px; }
  .conversation-thread { min-height: 520px; }
  .message-center-tabs { overflow-x: auto; }
}

@media (max-width: 560px) {
  .message-composer { grid-template-columns: 1fr; }
  .message-bubble { max-width: 90%; }
  .notification-item { grid-template-columns: 8px minmax(0, 1fr); }
  .notification-item > button { grid-column: 2; justify-self: start; }
}
