/* VENDORED from PTAG Glacier — source: glacier-6c95c807.css (pmis-techstack.ptaginc.com), 2026-06-09.
   Do not hand-edit; re-sync from the Glacier source when it updates. */
/**
 * PTAG Glacier Design System — CSS Custom Properties
 * Source: ../ptag-glacier/PTAG-DESIGN-SYSTEM.md
 * Shell type: Micro Shell
 * Project: PMIS Tech Stack Graphic
 */

:root {
  /* ── Brand colours — Blue ramp ──────────────────────────────────────── */
  /* Full 50→900 ramp anchored at --ptag-blue (#195171 = ~500)            */
  --ptag-blue-50:     #F0F6FA;   /* near-white blue tint                 */
  --ptag-blue-100:    #D8EAF3;   /* very light sky blue                  */
  --ptag-blue-200:    #B0D4E7;   /* light blue                           */
  --ptag-blue-300:    #73AECA;   /* medium-light steel blue              */
  --ptag-blue-400:    #3D85A8;   /* medium interactive blue              */
  --ptag-blue:        #195171;   /* ★ brand anchor (500)                 */
  --ptag-blue-600:    #0E3A54;   /* dark (alias: --ptag-blue-dark)       */
  --ptag-blue-700:    #092A3D;   /* deeper navy                          */
  --ptag-blue-800:    #051C29;   /* near-black navy                      */
  --ptag-blue-900:    #020E14;   /* deepest navy                         */
  /* Legacy aliases kept for backward compat */
  --ptag-blue-dark:   #0E3A54;
  --ptag-blue-light:  #E8F1F7;   /* softer surface tint (between 100-50) */

  /* ── Brand colours — Green ramp ─────────────────────────────────────── */
  /* Full 50→900 ramp anchored at --ptag-green (#3F832F = ~500)           */
  --ptag-green-50:    #F3F9F2;   /* near-white green tint                */
  --ptag-green-100:   #C8E6C2;   /* very light sage                      */
  --ptag-green-200:   #97CC8D;   /* light green                          */
  --ptag-green-300:   #6DB362;   /* medium-light forest                  */
  --ptag-green-400:   #52963F;   /* medium green                         */
  --ptag-green:       #3F832F;   /* ★ brand anchor (500)                 */
  --ptag-green-600:   #2D6321;   /* dark (alias: --ptag-green-dark)      */
  --ptag-green-700:   #1E4516;   /* deeper forest                        */
  --ptag-green-800:   #122B0D;   /* near-black green                     */
  --ptag-green-900:   #070F04;   /* deepest green                        */
  /* Legacy aliases kept for backward compat */
  --ptag-green-dark:  #2D6321;
  --ptag-green-light: #EBF5E9;   /* softer surface tint (between 100-50) */

  /* ── Brand colours — Teal accent ────────────────────────────────────── */
  /* Derived from the midpoint between PTAG Blue and PTAG Green;          */
  /* use for data-vis highlights, badges, and interactive accents.        */
  --ptag-teal-50:     #E8F6F5;
  --ptag-teal-100:    #C0EAE7;
  --ptag-teal-200:    #86D0CB;
  --ptag-teal-300:    #4CB5AE;
  --ptag-teal:        #1A7A6E;   /* ★ teal anchor                        */
  --ptag-teal-dark:   #125A52;
  --ptag-teal-700:    #0C3F39;

  /* ── Neutral scale ──────────────────────────────────────────────────── */
  /* Cool blue-tinted grays — 25 & 950 added for fine-grained control    */
  --neutral-0:   #FFFFFF;
  --neutral-25:  #FDFDFЕ;        /* near-white, subtler than 50          */
  --neutral-50:  #F8F8FC;
  --neutral-100: #F2F2F8;
  --neutral-200: #E5E5EE;
  --neutral-300: #D1D1DE;
  --neutral-400: #B0B0C4;
  --neutral-500: #8E8EA8;
  --neutral-600: #6B6B8A;
  --neutral-700: #4A4A68;
  --neutral-800: #2D2D44;
  --neutral-900: #1A1A2E;
  --neutral-950: #0D0D1A;        /* deepest, near-black                  */

  /* ── Semantic status — full token set ──────────────────────────────── */
  /* Each status now has: main · bg · border · text-on-white             */
  --status-success:        #3F832F;
  --status-success-bg:     #EBF5E9;
  --status-success-border: #7DC676;
  --status-success-text:   #245C1A;

  --status-warning:        #D4880F;
  --status-warning-bg:     #FFF3E0;
  --status-warning-border: #E8B94A;
  --status-warning-text:   #7A4A08;

  --status-danger:         #C4362A;
  --status-danger-bg:      #FDECEA;
  --status-danger-border:  #E88880;
  --status-danger-text:    #8C1F15;

  --status-info:           #195171;
  --status-info-bg:        #F0F6FA;
  --status-info-border:    #73AECA;
  --status-info-text:      #0D3348;

  --status-neutral:        #6B6B8A;
  --status-neutral-bg:     #F2F2F8;
  --status-neutral-border: #B0B0C4;
  --status-neutral-text:   #3A3A55;

  /* ── Typography ─────────────────────────────────────────────────────── */
  --font-sans:    'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-display: 'Maven Pro', 'Open Sans', system-ui, sans-serif;
  --font-body:    'Open Sans', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --tracking-overline: 0.14em;

  --text-display:  39px;
  --text-h1:       31px;
  --text-h2:       25px;
  --text-h3:       20px;
  --text-h4:       16px;
  --text-body:     16px;
  --text-body-sm:  14px;
  --text-caption:  12px;
  --text-overline: 11px;

  /* ── Spacing (4 px base grid) ───────────────────────────────────────── */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Border radius ──────────────────────────────────────────────────── */
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ── Elevation / shadows ────────────────────────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.10), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.08);

  /* ── Z-index scale ──────────────────────────────────────────────────── */
  --z-base:             1;
  --z-sticky:          10;
  --z-raised:          10;
  --z-l2-overlay:      48;
  --z-l2:              52;
  --z-sidebar:         50;
  --z-sidebar-tooltip: 60;
  --z-header:         100;
  --z-dropdown:       150;
  --z-mobile-overlay: 199;
  --z-mobile-sidebar: 200;
  --z-mobile-l2:      201;
  --z-modal-overlay:  300;
  --z-modal:          310;
  --z-toast:          400;
  --z-command-palette:500;

  /* ── Shell dimensions (Micro Shell) ─────────────────────────────────── */
  --header-height:  56px;
  --accent-line-h:  2px;
  --rail-expanded:  240px;
  --rail-collapsed: 64px;

  /* ── Motion / animation ─────────────────────────────────────────────── */
  --transition-fast:    100ms ease-in-out;
  --transition-default: 200ms ease-in-out;
  --transition-slow:    300ms ease-in-out;
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   100ms;
  --duration-normal: 200ms;
  --duration-slow:   300ms;
  --duration-enter:  250ms;
  --duration-exit:   200ms;
}

