/* ZoneLens Workspace Shell — Layout & Chrome
 * Design tokens from workspace/frontend_UI/workstation_designs.json */

:root {
  --sidebar-width: 240px;
  --sidebar-collapsed: 48px;
  --header-height: 48px;

  /* Color palette — aligned with workstation_designs.json dark_theme */
  --bg-base: #0F1117;
  --bg-surface: #161822;
  --bg-elevated: #1A1D2E;
  --bg-sidebar: #12141E;
  --bg-header: #161822;
  --bg-card: #1E2130;
  --bg-card-hover: #252840;
  --bg-input: #1A1D2E;
  --text-primary: #F0F0F5;
  --text-secondary: #8B8FA3;
  --text-muted: #5C5F73;
  --text-disabled: #3D3F4E;
  --accent: #6C63FF;
  --accent-hover: #7B73FF;
  --accent-pressed: #5B52EE;
  --accent-glow: 0 0 20px rgba(108, 99, 255, 0.3);
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.16);
  --border-focus: #6C63FF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;

  /* Tier colors */
  --tier-explorer: #8B8FA3;
  --tier-professional: #3B82F6;
  --tier-team: #8B5CF6;
  --tier-developer: #F59E0B;
  --tier-enterprise: #10B981;
}

/* ---- Light theme token overrides ---- */
html[data-theme="light"] {
  --bg-base: #F8F9FC;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F5F6FA;
  --bg-sidebar: #F1F3F9;
  --bg-header: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F0F1F5;
  --bg-input: #FFFFFF;
  --text-primary: #1A1D2E;
  --text-secondary: #5C5F73;
  --text-muted: #8B8FA3;
  --text-disabled: #C4C7D4;
  --accent: #5A52E0;
  --accent-hover: #4F46D8;
  --accent-pressed: #4338CA;
  --accent-glow: 0 0 20px rgba(90, 82, 224, 0.2);
  --border-subtle: rgba(0,0,0,0.06);
  --border-default: rgba(0,0,0,0.10);
  --border-strong: rgba(0,0,0,0.16);
  --border-focus: #5A52E0;
  /* success, warning, danger, info stay the same */
  /* tier colors stay the same */
}

/* ---- Theme transition (smooth toggle) ---- */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  overflow: hidden;
}

/* ---- Focus ring (UI-004, UI-009) ---- */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* ---- Layout Grid ---- */
.ws-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar content";
  height: 100vh;
  width: 100vw;
}

/* ---- Sidebar ---- */
.ws-sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease-out;
  z-index: 20;
}

.ws-sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  gap: 12px;
}

.ws-sidebar-brand .brand-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.ws-sidebar-brand .brand-text {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
}

.ws-sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.ws-nav-section {
  padding: 0 8px;
  margin-bottom: 4px;
}

.ws-nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 12px 8px 4px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-nav-section-label:hover {
  color: var(--text-secondary);
}

.ws-nav-section-label::after {
  content: '\25BC';
  font-size: 8px;
  transition: transform 200ms ease-out;
  display: inline-block;
  flex-shrink: 0;
}

.ws-nav-section.ws-nav-section--collapsed .ws-nav-section-label::after {
  transform: rotate(-90deg);
}

.ws-nav-section.ws-nav-section--collapsed > *:not(.ws-nav-section-label):not(.ws-nav-section-header) {
  display: none;
}

.ws-nav-section.ws-nav-section--collapsed .ws-nav-section-header ~ * {
  display: none;
}

.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
  white-space: nowrap;
  overflow: hidden;
}

.ws-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.ws-nav-item.active {
  background: rgba(108, 99, 255, 0.12);
  color: var(--accent);
  border-left: 2px solid var(--accent);
}

.ws-nav-item .nav-icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.ws-nav-item .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 8px;
  flex-shrink: 0;
}

/* ---- Header ---- */
.ws-header {
  grid-area: header;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
}

.ws-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-header-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.ws-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-tier-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(108, 99, 255, 0.2);
  color: var(--accent);
  white-space: nowrap;
}

/* Tier-specific badge colors */
.ws-tier-badge--free,
.ws-tier-badge--explorer { background: rgba(139, 143, 163, 0.15); color: var(--tier-explorer); }
.ws-tier-badge--professional { background: rgba(59, 130, 246, 0.15); color: var(--tier-professional); }
.ws-tier-badge--team { background: rgba(139, 92, 246, 0.15); color: var(--tier-team); }
.ws-tier-badge--developer { background: rgba(245, 158, 11, 0.15); color: var(--tier-developer); }
.ws-tier-badge--enterprise { background: rgba(16, 185, 129, 0.15); color: var(--tier-enterprise); }

.ws-user-email {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-header-btn {
  background: none;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.ws-header-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

#ws-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

/* ---- Content ---- */
.ws-content {
  grid-area: content;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-base);
}

.ws-content-inner {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 60vh;
  transition: opacity 0.15s ease-out;
}

.ws-content-inner.ws-fade-out {
  opacity: 0;
}

.ws-tab-content {
  transition: opacity 0.15s ease-out;
}

.ws-tab-content.ws-fade-out {
  opacity: 0;
}

/* Persistent tab panes — shown/hidden instead of destroyed/recreated */
.ws-tab-pane {
  min-height: 200px;
}

/* ---- Skip Navigation (accessibility) ---- */
.ws-skip-nav {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease-out;
}

.ws-skip-nav:focus {
  top: 8px;
}

/* ---- Sidebar: Section header with + button ---- */
.ws-nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 8px 4px;
}

.ws-nav-section-header .ws-nav-section-label {
  padding: 0;
}

.ws-nav-new-btn {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease-out;
  line-height: 1;
}

.ws-nav-new-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---- Sidebar: Project status dots ---- */
.ws-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.ws-status-dot--success { background: var(--success); }
.ws-status-dot--warning { background: var(--warning); }
.ws-status-dot--archived { background: var(--text-disabled); }
.ws-status-dot--default { background: var(--text-muted); }

/* ---- Sidebar: Parcel count badge ---- */
.ws-parcel-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0 6px;
  border-radius: 9999px;
  line-height: 18px;
  flex-shrink: 0;
}

/* ---- Sidebar: Empty state ---- */
.ws-sidebar-empty {
  padding: 8px 12px;
}

.ws-sidebar-empty-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Sidebar: Collapse toggle ---- */
.ws-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease-out;
  font-size: 16px;
}

.ws-collapse-toggle:hover {
  color: var(--text-primary);
}

/* Collapsed sidebar state */
.ws-sidebar--collapsed {
  width: var(--sidebar-collapsed) !important;
}

.ws-sidebar--collapsed .brand-text,
.ws-sidebar--collapsed .nav-label,
.ws-sidebar--collapsed .ws-nav-section-label,
.ws-sidebar--collapsed .ws-nav-section-header .ws-nav-section-label,
.ws-sidebar--collapsed .ws-parcel-count,
.ws-sidebar--collapsed .ws-sidebar-empty,
.ws-sidebar--collapsed .ws-nav-new-btn {
  display: none;
}

.ws-sidebar--collapsed .ws-nav-item {
  justify-content: center;
  padding: 8px 0;
}

.ws-sidebar--collapsed .ws-nav-item.active {
  border-left: none;
}

.ws-sidebar--collapsed .ws-sidebar-brand {
  justify-content: center;
  padding: 0;
}

.ws-sidebar--collapsed .ws-nav-section-header {
  justify-content: center;
  padding: 8px 0 4px;
}

.ws-sidebar--collapsed .ws-sidebar-footer .ws-nav-item {
  justify-content: center;
}

.ws-layout--collapsed {
  grid-template-columns: var(--sidebar-collapsed) 1fr;
}

/* ---- Overlay (tablet slide-over) ---- */
.ws-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 15;
}

.ws-overlay.visible { display: block; }

/* ---- Buttons (UI-004) ---- */
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  padding: 0 16px;
  height: 36px;
  transition: all 0.15s ease-out;
}

.ws-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ws-btn-primary {
  background: linear-gradient(135deg, #6C63FF 0%, #7B73FF 100%);
  color: #FFFFFF;
}

.ws-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
}

.ws-btn-primary:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.95);
}

.ws-btn-secondary {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.ws-btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ---- View Header ---- */
.ws-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.ws-view-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.ws-view-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Toggle Switch ---- */
.ws-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-toggle-input { display: none; }

.ws-toggle-switch {
  width: 40px;
  height: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  position: relative;
  transition: background 0.2s ease-out, border-color 0.2s ease-out;
}

.ws-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-secondary);
  border-radius: 9999px;
  transition: transform 0.2s ease-out, background 0.2s ease-out;
}

.ws-toggle-input:checked + .ws-toggle-switch {
  background: var(--accent);
  border-color: var(--accent);
}

.ws-toggle-input:checked + .ws-toggle-switch::after {
  transform: translateX(18px);
  background: #fff;
}

