/* ── PH CORE Layout — Floating Sidebar + Topbar + AI FAB ──
 * Shared layout CSS injected via ph-layout.js.
 * All pages include this file; ph-layout.js injects the HTML.
 * ──────────────────────────────────────────────────────── */

:root {
  --ph-sidebar-width-collapsed: 64px;
  --ph-sidebar-width-expanded: 240px;
}

/* ── App shell ── */
.app {
  display: flex;
  min-height: 100vh;
}

/* ── Floating sidebar ── */
.app-sidebar {
  width: var(--ph-sidebar-width-collapsed);
  transition: width 180ms ease, padding 180ms ease;
  background: var(--ph-surface);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-2xl);
  box-shadow: var(--ph-shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--ph-space-4) 0;
  gap: var(--ph-space-2);
  flex-shrink: 0;
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  margin: 12px 0 12px 12px;
  overflow: visible;
  z-index: 100;
}

.app-sidebar.expanded {
  width: var(--ph-sidebar-width-expanded);
  align-items: stretch;
  padding: var(--ph-space-4) var(--ph-space-3);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  background: var(--ph-primary-600);
  border-radius: var(--ph-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--ph-font-bold);
  font-size: var(--ph-text-sm);
  color: white;
  letter-spacing: -0.5px;
  margin-bottom: var(--ph-space-4);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-logo:hover { background: var(--ph-primary-700); }
.app-sidebar.expanded .sidebar-logo { align-self: center; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ph-space-1);
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
}
.sidebar-nav::-webkit-scrollbar { display: none; }

.sidebar-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--ph-radius-md);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ph-transition-colors);
  color: var(--ph-gray-400);
  position: relative;
}
.sidebar-btn:hover {
  background: var(--ph-gray-100);
  color: var(--ph-gray-600);
}
.sidebar-btn.active {
  background: var(--ph-primary-100);
  color: var(--ph-primary-600);
}

.app-sidebar.expanded .sidebar-btn {
  width: 100%;
  justify-content: flex-start;
  gap: var(--ph-space-3);
  padding: 0 var(--ph-space-3);
}

.sidebar-btn-label {
  display: none;
  font-size: var(--ph-text-sm);
  font-weight: var(--ph-font-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.app-sidebar.expanded .sidebar-btn-label { display: inline; }

/* Avatar não tem classe sidebar-btn — fica centralizado pelo align-items:center do sidebar-bottom */
.app-sidebar.expanded .sidebar-avatar { align-self: center; }

.sidebar-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Botão Reuniões — destaque roxo */
.sidebar-btn--reunioes {
  background: var(--ph-primary-600);
  color: #fff !important;
  border-radius: var(--ph-radius-md);
}
.sidebar-btn--reunioes:hover {
  background: var(--ph-primary-700);
  color: #fff;
}
.app-sidebar.expanded .sidebar-btn--reunioes {
  border-radius: var(--ph-radius-md);
}

.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ph-space-3);
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--ph-radius-full);
  background: linear-gradient(135deg, var(--ph-primary-400), var(--ph-primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ph-text-xs);
  font-weight: var(--ph-font-bold);
  color: white;
}

/* ── Flyout submenu ── */
.sb-group {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.sb-flyout {
  position: fixed;
  left: -9999px;
  top: 0;
  transform: translateX(-8px);
  width: 216px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: var(--ph-surface);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-xl);
  box-shadow: 0 8px 32px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
  padding: var(--ph-space-2);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 300;
  font-family: var(--ph-font-sans);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0ms linear 200ms;
}

/* Caret apontando para a esquerda */
.sb-flyout::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 20px;
  border: 7px solid transparent;
  border-right-color: var(--ph-border);
  pointer-events: none;
}
.sb-flyout::after {
  content: '';
  position: absolute;
  right: calc(100% - 1px);
  top: 20px;
  border: 7px solid transparent;
  border-right-color: var(--ph-surface);
  pointer-events: none;
}

/* Hover — controlled by JS .hover-open (grace delay prevents gap flicker) */
.sb-group.hover-open .sb-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: all;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0ms linear 0ms;
}

/* Click toggle — sem delay */
.sb-group.open .sb-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: all;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0ms linear 0ms;
}

.sb-flyout-section {
  padding: var(--ph-space-2) var(--ph-space-3) var(--ph-space-1);
  font-size: 10px;
  font-weight: var(--ph-font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ph-text-subtle);
}