/* ── Dark mode token overrides ───────────────────────────────────────── */
[data-theme="dark"] {
  /* Neutral scale — inverted */
  --neutral-0:   #1A1A2E;
  --neutral-50:  #1E1E34;
  --neutral-100: #24243C;
  --neutral-200: #2E2E48;
  --neutral-300: #3D3D58;
  --neutral-400: #5A5A78;
  --neutral-500: #8E8EA8;
  --neutral-600: #B0B0C4;
  --neutral-700: #D1D1DE;
  --neutral-800: #E5E5EE;
  --neutral-900: #F2F2F8;

  /* Brand — lightened ~15% for dark surfaces */
  --ptag-blue:        #3B8EC2;
  --ptag-blue-dark:   #195171;
  --ptag-blue-light:  #1C2D3D;
  --ptag-blue-50:     #1A2533;
  --ptag-green:       #5AAE48;
  --ptag-green-dark:  #3F832F;
  --ptag-green-light: #1C2D1A;
  --ptag-green-50:    #1A261A;

  /* Semantic status — brightened for dark surfaces */
  --status-success:    #5AAE48;
  --status-success-bg: #1A261A;
  --status-warning:    #F0A030;
  --status-warning-bg: #2A1E00;
  --status-danger:     #E05050;
  --status-danger-bg:  #2A0A0A;
  --status-danger-border: #C04040;
  --status-info:       #3B8EC2;
  --status-info-bg:    #1A2533;
  --status-neutral:    #8E8EA8;
  --status-neutral-bg: #24243C;

  /* Elevation — heavier shadows on dark bg */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.6);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.7);
}

