/* ============================================================
   Assigning View — Inbox Cockpit (ADR-045)
   Azia Light Theme — white/aqua palette
   View-specific styles (shared styles in epw-base.css)
   ============================================================ */

/* When assigning is active, hide other elements */
body.asg-active #expanded-title,
body.asg-active #detail-panel,
body.asg-active #bg-layer,
body.asg-active #c4-link { display: none !important; }

/* ---- Container uses .epw-view ---- */
#assigning-view.epw-view { background: #F3E8FF; }
#assigning-view .epw-header { border-bottom-color: #9333EA; }

/* ---- Header uses .epw-header .epw-header-left .epw-title .epw-subtitle .epw-header-right ---- */

/* ---- Filter Bar uses .epw-filter-bar .epw-filter-pills .epw-filter-pill .epw-filter-active ---- */

.asg-trawl-info {
  margin-left: auto;
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.5);
}

/* Trawl button — prominent */
.asg-trawl-btn {
  padding: 6px 16px;
  border: 1px solid rgba(6, 147, 227, 0.3);
  background: rgba(6, 147, 227, 0.1);
  color: rgba(6, 147, 227, 0.9);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asg-trawl-btn:hover {
  background: rgba(6, 147, 227, 0.2);
  border-color: rgba(6, 147, 227, 0.5);
}

.asg-trawl-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.asg-refresh-btn {
  padding: 5px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(71, 85, 105, 0.6);
  font-family: inherit;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asg-refresh-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}


/* ---- Cards Container ---- */
.asg-cards,
.asg-table-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  display: block;
  z-index: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.asg-table-subject { max-width: 500px; }
.asg-table-subject div:first-child { font-weight: 500; }
.asg-table-actions { white-space: nowrap; }
.asg-table-actions .asg-btn { margin: 0 2px; padding: 4px 10px; font-size: 0.72rem; }
.asg-table-row:hover { background: rgba(147, 51, 234, 0.04) !important; }
.asg-row-expanded { background: rgba(147, 51, 234, 0.06) !important; }

/* Inline detail row (disclosure) */
.asg-detail-row { background: rgba(147, 51, 234, 0.03); }
.asg-inline-detail {
  padding: 16px 24px;
  border-top: 1px solid rgba(147, 51, 234, 0.12);
  border-bottom: 2px solid rgba(147, 51, 234, 0.15);
}
.asg-inline-detail-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}
.asg-inline-detail-subject {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}
.asg-inline-detail-body {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #475569;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
}
.asg-inline-detail-right .asg-form-group { margin-bottom: 10px; }
.asg-inline-detail-right .asg-form-select,
.asg-inline-detail-right .asg-form-input,
.asg-inline-detail-right .asg-form-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  margin-top: 4px;
}
.asg-inline-detail-right .asg-btn {
  padding: 6px 14px;
  font-size: 0.78rem;
}


/* ---- Email Card ---- */
.asg-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.asg-card:hover {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.asg-card-confirmed {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.04);
}

.asg-card-dismissed {
  opacity: 0.4;
  border-color: rgba(148, 163, 184, 0.1);
}

.asg-card-sent {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.02);
}

/* ---- Source-based card left borders ---- */
.asg-card-src-email {
  border-left: 3px solid rgba(148, 163, 184, 0.35);
}
.asg-card-src-email-personal {
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.03);
}
.asg-card-src-whatsapp {
  border-left: 3px solid rgba(37, 211, 102, 0.5);
  background: rgba(37, 211, 102, 0.03);
}
.asg-card-src-sms {
  border-left: 3px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.03);
}
.asg-card-src-linkedin {
  border-left: 3px solid rgba(0, 119, 181, 0.5);
  background: rgba(0, 119, 181, 0.03);
}
.asg-card-src-aladdin {
  border-left: 3px solid rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.03);
}
.asg-card-src-nightsout {
  border-left: 3px solid rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.03);
}

.asg-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.asg-card-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.asg-card-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.asg-group-name {
  font-size: 0.72rem;
  color: rgba(37, 211, 102, 0.7);
  margin-bottom: 4px;
  font-style: italic;
}

.asg-card-date {
  font-size: 0.75rem;
  color: rgba(71, 85, 105, 0.5);
}

