:root {
  --portal-sidebar: #103a3b;
  --portal-sidebar-strong: #0c2f30;
  --portal-sidebar-text: #eef7f5;
  --portal-sidebar-muted: #8fb4b0;
  --portal-main-bg: #eef1ed;
  --portal-card: #ffffff;
  --portal-card-soft: #f5f7f4;
  --portal-line: rgba(20, 48, 44, 0.1);
  --portal-ink: #1c2c28;
  --portal-muted: #64756f;
  --portal-teal: #0f6668;
  --portal-teal-strong: #0b5052;
  --portal-green: #4a8554;
  --portal-coral: #c46652;
  --portal-blue: #4a779c;
  --portal-violet: #6f5f9a;
  --portal-sidebar-width: 15rem;
  --portal-topbar-height: 3.5rem;
  --portal-radius: 0.7rem;
  --portal-shadow: 0 1px 2px rgba(24, 48, 42, 0.04), 0 8px 24px rgba(24, 48, 42, 0.06);
}

[data-theme="dark"] {
  --portal-sidebar: #0e2829;
  --portal-sidebar-strong: #0a2122;
  --portal-sidebar-text: #eef7f5;
  --portal-sidebar-muted: #86aaa6;
  --portal-main-bg: #111615;
  --portal-card: #181f1d;
  --portal-card-soft: #1e2624;
  --portal-line: rgba(228, 241, 237, 0.09);
  --portal-ink: #e4eeeb;
  --portal-muted: #93a29d;
  --portal-teal: #5fb0b2;
  --portal-teal-strong: #78c2c3;
  --portal-green: #70a878;
  --portal-coral: #de8872;
  --portal-blue: #6f9ec2;
  --portal-violet: #9d8bc7;
  --portal-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 10px 28px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  background: var(--portal-main-bg);
}

body {
  display: block;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--portal-ink);
  background: var(--portal-main-bg);
  font-family: var(--fb);
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

button,
a,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.portal-skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--portal-radius);
  color: #fff;
  background: var(--portal-teal-strong);
  transform: translateY(-180%);
  transition: transform var(--tr);
}

.portal-skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--portal-teal) 75%, #fff);
  outline-offset: 2px;
}

.portal-access {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--portal-main-bg);
}

.portal-access img {
  object-fit: contain;
}

.portal-access h1 {
  margin: 0.15rem 0 0;
  font-family: var(--fh);
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  line-height: 1.15;
}

.portal-access p {
  max-width: 28rem;
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.9rem;
}

.portal-access__spinner {
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.2rem;
  border: 2px solid color-mix(in srgb, var(--portal-teal) 22%, transparent);
  border-top-color: var(--portal-teal);
  border-radius: 50%;
  animation: portal-spin 0.85s linear infinite;
}

@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}

.portal-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--portal-sidebar-text);
  background: linear-gradient(180deg, var(--portal-sidebar), var(--portal-sidebar-strong));
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--portal-topbar-height);
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-brand img {
  object-fit: contain;
}

.portal-brand span {
  display: grid;
  line-height: 1.15;
}

.portal-brand strong {
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.portal-brand small {
  margin-top: 0.15rem;
  color: var(--portal-sidebar-muted);
  font-size: 0.64rem;
}

.portal-workspace-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.7rem 0.7rem 0.25rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--portal-radius);
  background: rgba(255, 255, 255, 0.045);
}

.portal-workspace-card > span:last-child {
  min-width: 0;
  display: grid;
}