/* ---- Card Grid ---- */
.ws-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ---- Project Card ---- */
.ws-project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-project-card:hover {
  border-color: var(--border-default);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.ws-project-card--archived {
  opacity: 0.6;
}

.ws-project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ws-project-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-project-card-name:hover {
  color: var(--accent);
}

.ws-use-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Card Metrics ---- */
.ws-project-card-metrics {
  display: flex;
  gap: 16px;
}

.ws-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ws-metric-value {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.ws-metric-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ws-metric--go .ws-metric-value { color: var(--success); }
.ws-metric--review .ws-metric-value { color: var(--warning); }
.ws-metric--nogo .ws-metric-value { color: var(--danger); }

/* ---- Progress Bar ---- */
.ws-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 9999px;
  overflow: hidden;
}

.ws-progress-fill {
  height: 100%;
  background: var(--success);
  border-radius: 9999px;
  transition: width 0.3s ease-out;
}

.ws-progress-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- Card Footer ---- */
.ws-project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.ws-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.ws-btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease-out;
  font-family: inherit;
}

.ws-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* ---- Modal ---- */
.ws-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: ws-fade-in 0.2s ease-out;
}

@keyframes ws-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ws-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  margin: 16px;
  animation: ws-scale-in 0.2s ease-out;
}

@keyframes ws-scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ws-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.ws-modal-title {
  font-size: 18px;
  font-weight: 600;
}

.ws-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease-out;
}

.ws-modal-close:hover { color: var(--text-primary); }

.ws-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 24px 20px;
}

/* ---- Form Fields ---- */
.ws-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.ws-form-required {
  font-weight: 400;
  color: var(--text-muted);
}

.ws-form-input {
  height: 36px;
  padding: 0 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.ws-form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.ws-form-input::placeholder {
  color: var(--text-muted);
}

.ws-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B8FA3' stroke-width='2'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
  cursor: pointer;
}

.ws-form-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.ws-form-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
}

.ws-form-warning-icon {
  flex-shrink: 0;
  font-size: 14px;
}

.ws-form-error {
  font-size: 13px;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
}

/* ---- Project Detail Header ---- */
.ws-project-detail {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ws-project-header {
  margin-bottom: 24px;
}

.ws-project-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: color 0.15s ease-out;
}

.ws-back-link:hover {
  color: var(--text-primary);
}

.ws-project-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.ws-state-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.ws-state-badge--archived {
  background: rgba(139, 143, 163, 0.15);
  color: var(--text-muted);
}

.ws-project-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-left: 32px;
}

.ws-meta-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.ws-meta-sep {
  color: var(--text-muted);
}

/* ---- Tab Bar ---- */
.ws-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease-out, border-color 0.15s ease-out;
  white-space: nowrap;
  cursor: pointer;
}

.ws-tab:hover {
  color: var(--text-primary);
}

.ws-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.ws-tab-badge {
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0 6px;
  border-radius: 9999px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}

.ws-tab--active .ws-tab-badge {
  background: rgba(108, 99, 255, 0.15);
  color: var(--accent);
}

/* ---- Tab Content ---- */
.ws-tab-content {
  padding-top: 24px;
  min-height: 200px;
}

/* ---- Artifact Tab Bar — Windows-style stacked tabs (ZL-LNYC-225) ---- */
.ws-art-tab-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0;
  padding: 0;
  margin-bottom: -1px;       /* overlap bottom border so active tab hides it */
  position: relative;
  z-index: 1;
}
.ws-art-tab-bar .ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary, #f3f4f6);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-right: -1px;        /* overlap side borders like real tabs */
  margin-bottom: 0;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.ws-art-tab-bar .ws-tab:hover {
  background: var(--bg-primary, #fff);
  color: var(--text-primary);
}
.ws-art-tab-bar .ws-tab.ws-tab--active {
  background: var(--bg-primary, #fff);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  z-index: 2;                /* active tab sits on top */
  /* hide bottom border — tab "connects" to the panel */
  box-shadow: 0 1px 0 0 var(--bg-primary, #fff);
}
.ws-art-tab-bar .ws-tab[data-tab-locked="1"] {
  color: var(--text-muted);
  opacity: 0.7;
}
.ws-art-tab-sep {
  display: inline-flex;
  align-items: flex-end;
  padding: 0 6px 6px;
  color: var(--border-subtle);
  font-size: 14px;
  user-select: none;
  align-self: flex-end;
}
.ws-art-tab-lock {
  font-size: 10px;
  margin-right: 2px;
}
.ws-art-tab-label {
  font-size: 12px;
}

/* Tab badge dots */
.ws-art-badge {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 3px;
  flex-shrink: 0;
}
.ws-art-badge--loaded {
  background: #22c55e;
}
.ws-art-badge--empty {
  background: #9ca3af;
}
.ws-art-badge--locked {
  background: transparent;
}

/* Content panel border — completes the tab box */
.ws-art-tab-bar + .ws-tab-content {
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 20px;
  background: var(--bg-primary, #fff);
}

/* Recent Downloads (ZL-LNYC-225) */
.ws-art-recent-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 8px 0;
  user-select: none;
}
.ws-art-recent-summary::-webkit-details-marker {
  margin-right: 6px;
}
.ws-art-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.ws-art-recent-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-art-recent-scope {
  color: var(--text-muted);
  flex-shrink: 0;
}
.ws-art-recent-date {
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Responsive: smaller tabs on mobile */
@media (max-width: 768px) {
  .ws-art-tab-bar .ws-tab {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* ---- Artifact Empty States (ZL-LNYC-224) ---- */
.ws-art-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  padding: 32px 24px;
  border-radius: 8px;
  background: var(--bg-secondary, #f9fafb);
}
.ws-art-empty-state.ws-empty-positive {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.ws-art-empty-state.ws-empty-neutral {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}
.ws-art-empty-icon {
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1;
}
.ws-art-empty-headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}
.ws-art-empty-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
}

/* ---- Loading Screen (UI-005) ---- */
.ws-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
}

.ws-loading-icon {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  animation: ws-pulse 1.5s ease-in-out infinite;
}

@keyframes ws-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

.ws-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- Empty State (UI-006) ---- */
.ws-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 40vh;
  padding: 48px 24px;
  gap: 12px;
}

.ws-empty-icon {
  font-size: 48px;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ws-empty-icon--error {
  color: var(--warning);
}

.ws-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.ws-empty-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 360px;
}

.ws-empty-state .ws-btn {
  margin-top: 8px;
}

/* ---- Responsive: Tablet (collapsed sidebar) ---- */
@media (max-width: 1024px) {
  .ws-layout {
    grid-template-columns: var(--sidebar-collapsed) 1fr;
  }
  .ws-sidebar { width: var(--sidebar-collapsed); }
  .ws-sidebar .brand-text,
  .ws-sidebar .nav-label,
  .ws-sidebar .ws-nav-section-label { display: none; }
  .ws-nav-item { justify-content: center; padding: 8px 0; }
  .ws-nav-item.active { border-left: none; }
  .ws-sidebar-brand { justify-content: center; padding: 0; }
  .ws-sidebar-footer .ws-nav-item { justify-content: center; }
}

/* ---- Responsive: Small tablet / large phone (hidden sidebar, hamburger) ---- */
@media (max-width: 768px) {
  .ws-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "content";
  }

  .ws-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    transition: left 0.25s ease-out;
    z-index: 30;
  }

  .ws-sidebar.open { left: 0; }

  .ws-sidebar .brand-text,
  .ws-sidebar .nav-label,
  .ws-sidebar .ws-nav-section-label { display: block; }
  .ws-nav-item { justify-content: flex-start; padding: 8px 12px; }
  .ws-nav-item.active { border-left: 2px solid var(--accent); }
  .ws-sidebar-brand { justify-content: flex-start; padding: 0 16px; }

  #ws-hamburger { display: block; }
}

/* ---- Scrollbar ---- */
.ws-content::-webkit-scrollbar,
.ws-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}
.ws-content::-webkit-scrollbar-thumb,
.ws-sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}
.ws-content::-webkit-scrollbar-track,
.ws-sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

/* ---- Parcel Table (ZL-LNYC-125) ---- */
.ws-parcel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ws-parcel-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.ws-filter-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid var(--border-default);
  border-radius: 9999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease-out;
  white-space: nowrap;
}