.asg-card-status {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 10px;
  flex-shrink: 0;
}

.asg-status-new {
  background: rgba(59, 130, 246, 0.15);
  color: rgba(6, 147, 227, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.asg-status-confirmed {
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.asg-status-dismissed {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.asg-status-sent {
  background: rgba(34, 197, 94, 0.2);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Sender line on cards */
.asg-sender-line {
  font-size: 0.78rem;
  color: rgba(71, 85, 105, 0.6);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asg-card-subject {
  font-size: 1rem;
  font-weight: 600;
  color: #172351;
  margin-bottom: 6px;
  line-height: 1.3;
}

.asg-card-snippet {
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.7);
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Draft preview snippet on card */
.asg-draft-snippet {
  font-size: 0.78rem;
  color: rgba(6, 147, 227, 0.6);
  font-style: italic;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(6, 147, 227, 0.05);
  border-radius: 6px;
  border-left: 2px solid rgba(6, 147, 227, 0.3);
}

/* Reply badge (blue) */
.asg-reply-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(6, 147, 227, 0.15);
  color: rgba(6, 147, 227, 0.95);
  border: 1px solid rgba(6, 147, 227, 0.3);
}

/* Sent badge (green) */
.asg-sent-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.2);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.3);
}


/* ---- Analysis Box (inside card) ---- */
.asg-analysis {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.asg-analysis-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.asg-analysis-worker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.asg-worker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.asg-worker-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #172351;
}

.asg-worker-role {
  font-size: 0.75rem;
  color: rgba(71, 85, 105, 0.5);
}

.asg-confidence {
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.5);
  margin-left: auto;
}

.asg-analysis-project {
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.6);
  margin-bottom: 4px;
}

.asg-analysis-action {
  font-size: 0.8rem;
  color: rgba(6, 147, 227, 0.8);
  margin-bottom: 8px;
  line-height: 1.4;
}

.asg-analysis-action::before {
  content: '\2192 ';
}

.asg-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.asg-keyword {
  font-size: 0.65rem;
  padding: 2px 8px;
  background: rgba(6, 147, 227, 0.1);
  color: rgba(6, 147, 227, 0.8);
  border-radius: 4px;
  border: 1px solid rgba(6, 147, 227, 0.15);
}


/* ---- Card Actions ---- */
.asg-card-actions {
  display: flex;
  gap: 8px;
}

.asg-btn {
  padding: 7px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.8);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asg-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #475569;
}

.asg-btn-confirm {
  background: rgba(34, 197, 94, 0.12);
  color: rgba(34, 197, 94, 0.9);
  border-color: rgba(34, 197, 94, 0.25);
}

.asg-btn-confirm:hover {
  background: rgba(34, 197, 94, 0.2);
}

.asg-btn-dismiss {
  color: rgba(71, 85, 105, 0.5);
}


/* ---- Detail Panel (slides from right) — widened for reply composer ---- */
.asg-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 520px;
  background: #FFFFFF;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 200;
  overflow-y: auto;
  padding: 24px;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

.asg-detail-open {
  transform: translateX(0);
  opacity: 1;
}

.asg-detail-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: rgba(71, 85, 105, 0.7);
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.asg-detail-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #475569;
}

.asg-detail-subject {
  font-size: 1.3rem;
  font-weight: 700;
  color: #172351;
  margin-bottom: 6px;
  line-height: 1.2;
  padding-left: 40px;
}

.asg-detail-date {
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.5);
  margin-bottom: 20px;
}

.asg-detail-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(71, 85, 105, 0.85);
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  white-space: pre-wrap;
}

.asg-highlight {
  background: rgba(6, 147, 227, 0.15);
  color: #0693E3;
  padding: 1px 4px;
  border-radius: 3px;
}

.asg-detail-analysis {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(71, 85, 105, 0.7);
  margin-bottom: 24px;
  padding: 14px;
  background: rgba(6, 147, 227, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(6, 147, 227, 0.1);
}

.asg-detail-analysis-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(6, 147, 227, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}


/* ---- Detail Form ---- */
.asg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.asg-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.asg-form-group label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.asg-form-select,
.asg-form-input,
.asg-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
  color: #475569;
  font-family: inherit;
  font-size: 0.85rem;
  border-radius: 6px;
  box-sizing: border-box;
}

