/**
 * @file lawyer-case-detail.css
 * Lawyer-role specific case detail view.
 * All classes prefixed lw- to avoid conflicts with existing theme CSS.
 * Applied only when body has class lawyer-view.
 */

/* ── Left panel layout ────────────────────────────────────────────────── */
.lw-body-wrap {
  display: flex;
}

.lw-left-panel {
  position: fixed;
  left: 0;
  top: var(--lw-navbar-height, 72px);
  bottom: 0;
  width: 248px;
  z-index: 998;
  overflow-y: auto;
  background: #162135;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: #2d4a6b transparent;
}

.lw-left-panel.lw-collapsed {
  width: 56px;
}

.lw-left-panel.lw-collapsed .lw-nav-section-label,
.lw-left-panel.lw-collapsed .lw-nav-item-label,
.lw-left-panel.lw-collapsed .lw-nav-badge,
.lw-left-panel.lw-collapsed .lw-nav-user-info {
  display: none;
}

.lw-left-panel.lw-collapsed .lw-nav-item {
  justify-content: center;
  padding: 10px 0;
}

.lw-left-panel.lw-collapsed .lw-nav-item i {
  margin: 0;
}

.lw-left-panel.lw-collapsed .lw-nav-user {
  justify-content: center;
}

.lw-main-content {
  margin-left: 248px;
  flex: 1;
  min-width: 0;
  transition: margin-left 0.25s ease;
}

body.lawyer-view .lw-main-content .action-bar {
  top: var(--lw-navbar-height, 72px);
}

/* collapsed state shifts content */
body.lawyer-view.lw-panel-collapsed .lw-main-content {
  margin-left: 56px;
}

/* ── Panel toggle ─────────────────────────────────────────────────────── */
.lw-panel-toggle {
  padding: 10px 12px;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lw-panel-toggle-btn {
  background: rgba(255,255,255,0.06);
  color: #64748b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}

.lw-panel-toggle-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #94a3b8;
}

/* ── Nav section ─────────────────────────────────────────────────────── */
.lw-nav {
  flex: 1;
  padding: 4px 0;
  overflow: hidden;
}

.lw-nav-section {
  padding: 4px 0;
}

.lw-nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a5568;
  padding: 8px 16px 4px;
  white-space: nowrap;
  overflow: hidden;
}

.lw-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: #8fa3be;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.lw-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #c8d8ec;
  text-decoration: none;
}

.lw-nav-item.lw-active {
  background: rgba(30,97,168,0.25);
  color: #93c5fd;
  border-left-color: #2e75b6;
}

.lw-nav-item i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  opacity: 0.8;
}

.lw-nav-item.lw-active i {
  opacity: 1;
}

.lw-nav-item-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lw-nav-badge {
  margin-left: auto;
  background: #2e75b6;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.lw-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 6px 12px;
}

/* ── Nav user block ───────────────────────────────────────────────────── */
.lw-nav-user {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lw-nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1e3a5f;
  border: 2px solid #2e75b6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #93c5fd;
  flex-shrink: 0;
}

.lw-nav-user-info .lw-nav-user-name {
  font-size: 0.82rem;
  color: #c8d8ec;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.lw-nav-user-info .lw-nav-user-role {
  font-size: 0.68rem;
  color: #4a5568;
}

