/* --- Cards --- */
.card {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.type-card { transition: border-color 0.15s, box-shadow 0.15s; border-color: var(--pico-muted-border-color); }
.type-card:hover { border-color: var(--accent); }
.type-card-active { border-color: var(--accent) !important; box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0;
  background: none;
}
.card header h4 { margin: 0; font-size: 1rem; }
.card .meta {
  color: var(--pico-muted-color);
  font-size: 0.85rem;
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
}
.card .meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Stat cards --- */
.stat { text-align: center; padding: 1.25rem; }
.stat .value { font-family: var(--font-heading); font-size: 2.25rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.stat .label { font-size: 0.78rem; color: var(--pico-muted-color); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; white-space: nowrap; }

/* --- Mini stat (inline list cards) --- */
.mini-stat {
  text-align: center;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  min-width: 0;
  flex: 1;
}
.mini-stat-value { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.mini-stat-label { font-size: 0.65rem; color: var(--pico-muted-color); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Empty state --- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--pico-muted-color); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1.25rem; opacity: 0.3; }
.empty-state p { margin-bottom: 1.75rem; }

/* --- Page header --- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page-header h2 { margin: 0; }


/* --- Identifier tag --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--accent-subtle);
  color: var(--pico-contrast);
  border: 1px solid var(--pico-muted-border-color);
}
.tag .remove { cursor: pointer; opacity: 0.5; font-size: 0.7rem; }
.tag .remove:hover { opacity: 1; }

/* --- Tooltip --- */
.tip {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  color: var(--pico-muted-color);
}
.tip .tip-text {
  display: none;
  position: absolute;
  left: 0;
  min-width: 260px;
  max-width: 340px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--pico-color);
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  white-space: normal;
  text-align: left;
}
/* Arrow */
.tip .tip-text::after {
  content: '';
  position: absolute;
  left: 12px;
  border: 6px solid transparent;
}
/* Default: below */
.tip .tip-text { top: calc(100% + 8px); }
.tip .tip-text::after { bottom: 100%; border-bottom-color: var(--pico-muted-border-color); }
/* Flipped: above */
.tip .tip-text.tip-above { top: auto; bottom: calc(100% + 8px); }
.tip .tip-text.tip-above::after { bottom: auto; top: 100%; border-bottom-color: transparent; border-top-color: var(--pico-muted-border-color); }
.tip:hover .tip-text, .tip:focus .tip-text { display: block; }
.section-title .tip .tip-text { font-size: 0.82rem; font-weight: 400; }

/* --- Field hint --- */
.field-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--pico-muted-color);
  margin: -0.5rem 0 0.5rem;
  line-height: 1.4;
}

/* --- Info box --- */
.info-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  background: var(--accent-subtle);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--pico-muted-color);
}
.info-box h5 { margin: 0 0 0.3rem; font-size: 0.9rem; color: var(--pico-color); }
.info-box ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.info-box li { margin-bottom: 0.25rem; }

/* --- Page hero (shared for how-it-works, faq) --- */
.page-hero {
  text-align: center;
  padding: 2.5rem 0 3rem;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.page-hero p {
  font-size: 1.05rem;
  color: var(--pico-muted-color);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- How it works: vertical steps --- */
.howto-steps {
  max-width: 700px;
  margin: 0 auto 3.5rem;
  position: relative;
}
.howto-steps::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--pico-muted-border-color);
}
.howto-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
  padding-bottom: 2.5rem;
}
.howto-step:last-child { padding-bottom: 0; }
.howto-step-number {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  z-index: 1;
}
.howto-step-content h2 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0 0.4rem;
}
.howto-step-content p {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  line-height: 1.65;
  margin: 0;
}

/* --- FAQ --- */
.faq-list {
  max-width: 750px;
  margin: 0 auto 3rem;
}
.faq-item {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--pico-card-background-color);
  transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item[open] { box-shadow: var(--shadow); }
.faq-item summary {
  padding: 1.1rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--pico-color);
}
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--pico-muted-color);
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  padding: 0 1.5rem 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  line-height: 1.7;
}
.landing-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

/* --- Legal pages (privacy, terms) --- */
.legal-content {
  max-width: 750px;
  margin: 0 auto 3rem;
  line-height: 1.75;
}
.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.legal-content p {
  font-size: 0.92rem;
  color: var(--pico-muted-color);
  margin-bottom: 1rem;
}

