/* ── Buzz Chat UI ──────────────────────────────────── */

.buzz-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 50px);
  overflow: hidden;
}

/* Header */
.buzz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  flex-shrink: 0;
}

.buzz-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.buzz-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.buzz-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #334155;
}

[data-theme="dark"] .buzz-header-title {
  color: #f1f5f9;
}

.buzz-header-subtitle {
  font-size: 12px;
  color: #64748b;
}

.buzz-header-actions {
  display: flex;
  gap: 8px;
}

.buzz-clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.buzz-clear-btn:hover {
  background: var(--bg);
  color: var(--text);
  border-color: #2563eb;
}

/* Proactive Banner */
.buzz-proactive-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  flex-shrink: 0;
}

[data-theme="dark"] .buzz-proactive-banner {
  background: #451a0320;
  border-color: #92400e40;
}

.buzz-proactive-icon {
  color: #F5A623;
  flex-shrink: 0;
}

.buzz-proactive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.buzz-proactive-actions button {
  padding: 6px 14px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.buzz-proactive-actions button:hover {
  background: #e2e8f0;
}

[data-theme="dark"] .buzz-proactive-actions button {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}

[data-theme="dark"] .buzz-proactive-actions button:hover {
  background: #334155;
}

.buzz-proactive-dismiss {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* Messages Area */
.buzz-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px;
  scroll-behavior: smooth;
}

/* Welcome state */
.buzz-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.buzz-welcome-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.buzz-welcome h2 {
  font-size: 24px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

[data-theme="dark"] .buzz-welcome h2 {
  color: #f1f5f9;
}

.buzz-welcome p {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 28px;
}

[data-theme="dark"] .buzz-welcome p {
  color: #94a3b8;
}

.buzz-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.buzz-suggestion-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-bg);
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

[data-theme="dark"] .buzz-suggestion-chip {
  color: #94a3b8;
}

.buzz-suggestion-chip:hover {
  border-color: #2563eb;
  background: var(--blue-bg);
  color: #2563eb;
}

.buzz-suggestion-chip svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.buzz-suggestion-chip:hover svg {
  opacity: 1;
}

/* Message bubbles */
.buzz-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  max-width: 720px;
}

.buzz-msg.user {
  flex-direction: row-reverse;
  margin-left: auto;
}

.buzz-msg.assistant {
  margin-right: auto;
}

.buzz-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.buzz-msg.assistant .buzz-msg-avatar {
  background: transparent;
}

.buzz-msg.user .buzz-msg-avatar {
  background: #f1f5f9;
}

[data-theme="dark"] .buzz-msg.user .buzz-msg-avatar {
  background: #334155;
}

.buzz-msg-content {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  max-width: 100%;
  overflow-wrap: break-word;
}

[data-theme="dark"] .buzz-msg-content {
  color: #cbd5e1;
}

.buzz-msg.assistant .buzz-msg-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.buzz-msg.user .buzz-msg-content {
  background: #2563eb;
  color: white;
  border-top-right-radius: 4px;
}

.buzz-msg-content p {
  margin-bottom: 8px;
}

.buzz-msg-content p:last-child {
  margin-bottom: 0;
}

.buzz-msg-content strong {
  font-weight: 600;
}

.buzz-msg-content code {
  background: rgba(0,0,0,0.06);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
}

[data-theme="dark"] .buzz-msg-content code {
  background: rgba(255,255,255,0.1);
}

.buzz-msg-time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.buzz-msg.user .buzz-msg-time {
  text-align: right;
}