/* ── Mobile panel overlay ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .lw-left-panel {
    transform: translateX(-100%);
  }
  .lw-left-panel.lw-panel-mobile-open {
    transform: translateX(0);
  }
  .lw-main-content {
    margin-left: 0 !important;
  }
  .lw-mobile-toggle {
    display: flex !important;
  }
}

.lw-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
  align-items: center;
  gap: 6px;
}

/* ── Action bar outcome pills ─────────────────────────────────────────── */
.lw-action-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lw-outcome-pill {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.lw-outcome-pill.lw-win {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.lw-outcome-pill.lw-loss {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.lw-outcome-pill.lw-partial {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.lw-outcome-pill.lw-interim {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.lw-outcome-pill.lw-final {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

/* ── Section badge (AI tag in section title) ──────────────────────────── */
.lw-section-badge {
  margin-left: auto;
  font-size: 0.68rem;
  background: #eff6ff;
  color: #1e40af;
  padding: 2px 9px;
  border-radius: 4px;
  font-weight: 700;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
}

/* ── AI Outcome panel ─────────────────────────────────────────────────── */
.lw-outcome-panel {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .lw-outcome-panel {
    grid-template-columns: 1fr;
  }
}

.lw-gauge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lw-gauge-score {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a6baa;
  line-height: 1;
}

.lw-gauge-label {
  font-size: 0.7rem;
  color: #6b7280;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lw-outcome-panel--no-gauge {
  grid-template-columns: 1fr;
}

.lw-outcome-stats {}

.lw-outcome-favor-label {
  font-size: 0.72rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  margin-bottom: 4px;
}

.lw-outcome-favor-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #059669;
  line-height: 1;
  font-family: Georgia, serif;
  margin-bottom: 4px;
}

.lw-outcome-favor-value.lw-defendant {
  color: #dc2626;
}

.lw-outcome-favor-value.lw-partial {
  color: #d97706;
}

.lw-outcome-favor-sub {
  font-size: 0.82rem;
  color: #6b7280;
}

.lw-conf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.lw-conf-label {
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lw-conf-val {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 700;
}

.lw-conf-track {
  height: 6px;
  background: #f0f2f7;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.lw-conf-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #d97706, #1a6baa);
  transition: width 0.6s ease;
}

.lw-outcome-extras {
  font-size: 0.72rem;
  color: #6b7280;
  margin-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Why Win / Why Loss ───────────────────────────────────────────────── */
.lw-split-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (max-width: 540px) {
  .lw-split-cards {
    grid-template-columns: 1fr;
  }
}

.lw-wl-card {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid;
}

.lw-wl-card.lw-win {
  background: #f0fdf4;
  border-color: #86efac;
}

.lw-wl-card.lw-loss {
  background: #fff1f2;
  border-color: #fca5a5;
}

.lw-wl-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.lw-wl-card.lw-win .lw-wl-label {
  color: #16a34a;
}

.lw-wl-card.lw-loss .lw-wl-label {
  color: #dc2626;
}

.lw-wl-text {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.6;
}

.lw-no-data {
  font-size: 0.8rem;
  color: #9ca3af;
  font-style: italic;
}

/* ── Legal sections ───────────────────────────────────────────────────── */
.lw-law-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.lw-law-tag {
  padding: 5px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1a6baa;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Case timeline ────────────────────────────────────────────────────── */
.lw-timeline {
  display: flex;
  flex-direction: column;
}

.lw-tl-item {
  display: grid;
  grid-template-columns: 90px 18px 1fr;
  gap: 0 12px;
}

.lw-tl-date {
  font-size: 0.72rem;
  color: #6b7280;
  text-align: right;
  padding-top: 3px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-variant-numeric: tabular-nums;
}

.lw-tl-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lw-tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: 2px solid #fff;
  margin-top: 3px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px #e5e7eb;
}

.lw-tl-item.lw-done .lw-tl-dot {
  background: #16a34a;
  box-shadow: 0 0 0 1px #86efac;
}

.lw-tl-item.lw-active .lw-tl-dot {
  background: #1a6baa;
  box-shadow: 0 0 0 3px rgba(26,107,170,0.2);
}

.lw-tl-line {
  width: 2px;
  background: #e5e7eb;
  flex: 1;
  min-height: 24px;
}

.lw-tl-item:last-child .lw-tl-line {
  display: none;
}

.lw-tl-content {
  padding-bottom: 18px;
}

.lw-tl-event {
  font-size: 0.87rem;
  color: #1e2a3a;
  font-weight: 500;
}

.lw-tl-detail {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

/* ── Judge intelligence sidebar card ──────────────────────────────────── */
.lw-judge-avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.lw-judge-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dbeafe;
  border: 2px solid #1a6baa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #1a6baa;
  font-family: Georgia, serif;
  flex-shrink: 0;
}

.lw-judge-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e2a3a;
}

.lw-judge-court {
  font-size: 0.72rem;
  color: #6b7280;
}

.lw-judge-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.lw-jstat {
  text-align: center;
  padding: 8px 4px;
  background: #f8faff;
  border-radius: 7px;
  border: 1px solid #e9ecf2;
}

.lw-jstat-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e2a3a;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.lw-jstat-lbl {
  font-size: 0.65rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.lw-tend-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.lw-tend-track {
  height: 8px;
  border-radius: 4px;
  background: #f0f2f7;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

.lw-tend-fill-p {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #16a34a;
  border-radius: 4px 0 0 4px;
}

.lw-tend-fill-d {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: #dc2626;
  border-radius: 0 4px 4px 0;
}

.lw-tend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
}

.lw-tend-p {
  color: #16a34a;
  font-weight: 600;
}

.lw-tend-d {
  color: #dc2626;
  font-weight: 600;
}

/* ── Similar cases (lawyer view) ──────────────────────────────────────── */
.lw-sim-item {
  padding: 10px 12px;
  background: #f8faff;
  border: 1px solid #e9ecf2;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  text-decoration: none;
  display: block;
}

.lw-sim-item:hover {
  border-color: #1a6baa;
  text-decoration: none;
}

.lw-sim-case-num {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: #1a6baa;
  font-weight: 600;
}

.lw-sim-title {
  font-size: 0.83rem;
  color: #1e2a3a;
  margin: 3px 0;
  line-height: 1.4;
}

.lw-sim-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lw-sim-match {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: #eff6ff;
  color: #1a6baa;
  border-radius: 4px;
  font-weight: 600;
}

.lw-sim-outcome-p {
  font-size: 0.75rem;
  color: #16a34a;
  font-weight: 600;
}

.lw-sim-outcome-d {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 600;
}

.lw-sim-outcome-partial {
  font-size: 0.75rem;
  color: #d97706;
  font-weight: 600;
}

.lw-sim-dur {
  font-size: 0.72rem;
  color: #6b7280;
  margin-left: auto;
}

.lw-sim-type {
  font-size: 0.68rem;
  color: #6b7280;
  margin-top: 4px;
  font-style: italic;
}

.lw-sim-empty {
  font-size: 0.82rem;
  color: #9ca3af;
  text-align: center;
  padding: 12px 0;
  margin: 0;
}

/* ── AI Insights sidebar ──────────────────────────────────────────────── */
.lw-insights-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.lw-insights-card .sidebar-title {
  color: #1e40af;
  border-color: #bfdbfe;
}

.lw-insight-item {
  display: flex;
  gap: 8px;
  font-size: 0.82rem;
  color: #374151;
  margin-bottom: 10px;
  line-height: 1.5;
}

.lw-insight-item:last-child {
  margin-bottom: 0;
}

.lw-insight-icon {
  flex-shrink: 0;
}

/* ── Ask AI chat ──────────────────────────────────────────────────────── */
.lw-ask-ai {
  background: #fff;
  border: 1px solid #e9ecf2;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 1.5rem;
}

.lw-chat-header {
  padding: 14px 20px;
  background: #f0f6ff;
  border-bottom: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lw-ai-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  flex-shrink: 0;
  animation: lw-pulse 2s infinite;
}

@keyframes lw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.lw-chat-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e40af;
}

.lw-chat-sub {
  margin-left: auto;
  font-size: 0.72rem;
  color: #6b7280;
}

.lw-chat-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.lw-chat-msg {
  display: flex;
  gap: 8px;
}

.lw-chat-msg.lw-user {
  flex-direction: row-reverse;
}

.lw-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lw-chat-msg.lw-ai .lw-chat-avatar {
  background: #dbeafe;
  color: #1a6baa;
}

.lw-chat-msg.lw-user .lw-chat-avatar {
  background: #e5e7eb;
  color: #374151;
}

.lw-chat-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.lw-chat-msg.lw-ai .lw-chat-bubble {
  background: #f8faff;
  border: 1px solid #e9ecf2;
  color: #1e2a3a;
  border-radius: 4px 10px 10px 10px;
}

.lw-chat-msg.lw-user .lw-chat-bubble {
  background: #1a6baa;
  color: #fff;
  border-radius: 10px 4px 10px 10px;
}

.lw-quick-asks {
  padding: 4px 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lw-quick-ask {
  background: #f0f6ff;
  color: #1a6baa;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.lw-quick-ask:hover {
  background: #dbeafe;
}

.lw-chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid #e9ecf2;
  display: flex;
  gap: 8px;
}

.lw-chat-input {
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #1e2a3a;
  outline: none;
}

.lw-chat-input:focus {
  border-color: #1a6baa;
  box-shadow: 0 0 0 3px rgba(26,107,170,0.1);
}

.lw-chat-input::placeholder {
  color: #9ca3af;
}

.lw-chat-send {
  background: #1a6baa;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.lw-chat-send:hover {
  background: #155d96;
}

/* ── Similar case cards rendered inside the chat ─────────────────────── */
.lw-sim-chat-row {
  padding: 0 16px 6px;
  display: block;
}

.lw-sim-chat-row .lw-chat-avatar {
  visibility: hidden; /* preserve alignment without showing a second avatar */
}

.lw-chat-sim-card {
  display: block;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ── Markdown rendering inside AI chat bubbles ───────────────────────── */
.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-heading {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1e2a3a;
  margin-top: 10px;
  margin-bottom: 2px;
}

.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-line {
  margin-bottom: 2px;
  line-height: 1.6;
}

.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-gap {
  height: 6px;
}

.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-ol,
.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-ul {
  margin: 6px 0 6px 18px;
  padding: 0;
}

.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-ol li,
.lw-chat-msg.lw-ai .lw-chat-bubble .lw-md-ul li {
  margin-bottom: 4px;
  line-height: 1.55;
}

.lw-chat-msg.lw-ai .lw-chat-bubble code.lw-md-code {
  background: #f0f4f8;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: 'Courier New', monospace;
  font-size: 0.82em;
}

/* ── Typing indicator (three-dot bounce) ─────────────────────────────── */
.lw-typing {
  display: flex !important;
  align-items: center;
  gap: 5px;
  min-width: 44px;
  padding: 10px 14px !important;
}

.lw-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  animation: lw-dot-bounce 1.2s infinite ease-in-out;
}

.lw-typing span:nth-child(2) { animation-delay: 0.2s; }
.lw-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes lw-dot-bounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
  40%            { transform: translateY(-5px); opacity: 1;   }
}

/* ── AI Quick Insights ───────────────────────────────────────────────── */
.lw-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.lw-insight-card {
  border-radius: 8px;
  border-left: 4px solid var(--lw-ic-accent, #4f46e5);
  background: var(--lw-ic-bg, #f8fafc);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lw-insight-card--1 { --lw-ic-accent: #4f46e5; }
.lw-insight-card--2 { --lw-ic-accent: #0891b2; }
.lw-insight-card--3 { --lw-ic-accent: #16a34a; }
.lw-insight-card--4 { --lw-ic-accent: #d97706; }

.lw-insight-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.lw-insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--lw-ic-accent, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

.lw-insight-title {
  font-weight: 700;
  font-size: 0.84rem;
  color: #1e293b;
  line-height: 1.35;
}

.lw-insight-detail {
  font-size: 0.81rem;
  color: #475569;
  line-height: 1.55;
}

/* Shimmer skeleton */
.lw-insights-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.lw-skeleton-card {
  height: 86px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f2f7 25%, #e4e9f2 50%, #f0f2f7 75%);
  background-size: 400% 100%;
  animation: lw-shimmer 1.5s infinite linear;
}

@keyframes lw-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.lw-insights-error {
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
}

.lw-sidebar-insight-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
  font-style: italic;
  padding: 4px 0;
}

/* Print ────────────────────────────────────────────────────────────── */
@media print {
  .lw-left-panel,
  .lw-ask-ai {
    display: none !important;
  }
  .lw-main-content {
    margin-left: 0 !important;
  }
}