.portal-workspace-card small {
  color: var(--portal-sidebar-muted);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-workspace-card strong {
  overflow: hidden;
  margin-top: 0.08rem;
  font-size: 0.72rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-workspace-mark {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  color: #154747;
  background: #d4e8e2;
  font-size: 0.62rem;
  font-weight: 800;
}

.portal-nav {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.2rem 0.55rem 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.portal-nav__label {
  margin: 0.85rem 0.45rem 0.28rem;
  color: var(--portal-sidebar-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.portal-nav ul {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.2rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.55rem;
  color: color-mix(in srgb, var(--portal-sidebar-text) 78%, transparent);
  font-size: 0.74rem;
  font-weight: 560;
  transition: color var(--tr), background var(--tr);
}

.portal-nav__link::before {
  position: absolute;
  left: -0.55rem;
  width: 0.18rem;
  height: 1.1rem;
  border-radius: 0 0.25rem 0.25rem 0;
  background: #8ccfc4;
  content: "";
  opacity: 0;
  transform: scaleY(0.45);
  transition: opacity var(--tr), transform var(--tr);
}

.portal-nav__link:hover {
  color: var(--portal-sidebar-text);
  background: rgba(255, 255, 255, 0.06);
}

.portal-nav__link.is-active {
  color: #fff;
  background: rgba(175, 224, 213, 0.12);
}

.portal-nav__link.is-active::before {
  opacity: 1;
  transform: scaleY(1);
}

.portal-nav__link > svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-nav__badge {
  min-width: 1.1rem;
  height: 1.1rem;
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  padding-inline: 0.24rem;
  border-radius: 999px;
  color: #0e4344;
  background: #bfe2d8;
  font-size: 0.58rem;
  font-weight: 800;
}

.portal-sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.1);
}

.portal-sidebar-profile > span:last-child {
  min-width: 0;
  display: grid;
}

.portal-sidebar-profile strong,
.portal-sidebar-profile small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-sidebar-profile strong {
  font-size: 0.7rem;
}

.portal-sidebar-profile small {
  color: var(--portal-sidebar-muted);
  font-size: 0.6rem;
}

.portal-avatar {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #c05d4a, #94453c);
  font-size: 0.58rem;
  font-weight: 800;
}

.portal-avatar--small {
  width: 1.75rem;
  height: 1.75rem;
}

.portal-avatar--large {
  width: 2.85rem;
  height: 2.85rem;
  border-color: color-mix(in srgb, var(--portal-teal) 22%, transparent);
  font-size: 0.78rem;
}

.portal-workspace {
  min-width: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.portal-topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: var(--portal-topbar-height);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem clamp(0.85rem, 1.8vw, 1.5rem);
  border-bottom: 1px solid var(--portal-line);
  background: color-mix(in srgb, var(--portal-main-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.portal-menu-button {
  display: none !important;
}

.portal-search {
  width: min(26rem, 48vw);
  height: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.7rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  color: var(--portal-muted);
  background: var(--portal-card);
  text-align: left;
}

.portal-search svg {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.portal-search span {
  overflow: hidden;
  flex: 1 1 auto;
  font-size: 0.7rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-search kbd {
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.28rem;
  color: var(--portal-muted);
  background: var(--portal-card-soft);
  font-size: 0.6rem;
}

.portal-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
}

.portal-icon-button {
  position: relative;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-card);
  transition: color var(--tr), border-color var(--tr), background var(--tr);
}

.portal-icon-button:hover {
  color: var(--portal-teal);
  border-color: color-mix(in srgb, var(--portal-teal) 32%, transparent);
  background: color-mix(in srgb, var(--portal-card) 88%, var(--portal-teal));
}

.portal-icon-button svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[data-theme="dark"] .portal-theme-sun,
[data-theme="light"] .portal-theme-moon {
  display: none;
}

.portal-notification-wrap {
  position: relative;
}

.portal-notification-dot {
  position: absolute;
  top: 0.32rem;
  right: 0.32rem;
  width: 0.4rem;
  height: 0.4rem;
  border: 2px solid var(--portal-card);
  border-radius: 50%;
  background: var(--portal-coral);
}

.portal-notification-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(20rem, calc(100vw - 1.5rem));
  padding: 0.85rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.85rem;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-notification-panel__list {
  max-height: 18rem;
  overflow: auto;
  gap: 0.55rem;
}

.portal-notification-panel__list .portal-cabinet-item {
  padding: 0.7rem 0.75rem;
  border-radius: 0.7rem;
}

.portal-activity-panel {
  margin: 0 0 1.25rem;
}

.portal-cabinet-list,.portal-cabinet-grid{display:grid;gap:1rem}
.portal-cabinet-grid{grid-template-columns:repeat(auto-fit,minmax(15rem,1fr))}
.portal-cabinet-item,.portal-cabinet-card{display:flex;flex-direction:column;gap:.35rem;padding:1rem;border:1px solid var(--portal-border);border-radius:1rem;background:var(--portal-surface)}
.portal-cabinet-item span,.portal-cabinet-card span{color:var(--portal-muted)}
.portal-cabinet-item[href]{
  color:inherit;
  text-decoration:none;
}
.portal-cabinet-item__body{
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.portal-cabinet-item--action{
  width:100%;
  text-align:left;
  cursor:pointer;
  color:inherit;
  font:inherit;
  transition:border-color .15s ease, background-color .15s ease;
}
.portal-cabinet-item--action:hover,
.portal-cabinet-item--action:focus-visible{
  border-color:var(--portal-accent, #2ec4b6);
  outline:none;
}
.portal-cabinet-item--action:disabled{
  cursor:default;
  opacity:.72;
}
.portal-cabinet-item__hint{
  margin-top:.15rem;
  font-style:normal;
  font-size:.82rem;
  color:var(--portal-accent, #2ec4b6);
}
.portal-team-role-list{
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
}
.portal-team-role-chip{
  display:inline-flex;
  align-items:center;
  min-height:1.7rem;
  padding:.2rem .55rem;
  border:1px solid color-mix(in srgb,var(--portal-accent,#2ec4b6) 42%,var(--portal-border));
  border-radius:999px;
  background:color-mix(in srgb,var(--portal-accent,#2ec4b6) 10%,transparent);
  color:var(--portal-ink) !important;
  font-size:.76rem;
  font-weight:700;
}
.portal-cabinet-empty{color:var(--portal-muted);padding:1rem}
.portal-search-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:start center;padding:12vh 1rem;background:#0b282c99}
.portal-search-dialog{width:min(100%,42rem);padding:1rem;border-radius:1rem;background:var(--portal-surface);box-shadow:0 1rem 4rem #0004}
.portal-search-dialog input{width:100%;padding:.9rem;border:1px solid var(--portal-border);border-radius:.7rem;background:transparent;color:inherit}
.portal-search-results{display:grid;gap:.5rem;margin-top:.75rem}
.portal-search-result{border:0;text-align:left;padding:.75rem;border-radius:.6rem;background:var(--portal-surface-alt);color:inherit;cursor:pointer}

.portal-notification-panel h2 {
  margin: 0.1rem 0 0.65rem;
  font-family: var(--fh);
  font-size: 1.05rem;
}

.portal-empty-compact {
  display: grid;
  gap: 0.12rem;
  padding: 0.7rem;
  border-radius: 0.55rem;
  color: var(--portal-muted);
  background: var(--portal-card-soft);
}

.portal-empty-compact strong {
  color: var(--portal-ink);
  font-size: 0.78rem;
}

.portal-empty-compact span {
  font-size: 0.66rem;
}

.portal-topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
  padding-left: 0.55rem;
  border-left: 1px solid var(--portal-line);
}

.portal-topbar-profile > span:last-child {
  min-width: 0;
  display: grid;
}

.portal-topbar-profile strong {
  max-width: 8.5rem;
  overflow: hidden;
  font-size: 0.68rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-topbar-profile small {
  max-width: 8.5rem;
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 0.58rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-main {
  width: min(100%, 78rem);
  flex: 1 1 auto;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.65rem);
}

.portal-view {
  animation: portal-view-in 180ms ease-out both;
}

@keyframes portal-view-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.portal-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-intro__back {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0 0 0.55rem;
  color: var(--portal-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.portal-intro__back svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-intro__back:hover,
.portal-intro__back:focus-visible {
  color: var(--portal-ink);
}

.portal-intro__back:focus-visible {
  outline: 2px solid var(--portal-teal);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.portal-eyebrow {
  margin: 0;
  color: var(--portal-teal);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-live-dot {
  width: 0.42rem;
  height: 0.42rem;
  display: inline-block;
  margin-right: 0.32rem;
  border-radius: 50%;
  background: var(--portal-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-green) 14%, transparent);
}

.portal-intro h1 {
  margin: 0.2rem 0 0;
  font-family: var(--fh);
  font-size: clamp(1.45rem, 2.5vw, 2.05rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.portal-intro__lede {
  max-width: 36rem;
  margin: 0.35rem 0 0;
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.portal-button {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--portal-radius);
  font-size: 0.72rem;
  font-weight: 700;
  transition: background var(--tr), border-color var(--tr), box-shadow var(--tr);
}

.portal-button--primary {
  color: #fff;
  background: var(--portal-teal-strong);
}

.portal-button--primary:hover {
  background: color-mix(in srgb, var(--portal-teal-strong) 88%, #000);
}

.portal-button--secondary {
  border-color: var(--portal-line);
  background: var(--portal-card);
}

.portal-button--light {
  color: #154b4b;
  background: #e8f4f0;
}

.portal-pulse {
  display: grid;
  grid-template-columns: minmax(16rem, 1.2fr) minmax(0, 1.45fr);
  gap: 0.7rem;
}

.portal-meeting-hero,
.portal-metric,
.portal-panel {
  border: 1px solid var(--portal-line);
  border-radius: 0.85rem;
  box-shadow: var(--portal-shadow);
}

.portal-meeting-hero {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  color: #f3fbf7;
  background: linear-gradient(145deg, #1a5c5b, #134647);
}

.portal-meeting-hero__top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.portal-meeting-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-meeting-hero__status span {
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: #a7e5bd;
}

.portal-meeting-hero .portal-eyebrow {
  color: #a8d5cd;
}

.portal-meeting-hero h2 {
  margin: 0;
  font-family: var(--fh);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.1;
}

.portal-meeting-hero > p:not(.portal-eyebrow) {
  margin: 0.35rem 0 0.75rem;
  color: rgba(240, 250, 247, 0.72);
  font-size: 0.68rem;
}

.portal-kpi-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.portal-metric {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  background: var(--portal-card);
  border-top: 3px solid currentColor;
}

.portal-metric--warm {
  color: var(--portal-coral);
}

.portal-metric--green {
  color: var(--portal-green);
}

.portal-metric--blue {
  color: var(--portal-blue);
}

.portal-metric p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.portal-metric strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--portal-ink);
  font-family: var(--fh);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1;
}

.portal-metric small {
  color: var(--portal-muted);
  font-size: 0.58rem;
  line-height: 1.35;
}

.portal-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 0.85fr);
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.portal-panel {
  min-width: 0;
  padding: 0.95rem;
  background: var(--portal-card);
}

.portal-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.portal-panel__header h2 {
  margin: 0.12rem 0 0;
  font-family: var(--fh);
  font-size: 1.1rem;
  line-height: 1.15;
}

.portal-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.portal-quick-card {
  position: relative;
  min-height: 5.1rem;
  display: flex;
  flex-direction: column;
  padding: 0.7rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-card-soft);
  transition: border-color var(--tr), background var(--tr);
}

.portal-quick-card:hover {
  border-color: color-mix(in srgb, var(--portal-teal) 34%, transparent);
  background: color-mix(in srgb, var(--portal-card-soft) 80%, var(--portal-teal));
}

.portal-quick-card > span {
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  color: var(--portal-teal);
  font-weight: 800;
  font-size: 0.78rem;
}

.portal-quick-card strong {
  margin-top: auto;
  font-size: 0.74rem;
}

.portal-quick-card small {
  margin-top: 0.2rem;
  color: var(--portal-muted);
  font-size: 0.6rem;
  line-height: 1.35;
}

.portal-online {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--portal-muted);
  font-size: 0.62rem;
}

.portal-online i,
.portal-footer i {
  width: 0.38rem;
  height: 0.38rem;
  display: inline-block;
  border-radius: 50%;
  background: var(--portal-muted);
}

.portal-profile-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.8rem;
  padding: 0.7rem;
  border-radius: var(--portal-radius);
  background: var(--portal-card-soft);
}

.portal-profile-card > div {
  min-width: 0;
  display: grid;
}

.portal-profile-card strong,
.portal-profile-card span,
.portal-profile-card small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-profile-card strong {
  font-size: 0.76rem;
}

.portal-profile-card span {
  color: var(--portal-teal);
  font-size: 0.64rem;
  font-weight: 700;
}

.portal-profile-card small {
  margin-top: 0.22rem;
  color: var(--portal-muted);
  font-size: 0.58rem;
}

.portal-inline-button {
  margin-top: 0.55rem;
  color: var(--portal-teal);
  font-size: 0.68rem;
  font-weight: 700;
}

.portal-planned-view {
  min-height: calc(100dvh - var(--portal-topbar-height) - 7rem);
  display: grid;
  place-items: center;
}

.portal-planned-card {
  width: min(100%, 34rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--portal-line);
  border-radius: 0.95rem;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
  text-align: center;
}

.portal-planned-card__mark {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  margin: 0 auto 0.85rem;
  border-radius: 0.85rem;
  color: #fff;
  background: linear-gradient(145deg, var(--portal-teal), var(--portal-teal-strong));
  font-family: var(--fh);
  font-size: 1.15rem;
}

.portal-planned-card h1 {
  margin: 0.2rem 0 0.45rem;
  font-family: var(--fh);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.1;
}

.portal-planned-card > p:not(.portal-eyebrow) {
  margin: 0 auto 1rem;
  color: var(--portal-muted);
  font-size: 0.85rem;
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.65rem clamp(0.85rem, 1.8vw, 1.5rem);
  border-top: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 0.6rem;
}

.portal-footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.portal-toast {
  position: fixed;
  z-index: 100;
  right: 0.85rem;
  bottom: 0.85rem;
  max-width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  color: var(--portal-ink);
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
  font-size: 0.7rem;
}

.portal-sidebar-backdrop {
  position: fixed;
  z-index: 38;
  inset: 0;
  background: rgba(5, 18, 18, 0.48);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.portal-mobile-nav {
  display: none;
}

@media (max-width: 72rem) {
  .portal-topbar-profile > span:last-child {
    display: none;
  }

  .portal-topbar-profile {
    padding-left: 0.35rem;
  }
}

@media (max-width: 62rem) {
  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: fixed;
    left: 0;
    width: min(var(--portal-sidebar-width), calc(100vw - 2.75rem));
    transform: translateX(-105%);
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .portal-sidebar.is-open {
    transform: translateX(0);
  }

  .portal-menu-button {
    display: inline-grid !important;
  }

  .portal-search {
    width: min(24rem, 56vw);
  }

  .portal-main {
    padding-bottom: 5.8rem;
  }

  .portal-footer {
    padding-bottom: 5.2rem;
  }

  .portal-mobile-nav {
    position: fixed;
    z-index: 35;
    right: max(0.55rem, env(safe-area-inset-right));
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    left: max(0.55rem, env(safe-area-inset-left));
    height: 3.85rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0.28rem 0.35rem;
    border: 1px solid var(--portal-line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--portal-card) 94%, transparent);
    box-shadow: 0 12px 28px rgba(20, 48, 40, 0.16);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .portal-mobile-nav a,
  .portal-mobile-nav button {
    min-width: 3rem;
    height: 2.9rem;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.08rem;
    border-radius: 0.55rem;
    color: var(--portal-muted);
  }

  .portal-mobile-nav a.is-active {
    color: var(--portal-teal-strong);
    background: color-mix(in srgb, var(--portal-teal) 12%, var(--portal-card));
  }

  .portal-mobile-nav button {
    width: 3.1rem;
    min-width: 3.1rem;
    height: 3.1rem;
    margin-top: -0.95rem;
    border: 3px solid var(--portal-card);
    border-radius: 0.85rem;
    color: #fff;
    background: var(--portal-teal-strong);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--portal-teal) 26%, transparent);
  }

  .portal-mobile-nav span {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
  }

  .portal-mobile-nav small {
    font-size: 0.52rem;
    font-weight: 700;
  }
}

@media (max-width: 52rem) {
  .portal-topbar {
    gap: 0.45rem;
  }

  .portal-search {
    flex: 1 1 auto;
    width: auto;
  }

  .portal-search kbd {
    display: none;
  }

  .portal-topbar-profile {
    display: none;
  }

  .portal-pulse {
    grid-template-columns: 1fr;
  }

  .portal-kpi-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48rem) {
  .portal-main {
    padding: 0.95rem 0.85rem 5.8rem;
  }

  .portal-intro {
    align-items: start;
  }
}

@media (max-width: 39rem) {
  .portal-topbar {
    min-height: 3.25rem;
    padding: 0.4rem 0.65rem;
  }

  .portal-search {
    flex: 0 0 auto;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    justify-content: center;
    gap: 0;
  }

  .portal-search span,
  .portal-search kbd {
    display: none;
  }

  .portal-main {
    padding: 0.9rem 0.7rem 6rem;
  }

  .portal-intro {
    display: grid;
  }

  .portal-intro h1 {
    font-size: clamp(1.35rem, 7vw, 1.75rem);
  }

  .portal-intro > .portal-button {
    justify-self: start;
  }

  .portal-kpi-rail {
    grid-template-columns: 1fr;
  }

  .portal-metric {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: auto;
  }

  .portal-metric small {
    max-width: 9rem;
    text-align: right;
  }

  .portal-meeting-hero__top {
    flex-wrap: wrap;
  }

  .portal-quick-grid {
    grid-template-columns: 1fr;
  }

  .portal-panel {
    padding: 0.85rem;
  }

  .portal-footer {
    display: none;
  }
}

@media (max-width: 22.5rem) {
  .portal-pulse,
  .portal-kpi-rail,
  .portal-dashboard-grid,
  .portal-quick-grid {
    min-width: 0;
  }

  .portal-meeting-hero,
  .portal-metric,
  .portal-panel {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mentoring CRM */
.portal-crm-intro {
  margin-bottom: 0.85rem;
}

.portal-crm-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-card);
}

.portal-crm-status strong {
  font-size: 0.92rem;
}

.portal-crm-status span {
  color: var(--portal-muted);
  font-size: 0.86rem;
}

.portal-crm-status--loading,
.portal-crm-status--empty {
  border-color: color-mix(in srgb, var(--portal-teal) 28%, var(--portal-line));
}

.portal-crm-status--retry,
.portal-crm-status--auth,
.portal-crm-status--forbidden {
  border-color: color-mix(in srgb, var(--portal-coral) 35%, var(--portal-line));
}

.portal-crm-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(15rem, 1fr));
  gap: 0.75rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.portal-crm-column {
  min-height: 18rem;
  padding: 0.7rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background: var(--portal-card-soft);
}

.portal-crm-column.is-drop-target {
  outline: 2px solid color-mix(in srgb, var(--portal-teal) 55%, transparent);
  outline-offset: 1px;
}

.portal-crm-column__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.portal-crm-column__head h2 {
  margin: 0;
  font-size: 0.92rem;
}

.portal-crm-column__count {
  min-width: 1.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--portal-card);
  color: var(--portal-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.portal-crm-column__list {
  display: grid;
  gap: 0.55rem;
  min-height: 3rem;
}

.portal-crm-empty-column {
  margin: 0;
  padding: 0.75rem 0.35rem;
  color: var(--portal-muted);
  font-size: 0.82rem;
  text-align: center;
}

.portal-crm-card {
  position: relative;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--portal-line);
  border-radius: calc(var(--portal-radius) - 0.1rem);
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
  cursor: pointer;
}

.portal-crm-card.is-dragging {
  opacity: 0.55;
}

.portal-crm-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

.portal-crm-card__head strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.portal-crm-card__menu {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--portal-muted);
  cursor: pointer;
}

.portal-crm-card__menu:hover,
.portal-crm-card__menu:focus-visible {
  background: var(--portal-card-soft);
  color: var(--portal-ink);
}

.portal-crm-card__meta {
  margin: 0.35rem 0 0;
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.portal-crm-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.55rem;
}

.portal-crm-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--portal-blue) 16%, var(--portal-card));
  color: var(--portal-ink);
  font-size: 0.72rem;
  font-weight: 650;
}

.portal-crm-badge--link {
  text-decoration: none;
  background: color-mix(in srgb, var(--portal-teal) 18%, var(--portal-card));
}

.portal-crm-badge--link:hover {
  text-decoration: underline;
}

.portal-crm-popover {
  position: absolute;
  z-index: 80;
  min-width: 12rem;
  padding: 0.35rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.55rem;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-crm-popover__item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--portal-ink);
  text-align: left;
  cursor: pointer;
}

.portal-crm-popover__item:hover,
.portal-crm-popover__item:focus-visible {
  background: var(--portal-card-soft);
}

.portal-crm-dialog,
.portal-crm-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.portal-crm-dialog {
  z-index: 100;
}

.portal-crm-dialog[hidden],
.portal-crm-drawer[hidden] {
  display: none !important;
}

.portal-crm-dialog__backdrop,
.portal-crm-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 24, 22, 0.42);
  cursor: pointer;
}

.portal-crm-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(28rem, calc(100vw - 1.5rem));
  max-height: min(85vh, 40rem);
  overflow: auto;
  margin: 0;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--portal-line);
  border-radius: calc(var(--portal-radius) + 0.15rem);
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-crm-dialog__panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.portal-crm-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.portal-crm-field {
  display: grid;
  gap: 0.3rem;
  margin-top: 0.7rem;
  font-size: 0.84rem;
  color: var(--portal-muted);
}

.portal-crm-field input:not([type="checkbox"]),
.portal-crm-field textarea,
.portal-crm-field select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.5rem;
  color: var(--portal-ink);
  background: var(--portal-card-soft);
}

.portal-crm-field textarea {
  resize: vertical;
}

.portal-crm-check-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.portal-crm-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0.75rem 0.2rem 0;
  width: auto;
  max-width: 100%;
  color: var(--portal-ink);
  font-size: 0.8rem;
}

.portal-crm-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--portal-accent, #0f5658);
}

.portal-crm-subhead {
  margin: 1rem 0 0.2rem;
  color: var(--portal-ink);
  font-size: 0.92rem;
}

.portal-crm-error {
  margin: 0.65rem 0 0;
  color: var(--portal-coral);
  font-size: 0.84rem;
}

.portal-crm-muted {
  margin: 0.25rem 0 0;
  color: var(--portal-muted);
  font-size: 0.84rem;
}

.portal-crm-dialog__panel--move {
  width: min(32rem, calc(100vw - 1.5rem));
}

.portal-crm-drawer__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(96rem, calc(100vw - 2rem));
  max-height: min(94vh, 56rem);
  overflow: auto;
  margin: 0;
  padding: 1rem 1.1rem 1.25rem;
  border: 1px solid var(--portal-line);
  border-radius: calc(var(--portal-radius) + 0.2rem);
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-team-drawer__panel {
  width: min(30rem, calc(100vw - 2rem));
}

.portal-team-drawer__panel h2 {
  margin: 0;
}

.portal-team-drawer__email {
  display: grid;
  gap: 0.25rem;
  margin-top: 1.1rem;
  padding: 0.85rem;
  border-radius: 0.75rem;
  background: var(--portal-card-soft);
}

.portal-team-drawer__email[hidden] {
  display: none !important;
}

.portal-team-drawer__email span {
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.portal-team-drawer__email a {
  color: var(--portal-accent);
  overflow-wrap: anywhere;
}

.portal-team-drawer__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.1rem;
}

.portal-crm-drawer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.portal-crm-drawer__identity {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.portal-crm-avatar {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--portal-card-soft);
  border: 1px solid var(--portal-line);
  color: var(--portal-ink);
  font-weight: 700;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
}

.portal-crm-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portal-crm-drawer__meta {
  margin: 0.25rem 0 0;
  color: var(--portal-muted);
  font-size: 0.86rem;
}

.portal-crm-drawer__head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
}

.portal-crm-drawer__loading {
  color: var(--portal-muted);
}

.portal-crm-person-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}