/* Dark mode logo — invert to white */
[data-theme="dark"] .ptag-header__logo {
  filter: brightness(0) invert(1);
}

/* ============================================================
   GLACIER HEADER
   Source: ptag-glacier/CLAUDE-CODE-GUIDE.md §4.2
   ============================================================ */

.ptag-header {
  height: var(--header-height, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4, 16px);
  background: var(--neutral-0);
  border-bottom: 1px solid var(--neutral-200);
  z-index: var(--z-header, 100);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  gap: 0;
}

.ptag-header__left {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  min-width: 0;
}

.ptag-header__right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Hamburger toggle — leftmost element */
.ptag-header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--neutral-600);
  cursor: pointer;
  flex-shrink: 0;
  margin-right: var(--space-2, 8px);
  transition: background var(--transition-fast, 100ms ease-in-out);
}
.ptag-header__menu-btn:hover { background: var(--neutral-100); }

/* Brand: logo + divider + app name */
.ptag-header__brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.ptag-header__logo-text {
  font-size: var(--text-body-sm, 13px);
  font-weight: 700;
  color: var(--ptag-blue);
  letter-spacing: 0.05em;
}

.ptag-header__logo { height: 22px; width: auto; display: block; }

.ptag-header__divider {
  width: 1px;
  height: 20px;
  background: var(--neutral-200);
  margin: 0 12px;
}

.ptag-header__app-name {
  font-size: var(--text-body-sm, 14px);
  font-weight: 500;
  color: var(--neutral-600);
  white-space: nowrap;
}

/* Icon action buttons (search, bell, etc.) */
.ptag-header__action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--neutral-600);
  cursor: pointer;
  transition: background var(--transition-fast, 100ms ease-in-out);
  flex-shrink: 0;
}
.ptag-header__action:hover { background: var(--neutral-100); color: var(--neutral-800); }

.ptag-header__action--changelog { position: relative; }

.ptag-header__changelog-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ptag-green, #40833e);
  border: 1.5px solid var(--neutral-0);
  pointer-events: none;
}

/* User avatar */
.ptag-header__user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--neutral-800);
  color: var(--neutral-0);
  font-size: var(--text-caption, 12px);
  font-weight: 600;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: var(--space-1, 4px);
  transition: background var(--transition-fast, 100ms ease-in-out);
}
.ptag-header__user:hover { background: var(--neutral-700); }

/* Project selector — app-specific element in left zone */
.ptag-header__project {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: var(--space-4, 16px);
  padding-left: var(--space-4, 16px);
  border-left: 1px solid var(--neutral-200);
  flex-shrink: 0;
  position: relative;
}

/* ============================================================
   GLACIER SHELL — App body, accent line, L1 rail, L2 flyout
   Source: ptag-glacier/CLAUDE-CODE-GUIDE.md §4.3–4.4
   ============================================================ */

/* Green accent line — brand signature below header */
.ptag-accent-line {
  height: 2px;
  background: var(--ptag-green);
  flex-shrink: 0;
}

/* App body: horizontal flex row holding L1 + content; L2 is absolutely overlaid */
.ptag-app__body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0; /* allow flex child to shrink below content size */
  position: relative;
}

/* Content area */
.ptag-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--neutral-50);
  min-width: 0;
  padding-top: var(--space-4, 16px);
}

/* ── L1 Navigation Rail ── */
.ptag-sidebar {
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width-expanded, 240px);
  min-width: var(--sidebar-width-expanded, 240px);
  height: 100%;
  align-self: flex-start;
  background: var(--neutral-50);
  border-right: 1px solid var(--neutral-200);
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  z-index: var(--z-sidebar, 50);
  position: sticky;
  top: 0;
  transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1),
              min-width 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ptag-sidebar::-webkit-scrollbar { width: 6px; }
.ptag-sidebar::-webkit-scrollbar-track { background: transparent; }
.ptag-sidebar::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 3px; }

.ptag-sidebar[data-state="collapsed"] {
  width: var(--sidebar-width-collapsed, 64px);
  min-width: var(--sidebar-width-collapsed, 64px);
}
.ptag-sidebar[data-state="hidden"] {
  width: 0;
  min-width: 0;
  border-right: none;
  overflow: hidden;
}