/* Rich Components */
.buzz-components {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Transaction Card */
.buzz-txn-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.buzz-txn-info {
  flex: 1;
  min-width: 0;
}

.buzz-txn-desc {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .buzz-txn-desc {
  color: #f1f5f9;
}

.buzz-txn-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.buzz-txn-amount {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.buzz-txn-amount.expense { color: #dc2626; }
.buzz-txn-amount.income { color: #16a34a; }

.buzz-txn-actions {
  display: flex;
  gap: 6px;
}

.buzz-txn-actions button {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.buzz-txn-actions button.approve {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.buzz-txn-actions button.approve:hover {
  background: #1d4ed8;
}

.buzz-txn-actions button:hover {
  border-color: #2563eb;
}

/* Summary Card */
.buzz-summary-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.buzz-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

[data-theme="dark"] .buzz-summary-title {
  color: #f1f5f9;
}

.buzz-summary-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.buzz-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.buzz-summary-label {
  color: #475569;
}

[data-theme="dark"] .buzz-summary-label {
  color: #94a3b8;
}

.buzz-summary-value {
  font-weight: 600;
  color: #334155;
}

[data-theme="dark"] .buzz-summary-value {
  color: #f1f5f9;
}

/* Action Buttons */
.buzz-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.buzz-action-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #2563eb;
  background: var(--blue-bg);
  color: #2563eb;
  transition: all 0.15s;
}

.buzz-action-btn:hover {
  background: #2563eb;
  color: white;
}

/* Typing Indicator */
.buzz-typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.buzz-typing-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  animation: buzzDotPulse 1.4s ease-in-out infinite;
}

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

@keyframes buzzDotPulse {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* Input Area */
.buzz-input-area {
  padding: 16px 24px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.buzz-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 8px 8px 16px;
  transition: border-color 0.15s;
}

.buzz-input-wrapper:focus-within {
  border-color: #F5A623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.buzz-input-wrapper textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  max-height: 120px;
  padding: 4px 0;
}

.buzz-input-wrapper textarea::placeholder {
  color: #94a3b8;
}

.buzz-upload-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.buzz-upload-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: var(--blue-bg);
}

.buzz-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}

.buzz-send-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

[data-theme="dark"] .buzz-send-btn:disabled {
  background: #334155;
  color: #64748b;
}

.buzz-send-btn:not(:disabled):hover {
  background: #1d4ed8;
}

.buzz-input-hint {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Anomaly Cards */
/* Auto-Rule Suggestion Cards */
.buzz-rule-suggestion {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

[data-theme="dark"] .buzz-rule-suggestion {
  background: #0c2d48;
  border-color: #1e5a8a40;
}

.rule-suggestion-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2563eb;
}

[data-theme="dark"] .rule-suggestion-icon {
  color: #60a5fa;
}

.rule-suggestion-body {
  flex: 1;
  min-width: 0;
}

.rule-suggestion-message {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 10px;
}

[data-theme="dark"] .rule-suggestion-message {
  color: #cbd5e1;
}

.rule-suggestion-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rule-create-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: #2563eb;
  color: white;
  border: 1px solid #2563eb;
  transition: all 0.15s;
}

.rule-create-btn:hover {
  background: #1d4ed8;
}

.rule-skip-btn {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.rule-skip-btn:hover {
  border-color: #94a3b8;
  color: var(--text);
}

/* ── Responsive ─────────────────────────────────── */

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .buzz-main {
    margin-left: 0;
    max-width: 100vw;
  }

  .buzz-header {
    display: none;
  }

  /* Buzz page — global-header is fixed 50px, no mobile-header */
  .buzz-main {
    margin-top: 0;
    height: calc(100vh - 50px) !important;
    height: calc(100svh - 50px) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  #onboardingProgressBar {
    padding: 6px 16px !important;
    margin-top: 0;
    flex-shrink: 0;
  }

  #onboardingProgressSteps {
    display: none !important;
  }

  .buzz-messages {
    padding: 16px;
    padding-bottom: 8px !important;
    margin-top: 0;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }

  .buzz-input-area {
    flex-shrink: 0;
  }

  .buzz-input-area {
    padding: 10px 16px 14px;
  }

  .buzz-welcome {
    padding: 40px 16px;
  }

  .buzz-welcome h2 {
    font-size: 20px;
  }

  .buzz-suggestions {
    flex-direction: column;
    align-items: stretch;
  }

  .buzz-suggestion-chip {
    justify-content: center;
  }

  .buzz-msg {
    max-width: 100%;
    overflow: hidden;
  }

  .buzz-msg-content {
    max-width: calc(100vw - 80px);
    overflow: hidden;
  }

  .buzz-clear-btn span {
    display: none;
  }

  .buzz-proactive-banner {
    display: none !important;
  }

  .buzz-txn-card {
    flex-wrap: wrap;
  }

  .buzz-txn-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .buzz-anomaly-card {
    flex-wrap: wrap;
  }

  .anomaly-actions {
    width: 100%;
  }

  .buzz-rule-suggestion {
    flex-wrap: wrap;
  }

  .rule-suggestion-actions {
    width: 100%;
  }

  .buzz-onboarding-buttons {
    flex-direction: column;
  }

  .buzz-onboarding-btn {
    width: 100%;
    justify-content: center;
  }

  .buzz-onboarding-txn-group {
    flex-wrap: wrap;
  }

  .buzz-onboarding-txn-group .buzz-txn-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }
}

/* ── Nav Unlock Animations ─────────────────────── */

.nav-unlock-group.nav-unlocking {
  animation: navUnlock 0.5s ease forwards;
}

.nav-unlock-group.nav-unlocking .nav-item {
  animation: navGlow 0.6s ease 0.3s 3;
}

@keyframes navUnlock {
  0% { opacity: 0; transform: translateX(-20px); }
  50% { opacity: 1; transform: translateX(4px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes navGlow {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px 2px rgba(245, 166, 35, 0.4); }
}

.nav-item.nav-wiggling {
  animation: navWiggle 0.3s ease 3;
}

@keyframes navWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
}

/* ── Onboarding Checklist ──────────────────────── */

.buzz-onboarding-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.buzz-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #475569;
  padding: 4px 0;
  transition: opacity 0.3s;
}

[data-theme="dark"] .buzz-checklist-item {
  color: #cbd5e1;
}

.buzz-checklist-item.done {
  opacity: 0.6;
}

.buzz-checklist-item.done .buzz-checklist-label {
  text-decoration: line-through;
}

.buzz-checklist-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

[data-theme="dark"] .buzz-checklist-check {
  border-color: #475569;
}

.buzz-checklist-check.checked {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
  animation: checkBounce 0.4s ease;
}

@keyframes checkBounce {
  0% { transform: scale(0.5); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.buzz-checklist-label {
  flex: 1;
}

/* ── Onboarding Components ──────────────────────── */

/* Action Buttons (onboarding quick-select) */
.buzz-onboarding-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.buzz-onboarding-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: #334155;
  transition: all 0.15s;
  white-space: nowrap;
}

[data-theme="dark"] .buzz-onboarding-btn {
  color: #e2e8f0;
}

.buzz-onboarding-btn:hover:not(.disabled) {
  border-color: #2563eb;
  background: var(--blue-bg, #eff6ff);
  color: #2563eb;
}

.buzz-onboarding-btn.selected {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

.buzz-onboarding-btn.disabled,
.buzz-onboarding-btn.btn-history,
.buzz-onboarding-btn[disabled] {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Text Input (onboarding) */
.buzz-onboarding-text-input {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.buzz-onboarding-text-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.buzz-onboarding-text-input input:focus {
  border-color: #F5A623;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.buzz-onboarding-text-input input::placeholder {
  color: #94a3b8;
}

.buzz-onboarding-text-input button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.buzz-onboarding-text-input button:hover {
  background: #1d4ed8;
}

.buzz-onboarding-text-input button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* Transaction Group Card (onboarding categorization) */
.buzz-onboarding-txn-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.buzz-onboarding-txn-group .buzz-txn-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  transition: all 0.15s;
}

.buzz-onboarding-txn-group .buzz-txn-actions button.approve {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

.buzz-onboarding-txn-group .buzz-txn-actions button.approve:hover {
  background: #1d4ed8;
}

.buzz-onboarding-txn-group .buzz-txn-actions button:hover {
  border-color: #2563eb;
}

.buzz-txn-count {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

/* Receipt Scan Modal */
.buzz-receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.buzz-receipt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}
.buzz-receipt-modal-content {
  position: relative;
  background: var(--bg, #fff);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.buzz-receipt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.buzz-receipt-dropzone {
  border: 2px dashed var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.buzz-receipt-dropzone:hover,
.buzz-receipt-dropzone.dragover {
  border-color: #F5A623;
  background: rgba(245, 166, 35, 0.04);
}

/* ── Upload Type Picker ──────────────────────────── */
.buzz-upload-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 260px;
  z-index: 50;
  animation: buzzPickerFadeIn 0.12s ease-out;
}
@keyframes buzzPickerFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.buzz-upload-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.buzz-upload-picker-item:hover {
  background: var(--bg-secondary, #f1f5f9);
}
.buzz-upload-picker-item + .buzz-upload-picker-item {
  margin-top: 2px;
}
.buzz-upload-picker-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.buzz-upload-picker-label {
  flex: 1;
}
.buzz-upload-picker-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text, #334155);
}
.buzz-upload-picker-sub {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  margin-top: 1px;
}

/* ── Payout Preview Card ─────────────────────────── */
.buzz-payout-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  min-width: 300px;
  max-width: 460px;
}
.buzz-payout-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text, #334155);
  margin-bottom: 4px;
}
.buzz-payout-reconcile {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
}
.buzz-payout-reconcile.ok {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}
.buzz-payout-reconcile.warn {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.buzz-payout-meta {
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  margin-bottom: 10px;
}
.buzz-payout-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--border, #e2e8f0);
}
.buzz-payout-field:first-of-type {
  border-top: none;
}
.buzz-payout-field label {
  flex: 1;
  font-size: 13px;
  color: var(--text, #334155);
}
.buzz-payout-field .hint {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  display: block;
  margin-top: 1px;
  font-weight: 400;
}
.buzz-payout-field input[type="text"],
.buzz-payout-field input[type="number"] {
  width: 110px;
  padding: 6px 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  background: var(--bg, #fff);
  color: var(--text, #334155);
}
.buzz-payout-field input[type="text"].wide {
  flex: 1;
  width: auto;
  text-align: left;
}
.buzz-payout-totals {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px solid var(--border, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}
.buzz-payout-totals.mismatch {
  color: #c2410c;
}
.buzz-payout-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.buzz-payout-approve-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #F5A623;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
.buzz-payout-approve-btn:hover { background: #e4940b; }
.buzz-payout-approve-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.buzz-payout-cancel-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #fff);
  color: var(--text-secondary, #64748b);
  cursor: pointer;
  font-size: 13px;
}

/* ── Inline Invoice Form Card ──────────────────── */
.buzz-invoice-form-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 16px;
  min-width: 300px;
  max-width: 420px;
}

.buzz-invoice-form-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #334155);
  margin-bottom: 14px;
}

.buzz-invoice-form-header svg {
  color: #2563eb;
  flex-shrink: 0;
}

.buzz-invoice-form-field {
  margin-bottom: 10px;
}

.buzz-invoice-form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  margin-bottom: 4px;
}

.buzz-invoice-form-field label .required {
  color: #ef4444;
}

.buzz-invoice-form-field .form-input,
.buzz-invoice-form-field .form-select {
  width: 100%;
  box-sizing: border-box;
}

.buzz-invoice-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.buzz-invoice-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.buzz-invoice-form-submit {
  flex: 1;
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.buzz-invoice-form-submit:hover {
  background: #1d4ed8;
}

.buzz-invoice-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.buzz-invoice-form-cancel {
  padding: 8px 16px;
  background: var(--bg, #f1f5f9);
  color: var(--text-secondary, #64748b);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.buzz-invoice-form-cancel:hover {
  background: var(--border, #e2e8f0);
  color: var(--text, #334155);
}

.buzz-invoice-line-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.buzz-invoice-line-item:last-child {
  border-bottom: none;
}

.buzz-add-line-item-btn {
  width: 100%;
  padding: 10px;
  background: var(--bg-light, #f8fafc);
  color: var(--brand, #2563eb);
  border: 1px dashed var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.15s;
}

.buzz-add-line-item-btn:hover {
  background: var(--brand-light, #eff6ff);
  border-color: var(--brand, #2563eb);
}

.buzz-remove-line-item-btn {
  width: 32px;
  height: 32px;
  background: var(--bg, #f1f5f9);
  color: var(--text-secondary, #64748b);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 24px;
  transition: all 0.15s;
}

.buzz-remove-line-item-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

/* Mobile: stack amount + due date vertically */
@media (max-width: 480px) {
  .buzz-invoice-form-row {
    grid-template-columns: 1fr;
  }
  .buzz-invoice-form-card {
    min-width: unset;
  }
}
