* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f1117;
  color: #e1e4e8;
  min-height: 100vh;
}

header {
  background: linear-gradient(135deg, #1a1e2e 0%, #252a3a 100%);
  padding: 24px 32px;
  border-bottom: 1px solid #2d3348;
}

header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #58a6ff;
}

.subtitle {
  color: #8b949e;
  font-size: 14px;
  margin-top: 4px;
}

main { padding: 24px 32px; }

.did-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* DID Card */
.did-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.did-card:hover {
  border-color: #58a6ff;
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.1);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.did-number {
  font-size: 20px;
  font-weight: 700;
  color: #f0f6fc;
  letter-spacing: 0.5px;
}

.did-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-did {
  background: rgba(56, 139, 253, 0.15);
  color: #58a6ff;
}

.badge-intl {
  background: rgba(163, 113, 247, 0.15);
  color: #a371f7;
}

.card-meta {
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 16px;
}

.card-meta span {
  margin-right: 16px;
}

.card-gologin-status {
  font-size: 12px;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.card-gologin-status.is-ready {
  background: rgba(63, 185, 80, 0.12);
  border: 1px solid rgba(63, 185, 80, 0.2);
}

.card-gologin-status.is-fallback {
  background: rgba(210, 153, 34, 0.12);
  border: 1px solid rgba(210, 153, 34, 0.2);
}

.gologin-status-badge {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}

.card-gologin-status.is-ready .gologin-status-badge {
  background: rgba(63, 185, 80, 0.18);
  color: #7ee787;
}

.card-gologin-status.is-fallback .gologin-status-badge {
  background: rgba(210, 153, 34, 0.18);
  color: #e3b341;
}

.gologin-status-text {
  color: #c9d1d9;
  line-height: 1.4;
}

.card-notes-preview {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #8b949e;
  max-height: 60px;
  overflow: hidden;
}

.card-notes-preview .note-count {
  color: #58a6ff;
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:active { transform: scale(0.97); }

.btn-messages {
  background: rgba(56, 139, 253, 0.15);
  color: #58a6ff;
  flex: 1;
}
.btn-messages:hover { background: rgba(56, 139, 253, 0.25); }

.btn-send {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  flex: 1;
}
.btn-send:hover { background: rgba(63, 185, 80, 0.25); }

.btn-note {
  background: rgba(210, 153, 34, 0.15);
  color: #d29922;
  flex: 1;
}
.btn-note:hover { background: rgba(210, 153, 34, 0.25); }

.btn-launch {
  background: rgba(163, 113, 247, 0.16);
  color: #a371f7;
  flex: 1;
}

.btn-launch:hover { background: rgba(163, 113, 247, 0.28); }

.btn-mimic {
  background: rgba(255, 166, 87, 0.16);
  color: #ffb86b;
  flex: 1;
}

.btn-mimic:hover { background: rgba(255, 166, 87, 0.28); }

.btn-profile {
  background: rgba(139, 148, 158, 0.16);
  color: #c9d1d9;
  flex: 1;
}

.btn-profile:hover { background: rgba(139, 148, 158, 0.28); }

.btn-linkedin {
  background: rgba(10, 102, 194, 0.18);
  color: #67b3ff;
  flex: 1;
}

.btn-linkedin:hover { background: rgba(10, 102, 194, 0.3); }

.btn-linkedin-account {
  background: rgba(87, 171, 255, 0.16);
  color: #9fd0ff;
  flex: 1;
}

.btn-linkedin-account:hover { background: rgba(87, 171, 255, 0.28); }

.btn-linkedin-audit {
  background: rgba(121, 192, 255, 0.16);
  color: #79c0ff;
  flex: 1;
}

.btn-linkedin-audit:hover { background: rgba(121, 192, 255, 0.26); }

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal.hidden { display: none; }

.modal-content {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
}

.modal-sm { max-width: 480px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  color: #f0f6fc;
}

.close-btn {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.close-btn:hover { background: #21262d; color: #f0f6fc; }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #0d1117;
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #8b949e;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.tab.active {
  background: #21262d;
  color: #f0f6fc;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Messages */
.msg-list { max-height: 400px; overflow-y: auto; }

.msg-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.msg-item .msg-from {
  font-size: 12px;
  color: #58a6ff;
  font-weight: 600;
  margin-bottom: 4px;
}

.msg-item .msg-body {
  font-size: 14px;
  color: #e1e4e8;
  margin-bottom: 4px;
}

.msg-item .msg-time {
  font-size: 11px;
  color: #6e7681;
}

.msg-empty {
  text-align: center;
  color: #6e7681;
  padding: 32px;
  font-size: 14px;
}

/* Send form */
#send-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 6px;
  margin-top: 12px;
}

#send-form input,
#send-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e1e4e8;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

#send-form input:focus,
#send-form textarea:focus {
  outline: none;
  border-color: #58a6ff;
}

#send-form .btn-send {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

.status-msg {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  min-height: 20px;
}

.status-msg.success { color: #3fb950; }
.status-msg.error { color: #f85149; }

/* Notes */
.notes-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.note-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.note-item .note-body {
  flex: 1;
  font-size: 14px;
  color: #e1e4e8;
  white-space: pre-wrap;
}

.note-item .note-time {
  font-size: 11px;
  color: #6e7681;
  margin-top: 4px;
}

.note-delete {
  background: none;
  border: none;
  color: #6e7681;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.note-delete:hover { color: #f85149; background: rgba(248, 81, 73, 0.1); }

.notes-empty {
  text-align: center;
  color: #6e7681;
  padding: 24px;
  font-size: 14px;
}

#notes-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e1e4e8;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

#notes-form textarea:focus {
  outline: none;
  border-color: #d29922;
}

#notes-form .btn-note {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

/* Loading spinner */
.loading {
  text-align: center;
  padding: 32px;
  color: #6e7681;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #30363d;
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Email on card */
.card-email-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #79c0ff;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(121, 192, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-icon { font-size: 14px; }
.email-text { font-family: 'SF Mono', 'Fira Code', monospace; }

.card-gologin-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #c9d1d9;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(163, 113, 247, 0.07);
  border-radius: 6px;
  overflow: hidden;
}

.profile-label {
  color: #a371f7;
  font-weight: 600;
}

.profile-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-linkedin-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #c9d1d9;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(10, 102, 194, 0.09);
  border-radius: 6px;
  overflow: hidden;
}

.linkedin-label {
  color: #67b3ff;
  font-weight: 600;
}

.linkedin-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linkedin-audit-summary {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #c9d1d9;
  display: grid;
  gap: 6px;
}

.linkedin-audit-list {
  max-height: 420px;
  overflow-y: auto;
}

.linkedin-audit-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.linkedin-audit-head {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #79c0ff;
  margin-bottom: 6px;
}

.linkedin-audit-body {
  font-size: 13px;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Skip-Trace button styles */
.btn-skip-trace {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  flex: 1;
}

.btn-skip-trace:hover { background: rgba(168, 85, 247, 0.3); }

.btn-skip-trace-account {
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
  flex: 1;
}

.btn-skip-trace-account:hover { background: rgba(168, 85, 247, 0.35); }

.btn-skip-trace-audit {
  background: rgba(196, 181, 253, 0.16);
  color: #d8b4fe;
  flex: 1;
}

.btn-skip-trace-audit:hover { background: rgba(196, 181, 253, 0.26); }

/* Skip-Trace card display */
.card-skip-trace-display {
  font-size: 12px;
  color: #c9d1d9;
  background: #0d1117;
  border-left: 3px solid #a855f7;
  padding: 6px 10px;
  border-radius: 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.skip-trace-label {
  font-weight: 600;
  color: #d8b4fe;
}

.skip-trace-text {
  color: #c9d1d9;
  flex: 1;
}

/* Skip-Trace audit modal */
.skip-trace-audit-summary {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #c9d1d9;
  display: grid;
  gap: 6px;
  border-left: 3px solid #a855f7;
}

.skip-trace-audit-list {
  max-height: 420px;
  overflow-y: auto;
}

.skip-trace-audit-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-left: 3px solid #a855f7;
}

.skip-trace-audit-head {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #d8b4fe;
  margin-bottom: 6px;
  font-weight: 600;
}

.skip-trace-audit-body {
  font-size: 13px;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

.btn-email {
  background: rgba(121, 192, 255, 0.15);
  color: #79c0ff;
  flex: 1;
}
.btn-email:hover { background: rgba(121, 192, 255, 0.25); }

.btn-delete {
  background: rgba(248, 81, 73, 0.15);
  color: #f85149;
  flex: 1;
}
.btn-delete:hover { background: rgba(248, 81, 73, 0.25); }

.modal-lg { max-width: 720px; }

.email-address-display {
  font-size: 13px;
  color: #79c0ff;
  font-family: 'SF Mono', 'Fira Code', monospace;
  margin-top: 4px;
}

/* Email tabs */
.email-tabs {
  margin-bottom: 16px;
}

.email-tab-content { display: none; }
.email-tab-content.active { display: block; }

/* Email list */
.email-list {
  max-height: 400px;
  overflow-y: auto;
}

.email-item {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.email-item:hover {
  border-color: #79c0ff;
  background: #161b22;
}

.email-unread {
  border-left: 3px solid #79c0ff;
  background: rgba(121, 192, 255, 0.04);
}

.email-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.email-peer {
  font-size: 13px;
  font-weight: 600;
  color: #79c0ff;
}

.email-date {
  font-size: 11px;
  color: #6e7681;
}

.email-subject {
  font-size: 14px;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.email-unread .email-subject {
  color: #fff;
}

.email-preview {
  font-size: 13px;
  color: #8b949e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Email compose form */
#email-compose-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 6px;
  margin-top: 12px;
}

#email-compose-form input,
#email-compose-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e1e4e8;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

#email-compose-form input:focus,
#email-compose-form textarea:focus {
  outline: none;
  border-color: #79c0ff;
}

#email-compose-form .btn-email {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

/* Email read modal */
.email-read-meta {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.email-read-field {
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 4px;
}

.email-read-field strong {
  color: #e1e4e8;
}

.email-read-field:last-child {
  margin-bottom: 0;
}

.email-read-body {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  color: #e1e4e8;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.email-read-actions {
  display: flex;
  gap: 8px;
}

.email-read-actions .btn {
  padding: 10px 16px;
  font-size: 14px;
}

.card-notes-count {
  margin-bottom: 12px;
  font-size: 13px;
  color: #8b949e;
}

.card-profile-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-row-main {
  gap: 10px;
}

.profile-name {
  font-weight: 700;
  color: #e6edf3;
  text-transform: capitalize;
  flex: 1 1 auto;
}

.profile-ssn {
  color: #8b949e;
  font-family: monospace;
  font-size: 12px;
  white-space: nowrap;
}

.profile-dob {
  color: #8b949e;
  white-space: nowrap;
}

.profile-pool {
  color: #3fb950;
  font-weight: 600;
  white-space: nowrap;
}

.profile-label {
  color: #484f58;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  min-width: 30px;
  flex-shrink: 0;
}

.profile-value {
  color: #8b949e;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-row-tags {
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}

.profile-tag {
  background: #21262d;
  color: #8b949e;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  white-space: nowrap;
}

.profile-tag.tag-acct {
  color: #58a6ff;
}

.profile-tag.tag-approved {
  color: #3fb950;
  font-weight: 600;
}

.card-preview-block {
  border: 1px solid #21262d;
  border-radius: 8px;
  background: #0d1117;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.card-preview-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #8b949e;
  margin-bottom: 6px;
}

.card-preview-item {
  display: grid;
  grid-template-columns: 58px minmax(70px, 120px) 1fr;
  gap: 6px;
  font-size: 12px;
  line-height: 1.25;
  padding: 3px 0;
}

.preview-direction {
  color: #79c0ff;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
}

.preview-peer {
  color: #c9d1d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-text {
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-preview-empty {
  font-size: 12px;
  color: #6e7681;
}

.profile-main {
  padding: 24px 32px;
  display: grid;
  gap: 18px;
}

.profile-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-profile-link {
  background: rgba(139, 148, 158, 0.22);
  color: #c9d1d9;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-section {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 16px;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-section-head h2 {
  font-size: 18px;
  color: #f0f6fc;
}

.btn-save-profile {
  background: rgba(63, 185, 80, 0.2);
  color: #7ee787;
}

.btn-save-profile:hover {
  background: rgba(63, 185, 80, 0.3);
}

.profile-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.profile-field {
  display: grid;
  gap: 6px;
}

.profile-field span {
  font-size: 12px;
  color: #8b949e;
}

.profile-field input,
.profile-field textarea,
.inline-form input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e1e4e8;
}

.profile-field textarea {
  resize: vertical;
}

.profile-field-full {
  grid-column: span 2;
}

.profile-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
}

.profile-split-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.profile-split-lists h3 {
  font-size: 13px;
  color: #8b949e;
  margin-bottom: 6px;
}

.profile-mini-summary {
  color: #79c0ff;
  font-size: 13px;
  margin-bottom: 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.documents-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.document-item {
  border: 1px solid #21262d;
  border-radius: 8px;
  background: #0d1117;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.document-item a {
  color: #79c0ff;
  text-decoration: none;
}

.document-item a:hover {
  text-decoration: underline;
}

.agent-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .profile-fields-grid,
  .profile-two-col,
  .agent-action-grid {
    grid-template-columns: 1fr;
  }

  .profile-field-full {
    grid-column: span 1;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #484f58; }

.btn-collab {
  background: rgba(80, 80, 200, 0.18);
  color: #a0a0ff;
  border: 1px solid rgba(100, 100, 220, 0.35);
  padding: 6px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-collab:hover { background: rgba(80, 80, 200, 0.32); color: #c0c0ff; }

.btn-ingest {
  background: rgba(200, 140, 60, 0.18);
  color: #e0a050;
  border: 1px solid rgba(200, 140, 60, 0.35);
  padding: 6px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ingest:hover { background: rgba(200, 140, 60, 0.32); color: #f0b060; }

.btn-export-csv {
  background: rgba(63, 185, 80, 0.15);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.35);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-export-csv:hover { background: rgba(63, 185, 80, 0.3); color: #56d364; }

/* ── OpenClaw Integration ───────────────────────────────────────────────────── */

.btn-openclaw {
  background: rgba(124, 109, 240, 0.15);
  color: #a89bfc;
  border: 1px solid rgba(124, 109, 240, 0.35);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-openclaw:hover { background: rgba(124, 109, 240, 0.32); color: #c4baff; }

.openclaw-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #484f58;
  display: inline-block;
  transition: background 0.3s;
}
.openclaw-dot.online { background: #3fb950; box-shadow: 0 0 6px rgba(63,185,80,0.5); }
.openclaw-dot.offline { background: #f85149; }

/* Slide-out panel */
.openclaw-panel {
  position: fixed;
  top: 0; right: 0;
  width: 420px;
  height: 100vh;
  background: #161b22;
  border-left: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}
.openclaw-panel.hidden { transform: translateX(100%); pointer-events: none; }

.openclaw-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #30363d;
  background: #1a1e2e;
}
.openclaw-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: #e6edf3;
}
.openclaw-logo { font-size: 18px; }
.openclaw-status {
  font-size: 11px;
  font-weight: 500;
  color: #8b949e;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(139,148,158,0.12);
}
.openclaw-status.online { color: #3fb950; background: rgba(63,185,80,0.12); }
.openclaw-status.error { color: #f85149; background: rgba(248,81,73,0.12); }

.openclaw-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-oc {
  background: rgba(139,148,158,0.12);
  color: #8b949e;
  border: 1px solid #30363d;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-oc:hover { background: rgba(139,148,158,0.22); color: #e6edf3; }
.btn-oc-send {
  background: rgba(124,109,240,0.2);
  color: #a89bfc;
  border-color: rgba(124,109,240,0.35);
  padding: 8px 16px;
  font-weight: 600;
}
.btn-oc-send:hover { background: rgba(124,109,240,0.35); }

.openclaw-agent-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #21262d;
  font-size: 13px;
  color: #8b949e;
}
.openclaw-agent-select select {
  flex: 1;
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid #30363d;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.openclaw-chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oc-msg {
  max-width: 90%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.oc-msg.user {
  align-self: flex-end;
  background: rgba(124,109,240,0.18);
  color: #ddd8ff;
  border: 1px solid rgba(124,109,240,0.25);
}
.oc-msg.agent {
  align-self: flex-start;
  background: #1c2030;
  color: #c9d1d9;
  border: 1px solid #2a2d3a;
}
.oc-msg.agent.streaming { border-color: rgba(124,109,240,0.4); }
.oc-msg.error {
  align-self: center;
  background: rgba(248,81,73,0.1);
  color: #f85149;
  border: 1px solid rgba(248,81,73,0.25);
  font-size: 12px;
}

.openclaw-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #30363d;
  background: #1a1e2e;
}
.openclaw-input input {
  flex: 1;
  background: #0d1117;
  color: #e6edf3;
  border: 1px solid #30363d;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.openclaw-input input:focus { border-color: #7c6df0; }