/* --- Fraud types page --- */
.fraud-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.fraud-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--pico-color);
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  text-decoration: none;
  transition: all 0.15s;
}
.fraud-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.fraud-section {
  max-width: 800px;
  margin: 0 auto 3.5rem;
  scroll-margin-top: 5rem;
}
.fraud-section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.fraud-section-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.fraud-icon-investment { background: color-mix(in srgb, #f59e0b 12%, transparent); color: #f59e0b; }
.fraud-icon-romance { background: color-mix(in srgb, #ec4899 12%, transparent); color: #ec4899; }
.fraud-icon-phishing { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.fraud-icon-marketplace { background: color-mix(in srgb, #22c55e 12%, transparent); color: #22c55e; }
.fraud-icon-identity { background: color-mix(in srgb, #ef4444 12%, transparent); color: #ef4444; }

.fraud-section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
}
.fraud-section-tagline {
  font-size: 0.88rem;
  color: var(--pico-muted-color);
  margin: 0.15rem 0 0;
}
.fraud-section-body {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--radius);
  padding: 2rem;
}
.fraud-section-body p {
  font-size: 0.92rem;
  color: var(--pico-muted-color);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.fraud-section-body h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin: 1.75rem 0 0.6rem;
}
.fraud-section-body h3:first-child { margin-top: 0; }
.fraud-section-body ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.fraud-section-body li {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  line-height: 1.7;
  margin-bottom: 0.4rem;
}

.fraud-section-general {
  max-width: 100%;
}
.fraud-section-general h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 1.5rem;
  text-align: center;
}
.fraud-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}
.fraud-tips-grid h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.fraud-tips-grid p {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  line-height: 1.6;
  margin: 0;
}

/* --- About page --- */
.about-hero {
  padding: 3.5rem 0 4rem;
}
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}
.about-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}
.about-hero p {
  font-size: 1.05rem;
  color: var(--pico-muted-color);
  line-height: 1.65;
  max-width: 480px;
  margin: 0;
}
.about-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 1rem;
  padding: 3rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.06);
  color: var(--accent);
  font-size: 6rem;
  min-height: 300px;
}

/* Mission section */
.about-mission-section {
  background: color-mix(in srgb, var(--pico-muted-border-color) 30%, transparent);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding: 3.5rem 1.5rem;
  margin-bottom: 3.5rem;
}
.about-mission-header {
  max-width: var(--content-width);
  margin: 0 auto 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
.about-mission-header h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 0.5rem;
}
.about-mission-header > div:first-child p {
  font-size: 1rem;
  color: var(--pico-muted-color);
  margin: 0;
  max-width: 500px;
}
.about-mission-quote {
  background: var(--accent);
  color: #fff;
  padding: 1.75rem;
  border-radius: 1rem;
  max-width: 320px;
  flex-shrink: 0;
}
[data-theme=dark] .about-mission-quote { background: #134e7f; }
.about-mission-quote p {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.4;
  margin: 0;
  color: #fff;
}

/* Value cards */
.about-values-grid {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.about-value-card {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-bottom: 3px solid color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: 1rem;
  padding: 2rem;
}
.about-value-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--pico-muted-border-color) 50%, transparent);
  color: var(--accent);
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.about-value-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}
.about-value-card p {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  line-height: 1.65;
  margin: 0;
}

/* Stats banner */
.about-stats-banner {
  background: var(--accent-secondary);
  color: #fff;
  border-radius: 1.5rem;
  padding: 3.5rem 2rem;
  position: relative;
  overflow: hidden;
}
[data-theme=dark] .about-stats-banner { background: #336699; }
.about-stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.about-stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}
.about-stat-desc {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

/* Timeline */
.about-timeline-grid {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 3rem;
}
.about-timeline-sticky h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  position: sticky;
  top: 6rem;
  margin: 0;
}
.about-timeline {
  position: relative;
}
.about-timeline-item {
  position: relative;
  padding-left: 2.5rem;
  padding-bottom: 3rem;
  border-left: 2px solid var(--pico-muted-border-color);
}
.about-timeline-item:last-child { padding-bottom: 0; }
.about-timeline-dot {
  position: absolute;
  left: -8px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
}
.about-timeline-dot-2 { background: var(--accent-secondary); }
.about-timeline-dot-3 { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.about-timeline-year {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.about-timeline-item h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.about-timeline-item p {
  font-size: 0.88rem;
  color: var(--pico-muted-color);
  line-height: 1.65;
  margin: 0;
}

/* CTA card */
.about-cta-card {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-left: 6px solid var(--accent);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.about-cta-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}
.about-cta-card p {
  font-size: 0.9rem;
  color: var(--pico-muted-color);
  margin: 0;
}
.about-cta-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .about-hero-grid { grid-template-columns: 1fr; }
  .about-hero-visual { min-height: 200px; font-size: 4rem; }
  .about-mission-header { flex-direction: column; align-items: stretch; }
  .about-mission-quote { max-width: none; }
  .about-values-grid { grid-template-columns: 1fr; }
  .about-stats-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-timeline-grid { grid-template-columns: 1fr; }
  .about-timeline-sticky h2 { position: static; margin-bottom: 1.5rem; }
  .about-cta-card { flex-direction: column; text-align: center; }
}


/* --- Component: Filter/toggle buttons active state --- */
.filter-btn.active, .status-btn.active, .zoom-btn.active {
  background: var(--accent) !important;
  color: white !important;
  border-color: var(--accent) !important;
}

/* --- Component: Status alert with left border --- */
.alert-left { border-left: 3px solid; }
.alert-left-warning { border-left-color: var(--warning); }
.alert-left-accent { border-left-color: var(--accent); }
.alert-left-danger { border-left-color: var(--danger); }

/* --- Component: AI content box --- */
.ai-box {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--pico-border-radius);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}