/* Single-item flyout — clickable label (same href as icon) */
.sb-flyout-link-label {
  display: block;
  padding: var(--ph-space-2) var(--ph-space-3);
  font-size: var(--ph-text-sm);
  font-weight: var(--ph-font-semibold);
  color: var(--ph-text);
  text-decoration: none;
  border-radius: var(--ph-radius-md);
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.sb-flyout-link-label:hover {
  background: var(--ph-primary-50);
  color: var(--ph-primary-700);
  text-decoration: none;
}

.sb-flyout-item {
  display: flex;
  align-items: center;
  gap: var(--ph-space-3);
  padding: var(--ph-space-2) var(--ph-space-3);
  font-size: var(--ph-text-sm);
  color: var(--ph-text-muted);
  text-decoration: none;
  border-radius: var(--ph-radius-md);
  transition: background 120ms ease, color 120ms ease;
  white-space: nowrap;
  position: relative;
}
.sb-flyout-item:hover {
  background: var(--ph-primary-50);
  color: var(--ph-primary-700);
  text-decoration: none;
}

/* Single-item flyout: <a> using section-header typography — same as "TECNOLOGIA" label */
a.sb-flyout-section {
  display: block;
  text-decoration: none;
  cursor: pointer;
}
a.sb-flyout-section:hover {
  color: var(--ph-primary-700);
  text-decoration: none;
}

.sb-flyout-item svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sb-flyout-divider {
  height: 1px;
  background: var(--ph-border);
  margin: var(--ph-space-1);
}

/* ── App main area ── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Page content (scrollable) ── */
.page-content {
  flex: 1;
  padding: 0 var(--ph-space-8) var(--ph-space-8);
  overflow-y: auto;
}

/* ── Inline topbar ── */
.inline-topbar {
  display: flex;
  align-items: center;
  padding: var(--ph-space-4) 0;
  gap: var(--ph-space-4);
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ph-bg);
  margin-bottom: var(--ph-space-2);
}

.inline-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.inline-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  padding: 0 var(--ph-space-4) 0 var(--ph-space-9);
  font-size: var(--ph-text-sm);
  font-family: var(--ph-font-sans);
  color: var(--ph-text);
  background: var(--ph-surface);
  outline: none;
  box-shadow: var(--ph-shadow-sm);
  transition: var(--ph-transition-colors);
}
.inline-search input:focus {
  border-color: var(--ph-primary-400);
  box-shadow: var(--ph-shadow-focus);
}
.inline-search input::placeholder { color: var(--ph-text-subtle); }
.inline-search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--ph-gray-400); pointer-events: none;
}
.inline-search-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