.asg-form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.asg-form-select option {
  background: #FFFFFF;
  color: #475569;
}

.asg-form-textarea {
  min-height: 80px;
  resize: vertical;
}

.asg-form-select:focus,
.asg-form-input:focus,
.asg-form-textarea:focus {
  outline: none;
  border-color: rgba(6, 147, 227, 0.4);
  box-shadow: 0 0 0 2px rgba(6, 147, 227, 0.15);
}

.asg-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.asg-detail-actions .asg-btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
}

.asg-calendar-match {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(245, 158, 11, 0.8);
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.15);
  margin-bottom: 16px;
}

.asg-calendar-match::before {
  content: '\1F4C5';
  font-size: 0.9rem;
}


/* ---- Reply Composer Section ---- */
.asg-reply-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.asg-reply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.asg-reply-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.asg-reply-expand {
  font-size: 0.78rem;
  color: rgba(6, 147, 227, 0.8);
  text-decoration: none;
  cursor: pointer;
}

.asg-reply-expand:hover {
  color: rgba(6, 147, 227, 1);
}

/* Draft preview box (read-only, blue tint) */
.asg-draft-preview {
  padding: 14px;
  margin-bottom: 14px;
  background: rgba(6, 147, 227, 0.06);
  border: 1px solid rgba(6, 147, 227, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(71, 85, 105, 0.8);
  white-space: pre-wrap;
}

.asg-draft-preview-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(6, 147, 227, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* Reply textarea (taller) */
.asg-reply-textarea {
  min-height: 200px !important;
}

/* Thread checkbox */
.asg-thread-checkbox {
  margin: 10px 0 14px;
}

.asg-thread-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(71, 85, 105, 0.7);
  cursor: pointer;
}

.asg-thread-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: rgba(6, 147, 227, 0.8);
  cursor: pointer;
}

/* Send button (green, distinct from confirm) */
.asg-btn-send {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.95);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.asg-btn-send:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.5);
}

.asg-btn-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Sending spinner state */
.asg-btn-send-sending {
  background: rgba(245, 158, 11, 0.15);
  color: rgba(245, 158, 11, 0.9);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Sent info in detail */
.asg-sent-info {
  font-size: 0.78rem;
  color: rgba(34, 197, 94, 0.8);
  padding: 8px 12px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.15);
  margin-bottom: 14px;
}


/* ---- Empty State ---- */
.asg-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: rgba(71, 85, 105, 0.4);
}

.asg-empty-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.asg-empty-text {
  font-size: 0.9rem;
}


/* ---- ADR-047: Source Filter Bar ---- */
.asg-source-bar {
  display: flex;
  gap: 6px;
  padding: 0 28px 12px;
  flex-wrap: wrap;
}

.asg-source-pill {
  padding: 4px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(71, 85, 105, 0.6);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asg-source-pill:hover {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(71, 85, 105, 0.9);
}

.asg-source-active {
  background: rgba(6, 147, 227, 0.12);
  color: rgba(6, 147, 227, 0.9);
  border-color: rgba(6, 147, 227, 0.25);
}


/* ---- ADR-047: Source Badges on Cards ---- */
.asg-source-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 8px;
  line-height: 1.4;
}

