.lgp-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  border: 1px solid var(--lgp-border, #d0d7de);
  border-radius: 8px;
  background: var(--lgp-bg, #ffffff);
  color: var(--lgp-fg, #1f2328);
  margin: 12px 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.45;
}

.lgp-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--lgp-border, #d0d7de);
  background: var(--lgp-header-bg, #f6f8fa);
}

.lgp-logo {
  font-weight: 700;
  color: #5e6ad2;
  letter-spacing: 0.2px;
}

.lgp-header-label {
  color: var(--lgp-muted, #656d76);
  font-size: 12px;
}

.lgp-body {
  padding: 6px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lgp-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--lgp-border, #d0d7de);
  border-radius: 6px;
  background: var(--lgp-card-bg, #ffffff);
}

.lgp-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lgp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.03) inset;
}

.lgp-id {
  font-weight: 600;
  color: #5e6ad2;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.lgp-id:hover,
.lgp-title:hover,
.lgp-open:hover {
  text-decoration: underline;
}

.lgp-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--lgp-fg, #1f2328);
  text-decoration: none;
  font-weight: 500;
}

.lgp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lgp-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--lgp-badge-bg, #eaeef2);
  color: var(--lgp-badge-fg, #414852);
  font-size: 11px;
  white-space: nowrap;
}

.lgp-avatar {
  width: 16px;
  height: 16px;
  margin-right: 2px;
  border-radius: 50%;
  object-fit: cover;
}

.lgp-prio-1 {
  background: #ffe3e3;
  color: #b42318;
}
.lgp-prio-2 {
  background: #fff2d9;
  color: #a15c00;
}

.lgp-open {
  align-self: flex-start;
  color: #5e6ad2;
  text-decoration: none;
  font-size: 12px;
}

.lgp-empty {
  color: var(--lgp-muted, #656d76);
  padding: 4px 0;
}

.lgp-cta {
  align-self: flex-start;
  border: 1px solid #5e6ad2;
  background: #5e6ad2;
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}

.lgp-cta:hover {
  background: #4c58bf;
}

.lgp-cta:focus-visible,
.lgp-expand:focus-visible,
.lgp-error-options:focus-visible,
.lgp-id:focus-visible,
.lgp-title:focus-visible,
.lgp-open:focus-visible {
  outline: 2px solid #5e6ad2;
  outline-offset: 2px;
}

.lgp-error-options {
  align-self: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.lgp-error-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lgp-expand {
  align-self: flex-start;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: #5e6ad2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.lgp-expand:hover {
  text-decoration: underline;
}

.lgp-expand:disabled {
  color: var(--lgp-muted, #656d76);
  cursor: wait;
  text-decoration: none;
}

.lgp-card-error {
  border-color: #f2b5b0;
  background: #fff5f5;
}

.lgp-error-msg {
  color: #b42318;
  font-size: 12px;
}

.lgp-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lgp-skel-row {
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef1f4 25%, #e2e6ea 37%, #eef1f4 63%);
  background-size: 400% 100%;
  animation: lgp-shimmer 1.4s ease infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .lgp-skel-row {
    animation: none;
  }
}

[data-color-mode="dark"] .lgp-panel {
  --lgp-border: #30363d;
  --lgp-bg: #0d1117;
  --lgp-fg: #e6edf3;
  --lgp-header-bg: #161b22;
  --lgp-card-bg: #0d1117;
  --lgp-muted: #8b949e;
  --lgp-badge-bg: #21262d;
  --lgp-badge-fg: #c9d1d9;
}

@media (prefers-color-scheme: dark) {
  .lgp-panel {
    --lgp-border: #30363d;
    --lgp-bg: #0d1117;
    --lgp-fg: #e6edf3;
    --lgp-header-bg: #161b22;
    --lgp-card-bg: #0d1117;
    --lgp-muted: #8b949e;
    --lgp-badge-bg: #21262d;
    --lgp-badge-fg: #c9d1d9;
  }
  .lgp-prio-1 {
    background: #4b1c1c;
    color: #ff9c95;
  }
  .lgp-prio-2 {
    background: #4a3a12;
    color: #ffce7a;
  }
  .lgp-skel-row {
    background: linear-gradient(90deg, #1b2027 25%, #232a33 37%, #1b2027 63%);
    background-size: 400% 100%;
  }

  [data-color-mode="light"] .lgp-panel {
    --lgp-border: #d0d7de;
    --lgp-bg: #ffffff;
    --lgp-fg: #1f2328;
    --lgp-header-bg: #f6f8fa;
    --lgp-card-bg: #ffffff;
    --lgp-muted: #656d76;
    --lgp-badge-bg: #eaeef2;
    --lgp-badge-fg: #414852;
  }
}