/* --- Component: Delete button (inline dropdown) --- */
.btn-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  margin: 0;
}

/* --- Component: Dropdown action menu --- */
.action-menu { right: 0; left: auto; min-width: 10rem; padding: 0.25rem 0; margin: 0; }
.action-menu li { list-style: none; padding: 0; margin: 0; }

/* Clickable tags/badges — use span[role=button] to avoid Pico button overrides */
.tag-clickable { cursor: pointer; }
.tag-clickable:hover { filter: brightness(1.1); }

/* --- Component: Document row --- */
.doc-row { padding: 0.75rem 1rem; transition: box-shadow 0.3s, outline 0.3s; }
@keyframes doc-highlight-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); outline: 2px solid transparent; }
  30%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); outline: 2px solid var(--accent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); outline: 2px solid transparent; }
}
.doc-highlight { animation: doc-highlight-pulse 1.8s ease-out forwards; }

/* --- Component: User row --- */
.user-row-card { padding: 1rem 1.25rem; }

/* --- Component: Session row --- */
.session-row { padding: 0.75rem 1rem; }

/* --- Admin: Entity type badges --- */
.badge-document { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.badge-scam_summary { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); }
.badge-scam_profile { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.badge-scam { background: color-mix(in srgb, #e879f9 12%, transparent); color: #e879f9; }
.badge-scammer { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.badge-reported { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.badge-final-verified { background: color-mix(in srgb, #10b981 15%, transparent); color: #10b981; }

/* --- Admin: Chart --- */
#usage-chart { cursor: crosshair; }

/* --- Messages --- */
.message-thread {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}
.message-thread:not(.show-all) .message:not(:nth-last-child(-n+3)) { display: none; }
.message-thread.show-all .btn-show-all { display: none; }
.btn-show-all {
  background: none;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  color: var(--pico-muted-color);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0 auto 0.5rem;
}
.btn-show-all:hover { color: var(--pico-color); border-color: var(--pico-color); }
.message { display: flex; }
.message-mine { justify-content: flex-end; }
.message-other { justify-content: flex-start; }
.message-bubble {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--pico-border-radius);
  font-size: 0.9rem;
  line-height: 1.5;
}
.message-mine .message-bubble {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-bottom-right-radius: 0.2rem;
}
.message-other .message-bubble {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-bottom-left-radius: 0.2rem;
}
.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}
.message-sender {
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.message-time {
  font-size: 0.75rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}
.message-content { word-break: break-word; }
.message-doc-request {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--pico-border-radius);
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent);
}
.message-form textarea {
  font-size: 0.9rem;
  min-height: 3rem;
}
.tag-checkbox { display: inline-flex; cursor: pointer; }
.tag-checkbox input { display: none; }
.tag-checkbox input:checked + .tag-selectable {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}
.tag-selectable {
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  border: 1px solid var(--pico-muted-border-color);
}
.btn-link {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  color: inherit;
}
.card-unread {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}
.unread-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--danger);
  font-weight: 600;
}
.message-unread .message-bubble {
  box-shadow: inset 3px 0 0 var(--accent);
}
.message-unread-banner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: var(--pico-border-radius);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}
.message-new-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.35rem;
  vertical-align: middle;
}
.badge-pending { background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning); }
.badge-fulfilled { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.badge-cancelled { background: color-mix(in srgb, var(--pico-muted-color) 12%, transparent); color: var(--pico-muted-color); }