.inline-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--ph-space-3);
}
.inline-bell {
  width: 36px; height: 36px;
  border-radius: var(--ph-radius-full);
  background: var(--ph-surface);
  border: 1px solid var(--ph-border);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: var(--ph-shadow-sm);
  transition: var(--ph-transition-colors);
}
.inline-bell:hover { background: var(--ph-gray-50); }
.inline-bell svg { width: 16px; height: 16px; stroke: var(--ph-gray-600); fill: none; stroke-width: 2; }
.inline-bell-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: var(--ph-danger-500);
  border-radius: var(--ph-radius-full);
  border: 2px solid var(--ph-surface);
}
.inline-avatar {
  width: 36px; height: 36px;
  border-radius: var(--ph-radius-full);
  background: linear-gradient(135deg, #f59e42, #e53e3e);
  cursor: pointer;
  border: 2px solid var(--ph-border);
  box-shadow: var(--ph-shadow-sm);
}

/* ── AI FAB ── */
.ph-ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: var(--ph-radius-full);
  background: linear-gradient(135deg, var(--ph-primary-500) 0%, var(--ph-primary-700) 100%);
  border: none;
  cursor: grab;
  box-shadow: 0 4px 20px rgba(124,58,237,.45), 0 2px 8px rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  transition: box-shadow 200ms ease, transform 200ms ease;
  user-select: none; -webkit-user-select: none;
}
.ph-ai-fab:hover {
  box-shadow: 0 8px 28px rgba(124,58,237,.55), 0 4px 12px rgba(0,0,0,.2);
  transform: scale(1.06);
}
.ph-ai-fab.dragging { cursor: grabbing; transform: scale(0.97); box-shadow: 0 12px 36px rgba(124,58,237,.5); }
.ph-ai-fab svg { width: 26px; height: 26px; stroke: white; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ph-ai-fab-dot {
  position: absolute; top: 5px; right: 5px;
  width: 11px; height: 11px;
  background: #22c55e;
  border-radius: var(--ph-radius-full);
  border: 2px solid white;
  pointer-events: none;
}

/* ── AI Side Canvas ── */
.ph-ai-canvas {
  position: fixed;
  top: 0; right: -440px;
  width: 400px; height: 100vh;
  background: var(--ph-surface);
  border-left: 1px solid var(--ph-border);
  box-shadow: -8px 0 40px rgba(0,0,0,.10);
  z-index: 499;
  display: flex; flex-direction: column;
  transition: right 300ms cubic-bezier(0.4,0,0.2,1);
  font-family: var(--ph-font-sans);
}
.ph-ai-canvas.open { right: 0; }

.ph-ai-canvas-header {
  padding: var(--ph-space-4) var(--ph-space-5);
  border-bottom: 1px solid var(--ph-border);
  display: flex; align-items: center; gap: var(--ph-space-3);
  flex-shrink: 0;
  background: var(--ph-surface);
}
.ph-ai-canvas-icon {
  width: 36px; height: 36px;
  border-radius: var(--ph-radius-lg);
  background: linear-gradient(135deg, var(--ph-primary-100), var(--ph-primary-200));
  display: flex; align-items: center; justify-content: center;
  color: var(--ph-primary-600); flex-shrink: 0;
}
.ph-ai-canvas-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.ph-ai-canvas-title { font-size: var(--ph-text-sm); font-weight: var(--ph-font-semibold); color: var(--ph-text); }
.ph-ai-canvas-sub { font-size: var(--ph-text-xs); color: var(--ph-text-muted); margin-top: 1px; }
.ph-ai-canvas-close {
  margin-left: auto; width: 28px; height: 28px;
  border-radius: var(--ph-radius-md); border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ph-gray-400); transition: var(--ph-transition-colors);
}
.ph-ai-canvas-close:hover { background: var(--ph-gray-100); color: var(--ph-gray-600); }
.ph-ai-canvas-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.ph-ai-canvas-body {
  flex: 1; overflow-y: auto;
  padding: var(--ph-space-4) var(--ph-space-5);
  display: flex; flex-direction: column; gap: var(--ph-space-3);
}

.ph-ai-msg { display: flex; flex-direction: column; gap: 3px; }
.ph-ai-msg-ai  { align-items: flex-start; }
.ph-ai-msg-user { align-items: flex-end; }
.ph-ai-msg-bubble {
  max-width: 86%;
  padding: var(--ph-space-3) var(--ph-space-4);
  font-size: var(--ph-text-sm);
  line-height: var(--ph-leading-relaxed);
}
.ph-ai-msg-ai .ph-ai-msg-bubble {
  background: var(--ph-gray-100); color: var(--ph-text);
  border-radius: var(--ph-radius-lg) var(--ph-radius-lg) var(--ph-radius-lg) 4px;
}
.ph-ai-msg-user .ph-ai-msg-bubble {
  background: var(--ph-primary-600); color: white;
  border-radius: var(--ph-radius-lg) var(--ph-radius-lg) 4px var(--ph-radius-lg);
}
.ph-ai-msg-time { font-size: 10px; color: var(--ph-text-subtle); padding: 0 4px; }

.ph-ai-canvas-footer {
  padding: var(--ph-space-3) var(--ph-space-4);
  border-top: 1px solid var(--ph-border);
  display: flex; gap: var(--ph-space-2); align-items: flex-end;
  flex-shrink: 0;
}
.ph-ai-canvas-textarea {
  flex: 1;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  padding: var(--ph-space-2) var(--ph-space-3);
  font-size: var(--ph-text-sm);
  font-family: var(--ph-font-sans);
  color: var(--ph-text);
  background: var(--ph-bg);
  resize: none; outline: none;
  min-height: 60px; max-height: 120px;
  transition: var(--ph-transition-colors);
}
.ph-ai-canvas-textarea:focus { border-color: var(--ph-primary-400); box-shadow: var(--ph-shadow-focus); }
.ph-ai-canvas-send {
  width: 38px; height: 38px;
  border-radius: var(--ph-radius-lg);
  background: var(--ph-primary-600); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
  transition: var(--ph-transition-colors);
}
.ph-ai-canvas-send:hover { background: var(--ph-primary-700); }
.ph-ai-canvas-send svg { width: 16px; height: 16px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; }