.ptag-sidebar__menu {
  flex: 1;
  list-style: none;
  padding: var(--space-1, 4px) var(--space-2, 8px);
  margin: 0;
  transition: padding var(--duration-normal, 200ms) var(--ease-in-out, cubic-bezier(0.4, 0, 0.2, 1));
}

.ptag-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 var(--space-3, 12px);
  margin: 2px 0;
  border-radius: 6px;
  color: var(--neutral-700);
  font-size: var(--text-body-sm);
  font-weight: 400;
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  width: 100%;
  text-align: left;
  position: relative;
  transition: background var(--transition-fast, 100ms ease-in-out);
  white-space: nowrap;
  font-family: inherit;
}
.ptag-sidebar__item:hover { background: var(--neutral-100); }

.ptag-sidebar__item--active {
  border-left-color: var(--ptag-blue);
  background: var(--ptag-blue-50);
  color: var(--ptag-blue);
  font-weight: 600;
}
.ptag-sidebar__item--active .ptag-sidebar__icon { color: var(--ptag-blue); }
.ptag-sidebar__item--active:hover { background: var(--ptag-blue-light); }

.ptag-sidebar__item--open {
  background: var(--neutral-100);
  color: var(--ptag-blue);
}
.ptag-sidebar__item--open .ptag-sidebar__icon { color: var(--ptag-blue); }

.ptag-sidebar__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--neutral-500);
}

.ptag-sidebar__label {
  opacity: 1;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  max-width: 200px;
  flex: 1;
  transition: opacity 150ms ease-in-out,
              max-width 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__label {
  opacity: 0;
  max-width: 0;
  flex: none;
  transition: opacity 100ms ease-in-out,
              max-width 200ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.ptag-sidebar__chevron {
  margin-left: auto;
  color: var(--neutral-400);
  flex-shrink: 0;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
              color var(--transition-fast, 100ms ease-in-out);
}
.ptag-sidebar__chevron--open {
  color: var(--ptag-blue);
  transform: rotate(90deg);
}
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__chevron { display: none; }

/* Collapsed: center icons via padding (no justify-content change = no jump) */
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__menu {
  padding-left: var(--space-2, 8px);
  padding-right: var(--space-2, 8px);
}
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__item {
  /* Keep padding-left identical to expanded (12px) so icon stays perfectly stationary.
     menu(8) + border(3) + item-left(12) = 23px from sidebar edge in both states. */
  padding: 0 0 0 12px;
  gap: 0;
  border-left: 3px solid transparent;
}
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__item--active {
  border-left-color: var(--ptag-blue);
}

/* Collapsed: tooltip on hover */
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--neutral-800);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms ease-in-out;
  z-index: var(--z-sidebar-tooltip, 60);
}
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__item:hover::after { opacity: 1; }

.ptag-sidebar__footer {
  border-top: 1px solid var(--neutral-200);
  padding: 6px var(--space-2, 8px);
  margin-top: auto;
}

.ptag-sidebar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--neutral-500);
  cursor: pointer;
  transition: background var(--transition-fast, 100ms ease-in-out);
  flex-shrink: 0;
  margin: 0 auto;
}
.ptag-sidebar__toggle:hover { background: var(--neutral-100); color: var(--neutral-700); }
.ptag-sidebar__toggle svg { transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1); }
.ptag-sidebar[data-state="collapsed"] .ptag-sidebar__toggle svg { transform: rotate(180deg); }

/* ── L2 Flyout Panel ── */
/* Absolutely overlaid (not in flex flow) so opening/closing never affects ptag-content width */
.ptag-l2 {
  position: absolute;
  top: 0;
  left: var(--sidebar-width-collapsed, 64px);
  height: 100%;
  width: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--neutral-0);
  border-right: none;
  display: flex;
  flex-direction: column;
  z-index: var(--z-l2, 49);
  transition: width 200ms cubic-bezier(0.4, 0, 0.2, 1),
              min-width 200ms cubic-bezier(0.4, 0, 0.2, 1),
              border-right 200ms cubic-bezier(0.4, 0, 0.2, 1),
              left 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* Track sidebar width so L2 always starts at the sidebar's right edge */