.asg-src-email {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(148, 163, 184, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.asg-src-personal {
  background: rgba(59, 130, 246, 0.15);
  color: rgba(6, 147, 227, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.asg-src-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  color: rgba(37, 211, 102, 0.9);
  border: 1px solid rgba(37, 211, 102, 0.25);
}

.asg-src-sms {
  background: rgba(245, 158, 11, 0.12);
  color: rgba(245, 158, 11, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.asg-src-linkedin {
  background: rgba(0, 119, 181, 0.15);
  color: rgba(0, 119, 181, 0.9);
  border: 1px solid rgba(0, 119, 181, 0.25);
}

.asg-src-aladdin {
  background: rgba(168, 85, 247, 0.12);
  color: rgba(168, 85, 247, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.asg-src-nightsout {
  background: rgba(236, 72, 153, 0.12);
  color: rgba(236, 72, 153, 0.9);
  border: 1px solid rgba(236, 72, 153, 0.25);
}

/* WhatsApp category sub-badges */
.asg-wa-sub {
  margin-left: 2px;
  font-size: 0.55rem;
}

.asg-wa-immediate {
  background: rgba(239, 68, 68, 0.15);
  color: rgba(239, 68, 68, 0.95);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.asg-wa-voice {
  background: rgba(245, 158, 11, 0.15);
  color: rgba(245, 158, 11, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.asg-wa-killian {
  background: rgba(168, 85, 247, 0.15);
  color: rgba(168, 85, 247, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.asg-wa-discussion {
  background: rgba(59, 130, 246, 0.15);
  color: rgba(6, 147, 227, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.asg-wa-unknown {
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
}


/* ---- ADR-047: Trawl Dropdown ---- */
.asg-trawl-dropdown {
  position: relative;
}

.asg-trawl-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #FFFFFF;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  z-index: 100;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.asg-trawl-menu-open {
  display: block;
}

.asg-trawl-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: rgba(71, 85, 105, 0.8);
  font-family: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.asg-trawl-option:hover {
  background: rgba(6, 147, 227, 0.08);
  color: #475569;
}

.asg-trawl-all {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
  color: rgba(6, 147, 227, 0.9);
}


/* ---- WhatsApp/SMS Send Buttons ---- */
.asg-btn-wa-send {
  background: rgba(37, 211, 102, 0.15) !important;
  color: rgba(37, 211, 102, 0.95) !important;
  border-color: rgba(37, 211, 102, 0.35) !important;
}

.asg-btn-wa-send:hover {
  background: rgba(37, 211, 102, 0.25) !important;
}

.asg-btn-sms-send {
  background: rgba(245, 158, 11, 0.15) !important;
  color: rgba(245, 158, 11, 0.95) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}

.asg-btn-sms-send:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}


/* ---- Responsive (assigning-specific; shared rules in epw-base.css) ---- */
@media (max-width: 768px) {
  .asg-cards { padding: 14px 16px; gap: 12px; }
  .asg-card { padding: 16px; }
  .asg-detail { width: 100%; border-left: none; }
  .asg-trawl-info { display: none; }
  .asg-source-bar { padding: 0 16px 10px; }
}

/* ---- ADR-057: Link Security Badges & Panels ---- */

.asg-link-security-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-left: 4px;
}
.asg-link-green {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.asg-link-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.asg-link-red {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Detail panel */
.asg-link-security-panel {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
}
.asg-link-panel-green {
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid #22c55e;
}
.asg-link-panel-amber {
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
}
.asg-link-panel-red {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
}
.asg-link-security-header {
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #172351;
}
.asg-link-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.78rem;
}
.asg-link-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.asg-link-dot-green { background: #22c55e; }
.asg-link-dot-amber { background: #f59e0b; }
.asg-link-dot-red   { background: #ef4444; }
.asg-link-url {
  color: rgba(71, 85, 105, 0.6);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.asg-link-reason {
  color: rgba(71, 85, 105, 0.8);
}

/* ---- ADR-056: Dispatched Status ---- */
.asg-card-dispatched {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.04);
}

.asg-status-dispatched {
  background: rgba(59, 130, 246, 0.18);
  color: rgba(6, 147, 227, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.3);
}


/* ---- ADR-056: Dispatch Toast ---- */
.asg-dispatch-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #FFFFFF;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 147, 227, 0.3);
  border-radius: 10px;
  padding: 14px 20px;
  color: #475569;
  font-size: 0.82rem;
  z-index: 500;
  max-width: 340px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.asg-dispatch-toast-visible {
  transform: translateY(0);
  opacity: 1;
}


/* ---- Card Checkbox ---- */
.asg-card-cb-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
}

.asg-row-cb {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #9333EA;
}

.asg-card { padding-left: 38px; }

@media (max-width: 480px) {
  .asg-cards { padding: 10px 12px; gap: 10px; }
  .asg-card { padding: 14px 14px 14px 38px; }
  .asg-card-actions { flex-wrap: wrap; }
}