/* ── Showcase content styles (component pages) ── */
.ds-page-title { font-size: var(--ph-text-3xl); font-weight: var(--ph-font-bold); letter-spacing: var(--ph-tracking-tight); }
.ds-page-desc { font-size: var(--ph-text-base); color: var(--ph-text-muted); margin-top: var(--ph-space-2); margin-bottom: var(--ph-space-8); }
.ds-section-title {
  font-size: var(--ph-text-base); font-weight: var(--ph-font-semibold);
  color: var(--ph-text); margin-bottom: var(--ph-space-4); margin-top: var(--ph-space-10);
  padding-bottom: var(--ph-space-3); border-bottom: 1px solid var(--ph-border);
  display: flex; align-items: center; gap: var(--ph-space-3);
}
.ds-section-title:first-of-type { margin-top: 0; }
.ds-section-badge {
  font-size: 10px; font-weight: var(--ph-font-medium);
  background: var(--ph-primary-100); color: var(--ph-primary-700);
  padding: 2px 8px; border-radius: var(--ph-radius-full);
}
.ds-breadcrumb {
  display: flex; align-items: center; gap: var(--ph-space-2);
  font-size: var(--ph-text-sm); color: var(--ph-text-muted); margin-bottom: var(--ph-space-6);
}
.ds-breadcrumb a { color: var(--ph-text-muted); text-decoration: none; }
.ds-breadcrumb a:hover { color: var(--ph-primary-600); }
.ds-breadcrumb .sep { color: var(--ph-gray-300); }
.ds-breadcrumb .current { color: var(--ph-text); font-weight: var(--ph-font-medium); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-sidebar { display: none; }
}

/* ── Mobile Menu (only on mobile) ── */
#ph-mob-tab,
#ph-mob-backdrop,
#ph-mob-drawer { display: none; }