.ptag-sidebar[data-state="expanded"] ~ .ptag-l2 {
  left: var(--sidebar-width-expanded, 240px);
}
.ptag-sidebar[data-peeking] ~ .ptag-l2 {
  left: var(--sidebar-width-expanded, 240px);
}
.ptag-sidebar[data-state="hidden"] ~ .ptag-l2 {
  left: 0;
}
.ptag-l2[data-open="true"] {
  width: 260px;
  min-width: 260px;
  border-right: 1px solid var(--neutral-200);
  overflow-y: auto;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

.ptag-l2__header {
  padding: var(--space-5, 20px) var(--space-5, 20px) var(--space-3, 12px);
  border-bottom: 1px solid var(--neutral-100);
  flex-shrink: 0;
}
.ptag-l2__title {
  font-size: var(--text-overline);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neutral-500);
}

.ptag-l2__list {
  list-style: none;
  padding: var(--space-2, 8px) var(--space-3, 12px);
  flex: 1;
  margin: 0;
}

.ptag-l2__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 12px);
  padding: var(--space-3, 12px);
  margin: 2px 0;
  border-radius: var(--radius-md);
  color: var(--neutral-700);
  text-decoration: none;
  transition: background var(--transition-fast, 100ms ease-in-out);
  border-left: 3px solid transparent;
  background: transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.ptag-l2__item:hover { background: var(--neutral-50); }

.ptag-l2__item--active {
  border-left-color: var(--ptag-blue);
  background: var(--ptag-blue-50);
}
.ptag-l2__item--active .ptag-l2__item-label {
  color: var(--ptag-blue);
  font-weight: 600;
}
.ptag-l2__item--active .ptag-l2__item-icon { color: var(--ptag-blue); }
.ptag-l2__item--active:hover { background: var(--ptag-blue-light); }

.ptag-l2__item-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ptag-l2__item-label {
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: var(--neutral-800);
  white-space: nowrap;
}
.ptag-l2__item-desc {
  font-size: var(--text-caption);
  color: var(--neutral-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ptag-l2__item-icon {
  color: var(--neutral-400);
  flex-shrink: 0;
}

/* L2 as overlay when sidebar is collapsed */
@media (min-width: 1024px) {
  .ptag-l2[data-open="true"][data-sidebar="collapsed"] {
    position: fixed;
    left: var(--sidebar-width-collapsed, 64px);
    top: calc(var(--header-height) + 2px);
    box-shadow: var(--shadow-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }
}

/* Mobile */
@media (max-width: 1023px) {
  .ptag-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    min-width: 280px;
    z-index: var(--z-mobile-sidebar, 200);
    transform: translateX(-100%);
    transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
    background: var(--neutral-0);
  }
  .ptag-sidebar[data-state="expanded"] { transform: translateX(0); }
  .ptag-l2[data-open="true"] {
    position: fixed;
    left: 0;
    top: calc(var(--header-height) + 2px);
    width: 300px;
    min-width: 300px;
    z-index: var(--z-mobile-l2, 201);
    box-shadow: var(--shadow-lg);
  }
}

/* ── Accessibility: respect reduced-motion preference ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Project Toolbar
   ============================================================ */

.ptag-toolbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm, 4px);
  border: none;
  background: transparent;
  color: var(--neutral-500);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast, 100ms ease-in-out), color var(--transition-fast, 100ms ease-in-out);
}
.ptag-toolbar__btn:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

/* ============================================================
   Changelog Panel
   ============================================================ */

.ptag-changelog-panel {
  position: fixed;
  top: calc(var(--header-height, 56px) + 2px);
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--neutral-0);
  border-left: 1px solid var(--neutral-200);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06);
}

.ptag-changelog-panel[data-state="open"] {
  transform: translateX(0);
}

.ptag-changelog-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-200);
  flex-shrink: 0;
}

.ptag-changelog-panel__title {
  font-size: var(--text-body-sm, 14px);
  font-weight: 600;
  color: var(--neutral-700);
  margin: 0;
}

.ptag-changelog-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm, 4px);
  border: none;
  background: transparent;
  color: var(--neutral-400);
  cursor: pointer;
  transition: background var(--transition-fast, 100ms ease-in-out), color var(--transition-fast, 100ms ease-in-out);
}
.ptag-changelog-panel__close:hover { background: var(--neutral-100); color: var(--neutral-700); }