.ws-filter-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.ws-filter-btn--active {
  background: rgba(108, 99, 255, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.ws-parcel-bulk {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-parcel-bulk-count {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ws-btn--sm {
  height: 28px;
  font-size: 12px;
  padding: 0 12px;
}

.ws-parcel-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card);
}

.ws-parcel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ws-parcel-th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
}

.ws-parcel-th--sortable {
  cursor: pointer;
  transition: color 0.15s ease-out;
}

.ws-parcel-th--sortable:hover {
  color: var(--text-primary);
}

.ws-parcel-th--check {
  width: 36px;
  text-align: center;
}

.ws-sort-icon {
  color: var(--text-disabled);
  font-size: 12px;
}

.ws-sort-icon--active {
  color: var(--accent);
}

.ws-parcel-row {
  cursor: pointer;
  transition: background 0.15s ease-out;
}

.ws-parcel-row:hover {
  background: var(--bg-card-hover);
}

.ws-parcel-row:not(:last-child) .ws-parcel-td {
  border-bottom: 1px solid var(--border-subtle);
}

.ws-parcel-td {
  padding: 10px 12px;
  color: var(--text-primary);
  vertical-align: middle;
}

.ws-parcel-td--check {
  text-align: center;
  width: 36px;
}

.ws-parcel-td--id {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ws-parcel-td--source {
  color: var(--text-secondary);
  font-size: 12px;
}

.ws-parcel-td--date {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.ws-class-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* Parcel checkbox styling */
.ws-parcel-check,
#ws-select-all {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- Add Parcels Modal (ZL-LNYC-126) ---- */
.ws-ap-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  gap: 0;
}

.ws-ap-tab {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
  transition: color 0.15s ease-out, border-color 0.15s ease-out;
  white-space: nowrap;
}

.ws-ap-tab:hover { color: var(--text-primary); }
.ws-ap-tab--active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.ws-ap-textarea {
  min-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  line-height: 1.5;
  font-family: 'Inter', monospace;
  font-size: 13px;
}

/* Dropzone */
.ws-ap-dropzone {
  border: 2px dashed var(--border-default);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

.ws-ap-dropzone:hover,
.ws-ap-dropzone--active {
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.04);
}

.ws-ap-dropzone-icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.ws-ap-dropzone-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ws-ap-dropzone-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.ws-ap-file-label {
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}

.ws-ap-file-label:hover {
  text-decoration: underline;
}

/* CSV preview ids */
.ws-ap-csv-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.ws-ap-csv-id {
  font-size: 11px;
  font-family: monospace;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* Review list */
.ws-ap-review-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
}

.ws-ap-review-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.ws-ap-review-item:last-child {
  border-bottom: none;
}

.ws-ap-review-icon {
  flex-shrink: 0;
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.ws-ap-review-id {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.ws-ap-review-city {
  font-size: 11px;
  color: var(--text-muted);
}

.ws-ap-review-msg {
  margin-left: auto;
  font-size: 11px;
  flex-shrink: 0;
}

/* ---- Screening Workflow (ZL-LNYC-127) ---- */
.ws-screen-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-screen-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-screen-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ws-screen-status--completed {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.ws-screen-status--processing {
  background: rgba(108, 99, 255, 0.12);
  color: var(--accent);
  animation: ws-pulse 1.5s ease-in-out infinite;
}

.ws-screen-status--failed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.ws-screen-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-screen-progress .ws-progress-bar {
  flex: 1;
}

.ws-screen-counters {
  display: flex;
  gap: 16px;
}

.ws-screen-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 56px;
}

.ws-screen-counter-val {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ws-screen-counter-lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* Classification bar chart */
.ws-screen-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-elevated);
}

.ws-screen-bar-seg {
  transition: width 0.3s ease-out;
  min-width: 2px;
}

.ws-screen-bar-seg:first-child {
  border-radius: 6px 0 0 6px;
}

.ws-screen-bar-seg:last-child {
  border-radius: 0 6px 6px 0;
}

.ws-screen-bar-seg:only-child {
  border-radius: 6px;
}

/* ---- Reduced motion (UI-012) ---- */
/* ── Resolve Flow ──────────────────────────────────────────────── */
.ws-resolve-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.ws-resolve-info {
  flex: 1 1 auto;
  min-width: 120px;
}
.ws-resolve-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ws-btn-sm {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all 0.15s;
}
.ws-btn-sm:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.ws-btn-sm:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.ws-btn-go {
  border-color: rgba(34,197,94,0.3);
  color: #22c55e;
}
.ws-btn-go:hover {
  background: rgba(34,197,94,0.1);
  border-color: #22c55e;
}
.ws-btn-nogo {
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.ws-btn-nogo:hover {
  background: rgba(239,68,68,0.1);
  border-color: #ef4444;
}
.ws-resolve-reason {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.ws-resolve-select {
  flex: 0 1 200px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}
.ws-resolve-other {
  flex: 1 1 200px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}
.ws-resolve-other::placeholder {
  color: var(--text-muted);
}

/* ── Parcel Detail Panel (ZL-LNYC-129) ─────────────────────── */
.ws-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 40;
}
.ws-panel-overlay.visible { display: block; }

.ws-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-default);
  z-index: 45;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease-out;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}
.ws-panel-open { right: 0; }

.ws-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.ws-panel-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s ease-out;
}
.ws-panel-close:hover { color: var(--text-primary); }

.ws-panel-sections {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 16px;
}

.ws-panel-section {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.ws-panel-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-panel-section-title:hover {
  color: var(--text-secondary);
}

.ws-panel-section-title::after {
  content: '\25BC';
  font-size: 8px;
  color: var(--text-muted);
  transition: transform 200ms ease-out;
  display: inline-block;
  flex-shrink: 0;
  margin-left: 8px;
}

.ws-panel-section.ws-panel-section--collapsed .ws-panel-section-title::after {
  transform: rotate(-90deg);
}

.ws-panel-section.ws-panel-section--collapsed > *:not(.ws-panel-section-title) {
  display: none;
}

.ws-panel-field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  font-size: 12px;
}

.ws-panel-field-label {
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-right: 12px;
}

.ws-panel-field-value {
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
}

.ws-panel-footer {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .ws-panel { width: 100vw; right: -100vw; }
}

/* ── Settings Panel (ZL-LNYC-138) ──────────────────────────── */
.ws-settings-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.ws-settings-section:last-child { border-bottom: none; }

.ws-settings-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.ws-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.ws-settings-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
}

.ws-settings-danger {
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
  background: rgba(239, 68, 68, 0.04);
}

/* ── Workspace Switcher (ZL-LNYC-137) ─────────────────────── */
.ws-ws-switcher {
  position: relative;
  padding: 0 8px;
}

.ws-ws-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease-out;
}

.ws-ws-current:hover {
  border-color: var(--border-default);
}

.ws-ws-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.ws-ws-chevron {
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ws-ws-dropdown {
  position: absolute;
  top: 100%;
  left: 8px;
  right: 8px;
  margin-top: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 25;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.ws-ws-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease-out;
  cursor: pointer;
}

.ws-ws-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.ws-ws-item--active {
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent);
}

.ws-ws-create {
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 8px;
  color: var(--accent);
  font-weight: 500;
}

/* ── Workspace Badge on Project Cards (ZL-LNYC-153) ─────── */
.ws-workspace-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--tier-team);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 4px;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-project-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Workspace Filter Tabs (ZL-LNYC-153) ────────────────── */
.ws-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 0 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ws-filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out;
  font-family: inherit;
}

.ws-filter-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.ws-filter-tab--active {
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Share to Workspace Dropdown (ZL-LNYC-153) ──────────── */
.ws-share-wrap {
  position: relative;
  display: inline-block;
}

.ws-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease-out, border-color 0.15s ease-out;
}

.ws-share-btn:hover {
  background: var(--bg-card);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.ws-share-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 30;
  padding: 4px;
}

.ws-share-dropdown--open {
  display: block;
}

.ws-share-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease-out;
}

.ws-share-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.ws-share-item--active {
  background: rgba(108, 99, 255, 0.1);
  color: var(--accent);
}

.ws-share-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 8px;
}

/* ── Locked Section (ZL-LNYC-143) ─────────────────────────── */
.ws-locked-section {
  padding: 12px 0;
}

.ws-locked-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ws-locked-upgrade-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  display: block;
  margin-top: 4px;
}

.ws-locked-upgrade-link:hover {
  text-decoration: underline;
}

/* ---- Map Tab Toolbar (ZL-LNYC-131) ---- */
.ws-map-tab {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ws-map-filters {
  display: flex;
  gap: 6px;
}

.ws-map-layer-toggles {
  display: flex;
  gap: 12px;
}

.ws-map-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-map-toggle input { accent-color: var(--accent); }

.ws-map-address-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ws-map-address-bar .ws-input {
  flex: 1;
  max-width: 400px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.ws-map-address-bar .ws-input::placeholder {
  color: var(--text-tertiary);
}

.ws-map-address-status {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.ws-map-toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 10;
  white-space: nowrap;
}

/* ---- Map Explorer (ZL-LNYC-132) ---- */
.ws-map-explorer {
  display: flex;
  height: calc(100vh - var(--header-height) - 24px);
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.ws-map-explorer-map {
  flex: 0 0 60%;
  position: relative;
  min-height: 400px;
}

.ws-map-explorer-panel {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  overflow: hidden;
}

.ws-explorer-filters {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.ws-explorer-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.ws-explorer-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.ws-explorer-results-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ws-explorer-field {
  margin-bottom: 10px;
}

.ws-explorer-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.ws-explorer-input,
.ws-explorer-select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 200ms;
}

.ws-explorer-input:focus,
.ws-explorer-select:focus {
  border-color: var(--border-focus);
  outline: none;
}

.ws-explorer-input::placeholder { color: var(--text-muted); }

.ws-explorer-input--sm { width: auto; flex: 1; }

.ws-explorer-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-explorer-range-sep {
  color: var(--text-muted);
}

.ws-explorer-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-explorer-toggle-label input { accent-color: var(--accent); }

.ws-explorer-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-explorer-card {
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 200ms;
}

.ws-explorer-card:hover { border-color: var(--border-default); }

.ws-explorer-card-top { margin-bottom: 4px; }

.ws-explorer-card-addr {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.ws-explorer-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ws-explorer-card-stats {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.ws-explorer-flood-tag {
  color: var(--info);
  font-weight: 500;
}

.ws-explorer-card-add {
  margin-top: 8px;
}

.ws-explorer-card-add .ws-explorer-select {
  font-size: 11px;
  padding: 4px 8px;
}

/* ---- Artifact Viewer (ZL-LNYC-134) ---- */
.ws-art-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.ws-art-viewer-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-art-viewer-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.ws-art-viewer-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ws-art-viewer-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ws-art-viewer-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-art-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 200ms;
}

.ws-art-card:hover { border-color: var(--border-default); }

.ws-art-card--locked { opacity: 0.85; }

.ws-art-card-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.ws-art-card-header:hover { background: var(--bg-card-hover); }

.ws-art-card-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.ws-art-card-lock {
  font-size: 12px;
}

.ws-art-card-chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 200ms ease-out;
  display: inline-block;
}

.ws-art-card-chevron.ws-art-card-chevron--collapsed {
  transform: rotate(-90deg);
}

.ws-art-card-body {
  padding: 0 16px 16px;
}

.ws-art-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-art-field {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.ws-art-field:last-child { border-bottom: none; }

.ws-art-field--locked { opacity: 0.6; }

.ws-art-field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 140px;
  flex-shrink: 0;
}

.ws-art-field-value {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-word;
}

.ws-art-field-nested {
  font-size: 13px;
  color: var(--text-primary);
}

.ws-art-subfield {
  padding: 2px 0;
}

.ws-art-subfield-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.ws-art-field-lock {
  font-size: 11px;
  flex-shrink: 0;
}

.ws-art-blur {
  filter: blur(4px);
  user-select: none;
}

.ws-art-list {
  list-style: disc;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-primary);
}

.ws-art-list li { padding: 2px 0; }

.ws-art-locked-content {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.ws-art-locked-blur {
  filter: blur(5px);
  user-select: none;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  padding: 8px 0;
}

.ws-art-locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 17, 23, 0.7);
  font-size: 13px;
  color: var(--text-secondary);
}

.ws-art-unlock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 12px;
  margin-top: 8px;
  color: var(--text-primary);
}