@media (max-width: 768px) {

  /* ── Pull tab on left edge ── */
  #ph-mob-tab {
    position: fixed;
    left: 0;
    top: 18%;
    transform: translateY(-50%);
    width: 18px;
    height: 56px;
    border-radius: 0 8px 8px 0;
    background: var(--ph-primary-600);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 520;
    transition: background 180ms ease, width 180ms ease;
    user-select: none;
    -webkit-user-select: none;
  }
  #ph-mob-tab:hover { background: var(--ph-primary-700); width: 22px; }
  /* 3 small white lines as pull indicator */
  #ph-mob-tab::before {
    content: '';
    width: 3px;
    height: 18px;
    background: rgba(255,255,255,.7);
    border-radius: 2px;
    box-shadow: 0 -7px 0 rgba(255,255,255,.7), 0 7px 0 rgba(255,255,255,.7);
  }
  /* Hide tab when drawer is open */
  #ph-mob-tab.open { display: none; }

  /* ── Semi-transparent backdrop ── */
  #ph-mob-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 509;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
  }
  #ph-mob-backdrop.open {
    opacity: 1;
    pointer-events: all;
  }

  /* ── Side drawer — slides in from left ── */
  #ph-mob-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(300px, 88vw);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--ph-surface);
    z-index: 510;
    transform: translateX(-100%);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 6px 0 32px rgba(0, 0, 0, .18);
    overflow: hidden;
  }
  #ph-mob-drawer.open {
    transform: translateX(0);
  }

  /* Header row: logo + user */
  .ph-mob-header {
    display: flex;
    align-items: center;
    gap: var(--ph-space-3);
    padding: calc(env(safe-area-inset-top, 0px) + var(--ph-space-5)) var(--ph-space-5) var(--ph-space-4);
    border-bottom: 1px solid var(--ph-border);
    flex-shrink: 0;
  }
  .ph-mob-logo {
    width: 36px; height: 36px; min-width: 36px;
    border-radius: var(--ph-radius-md);
    background: var(--ph-primary-600);
    display: flex; align-items: center; justify-content: center;
    font-weight: var(--ph-font-bold);
    font-size: var(--ph-text-sm);
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
  }
  .ph-mob-user {
    display: flex; align-items: center; gap: var(--ph-space-2);
    text-decoration: none; color: var(--ph-text); min-width: 0;
  }
  .ph-mob-user:hover { text-decoration: none; }
  .ph-mob-user-img {
    width: 32px; height: 32px;
    border-radius: var(--ph-radius-full);
    object-fit: cover; flex-shrink: 0;
  }
  .ph-mob-user-avatar {
    width: 32px; height: 32px; min-width: 32px;
    border-radius: var(--ph-radius-full);
    background: linear-gradient(135deg, var(--ph-primary-400), var(--ph-primary-700));
    display: flex; align-items: center; justify-content: center;
    font-size: var(--ph-text-xs); font-weight: var(--ph-font-bold); color: #fff;
  }
  .ph-mob-user-name {
    font-size: var(--ph-text-sm); font-weight: var(--ph-font-medium);
    color: var(--ph-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* Scrollable nav list */
  .ph-mob-list {
    flex: 1; overflow-y: auto;
    padding: var(--ph-space-3) var(--ph-space-4);
    display: flex; flex-direction: column; gap: 2px;
  }

  /* Single link item */
  .ph-mob-item {
    display: flex; align-items: center; gap: var(--ph-space-3);
    padding: 10px var(--ph-space-3);
    border-radius: var(--ph-radius-md);
    font-size: var(--ph-text-sm); font-weight: var(--ph-font-medium);
    color: var(--ph-text-muted);
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
  }
  .ph-mob-item:hover, .ph-mob-item:active {
    background: var(--ph-gray-100); color: var(--ph-text); text-decoration: none;
  }
  .ph-mob-item.active { background: var(--ph-primary-50); color: var(--ph-primary-700); }
  .ph-mob-item--reunioes {
    background: var(--ph-primary-600); color: #fff !important;
  }
  .ph-mob-item--reunioes:hover { background: var(--ph-primary-700); color: #fff; }
  .ph-mob-item i { font-size: 18px; flex-shrink: 0; }

  /* Group with sub-items */
  .ph-mob-group { display: flex; flex-direction: column; }
  .ph-mob-group-btn {
    display: flex; align-items: center; gap: var(--ph-space-3);
    padding: 10px var(--ph-space-3);
    border-radius: var(--ph-radius-md);
    font-size: var(--ph-text-sm); font-weight: var(--ph-font-medium);
    color: var(--ph-text-muted); background: transparent; border: none;
    cursor: pointer; width: 100%; text-align: left; font-family: inherit;
    transition: background 120ms ease, color 120ms ease;
    position: relative;
  }
  .ph-mob-group-btn:hover { background: var(--ph-gray-100); color: var(--ph-text); }
  .ph-mob-group-btn.active { color: var(--ph-primary-700); }
  .ph-mob-group-btn > i:first-child { font-size: 18px; flex-shrink: 0; }
  .ph-mob-group-btn > span { flex: 1; text-align: left; }

  /* Chevron rotates when expanded */
  .ph-mob-chevron {
    font-size: 14px !important; color: var(--ph-gray-400);
    transition: transform 220ms ease; flex-shrink: 0;
  }
  .ph-mob-group-btn[aria-expanded="true"] .ph-mob-chevron {
    transform: rotate(90deg);
  }

  /* Sub-items container (accordion) */
  .ph-mob-subitems {
    display: none; flex-direction: column; gap: 1px;
    padding-left: calc(var(--ph-space-3) + 18px + var(--ph-space-3));
    padding-bottom: var(--ph-space-1);
  }
  .ph-mob-subitems.open { display: flex; }
  .ph-mob-subitem {
    display: flex; align-items: center; gap: var(--ph-space-2);
    padding: 8px var(--ph-space-3);
    border-radius: var(--ph-radius-md);
    font-size: var(--ph-text-sm); color: var(--ph-text-muted); text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
    position: relative;
  }
  .ph-mob-subitem:hover { background: var(--ph-primary-50); color: var(--ph-primary-700); text-decoration: none; }
  .ph-mob-subitem.active { color: var(--ph-primary-600); background: var(--ph-primary-50); }
  .ph-mob-subitem i { font-size: 14px; flex-shrink: 0; }

  /* Footer: Reuniões + Sair */
  .ph-mob-footer {
    padding: var(--ph-space-3) var(--ph-space-4);
    padding-bottom: max(var(--ph-space-6), calc(env(safe-area-inset-bottom, 0px) + var(--ph-space-4)));
    border-top: 1px solid var(--ph-border);
    display: flex; flex-direction: column; gap: 2px; flex-shrink: 0;
  }
}

/* ── Notification dots (chamados TI) ── */
.menu-notif-dot,
.menu-notif-dot--inline,
.row-notif-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c3aed;
  pointer-events: none;
  flex-shrink: 0;
}