.ptag-changelog-panel__body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ptag-changelog-panel__list {
  flex: 1;
  padding: 8px 0;
}

.ptag-changelog-panel__entry {
  padding: 10px 16px;
  border-bottom: 1px solid var(--neutral-100);
}

.ptag-changelog-panel__entry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ptag-changelog-panel__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm, 4px);
  font-size: 11px;
  font-weight: 600;
  background: var(--neutral-100);
  color: var(--ptag-blue);
}

.ptag-changelog-panel__time {
  font-size: 11px;
  color: var(--neutral-400);
}

.ptag-changelog-panel__summary {
  font-size: 13px;
  color: var(--neutral-800);
  margin: 0 0 2px;
}

.ptag-changelog-panel__user {
  font-size: 11px;
  color: var(--neutral-500);
  margin: 0;
}

.ptag-changelog-panel__pagination {
  padding: 8px 16px;
  border-top: 1px solid var(--neutral-100);
}

.ptag-changelog-panel__footer {
  padding: 10px 16px;
  border-top: 1px solid var(--neutral-200);
  flex-shrink: 0;
}

.ptag-changelog-panel__clear-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm, 4px);
  border: 1px solid var(--status-danger-border);
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  cursor: pointer;
  transition: opacity var(--transition-fast, 100ms ease-in-out);
}
.ptag-changelog-panel__clear-btn:hover { opacity: 0.8; }

.ptag-changelog-panel__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  font-size: 13px;
  color: var(--neutral-400);
}

/* ============================================================
   Blade Panel (Block Details)
   ============================================================ */

.ptag-blade-panel {
  position: fixed;
  top: calc(var(--header-height, 56px) + 2px);
  right: 0;
  bottom: 0;
  width: 384px;
  background: var(--neutral-0);
  border-left: 1px solid var(--neutral-200);
  z-index: 150;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06);
}

.ptag-blade-panel[data-state="open"] {
  transform: translateX(0);
}

.ptag-blade-panel[data-state="hidden"] {
  transform: translateX(100%);
}

/* Pull-tab: peeks from the right edge when the blade is hidden */
.ptag-blade-tab {
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 80px;
  background: var(--ptag-blue, #185FA5);
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, left 120ms ease, width 120ms ease;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ptag-blade-tab:hover {
  left: -18px;
  width: 18px;
}
.ptag-blade-panel[data-state="hidden"] .ptag-blade-tab {
  opacity: 1;
  pointer-events: auto;
}

/* Two vertical grip lines ("||") */
.ptag-blade-tab__grip {
  display: flex;
  gap: 3px;
}
.ptag-blade-tab__grip span {
  display: block;
  width: 1.5px;
  height: 18px;
  background: rgba(255,255,255,0.65);
  border-radius: 2px;
}

.ptag-blade-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--neutral-200);
  flex-shrink: 0;
}

.ptag-blade-panel__title {
  font-size: var(--text-body-sm, 14px);
  font-weight: 600;
  color: var(--neutral-700);
  margin: 0;
}

.ptag-blade-panel__close,
.ptag-blade-panel__minimize {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm, 4px);
  border: none;
  background: transparent;
  color: var(--neutral-400);
  cursor: pointer;
  transition: background var(--transition-fast, 100ms ease-in-out), color var(--transition-fast, 100ms ease-in-out);
}
.ptag-blade-panel__close:hover,
.ptag-blade-panel__minimize:hover { background: var(--neutral-100); color: var(--neutral-700); }

/* Show minimize icon when open, restore icon when hidden */
.ptag-blade-panel__minimize .blade-restore-icon { display: none; }
.ptag-blade-panel[data-state="hidden"] .ptag-blade-panel__minimize .blade-minimize-icon { display: none; }
.ptag-blade-panel[data-state="hidden"] .ptag-blade-panel__minimize .blade-restore-icon { display: flex; }

/* Block card selected/active state */
[data-block-id][data-selected="true"] {
  outline: 2px solid var(--ptag-blue, #185FA5);
  outline-offset: -2px;
}

.ptag-blade-panel__body {
  flex: 1;
  overflow-y: auto;
}