/* ---- Responsive: Map Explorer stacks on mobile ---- */
@media (max-width: 768px) {
  .ws-map-explorer {
    flex-direction: column;
    height: auto;
  }
  .ws-map-explorer-map {
    flex: none;
    height: 300px;
  }
  .ws-map-explorer-panel {
    flex: none;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    max-height: 50vh;
  }
  .ws-art-viewer-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ws-map-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Decision Gates Bar (ZL-LNYC-162) ---- */
.ws-gates-bar { display:flex; align-items:center; padding:8px 0 12px; gap:0; }
.ws-gate-node { display:flex; flex-direction:column; align-items:center; cursor:pointer; position:relative; z-index:1; min-width:60px; }
.ws-gate-node--locked { opacity:0.4; cursor:default; }
.ws-gate-dot { width:24px; height:24px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; border:2px solid var(--border-default); background:var(--bg-surface); color:var(--text-muted); transition:all 0.2s; }
.ws-gate-node--complete .ws-gate-dot { background:var(--success); border-color:var(--success); color:#fff; }
.ws-gate-node--current .ws-gate-dot { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:var(--accent-glow); }
.ws-gate-node--locked .ws-gate-dot { background:var(--bg-elevated); border-color:var(--border-subtle); }
.ws-gate-label { font-size:10px; color:var(--text-muted); margin-top:4px; white-space:nowrap; }
.ws-gate-node--current .ws-gate-label { color:var(--accent); font-weight:600; }
.ws-gate-node--complete .ws-gate-label { color:var(--success); }
.ws-gate-line { flex:1; height:2px; background:var(--border-default); min-width:20px; margin-top:-12px; }
.ws-gate-line--done { background:var(--success); }

@media (max-width: 600px) {
  .ws-gate-label { display:none; }
}

/* Export Dropdown */
.ws-export-wrap { position:relative; margin-left:auto; }
.ws-export-btn { display:flex; align-items:center; gap:6px; padding:6px 14px; border-radius:8px; background:var(--bg-elevated); border:1px solid var(--border-default); color:var(--text-secondary); font-size:12px; cursor:pointer; transition:all 0.15s; }
.ws-export-btn:hover { background:var(--bg-card-hover); color:var(--text-primary); border-color:var(--border-strong); }
.ws-export-btn:disabled { opacity:0.4; cursor:not-allowed; }
.ws-export-btn:disabled:hover { background:var(--bg-elevated); color:var(--text-secondary); }
.ws-export-dropdown { position:absolute; top:100%; right:0; margin-top:4px; background:var(--bg-elevated); border:1px solid var(--border-default); border-radius:8px; min-width:200px; z-index:100; display:none; box-shadow:0 8px 24px rgba(0,0,0,0.3); }
.ws-export-dropdown--open { display:block; }
.ws-export-item { display:flex; align-items:center; gap:8px; padding:10px 14px; font-size:12px; color:var(--text-primary); cursor:pointer; transition:background 0.1s; border:none; background:none; width:100%; text-align:left; }
.ws-export-item:hover { background:var(--bg-card-hover); }
.ws-export-item:first-child { border-radius:8px 8px 0 0; }
.ws-export-item:last-child { border-radius:0 0 8px 8px; }
.ws-export-item--locked { color:var(--text-muted); }
.ws-export-item--locked:hover { background:var(--bg-card-hover); }
.ws-export-sep { height:1px; background:var(--border-subtle); margin:0; }

/* ---- Download Hub (ZL-LNYC-240) ---- */
.ws-download-hub { background:var(--bg-card); border:1px solid var(--border-default); border-radius:12px; padding:20px 24px; margin:16px 0; }
.ws-download-hub-title { font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:6px; }
.ws-download-hub-desc { font-size:12px; color:var(--text-muted); margin-bottom:16px; }
.ws-download-hub-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:10px; }
.ws-download-hub-loading { grid-column:1/-1; text-align:center; color:var(--text-muted); font-size:12px; padding:16px 0; }
.ws-download-hub-empty { grid-column:1/-1; text-align:center; color:var(--text-muted); font-size:12px; padding:8px 0; }
.ws-download-card { display:flex; flex-direction:column; align-items:center; gap:4px; padding:14px 10px; background:var(--bg-elevated); border:1px solid var(--border-default); border-radius:10px; cursor:pointer; transition:all 0.15s; text-align:center; }
.ws-download-card:hover { background:var(--bg-card-hover); border-color:var(--accent); transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,0.15); }
.ws-download-card--locked { opacity:0.5; cursor:not-allowed; }
.ws-download-card--locked:hover { transform:none; box-shadow:none; border-color:var(--border-default); background:var(--bg-elevated); }
.ws-download-card-icon { font-size:20px; line-height:1; }
.ws-download-card-label { font-size:11px; font-weight:600; color:var(--text-primary); }
.ws-download-card-ext { font-size:10px; color:var(--text-muted); font-family:monospace; }
.ws-download-card-size { font-size:10px; color:var(--text-muted); }
.ws-download-card-tier { font-size:10px; color:var(--accent); background:rgba(108,99,255,0.12); padding:2px 6px; border-radius:4px; margin-top:2px; }

/* ---- Sidebar Search (ZL-LNYC-166) ---- */
.ws-search-section { padding:8px 12px !important; }
.ws-search-wrap { position:relative; }
.ws-search-input { width:100%; padding:8px 12px; background:var(--bg-input); border:1px solid var(--border-subtle); border-radius:8px; color:var(--text-primary); font-size:12px; outline:none; transition:border-color 0.15s; box-sizing:border-box; }
.ws-search-input:focus { border-color:var(--accent); box-shadow:0 0 0 2px rgba(108,99,255,0.15); }
.ws-search-input::placeholder { color:var(--text-muted); }
.ws-search-results { position:absolute; top:100%; left:0; right:0; margin-top:4px; background:var(--bg-elevated); border:1px solid var(--border-default); border-radius:8px; max-height:280px; overflow-y:auto; z-index:200; box-shadow:0 8px 24px rgba(0,0,0,0.3); }
.ws-search-result { display:flex; flex-direction:column; padding:10px 12px; cursor:pointer; transition:background 0.1s; border-bottom:1px solid var(--border-subtle); }
.ws-search-result:last-child { border-bottom:none; }
.ws-search-result:hover, .ws-search-result--active { background:var(--bg-card-hover); }
.ws-search-result-addr { font-size:12px; color:var(--text-primary); font-weight:500; }
.ws-search-result-meta { display:flex; gap:8px; font-size:10px; color:var(--text-muted); margin-top:2px; }
.ws-search-result-add { font-size:10px; color:var(--accent); margin-top:4px; cursor:pointer; }
.ws-search-result-add:hover { text-decoration:underline; }
.ws-search-loading { padding:12px; text-align:center; font-size:11px; color:var(--text-muted); }
.ws-search-empty { padding:12px; text-align:center; font-size:11px; color:var(--text-muted); }
.ws-sidebar--collapsed .ws-search-section { display:none; }

/* Map layer toggle checkboxes (ZL-LNYC-165) */
.ws-map-toggle input[type="checkbox"] { accent-color: var(--accent); }
.ws-map-toggle { display:flex; align-items:center; gap:4px; font-size:12px; color:var(--text-secondary); cursor:pointer; }