.portal-crm-person-tab {
  appearance: none;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  background: var(--portal-card-soft);
  color: var(--portal-muted);
  font: inherit;
  font-size: 0.86rem;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.portal-crm-person-tab.is-active {
  border-color: var(--portal-accent, #2f6fed);
  background: color-mix(in srgb, var(--portal-accent, #2f6fed) 14%, transparent);
  color: var(--portal-ink);
}

.portal-crm-drawer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1rem 1.15rem;
  align-items: start;
}

.portal-crm-drawer__info {
  display: grid;
  gap: 1rem;
  min-width: 0;
  align-content: start;
}

.portal-crm-drawer__grid.is-personal-tab {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.portal-crm-drawer__grid.is-personal-tab .portal-crm-drawer__personal {
  grid-column: 1;
}

.portal-crm-drawer__grid.is-personal-tab .portal-crm-drawer__aside {
  grid-column: 2;
}

.portal-crm-drawer__section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--portal-line);
}

.portal-crm-drawer__contacts > .portal-crm-drawer__section:first-child,
.portal-crm-drawer__bio > .portal-crm-drawer__section:first-child,
.portal-crm-drawer__personal > .portal-crm-drawer__section:first-child,
.portal-crm-drawer__comments,
.portal-crm-drawer__activity {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.portal-crm-drawer__section--nested {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--portal-line);
}

.portal-crm-drawer__section h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.portal-crm-drawer__section > .portal-button {
  margin-top: 0.75rem;
}

.portal-crm-drawer__aside {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  position: static;
  max-height: none;
  overflow: visible;
  align-self: start;
  z-index: 1;
  min-width: 0;
}

.portal-crm-drawer__comments,
.portal-crm-drawer__activity {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.75rem;
  background: var(--portal-card-soft);
  min-width: 0;
}

.portal-crm-drawer__comments {
  position: relative;
  z-index: 2;
}

.portal-crm-field--compose textarea {
  min-height: 5.5rem;
}

.portal-crm-reminder-details {
  margin: 0.15rem 0 0;
  color: var(--portal-muted);
  font-size: 0.84rem;
}

.portal-crm-reminder-details summary {
  cursor: pointer;
  color: var(--portal-ink);
  font-size: 0.86rem;
}

.portal-crm-reminder-details[hidden] {
  display: none !important;
}

.portal-crm-drawer__comments .portal-button,
.portal-crm-drawer__activity .portal-button {
  align-self: flex-start;
}

.portal-crm-timeline--comments,
.portal-crm-timeline--activity {
  max-height: min(36vh, 22rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.portal-crm-drawer__log {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0.85rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.75rem;
  background: var(--portal-card-soft);
}

.portal-crm-drawer__section--comment {
  position: relative;
  z-index: 2;
  padding: 0.85rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.75rem;
  background: var(--portal-card);
}

.portal-crm-timeline__item {
  margin-top: 0.75rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.65rem;
  background: var(--portal-card);
}

.portal-crm-timeline__item header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--portal-muted);
}

.portal-crm-timeline__item p {
  margin: 0.2rem 0 0;
  color: var(--portal-ink);
  font-size: 0.86rem;
  white-space: pre-wrap;
}

.portal-crm-timeline__edit {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.portal-crm-timeline__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

@media (max-width: 1100px) {
  .portal-crm-drawer__grid,
  .portal-crm-drawer__grid.is-personal-tab {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .portal-crm-drawer__aside {
    grid-column: 2;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .portal-crm-drawer__info {
    grid-column: 1;
  }

  .portal-crm-timeline--comments,
  .portal-crm-timeline--activity {
    max-height: min(28vh, 16rem);
  }
}

@media (max-width: 720px) {
  .portal-crm-drawer__grid,
  .portal-crm-drawer__grid.is-personal-tab {
    grid-template-columns: 1fr;
  }

  .portal-crm-drawer__info,
  .portal-crm-drawer__aside {
    grid-column: auto;
  }

}

.portal-crm-meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.portal-crm-meeting-actions .portal-button {
  text-decoration: none;
}

.portal-crm-timeline {
  display: grid;
  gap: 0.65rem;
}

.portal-crm-card__progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.portal-crm-progress-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--portal-line);
  background: var(--portal-card-soft);
  color: var(--portal-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

.portal-crm-progress-chip--link:hover,
.portal-crm-progress-chip--link:focus-visible {
  border-color: var(--portal-accent, #2f6fed);
  color: var(--portal-accent, #2f6fed);
}

.portal-crm-card__flags {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--portal-line);
}

.portal-crm-card__flags .portal-crm-check {
  font-size: 0.78rem;
}

.portal-crm-member-link {
  margin: 0.55rem 0 0.75rem;
}

.portal-crm-board[data-crm-board="mentees"] {
  grid-template-columns: repeat(5, minmax(14rem, 1fr));
}

@media (max-width: 62rem) {
  .portal-crm-board {
    grid-auto-flow: column;
    grid-template-columns: repeat(4, minmax(14.5rem, 78vw));
  }

  .portal-crm-board[data-crm-board="mentees"] {
    grid-template-columns: repeat(5, minmax(14.5rem, 78vw));
  }
}

@media (max-width: 39rem) {
  .portal-crm-drawer__panel {
    width: min(100vw - 0.5rem, 96rem);
    max-height: min(96vh, 56rem);
  }

  .portal-crm-dialog__actions {
    flex-direction: column-reverse;
  }

  .portal-crm-dialog__actions .portal-button {
    width: 100%;
  }

  .portal-crm-meeting-actions {
    display: grid;
  }
}

/* Portal chat, mail and settings */
.portal-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.portal-work-status,
.portal-chat-message-status {
  margin-bottom: 0.7rem;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  color: var(--portal-muted);
  background: var(--portal-card);
  font-size: 0.72rem;
}

.portal-work-status--loading,
.portal-chat-message-status--loading {
  border-color: color-mix(in srgb, var(--portal-teal) 30%, var(--portal-line));
}

.portal-work-status--error,
.portal-chat-message-status--error {
  border-color: color-mix(in srgb, var(--portal-coral) 42%, var(--portal-line));
  color: var(--portal-coral);
}

.portal-work-status--success {
  border-color: color-mix(in srgb, var(--portal-green) 42%, var(--portal-line));
  color: var(--portal-green);
}

.portal-work-status--warning,
.portal-chat-message-status--warning {
  border-color: color-mix(in srgb, #d59a27 45%, var(--portal-line));
  color: #9a6810;
}

.portal-chat-intro,
.portal-mail-intro {
  margin-bottom: 0.8rem;
}

.portal-chat-layout {
  min-height: 32rem;
  height: min(43rem, calc(100dvh - 10.5rem));
  display: grid;
  grid-template-columns: minmax(16rem, 19rem) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 0.85rem;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-chat-sidebar,
.portal-chat-pane {
  min-width: 0;
  min-height: 0;
}

.portal-chat-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-card-soft);
}

.portal-chat-sidebar__head,
.portal-chat-pane__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-chat-sidebar__head h2,
.portal-chat-pane__head h2 {
  margin: 0.12rem 0 0;
  font-family: var(--fh);
  font-size: 1rem;
  line-height: 1.2;
}

.portal-chat-pane__head span {
  display: block;
  margin-top: 0.18rem;
  color: var(--portal-muted);
  font-size: 0.64rem;
}

.portal-chat-total,
.portal-mail-list-pane > header > span {
  min-width: 1.45rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  color: var(--portal-muted);
  background: var(--portal-card);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}

.portal-chat-direct {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.42rem;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-chat-direct label,
.portal-settings-fields label {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
  color: var(--portal-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.portal-chat-direct input,
.portal-chat-direct select,
.portal-chat-composer textarea,
.portal-settings-fields input,
.portal-settings-fields select {
  width: 100%;
  border: 1px solid var(--portal-line);
  border-radius: 0.5rem;
  color: var(--portal-ink);
  background: var(--portal-card);
  font: inherit;
}

.portal-chat-direct input,
.portal-chat-direct select,
.portal-settings-fields input,
.portal-settings-fields select {
  height: 2.25rem;
  padding: 0.42rem 0.58rem;
}

.portal-chat-threads {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.4rem;
}

.portal-chat-thread-group + .portal-chat-thread-group {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--portal-line);
}

.portal-chat-thread-group h3 {
  margin: 0 0 0.26rem;
  padding: 0 0.35rem;
  color: var(--portal-muted);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-chat-thread-group__empty,
.portal-mail-list__empty {
  margin: 0;
  padding: 0.7rem 0.55rem;
  color: var(--portal-muted);
  font-size: 0.68rem;
  text-align: center;
}

.portal-chat-thread {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.48rem;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--portal-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.portal-chat-thread:hover,
.portal-chat-thread:focus-visible {
  background: var(--portal-card);
}

.portal-chat-thread.is-active {
  border-color: color-mix(in srgb, var(--portal-teal) 25%, var(--portal-line));
  background: color-mix(in srgb, var(--portal-teal) 10%, var(--portal-card));
}

.portal-chat-thread__mark {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 0.45rem;
  color: var(--portal-teal-strong);
  background: color-mix(in srgb, var(--portal-teal) 13%, var(--portal-card));
  font-size: 0.68rem;
  font-weight: 800;
}

.portal-chat-thread__body {
  min-width: 0;
  display: grid;
}

.portal-chat-thread__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}

.portal-chat-thread__top strong,
.portal-mail-item__top strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-chat-thread__top time,
.portal-mail-item__top time {
  flex: 0 0 auto;
  color: var(--portal-muted);
  font-size: 0.54rem;
}

.portal-chat-thread__preview {
  overflow: hidden;
  margin-top: 0.08rem;
  color: var(--portal-muted);
  font-size: 0.62rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-chat-thread__unread {
  min-width: 1.1rem;
  height: 1.1rem;
  display: grid;
  place-items: center;
  padding-inline: 0.2rem;
  border-radius: 999px;
  color: #fff;
  background: var(--portal-teal-strong);
  font-size: 0.55rem;
  font-weight: 800;
}

.portal-chat-pane {
  display: flex;
  flex-direction: column;
  position: relative;
}

.portal-chat-message-status {
  margin: 0.55rem 0.7rem 0;
}

.portal-chat-older,
.portal-mail-more {
  align-self: center;
  margin: 0.55rem 0 0;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-teal);
  background: var(--portal-card);
  font-size: 0.62rem;
  font-weight: 750;
  cursor: pointer;
}

.portal-chat-messages {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  padding: 0.75rem;
}

.portal-chat-messages:empty {
  display: none;
}

.portal-chat-message {
  max-width: min(78%, 36rem);
  align-self: flex-start;
  padding: 0.52rem 0.64rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.65rem 0.65rem 0.65rem 0.18rem;
  background: var(--portal-card-soft);
}

.portal-chat-message.is-own {
  align-self: flex-end;
  border-color: color-mix(in srgb, var(--portal-teal) 24%, var(--portal-line));
  border-radius: 0.65rem 0.65rem 0.18rem;
  background: color-mix(in srgb, var(--portal-teal) 10%, var(--portal-card));
}

.portal-chat-message header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.portal-chat-message header strong {
  color: var(--portal-teal);
  font-size: 0.6rem;
}

.portal-chat-message header time {
  color: var(--portal-muted);
  font-size: 0.52rem;
}

.portal-chat-message p {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.portal-chat-message__attachments {
  display: grid;
  gap: 0.28rem;
  margin-top: 0.42rem;
}

.portal-chat-attachment {
  min-width: 12rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.48rem;
  color: var(--portal-ink);
  background: color-mix(in srgb, var(--portal-card) 82%, transparent);
  text-decoration: none;
}

.portal-chat-attachment:hover {
  border-color: color-mix(in srgb, var(--portal-teal) 45%, var(--portal-line));
}

.portal-chat-attachment__icon {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 0.42rem;
  color: var(--portal-teal);
  background: color-mix(in srgb, var(--portal-teal) 12%, transparent);
}

.portal-chat-attachment__body {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.portal-chat-attachment__body strong {
  overflow: hidden;
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-chat-attachment__body small,
.portal-chat-message__delivery {
  color: var(--portal-muted);
  font-size: 0.54rem;
}

.portal-chat-message__delivery {
  display: block;
  margin-top: 0.3rem;
  text-align: right;
}

.portal-chat-message__delivery.is-error {
  color: var(--portal-coral);
}

.portal-chat-empty,
.portal-mail-detail__empty {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.18rem;
  padding: 1rem;
  color: var(--portal-muted);
  text-align: center;
}

.portal-chat-empty strong,
.portal-mail-detail__empty strong {
  color: var(--portal-ink);
  font-size: 0.8rem;
}

.portal-chat-empty span,
.portal-mail-detail__empty span {
  font-size: 0.65rem;
}

.portal-chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-top: 1px solid var(--portal-line);
  background: var(--portal-card);
}

.portal-chat-composer__message {
  min-width: 0;
}

.portal-chat-composer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.portal-chat-attach {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.portal-chat-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.portal-chat-attach span {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--portal-line);
  border-radius: 0.5rem;
  color: var(--portal-teal);
  background: var(--portal-card-soft);
  font-size: 0.65rem;
  font-weight: 750;
}

.portal-chat-pending-files {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.portal-chat-pending-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.35rem 0.28rem 0.48rem;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  color: var(--portal-muted);
  background: var(--portal-card-soft);
  font-size: 0.58rem;
}

.portal-chat-pending-file button {
  border: 0;
  color: var(--portal-coral);
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.portal-chat-composer textarea {
  min-height: 2.5rem;
  max-height: 9rem;
  padding: 0.5rem 0.6rem;
  resize: vertical;
}

.portal-personal-mail-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.portal-personal-mail-card__mark {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  color: #fff;
  background: var(--portal-teal-strong);
  font-family: var(--fh);
  font-size: 1.1rem;
  font-weight: 700;
}

.portal-personal-mail-card h2 {
  margin: 0.12rem 0 0;
  font-family: var(--fh);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.portal-personal-mail-card p:not(.portal-eyebrow) {
  margin: 0.2rem 0 0;
  color: var(--portal-muted);
  font-size: 0.68rem;
}

.portal-personal-mail-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.portal-mail-layout {
  min-height: 32rem;
  height: min(43rem, calc(100dvh - 10.5rem));
  display: grid;
  grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 0.85rem;
  background: var(--portal-card);
  box-shadow: var(--portal-shadow);
}

.portal-mail-list-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-card-soft);
}

.portal-mail-list-pane > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-mail-list-pane > header h2 {
  margin: 0.12rem 0 0;
  font-family: var(--fh);
  font-size: 1rem;
}

.portal-mail-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.4rem;
}

.portal-mail-item {
  width: 100%;
  display: grid;
  gap: 0.12rem;
  padding: 0.56rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  color: var(--portal-ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.portal-mail-item + .portal-mail-item {
  margin-top: 0.15rem;
}

.portal-mail-item:hover,
.portal-mail-item:focus-visible {
  background: var(--portal-card);
}

.portal-mail-item.is-active {
  border-color: color-mix(in srgb, var(--portal-teal) 25%, var(--portal-line));
  background: color-mix(in srgb, var(--portal-teal) 10%, var(--portal-card));
}

.portal-mail-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.portal-mail-item__from,
.portal-mail-item__snippet {
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 0.62rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.portal-mail-item__snippet {
  font-size: 0.58rem;
}

.portal-mail-more {
  flex: 0 0 auto;
  margin: 0.45rem auto 0.65rem;
}

.portal-mail-detail {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  background: var(--portal-card);
}

.portal-mail-detail__head {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-mail-detail__head h2 {
  margin: 0.15rem 0 0.55rem;
  font-family: var(--fh);
  font-size: 1.12rem;
  line-height: 1.25;
}

.portal-mail-detail__head dl {
  display: grid;
  gap: 0.2rem;
  margin: 0;
}

.portal-mail-detail__head dl > div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.45rem;
}

.portal-mail-detail__head dt,
.portal-mail-detail__head dd {
  margin: 0;
  font-size: 0.64rem;
}

.portal-mail-detail__head dt {
  color: var(--portal-muted);
}

.portal-mail-detail__head dd {
  overflow-wrap: anywhere;
}

.portal-mail-text {
  margin: 0;
  padding: 0.95rem;
  color: var(--portal-ink);
  background: transparent;
  font: 0.72rem/1.55 var(--fb);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.portal-mail-html {
  width: 100%;
  min-height: 32rem;
  display: block;
  border: 0;
  background: #fff;
}

.portal-settings-form {
  width: min(100%, 52rem);
  display: grid;
  gap: 0.7rem;
}

.portal-settings-panel {
  box-shadow: none;
}

.portal-settings-switches {
  display: grid;
}

.portal-settings-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.68rem 0;
}

.portal-settings-switch + .portal-settings-switch {
  border-top: 1px solid var(--portal-line);
}

.portal-settings-switch > span {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.portal-settings-switch strong {
  font-size: 0.74rem;
}

.portal-settings-switch small,
.portal-settings-fields small {
  color: var(--portal-muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.portal-settings-switch input {
  position: relative;
  width: 2.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid var(--portal-line);
  border-radius: 999px;
  appearance: none;
  background: var(--portal-card-soft);
  cursor: pointer;
}

.portal-settings-switch input::before {
  content: "";
  position: absolute;
  top: 0.14rem;
  left: 0.14rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--portal-muted);
  transform: translateX(0);
}

.portal-settings-switch input:checked {
  border-color: var(--portal-teal-strong);
  background: var(--portal-teal-strong);
}

.portal-settings-switch input:checked::before {
  background: #fff;
  transform: translateX(0.98rem);
}

.portal-settings-switch input:disabled {
  cursor: wait;
}

.portal-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.portal-settings-fields label > span {
  color: var(--portal-ink);
  font-size: 0.7rem;
}

.portal-settings-fields input,
.portal-settings-fields select {
  background: var(--portal-card-soft);
}

.portal-settings-fields input[readonly] {
  color: var(--portal-muted);
  cursor: default;
}

.portal-mail-admin-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-mail-admin-form .portal-settings-actions {
  grid-column: 1 / -1;
  gap: 0.5rem;
}

.portal-settings-actions {
  display: flex;
  justify-content: flex-end;
}

.portal-button:disabled,
.portal-chat-older:disabled,
.portal-mail-more:disabled {
  opacity: 0.55;
  cursor: wait;
}

.portal-mobile-nav a {
  position: relative;
}

.portal-mobile-nav .portal-mobile-nav__badge {
  position: absolute;
  top: 0.08rem;
  right: 0.15rem;
  min-width: 0.95rem;
  height: 0.95rem;
  display: grid;
  place-items: center;
  padding: 0 0.18rem;
  border: 2px solid var(--portal-card);
  border-radius: 999px;
  color: #fff;
  background: var(--portal-coral);
  font-size: 0.48rem;
  font-weight: 800;
  line-height: 1;
}

@media (max-width: 52rem) {
  .portal-chat-layout,
  .portal-mail-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .portal-chat-sidebar,
  .portal-mail-list-pane {
    max-height: 17rem;
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-chat-pane {
    min-height: 27rem;
  }

  .portal-mail-detail {
    min-height: 27rem;
    max-height: 38rem;
  }
}

@media (max-width: 39rem) {
  .portal-chat-message {
    max-width: 88%;
  }

  .portal-personal-mail-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .portal-personal-mail-card__actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .portal-personal-mail-card__actions .portal-button {
    flex: 1 1 9rem;
  }

  .portal-settings-fields {
    grid-template-columns: 1fr;
  }

  .portal-mail-admin-form {
    grid-template-columns: 1fr;
  }

  .portal-settings-actions .portal-button {
    width: 100%;
  }
}