/* ---- Report Template Engine (ZL-LNYC-156) ---- */
.rpt-header { background:linear-gradient(135deg, #3B82F6 0%, #6366F1 100%); padding:28px 28px 20px; border-radius:12px 12px 0 0; }
.rpt-header-top { margin-bottom:12px; }
.rpt-header-brand { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.06em; opacity:0.7; color:#fff; }
.rpt-header-title { font-size:22px; font-weight:700; color:#fff; margin-bottom:4px; }
.rpt-header-sub { font-size:13px; color:rgba(255,255,255,0.7); }
.rpt-class-banner { display:flex; justify-content:space-between; align-items:center; padding:14px 28px; background:var(--bg-elevated); border-bottom:1px solid var(--border-subtle); }
.rpt-class-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); }
.rpt-class-value { font-size:16px; font-weight:700; margin-top:2px; display:flex; align-items:center; gap:8px; }
.rpt-class-right { text-align:right; }
.rpt-badge { display:inline-block; padding:2px 10px; border-radius:4px; font-size:11px; font-weight:700; color:#fff; letter-spacing:0.04em; vertical-align:middle; }
.rpt-section { padding:20px 28px; border-bottom:1px solid var(--border-subtle); }
.rpt-section-title { font-size:14px; font-weight:700; color:var(--text-primary); margin-bottom:12px; cursor:pointer; user-select:none; display:flex; align-items:center; justify-content:space-between; }
.rpt-section-title:hover { color:var(--accent); }
.rpt-section-title::after { content:'\25BC'; font-size:10px; color:var(--text-muted); transition:transform 200ms ease-out; display:inline-block; flex-shrink:0; margin-left:8px; }
.rpt-section.rpt-section--collapsed .rpt-section-title::after { transform:rotate(-90deg); }
.rpt-section.rpt-section--collapsed > *:not(.rpt-section-title) { display:none; }
.rpt-lite-locked .rpt-section-title,
.rpt-lite-cta-section .rpt-section-title,
.rpt-memo-disclaimer .rpt-section-title,
.rpt-memo-signature .rpt-section-title,
.rpt-bundle-actions .rpt-section-title { cursor:default; }
.rpt-lite-locked .rpt-section-title::after,
.rpt-lite-cta-section .rpt-section-title::after,
.rpt-memo-disclaimer .rpt-section-title::after,
.rpt-memo-signature .rpt-section-title::after,
.rpt-bundle-actions .rpt-section-title::after { display:none; }
.rpt-lite-locked .rpt-section-title:hover,
.rpt-lite-cta-section .rpt-section-title:hover,
.rpt-memo-disclaimer .rpt-section-title:hover,
.rpt-memo-signature .rpt-section-title:hover,
.rpt-bundle-actions .rpt-section-title:hover { color:var(--text-primary); }
.rpt-stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:10px; }
.rpt-stat-card { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:10px; padding:14px; text-align:center; }
.rpt-stat-label { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; color:var(--accent); margin-bottom:6px; }
.rpt-stat-value { font-size:20px; font-weight:700; color:var(--text-primary); }
.rpt-info-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:10px; }
.rpt-info-cell { }
.rpt-info-label { font-size:11px; color:var(--text-muted); }
.rpt-info-value { font-size:13px; font-weight:600; color:var(--text-primary); margin-top:2px; }
.rpt-constraint-list { display:flex; flex-direction:column; gap:8px; }
.rpt-constraint-row { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--text-secondary); }
.rpt-constraint-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.rpt-constraint-text { line-height:1.4; }
.rpt-risk-list { display:flex; flex-direction:column; gap:10px; }
.rpt-risk-item { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:8px; padding:12px 16px; }
.rpt-risk-head { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.rpt-risk-chip { display:inline-block; padding:2px 8px; border-radius:4px; font-size:10px; font-weight:700; color:#fff; letter-spacing:0.04em; }
.rpt-risk-category { font-size:13px; font-weight:600; color:var(--text-primary); }
.rpt-risk-desc { font-size:12px; color:var(--text-secondary); line-height:1.5; }
.rpt-footer { padding:20px 28px; background:var(--bg-surface); border-radius:0 0 12px 12px; }
.rpt-footer p { font-size:11px; color:var(--text-muted); line-height:1.5; }
.rpt-footer-meta { font-size:10px; color:var(--text-disabled); margin-top:8px; }

/* ── Header color variants (ZL-LNYC-157) ───────────────────────────── */
.rpt-header--indigo { background:linear-gradient(135deg, #6366F1 0%, #7C3AED 100%); }
.rpt-header--green { background:linear-gradient(135deg, #059669 0%, #065F46 100%); }
.rpt-header--red { background:linear-gradient(135deg, #EF4444 0%, #BE123C 100%); }

/* ── FAR utilization bar (buildable_envelope) ───────────────────────── */
.rpt-far-labels { display:flex; justify-content:space-between; font-size:12px; color:var(--text-secondary); margin-bottom:6px; }
.rpt-far-bar { position:relative; width:100%; height:24px; background:var(--bg-card); border-radius:12px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-far-fill { height:100%; background:linear-gradient(90deg, #6366F1, #818CF8); border-radius:12px 0 0 12px; }
.rpt-far-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.3); }

/* ── Table helpers (buildable_envelope) ─────────────────────────────── */
.rpt-table-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.rpt-table { width:100%; font-size:13px; border-collapse:collapse; }
.rpt-table td { padding:8px 0; border-bottom:1px solid var(--border-subtle); }
.rpt-table td:first-child { color:var(--text-secondary); }
.rpt-table td:last-child { font-weight:600; color:var(--text-primary); text-align:right; }
.rpt-table--full { width:100%; }
.rpt-table--full th { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-muted); padding:8px 12px; text-align:left; background:var(--bg-card); }
.rpt-table--full th:first-child { border-radius:8px 0 0 0; }
.rpt-table--full th:last-child { border-radius:0 8px 0 0; }
.rpt-table--full td { padding:8px 12px; border-bottom:1px solid var(--border-subtle); font-size:13px; color:var(--text-primary); }
.rpt-row-highlight { background:rgba(99,102,241,0.08); }
.rpt-note { font-size:11px; color:var(--text-muted); margin-top:8px; }

/* ── Checklist styles (checklist) ───────────────────────────────────── */
.rpt-checklist-progress-header { display:flex; justify-content:space-between; align-items:center; font-size:13px; font-weight:600; color:var(--text-primary); margin-bottom:6px; }
.rpt-checklist-pct { color:#10B981; }
.rpt-progress-track { width:100%; height:16px; background:var(--bg-card); border-radius:8px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-progress-fill { height:100%; border-radius:8px 0 0 8px; transition:width 0.3s ease; }
.rpt-progress-fill--green { background:#10B981; }
.rpt-checklist-progress-footer { display:flex; justify-content:space-between; font-size:11px; color:var(--text-muted); margin-top:4px; }
.rpt-checklist-list { display:flex; flex-direction:column; gap:8px; }
.rpt-checklist-item { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; border-radius:8px; }
.rpt-checklist-item--pass { background:rgba(16,185,129,0.08); }
.rpt-checklist-item--warn { background:rgba(245,158,11,0.08); border:1px solid rgba(245,158,11,0.2); }
.rpt-checklist-item--manual { background:rgba(245,158,11,0.06); border:1px solid rgba(245,158,11,0.15); }
.rpt-checklist-icon { font-size:16px; flex-shrink:0; margin-top:1px; }
.rpt-checklist-item-title { font-size:13px; font-weight:600; color:var(--text-primary); }
.rpt-checklist-item-detail { font-size:12px; color:var(--text-secondary); margin-top:2px; line-height:1.4; }

/* ── Elimination & Scenario template styles (ZL-LNYC-159) ──────────── */

/* Header color variants */
.rpt-header--elim { background:linear-gradient(135deg, #EF4444 0%, #BE123C 100%); }
.rpt-header--scenario { background:linear-gradient(135deg, #0D9488 0%, #155E75 100%); }

/* Summary bar (project-level reports) */
.rpt-summary-bar { padding:14px 28px; border-bottom:1px solid var(--border-subtle); }
.rpt-summary-bar--elim { background:rgba(239,68,68,0.06); }
.rpt-summary-bar--scenario { background:rgba(13,148,136,0.06); }

/* Screening funnel (elimination) */
.rpt-funnel { display:flex; flex-direction:column; gap:6px; }
.rpt-funnel-row { display:flex; align-items:center; gap:10px; }
.rpt-funnel-bar { border-radius:8px; height:36px; display:flex; align-items:center; padding:0 14px; min-width:60px; transition:width 0.3s ease; }
.rpt-funnel-label { font-size:12px; font-weight:700; white-space:nowrap; }
.rpt-funnel-lost { font-size:11px; color:var(--text-muted); white-space:nowrap; }

/* Category dot (rejection table) */
.rpt-cat-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:8px; vertical-align:middle; }
.rpt-td-bold { font-weight:700; }
.rpt-td-muted { color:var(--text-secondary); }

/* Reason cards (elimination) */
.rpt-reason-cards { display:flex; flex-direction:column; gap:10px; }
.rpt-reason-card { border:1px solid; border-radius:10px; padding:14px 16px; }
.rpt-reason-header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; flex-wrap:wrap; }
.rpt-reason-title { font-size:13px; font-weight:700; color:var(--text-primary); }
.rpt-reason-badge { font-size:10px; font-weight:700; padding:2px 8px; border-radius:4px; white-space:nowrap; letter-spacing:0.03em; }
.rpt-reason-detail { font-size:12px; color:var(--text-secondary); line-height:1.5; }
.rpt-reason-blocks { font-size:11px; color:var(--text-muted); margin-top:6px; }

/* Insights list (elimination) */
.rpt-insights-list { display:flex; flex-direction:column; gap:10px; }
.rpt-insight-row { display:flex; align-items:flex-start; gap:10px; font-size:13px; color:var(--text-secondary); line-height:1.5; }
.rpt-insight-num { color:#3B82F6; font-weight:700; flex-shrink:0; margin-top:1px; }
.rpt-insight-text { flex:1; }

/* Empty state */
.rpt-empty { font-size:13px; color:var(--text-muted); font-style:italic; padding:12px 0; }

/* Table wrap (scenario — horizontal scroll for wide tables) */
.rpt-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }

/* Table row variants (scenario) */
.rpt-row-go { background:rgba(16,185,129,0.06); }
.rpt-td-rank { font-weight:700; color:#0D9488; }
.rpt-tr-more td { color:var(--text-muted); font-style:italic; padding:10px 12px; }

/* Classification grid (scenario) */
.rpt-class-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; }
.rpt-class-box { border:1px solid; border-radius:10px; padding:18px 14px; text-align:center; }
.rpt-class-box-count { font-size:28px; font-weight:800; }
.rpt-class-box-label { font-size:13px; font-weight:700; margin-top:4px; }
.rpt-class-box-detail { font-size:11px; color:var(--text-muted); margin-top:6px; }

/* Zoning distribution bars (scenario) */
.rpt-zoning-bars { display:flex; flex-direction:column; gap:12px; }
.rpt-zoning-row { }
.rpt-zoning-meta { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.rpt-zoning-district { font-size:13px; font-weight:700; color:var(--text-primary); }
.rpt-zoning-detail { font-size:12px; color:var(--text-muted); }
.rpt-zoning-track { width:100%; height:12px; background:var(--bg-card); border-radius:6px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-zoning-fill { height:100%; background:#0D9488; border-radius:6px 0 0 6px; transition:width 0.3s ease; }

/* ── Pack/Advanced report styles (ZL-LNYC-160) ─────────────────────── */

/* Pack upsell CTA */
.rpt-pack-cta { text-align:center; padding:32px 24px; background:var(--bg-card); border:1px dashed var(--border-strong); border-radius:10px; }
.rpt-pack-cta strong { display:block; font-size:15px; color:var(--text-primary); margin-bottom:6px; }
.rpt-pack-cta p { font-size:13px; color:var(--text-secondary); margin:0; }

/* Gauge bar (horizontal score bar) */
.rpt-gauge { position:relative; width:100%; height:28px; background:var(--bg-card); border-radius:14px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-gauge-fill { height:100%; border-radius:14px 0 0 14px; transition:width 0.3s ease; }
.rpt-gauge-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,0.4); }

/* Horizontal bar rows (confidence contributions, permit trends, scoring) */
.rpt-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.rpt-bar-label { font-size:12px; color:var(--text-secondary); min-width:100px; flex-shrink:0; }
.rpt-bar-track { flex:1; height:14px; background:var(--bg-card); border-radius:7px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-bar-fill { height:100%; border-radius:7px 0 0 7px; transition:width 0.3s ease; }
.rpt-bar-value { font-size:12px; font-weight:700; color:var(--text-primary); min-width:36px; text-align:right; }
.rpt-bar-sm { height:10px; border-radius:5px; }
.rpt-bar-sm .rpt-bar-fill { border-radius:5px 0 0 5px; }

/* Stacked bar segments (permit trends) */
.rpt-bar-stack { flex:1; display:flex; height:18px; border-radius:4px; overflow:hidden; background:var(--bg-card); border:1px solid var(--border-subtle); }
.rpt-bar-seg { height:100%; transition:width 0.3s ease; }

/* Permit trend legend */
.rpt-permit-legend { font-size:11px; color:var(--text-secondary); margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.rpt-leg { display:inline-block; width:10px; height:10px; border-radius:2px; }

/* Stat card sub-line (typology percentages) */
.rpt-stat-sub { font-size:11px; color:var(--text-muted); margin-top:2px; }

/* Citation text */
.rpt-citation { font-size:11px; color:var(--text-muted); font-style:italic; }

/* Conflict callout (zoning interpretation) */
.rpt-conflict-callout { margin-top:6px; padding:6px 10px; background:rgba(239,68,68,0.08); border:1px solid rgba(239,68,68,0.2); border-radius:6px; font-size:12px; color:var(--text-secondary); }

/* Acquisition screening dimension breakdown */
.rpt-dims-cell { padding:4px 12px 12px !important; border-bottom:1px solid var(--border-subtle); }
.rpt-dims-bar { display:flex; flex-wrap:wrap; gap:8px; }
.rpt-dim-seg { display:flex; align-items:center; gap:6px; min-width:140px; flex:1; }
.rpt-dim-name { font-size:11px; color:var(--text-muted); min-width:60px; }

/* ── Decision Memo, Constraint Risk, Decision Packet (ZL-LNYC-158) ─── */

/* Header gradient variants */
.rpt-header--memo { background:linear-gradient(135deg, #F59E0B 0%, #EA580C 100%); }
.rpt-header--risk { background:linear-gradient(135deg, #F97316 0%, #EF4444 100%); }
.rpt-header--packet { background:linear-gradient(135deg, #334155 0%, #1E293B 100%); }

/* Recommendation banner (memo) */
.rpt-memo-rec { display:flex; align-items:center; gap:16px; padding:16px 28px; border-bottom:1px solid var(--border-subtle); }
.rpt-memo-rec-icon { width:48px; height:48px; border-radius:50%; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.rpt-memo-rec-body { flex:1; }
.rpt-memo-rec-text { font-size:18px; font-weight:700; margin-top:2px; }
.rpt-memo-rec-meta { font-size:12px; color:var(--text-secondary); margin-top:4px; }

/* Sub-headings for strengths/risks */
.rpt-sub-heading { font-size:13px; font-weight:700; color:var(--text-secondary); margin:14px 0 8px; text-transform:uppercase; letter-spacing:0.04em; }
.rpt-sub-heading--green { color:#10B981; }
.rpt-sub-heading--amber { color:#F59E0B; }

/* Strength reason list */
.rpt-reason-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; }
.rpt-reason-item { display:flex; align-items:flex-start; gap:8px; font-size:13px; color:var(--text-secondary); line-height:1.5; }
.rpt-reason-plus { color:#10B981; font-weight:700; flex-shrink:0; margin-top:1px; }
.rpt-reason-conf { font-size:11px; color:var(--text-muted); }

/* Next steps numbered list */
.rpt-next-steps { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.rpt-next-step-item { display:flex; align-items:center; gap:12px; font-size:13px; color:var(--text-secondary); }
.rpt-step-num { width:24px; height:24px; background:rgba(99,102,241,0.12); color:var(--accent); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; flex-shrink:0; }

/* Composite risk score bar */
.rpt-score-bar-wrap { margin-top:4px; }
.rpt-score-bar-track { width:100%; height:20px; background:var(--bg-card); border-radius:10px; overflow:hidden; border:1px solid var(--border-subtle); }
.rpt-score-bar-fill { height:100%; border-radius:10px 0 0 10px; transition:width 0.3s ease; }
.rpt-score-bar-labels { display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.rpt-score-bar-value { font-size:16px; font-weight:700; }
.rpt-score-bar-penalty { font-size:12px; color:var(--text-muted); }

/* Table of contents (decision packet) */
.rpt-toc { padding:16px 28px; background:var(--bg-elevated); border-bottom:1px solid var(--border-subtle); }
.rpt-toc-title { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(--text-muted); margin-bottom:8px; }
.rpt-toc-list { list-style:none; padding:0; margin:0; display:flex; flex-wrap:wrap; gap:6px 16px; counter-reset:toc; }
.rpt-toc-list li { counter-increment:toc; }
.rpt-toc-link { font-size:13px; color:var(--accent); text-decoration:none; font-weight:500; }
.rpt-toc-link:hover { text-decoration:underline; }
.rpt-toc-link::before { content:counter(toc) ". "; color:var(--text-muted); }

/* ── Feasibility Snapshot Lite (ZL-LNYC-161) ─────────────────────────── */
.rpt-lite-badge { display:inline-block; padding:3px 10px; border-radius:4px; font-size:10px; font-weight:800; color:#fff; background:rgba(255,255,255,0.25); letter-spacing:0.08em; vertical-align:middle; margin-left:8px; }
.rpt-lite-locked { position:relative; overflow:hidden; }
.rpt-lite-blur-wrap { position:relative; }
.rpt-lite-blur-content { filter:blur(6px); -webkit-filter:blur(6px); user-select:none; pointer-events:none; font-size:13px; color:var(--text-secondary); line-height:1.8; }
.rpt-lite-lock-overlay { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.rpt-lite-lock-icon { font-size:20px; }
.rpt-lite-lock-text { font-size:11px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.04em; }
.rpt-lite-cta-section { text-align:center; padding:32px 28px; }
.rpt-lite-cta-btn { display:inline-block; padding:14px 40px; background:linear-gradient(135deg, #6366F1 0%, #3B82F6 100%); color:#fff; font-size:16px; font-weight:700; border-radius:10px; text-decoration:none; letter-spacing:0.02em; box-shadow:0 4px 20px rgba(99,102,241,0.35); transition:transform 0.15s ease, box-shadow 0.15s ease; }
.rpt-lite-cta-btn:hover { transform:translateY(-1px); box-shadow:0 6px 28px rgba(99,102,241,0.5); }
.rpt-lite-cta-sub { font-size:13px; color:var(--text-secondary); margin-top:12px; }

/* ── Zoning Memo (ZL-LNYC-161) ───────────────────────────────────────── */
.rpt-memo-header { padding:28px 28px 20px; background:var(--bg-elevated); border-bottom:2px solid var(--border-strong); border-radius:12px 12px 0 0; }
.rpt-memo-header-brand { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--accent); margin-bottom:12px; }
.rpt-memo-header-title { font-size:24px; font-weight:800; color:var(--text-primary); letter-spacing:0.04em; margin-bottom:14px; text-align:center; }
.rpt-memo-header-meta { font-size:13px; color:var(--text-secondary); line-height:1.8; }
.rpt-memo-header-meta strong { color:var(--text-primary); }
.rpt-memo-list { list-style:disc; padding-left:20px; margin:0; display:flex; flex-direction:column; gap:4px; font-size:13px; color:var(--text-secondary); line-height:1.5; }
.rpt-memo-findings { display:flex; flex-direction:column; gap:10px; }
.rpt-memo-finding { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:8px; padding:12px 16px; }
.rpt-memo-finding-head { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
.rpt-memo-finding-num { font-size:13px; font-weight:700; color:var(--text-muted); font-family:'Courier New', monospace; }
.rpt-memo-disclaimer { background:var(--bg-surface); border-left:3px solid var(--warning); }
.rpt-memo-signature { padding:28px; }
.rpt-memo-sig-line { width:240px; border-bottom:1px solid var(--text-muted); margin-bottom:4px; }
.rpt-memo-sig-label { font-size:11px; color:var(--text-muted); }

/* ── Data Room Bundle (ZL-LNYC-161) ───────────────────────────────────── */
.rpt-header--bundle { background:linear-gradient(135deg, #334155 0%, #0F172A 100%); }
.rpt-bundle-stats { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; text-align:center; }
.rpt-bundle-stat-num { display:block; font-size:28px; font-weight:800; }
.rpt-bundle-stat-label { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; color:var(--text-muted); }
.rpt-bundle-list { display:flex; flex-direction:column; gap:8px; }
.rpt-bundle-item { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:8px; }
.rpt-bundle-item-info { display:flex; flex-direction:column; gap:2px; }
.rpt-bundle-item-title { font-size:13px; font-weight:600; color:var(--text-primary); }
.rpt-bundle-item-type { font-size:11px; color:var(--text-muted); }
.rpt-bundle-item-actions { display:flex; align-items:center; gap:8px; }
.rpt-bundle-btn { display:inline-block; padding:4px 12px; border-radius:6px; font-size:11px; font-weight:600; text-decoration:none; cursor:pointer; border:none; }
.rpt-bundle-btn--dl { background:#10B981; color:#fff; }
.rpt-bundle-btn--dl:hover { background:#059669; }
.rpt-bundle-lock { display:flex; align-items:center; gap:4px; font-size:12px; color:var(--text-muted); }
.rpt-bundle-lock-icon { font-size:14px; }
.rpt-bundle-lock-tier { font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.03em; }
.rpt-bundle-actions { display:flex; align-items:center; justify-content:center; gap:12px; padding:24px 28px; flex-wrap:wrap; }
.rpt-bundle-cta { display:inline-block; padding:12px 32px; background:linear-gradient(135deg, #3B82F6 0%, #6366F1 100%); color:#fff; font-size:14px; font-weight:700; border-radius:10px; border:none; cursor:pointer; text-decoration:none; letter-spacing:0.02em; box-shadow:0 4px 16px rgba(59,130,246,0.3); transition:transform 0.15s ease, box-shadow 0.15s ease; }
.rpt-bundle-cta:hover { transform:translateY(-1px); box-shadow:0 6px 24px rgba(59,130,246,0.45); }
.rpt-bundle-cta--secondary { background:var(--bg-card); color:var(--text-primary); border:1px solid var(--border-strong); box-shadow:none; }
.rpt-bundle-cta--secondary:hover { background:var(--bg-card-hover); box-shadow:none; transform:none; }

@media (max-width:600px) {
  .rpt-header { padding:20px 16px 14px; }
  .rpt-header-title { font-size:18px; }
  .rpt-section { padding:14px 16px; }
  .rpt-class-banner { padding:12px 16px; flex-direction:column; align-items:flex-start; gap:8px; }
  .rpt-stats-grid { grid-template-columns:repeat(2, 1fr); }
  .rpt-info-grid { grid-template-columns:1fr; }
  .rpt-table-grid { grid-template-columns:1fr; }
  .rpt-summary-bar { padding:12px 16px; }
  .rpt-class-grid { grid-template-columns:1fr; }
  .rpt-funnel-bar { height:30px; }
  .rpt-reason-header { flex-direction:column; align-items:flex-start; }
  .rpt-bar-label { min-width:70px; }
  .rpt-dims-bar { flex-direction:column; }
  .rpt-memo-rec { flex-direction:column; align-items:flex-start; padding:14px 16px; }
  .rpt-memo-rec-icon { width:36px; height:36px; }
  .rpt-memo-rec-text { font-size:15px; }
  .rpt-toc { padding:12px 16px; }
  .rpt-toc-list { flex-direction:column; }
  .rpt-bundle-stats { grid-template-columns:repeat(2, 1fr); }
  .rpt-bundle-actions { flex-direction:column; }
  .rpt-memo-sig-line { width:180px; }
  .rpt-lite-cta-btn { padding:12px 24px; font-size:14px; }
}

/* ================================================================
 *  DOCUMENTS TAB (ZL-LNYC-020-A)
 * ================================================================ */

/* Upload drop zone */
.ws-doc-upload-zone {
  border: 2px dashed var(--border-color, #2A2D3A);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.ws-doc-upload-zone:hover,
.ws-doc-upload-zone--dragover {
  border-color: var(--accent-blue, #3B82F6);
  background: rgba(59, 130, 246, 0.05);
}
.ws-doc-upload-icon { font-size: 36px; margin-bottom: 8px; }
.ws-doc-upload-text { color: var(--text-primary, #E4E6F0); font-size: 14px; margin: 0 0 4px; }
.ws-doc-upload-link { color: var(--accent-blue, #3B82F6); cursor: pointer; text-decoration: underline; }
.ws-doc-upload-hint { color: var(--text-muted, #8B8FA3); font-size: 12px; margin: 0; }

/* Upload form */
.ws-doc-upload-form {
  background: var(--card-bg, #1E2130);
  border: 1px solid var(--border-color, #2A2D3A);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.ws-doc-upload-file-info {
  font-size: 13px;
  color: var(--text-primary, #E4E6F0);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color, #2A2D3A);
}
.ws-doc-upload-fields { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.ws-doc-label { font-size: 12px; color: var(--text-muted, #8B8FA3); font-weight: 500; }
.ws-doc-select,
.ws-doc-input {
  background: var(--bg-primary, #13151F);
  border: 1px solid var(--border-color, #2A2D3A);
  color: var(--text-primary, #E4E6F0);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
}
.ws-doc-select:focus,
.ws-doc-input:focus { border-color: var(--accent-blue, #3B82F6); outline: none; }
.ws-doc-upload-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Toolbar & filters */
.ws-doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.ws-doc-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-doc-filter-btn {
  background: transparent;
  border: 1px solid var(--border-color, #2A2D3A);
  color: var(--text-secondary, #C0C3D1);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ws-doc-filter-btn:hover { border-color: var(--accent-blue, #3B82F6); }
.ws-doc-filter-btn--active {
  background: var(--accent-blue, #3B82F6);
  border-color: var(--accent-blue, #3B82F6);
  color: #fff;
}
.ws-doc-count { font-size: 12px; color: var(--text-muted, #8B8FA3); }

/* Document list */
.ws-doc-list { display: flex; flex-direction: column; gap: 4px; }
.ws-doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #2A2D3A);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ws-doc-item:hover { background: rgba(59, 130, 246, 0.04); border-color: var(--accent-blue, #3B82F6)33; }
.ws-doc-item--active { background: rgba(59, 130, 246, 0.08); border-color: var(--accent-blue, #3B82F6); }
.ws-doc-item-icon { font-size: 24px; flex-shrink: 0; }
.ws-doc-item-info { flex: 1; min-width: 0; }
.ws-doc-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #E4E6F0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-doc-item-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted, #8B8FA3);
  margin-top: 2px;
}
.ws-doc-type-badge {
  background: rgba(139, 92, 246, 0.12);
  color: #A78BFA;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}
.ws-doc-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ws-btn--xs {
  padding: 3px 8px;
  font-size: 12px;
  min-width: unset;
}

/* Preview area */
.ws-doc-preview {
  margin-top: 16px;
  border: 1px solid var(--border-color, #2A2D3A);
  border-radius: 8px;
  overflow: hidden;
}
.ws-doc-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--card-bg, #1E2130);
  font-size: 13px;
  color: var(--text-primary, #E4E6F0);
  border-bottom: 1px solid var(--border-color, #2A2D3A);
}
.ws-doc-preview-embed {
  width: 100%;
  height: 600px;
  border: none;
  background: var(--bg-primary, #13151F);
}
.ws-doc-preview-img {
  max-width: 100%;
  max-height: 600px;
  display: block;
  margin: 0 auto;
  padding: 16px;
  background: var(--bg-primary, #13151F);
}

/* Preview header actions */
.ws-doc-preview-actions { display: flex; gap: 6px; }

/* Extracted data panel (020-B) */
.ws-doc-extracted-panel {
  padding: 16px;
  background: var(--card-bg, #1E2130);
  border-top: 1px solid var(--border-color, #2A2D3A);
}
.ws-doc-extracted-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #E4E6F0);
  margin-bottom: 12px;
}
.ws-doc-extracted-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.ws-doc-field { padding: 6px 0; }
.ws-doc-field-label {
  font-size: 11px;
  color: var(--text-muted, #8B8FA3);
  text-transform: capitalize;
  margin-bottom: 2px;
}
.ws-doc-field-value {
  font-size: 13px;
  color: var(--text-primary, #E4E6F0);
  word-break: break-word;
  white-space: pre-wrap;
}
.ws-doc-conf {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 500;
  text-transform: uppercase;
  margin-left: 4px;
}
.ws-conf--high { background: rgba(34,197,94,0.15); color: #22c55e; }
.ws-conf--med { background: rgba(245,158,11,0.15); color: #f59e0b; }
.ws-conf--low { background: rgba(239,68,68,0.15); color: #ef4444; }
.ws-conf--user { background: rgba(59,130,246,0.15); color: #3B82F6; }
.ws-doc-extracted-status {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted, #8B8FA3);
  background: var(--card-bg, #1E2130);
  border-top: 1px solid var(--border-color, #2A2D3A);
}
.ws-doc-extracted-status--warn { color: #f59e0b; }

/* Cross-reference insights (020-C) */
.ws-doc-xref-actions { padding: 8px 16px; }
.ws-doc-insights {
  padding: 16px;
  border-top: 1px solid var(--border-color, #2A2D3A);
}
.ws-doc-insights-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #E4E6F0);
  margin-bottom: 12px;
}
.ws-finding {
  border: 1px solid var(--border-color, #2A2D3A);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12px;
}
.ws-finding--discrepancy { border-left: 3px solid #f59e0b; }
.ws-finding--risk { border-left: 3px solid #ef4444; }
.ws-finding--confirmation { border-left: 3px solid #22c55e; }
.ws-finding--critical .ws-finding-header { color: #ef4444; }
.ws-finding--high .ws-finding-header { color: #f59e0b; }
.ws-finding-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
}
.ws-finding-icon { font-size: 14px; }
.ws-finding-type { text-transform: uppercase; letter-spacing: 0.5px; }
.ws-finding-sig {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(139,143,163,0.12);
  color: var(--text-muted, #8B8FA3);
  font-weight: 500;
  text-transform: capitalize;
}
.ws-finding-field {
  font-weight: 500;
  color: var(--text-primary, #E4E6F0);
  text-transform: capitalize;
  margin-bottom: 4px;
}
.ws-finding-values {
  color: var(--text-secondary, #C0C3D1);
  font-size: 11px;
  margin-bottom: 4px;
}
.ws-finding-label { font-weight: 500; color: var(--text-muted, #8B8FA3); }
.ws-finding-rec {
  color: var(--text-secondary, #C0C3D1);
  font-size: 11px;
  line-height: 1.5;
  font-style: italic;
}

/* ================================================================
 *  WORKSPACE ELEVATION + GATED ACTIONS (ZL-LNYC-155)
 * ================================================================ */

/* Elevation badge — "Viewing via Workspace (Pro+)" */
.ws-elevation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(59, 130, 246, 0.1);
  color: #60A5FA;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  white-space: nowrap;
}

/* Gated action buttons — visible but disabled with lock */
.ws-btn--gated {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}
.ws-btn--gated:hover { opacity: 0.75; }

/* Upgrade modal overlay */
.ws-upgrade-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: ws-fade-in 0.15s ease;
}
@keyframes ws-fade-in { from { opacity: 0; } to { opacity: 1; } }

.ws-upgrade-card {
  background: var(--card-bg, #1E2130);
  border: 1px solid var(--border-color, #2A2D3A);
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
}
.ws-upgrade-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted, #8B8FA3);
  cursor: pointer;
}
.ws-upgrade-close:hover { color: var(--text-primary, #E4E6F0); }
.ws-upgrade-icon { font-size: 36px; margin-bottom: 12px; }
.ws-upgrade-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #E4E6F0);
  margin: 0 0 8px;
}
.ws-upgrade-context {
  font-size: 13px;
  color: #60A5FA;
  margin: 0 0 8px;
}
.ws-upgrade-desc {
  font-size: 14px;
  color: var(--text-secondary, #C0C3D1);
  margin: 0 0 20px;
  line-height: 1.5;
}
.ws-upgrade-cta {
  display: inline-block;
  padding: 10px 28px;
  font-size: 14px;
  text-decoration: none;
}

/* Light theme overrides */
html[data-theme="light"] .ws-doc-upload-zone { border-color: #D1D5DB; }
html[data-theme="light"] .ws-doc-upload-zone:hover,
html[data-theme="light"] .ws-doc-upload-zone--dragover { border-color: #3B82F6; background: rgba(59,130,246,0.04); }
html[data-theme="light"] .ws-doc-type-badge { background: rgba(139,92,246,0.08); color: #7C3AED; }
html[data-theme="light"] .ws-elevation-badge { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.15); color: #2563EB; }
html[data-theme="light"] .ws-upgrade-card { background: #fff; border-color: #E5E7EB; }
html[data-theme="light"] .ws-upgrade-overlay { background: rgba(0,0,0,0.4); }

/* ================================================================
 *  NOTIFICATION BELL + DROPDOWN (ZL-LNYC-181)
 * ================================================================ */

/* Bell button in sidebar header */
.ws-notif-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 4px 6px;
  margin-left: auto;
  border-radius: 6px;
  transition: background 0.15s;
}
.ws-notif-bell:hover { background: rgba(255,255,255,0.06); }
.ws-notif-bell-icon { font-size: 18px; line-height: 1; }

/* Unread badge */
.ws-notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #EF4444;
  border-radius: 8px;
}

/* Dropdown panel */
.ws-notif-dropdown {
  position: absolute;
  top: calc(var(--header-height, 48px) - 4px);
  right: 8px;
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-elevated, #1A1D2E);
  border: 1px solid var(--border-default, rgba(255,255,255,0.10));
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 1000;
  animation: ws-fade-in 0.12s ease;
}

/* Dropdown header */
.ws-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}
.ws-notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #F0F0F5);
}
.ws-notif-mark-all {
  background: none;
  border: none;
  color: var(--accent, #6C63FF);
  font-size: 12px;
  cursor: pointer;
  font-weight: 500;
}
.ws-notif-mark-all:hover { text-decoration: underline; }

/* Empty / loading states */
.ws-notif-empty,
.ws-notif-loading {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #5C5F73);
}

/* Notification list */
.ws-notif-list { padding: 4px 0; }

/* Individual notification item */
.ws-notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.ws-notif-item:hover { background: rgba(255,255,255,0.03); }
.ws-notif-item--unread { background: rgba(108,99,255,0.04); }
.ws-notif-item--unread:hover { background: rgba(108,99,255,0.08); }

/* Unread dot */
.ws-notif-item-dot {
  width: 8px;
  flex-shrink: 0;
  padding-top: 5px;
  font-size: 8px;
  color: var(--accent, #6C63FF);
}

/* Item content */
.ws-notif-item-content { flex: 1; min-width: 0; }
.ws-notif-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary, #F0F0F5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-notif-item-body {
  font-size: 12px;
  color: var(--text-secondary, #8B8FA3);
  margin-top: 2px;
}
.ws-notif-item-parcels {
  font-size: 11px;
  color: var(--text-muted, #5C5F73);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ws-notif-item-time {
  font-size: 11px;
  color: var(--text-muted, #5C5F73);
  margin-top: 3px;
}

/* Light theme overrides for notifications */
html[data-theme="light"] .ws-notif-dropdown { background: #fff; border-color: #E5E7EB; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
html[data-theme="light"] .ws-notif-item--unread { background: rgba(108,99,255,0.03); }
html[data-theme="light"] .ws-notif-item:hover { background: rgba(0,0,0,0.02); }

/* ── Prospecting Tool (ZL-LNYC-234) ── */
.ws-prospect-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ws-prospect-table th { padding: 6px 8px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.ws-prospect-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.ws-prospect-table tr:hover td { background: var(--bg-secondary); }
.ws-prospect-hint { border: 1px solid var(--border-subtle); }

/* ── Validate Tab Mobile (ZL-CENT-110) ──────────────────────────── */
@media (max-width: 768px) {
  /* Stat cards: stack vertically */
  [style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Validation table: horizontal scroll */
  .ws-parcel-table { font-size: 11px; }
  .ws-parcel-th, .ws-parcel-td { padding: 6px 8px; white-space: nowrap; }
  /* Decide section buttons: stack */
  .ws-decide-confirm, .ws-decide-downgrade { font-size: 10px !important; padding: 4px 8px !important; }
  /* Competitors + reforms: stack vertically */
  [style*="grid-template-columns: 1fr 1fr"][style*="padding: 0 20px"] {
    grid-template-columns: 1fr !important;
  }
}
