/* Revision: 2026-03-18 – Add light theme overrides for receipts panels, badges, modals, edit form */
/* Revision: 2026-04-22-color-pass2 — Second pass color correction */
/* Revision: 2026-04-22-color-migration — Color migration — match migration landing palette */

/* dashboard.css — Dashboard, connections, analysis, health, settings */
/* Payout row selection */
.payout-row:hover   { background: var(--row-hover, rgba(255,255,255,0.03)); }
.payout-row.selected { background: rgba(34,165,89,0.08) !important; box-shadow: inset 3px 0 0 #22a559; }
/* ============================================================================
   30. Dashboard — TheReconciliator
   ============================================================================ */

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card  { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.metric-card h3 { font-size: 14px; color: #64748b; margin: 0 0 8px; }
.metric-value   { font-size: 32px; font-weight: 700; color: #111a14; }
.metric-change  { font-size: 13px; color: #22a559; margin-top: 4px; }

.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.section-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.section-title  { font-size: 18px; font-weight: 600; color: #f9fafb; margin: 0; }

/* ============================================================================
   31. Connection Cards
   ============================================================================ */

.connection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.connection-card  { background: white; border-radius: 12px; padding: 20px; display: flex; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid #e2dfd7; transition: all 0.2s; align-items: flex-start; }
.connection-card:hover { border-color: #d4cfc7; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.connection-card#qbo-card { border-left: 4px solid #2ca01c; }
.card-content      { flex: 1; min-height: 80px; }
.card-content h3   { margin: 0 0 4px; font-size: 16px; }
.card-content .card-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.card-actions      { margin-top: 12px; }
.company-name, .connected-date, .store-url { font-size: 12px; color: #64748b; margin: 4px 0 0; }
.store-name        { font-size: 15px; font-weight: 600; color: #111a14; margin-bottom: 2px; }
.store-details     { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #64748b; }
.store-details span { display: flex; align-items: center; gap: 4px; }
.connection-error  { color: #dc2626; font-size: 13px; }

/* ============================================================================
   32. Action Cards
   ============================================================================ */

.action-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1200px) { .action-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .action-cards { grid-template-columns: 1fr; } }

.action-card  { background: white; border-radius: 12px; padding: 24px; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid transparent; }
.action-card:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: #e2dfd7; }
.action-card:active { transform: translateY(0); }
.action-card.primary-action { background: linear-gradient(135deg, #22a559 0%, #22a559 100%); color: white; }
.action-card.primary-action:hover { background: linear-gradient(135deg, #16a34a 0%, #22a559 100%); box-shadow: 0 8px 24px rgba(34,165,89,0.25); }
.action-card.primary-action h3,
.action-card.primary-action p { color: white; }
.action-card.primary-action p { opacity: 0.9; }
.action-icon     { font-size: 32px; margin-bottom: 12px; }
.action-card h3  { margin: 0 0 8px; font-size: 16px; color: #111a14; }
.action-card p   { margin: 0; font-size: 13px; color: #64748b; }
.action-card.locked { opacity: 0.45; cursor: not-allowed; position: relative; border: 2px dashed #d1d5db; }
.action-card.locked:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.05); opacity: 0.65; border-color: #f59e0b; }
.action-card.locked .lock-badge { position: absolute; top: 10px; right: 10px; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px; }

/* ============================================================================
   33. Analysis Pages (Shared — Order & Customer)
   ============================================================================ */

.analysis-header   { margin-bottom: 24px; }
.analysis-header h2 { font-size: 24px; font-weight: 600; color: #111a14; margin: 0 0 4px; }
.analysis-subtitle { font-size: 15px; color: #64748b; }

.stats-grid     { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card      { background: white; border-radius: 10px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); text-align: center; }
.stat-number    { font-size: 28px; font-weight: 700; color: #111a14; }
.stat-icon      { font-size: 24px; margin-bottom: 8px; }
.stat-label     { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value     { font-size: 20px; font-weight: 600; color: #111a14; }

.match-results  { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.match-icon     { font-size: 20px; }
.match-label    { font-size: 14px; font-weight: 500; color: #2d3b28; }

.custom-date-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 500; display: none; align-items: center; justify-content: center; }
.custom-date-overlay.active { display: flex; }
.custom-date-dialog { background: white; border-radius: 12px; padding: 24px; min-width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.custom-date-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.custom-date-header h3 { margin: 0; font-size: 18px; }
.custom-date-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.custom-date-body   { display: flex; flex-direction: column; gap: 12px; }
.custom-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.custom-date-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.custom-date-field input { width: 100%; padding: 8px 10px; border: 1px solid #e2dfd7; border-radius: 6px; font-size: 14px; }
.custom-date-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

.log-entry { padding: 8px 12px; border-bottom: 1px solid #faf9f6; font-size: 13px; color: #2d3b28; }

.tab-btn        { padding: 8px 16px; border: 1px solid #e2dfd7; border-radius: 6px; background: #f2f0eb; color: #2d3b28; cursor: pointer; font-size: 14px; transition: all 0.15s; }
.tab-btn:hover  { background: #e2dfd7; }
.tab-btn.active { background: #22a559; color: white; border-color: #22a559; }

/* ============================================================================
   34. Health Pages (Shared — Financial & QBO)
   ============================================================================ */

.health-container { max-width: 900px; }

.score-card-main { background: linear-gradient(135deg, #152818 0%, #18261c 100%); border-radius: 16px; padding: 32px; color: white; display: flex; gap: 32px; align-items: center; margin-bottom: 32px; }
.score-circle-wrapper { position: relative; }
.score-circle { width: 140px; height: 140px; border-radius: 50%; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-number { font-size: 48px; font-weight: 700; color: #111a14; line-height: 1; }
.score-label  { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.score-info h2 { font-size: 24px; margin-bottom: 8px; }
.score-info p  { opacity: 0.85; font-size: 15px; }
.score-date    { font-size: 13px; opacity: 0.7; margin-top: 8px; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.category-card   { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.category-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.category-icon   { font-size: 24px; }
.category-score  { font-size: 20px; font-weight: 700; color: #111a14; margin-left: auto; }
.category-bar    { height: 8px; background: #e2dfd7; border-radius: 4px; overflow: hidden; }
.category-bar-fill { height: 100%; border-radius: 4px; background: #22a559; }

.issues-section  { margin-bottom: 32px; }
.issues-section h3 { font-size: 20px; font-weight: 600; color: #111a14; margin-bottom: 16px; }
.issue-group     { border: 1px solid #e2dfd7; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.issue-group-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background 0.15s; }
.issue-group-header:hover { background: #f2f0eb; }
.issue-group-icon  { font-size: 20px; }
.issue-group-title { flex: 1; font-weight: 500; color: #111a14; }
.issue-group-count { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 10px; }
.issue-group-count.medium { background: #fef3c7; color: #92400e; }
.issue-group-count.low    { background: #d1fae5; color: #065f46; }
.issue-group-chevron { font-size: 12px; color: #64748b; transition: transform 0.2s; }
.issue-group.expanded .issue-group-chevron { transform: rotate(180deg); }
.issue-group-content { display: none; padding: 0; background: #f2f0eb; }
.issue-group.expanded .issue-group-content { display: block; }

.issue-card     { padding: 16px; border-bottom: 1px solid #e2dfd7; display: flex; gap: 16px; align-items: flex-start; }
.issue-card:last-child { border-bottom: none; }
.issue-card.medium { border-left: 3px solid #f59e0b; }
.issue-card.low    { border-left: 3px solid #22a559; }
.issue-icon        { font-size: 20px; flex-shrink: 0; }
.issue-content     { flex: 1; }
.issue-title       { font-weight: 500; color: #111a14; margin-bottom: 4px; }
.issue-description { font-size: 14px; color: #64748b; line-height: 1.5; }
.issue-action      { font-size: 13px; color: #22a559; text-decoration: none; display: inline-block; margin-top: 8px; }

.progress-bar-container { background: #e2dfd7; border-radius: 8px; height: 10px; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }

.score-circle-wrapper.critical::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid #dc2626; animation: pulse-danger 2s infinite; }
@keyframes pulse-danger { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================================
   35. Inventory Page
   ============================================================================ */

.summary-row   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.summary-row:last-child { border-bottom: none; }
.summary-label { font-size: 14px; color: #64748b; }
.summary-value { font-size: 14px; font-weight: 600; color: #111a14; }

/* ============================================================================
   36. Settings Page
   ============================================================================ */

.settings-section { background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.settings-section h2 { font-size: 18px; font-weight: 600; color: #111a14; margin-bottom: 16px; }
.setting-card { padding: 16px; border: 1px solid #e2dfd7; border-radius: 8px; margin-bottom: 12px; }
.header-actions select { padding: 8px 12px; border: 1px solid #e2dfd7; border-radius: 6px; font-size: 14px; }

/* ============================================================================
   42. TheReconciliator Dashboard — Dark Sidebar Layout
        (dashboard-thereconciliator.pug)
   ============================================================================ */

/* Account bar at top of dark dashboard pages */
.dashboard .account-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0;
  margin-bottom: 12px;
}

.dashboard .header-left h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #f9fafb;
}

.dashboard .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Connection Cards — dark sidebar variant */
.dashboard .connection-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dashboard .connection-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 28px 32px 64px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: 160px;
  position: relative;
}

.dashboard .connection-icon {
  font-size: 48px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 14px;
  flex-shrink: 0;
}

.dashboard .connection-info { flex: 1; }

.dashboard .connection-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 4px;
}

.dashboard .connection-name { font-size: 14px; color: #9ca3af; margin: 0 0 8px; }

.dashboard .connection-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.dashboard .connection-badge.connected { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.dashboard .connection-badge.disconnected { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.qbo-connect-btn { height: 32px; width: auto; display: block; }
.qbo-connect-btn:hover { content: url('/images/qbo/Connect_to_QuickBooks_SVG/C2QB_green_btn_med_hover.svg'); }
.env-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; margin-left: 8px; vertical-align: middle; }
.env-sandbox { background: rgba(234, 179, 8, 0.2); color: #ca8a04; border: 1px solid rgba(234,179,8,0.3); }
.env-production { background: rgba(16, 185, 129, 0.2); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.connection-detail { font-size: 12px; color: var(--text-mid, #8a99ad); margin: 2px 0; }
.connection-detail-row { display: flex; gap: 16px; margin-top: 4px; }
.platform-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgba(34,165,89,0.12); color: #4ade80; border: 1px solid rgba(34,165,89,0.2); margin-left: 6px; }
.connected-stores-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.connected-store-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(34,165,89,0.05); border: 1px solid rgba(34,165,89,0.12); }
.connected-store-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.connected-store-detail { font-size: 11px; color: var(--text-mid, #8a99ad); }
.btn-disconnect { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 5px; background: rgba(239,68,68,0.75); color: #ffffff; border: 1px solid rgba(239,68,68,0.5); text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.btn-disconnect:hover { background: rgba(239,68,68,0.95); }

.dashboard .btn-link {
  color: #22a559;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.dashboard .btn-link:hover { text-decoration: underline; }

/* Metrics Grid — dark sidebar variant */
.dashboard .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dashboard .metric-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard .metric-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}

.dashboard .metric-content { flex: 1; }

.dashboard .metric-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dashboard .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.2;
}

.dashboard .metric-sublabel { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* Quick Actions — dark sidebar variant */
.dashboard .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dashboard .quick-action-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.dashboard .quick-action-card:hover {
  border-color: #22a559;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.dashboard .quick-action-card.card-highlight {
  background: linear-gradient(135deg, #152818 0%, #18261c 100%);
  border-color: #22a559;
}

.dashboard .qa-icon { font-size: 36px; margin-bottom: 16px; }

.dashboard .qa-content h3 { font-size: 16px; font-weight: 600; color: #f9fafb; margin: 0 0 6px; }
.dashboard .qa-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

/* Tools Grid — dark sidebar variant */
.dashboard .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dashboard .tool-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.dashboard .tool-card:not(.disabled):hover {
  border-color: #22a559;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.dashboard .tool-card.disabled { opacity: 0.6; cursor: not-allowed; }

.dashboard .tool-icon { font-size: 32px; }

.dashboard .tool-content h3 { font-size: 15px; font-weight: 600; color: #f9fafb; margin: 0 0 4px; }
.dashboard .tool-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

.dashboard .tool-content .coming-soon {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  background: #152818;
  padding: 3px 8px;
  border-radius: 4px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dashboard .quick-actions-grid { grid-template-columns: 1fr; }
  .dashboard .metrics-grid       { grid-template-columns: 1fr; }
}



/* --- connect-bigcommerce (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-back-method { display: inline-block; color: #475569; font-size: 0.85rem; text-decoration: none; margin-bottom: 20px; }
.cs-back-method:hover { color: #94a3b8; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(34,197,94,0.12) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-method-cards { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 480px; }
.cs-method-card { position: relative; background: #111a14; border: 1px solid #111a14; border-radius: 14px; padding: 24px; text-decoration: none; color: inherit; display: block; transition: border-color 0.2s, transform 0.15s; cursor: pointer; }
.cs-method-card:hover { border-color: #16a34a; transform: translateY(-2px); }
.cs-method-badge { position: absolute; top: 14px; right: 14px; background: #16a34a; color: #fff; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 20px; }
.cs-method-icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.cs-method-title { font-size: 1rem; font-weight: 700; color: #faf9f6; margin: 0 0 6px; }
.cs-method-desc { font-size: 0.82rem; color: #475569; margin: 0; line-height: 1.6; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 16px; line-height: 1.6; }
.cs-hint { font-size: 0.8rem; color: #1a2820; margin: 0 0 14px; line-height: 1.6; }
.cs-hint code { background: #111a14; padding: 1px 6px; border-radius: 4px; color: #94a3b8; font-size: 0.78rem; }
.cs-label { display: block; font-size: 0.8rem; font-weight: 600; color: #64748b; margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-input { width: 100%; padding: 10px 12px; background: #0f1109; border: 1px solid #111a14; border-radius: 8px; color: #faf9f6; font-size: 0.9rem; box-sizing: border-box; outline: none; }
.cs-input:focus { border-color: #22c55e; }
.cs-btn-primary { display: block; text-align: center; padding: 12px; background: #22c55e; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s; width: 100%; box-sizing: border-box; }
.cs-btn-primary:hover { background: #22a559; color: #fff; }
.cs-connected-state { text-align: center; }
.cs-connected-icon { font-size: 2rem; color: #4ade80; margin-bottom: 8px; display: block; }
.cs-btn-danger { display: block; width: 100%; text-align: center; padding: 10px; background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 12px; transition: background 0.2s; box-sizing: border-box; }
.cs-btn-danger:hover { background: rgba(239,68,68,0.2); }


/* --- connect-store (migrated from inline style block) --- */
/* Allow full page scroll on this view */
.page-wrapper { height: auto !important; overflow: visible !important; min-height: 100vh; }
.main-content { overflow-y: visible !important; height: auto !important; }
/* ── Connect Store Page ──────────────────────────────────── */
.cs-page {
  min-height: 100vh;
  background: #0b1108;
  font-family: inherit;
}

/* Header */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cs-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* Hero */
.cs-hero {
  position: relative;
  text-align: center;
  padding: 56px 40px 40px;
  overflow: hidden;
}
.cs-hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(34,165,89,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon {
  font-size: 2.75rem;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(34,165,89,0.35));
}
.cs-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #faf9f6;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.cs-hero-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 auto;
  max-width: 480px;
  line-height: 1.7;
}

/* Cards grid */
.cs-cards-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 40px 64px;
}
.cs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1000px;
}
.cs-card {
  background: #111a14;
  border: 1px solid #111a14;
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}
.cs-card:not(.cs-card-disabled):hover {
  border-color: #22a559;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(34,165,89,0.12);
}
.cs-card-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Card Header */
.cs-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.cs-card-emoji { line-height: 1; }
.cs-woo        { background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-amazon     { background: rgba(255,153,0,0.12);  border: 1px solid rgba(255,153,0,0.2);  }
.cs-bigcommerce{ background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-wix        { background: rgba(250,204,21,0.10); border: 1px solid rgba(250,204,21,0.2); }
.cs-s4s        { background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-ebay       { background: rgba(231,76,60,0.10);  border: 1px solid rgba(231,76,60,0.2);  }
.cs-shopify    { background: rgba(149,191,71,0.10); border: 1px solid rgba(149,191,71,0.2); }
.cs-card-img   { width: 28px; height: 28px; object-fit: contain; }

.cs-card-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 20px;
}
.cs-status-connected {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.cs-status-available {
  background: rgba(16,185,129,0.12);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.25);
}
.cs-status-soon {
  background: rgba(148,163,184,0.08);
  color: #64748b;
  border: 1px solid rgba(148,163,184,0.15);
}

/* Card Body */
.cs-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #faf9f6;
  margin: 0 0 6px;
}
.cs-card-desc {
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* Card Footer */
.cs-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #1a2318;
}
.cs-card-cta    { font-size: 0.875rem; font-weight: 600; color: #22a559; }
.cs-card-disconnect { font-size: 0.875rem; font-weight: 600; color: #ef4444; }
.cs-card-notify { font-size: 0.875rem; font-weight: 600; color: #2d3f28; }

/* Responsive */
@media (max-width: 900px) {
  .cs-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cs-header { padding: 16px 20px; }
  .cs-hero { padding: 36px 20px 28px; }
  .cs-hero-title { font-size: 1.75rem; }
  .cs-cards-wrapper { padding: 0 20px 40px; }
  .cs-cards { grid-template-columns: 1fr; }
}


/* --- connect-wix (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(250,204,21,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 24px; line-height: 1.6; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(250,204,21,0.15); border: 1px solid rgba(250,204,21,0.3); color: #fbbf24; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-input-group { margin-bottom: 16px; }
.cs-input { width: 100%; padding: 10px 14px; background: #0b1108; border: 1px solid #111a14; border-radius: 8px; color: #faf9f6; font-size: 0.875rem; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.cs-input:focus { border-color: #22a559; }
.cs-input::placeholder { color: #1a2820; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #4ade80; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-btn-primary { display: block; width: 100%; text-align: center; padding: 12px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.cs-btn-primary:hover { background: #16a34a; }
.cs-btn-primary:disabled { background: #1a2820; cursor: not-allowed; }
.cs-connected-state { text-align: center; padding: 16px 0; }
.cs-connected-icon { font-size: 2rem; color: #4ade80; display: block; margin-bottom: 10px; }
.cs-btn-danger { display: block; width: 100%; text-align: center; padding: 11px; background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 16px; transition: background 0.2s; box-sizing: border-box; }
.cs-btn-danger:hover { background: rgba(239,68,68,0.2); }


/* --- connect-woocommerce (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(34,165,89,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 680px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 24px; line-height: 1.6; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(34,165,89,0.15); border: 1px solid rgba(34,165,89,0.35); color: #4ade80; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-store-url-input { margin-bottom: 20px; }
.cs-label { display: block; font-size: 0.8rem; font-weight: 600; color: #94a3b8; margin-bottom: 8px; letter-spacing: 0.3px; }
.cs-input { width: 100%; padding: 10px 14px; background: #0d1808; border: 1px solid #111a14; border-radius: 8px; color: #e2dfd7; font-size: 0.9rem; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.cs-input:focus { border-color: #22a559; }
.cs-input::placeholder { color: #1a2820; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-btn-primary { width: 100%; padding: 12px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.cs-btn-primary:hover { background: #16a34a; }
.cs-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.cs-divider { display: flex; align-items: center; gap: 16px; padding: 0 32px; color: #111a14; font-size: 0.8rem; color: #1a2820; }
.cs-divider::before, .cs-divider::after { content: ''; flex: 1; height: 1px; background: #111a14; }
.cs-form { display: flex; flex-direction: column; gap: 16px; }
.cs-form-group { display: flex; flex-direction: column; }
.cs-instructions { margin-bottom: 20px; }
.cs-instructions p { font-size: 0.875rem; color: #64748b; margin: 0 0 8px; }
.cs-instructions ol { margin: 0; padding-left: 20px; }
.cs-instructions li { font-size: 0.8rem; color: #475569; margin-bottom: 4px; line-height: 1.5; }
.cs-btn-secondary { width: 100%; padding: 12px; background: transparent; color: #22a559; border: 1px solid #22a559; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.cs-btn-secondary:hover { background: rgba(34,165,89,0.06); }


/* --- dashboard-thereconciliator (migrated from inline style block) --- */
.qbo-company-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.qbo-company-name { font-size: 13px; font-weight: 700; color: var(--text-bright, #faf9f6); letter-spacing: 0.3px; }
.qbo-company-sub { font-size: 12px; color: var(--text-mid, #8a99ad); margin: 0 0 6px; }
.env-badge.env-production { background: #fef3c7; color: #92400e; }
.env-badge.env-sandbox { background: #d1fae5; color: #16a34a; }


/* --- receipts (migrated from inline style block) --- */
.receipts-panels { display: flex; gap: 0; flex: 1; min-height: 0; padding: 0 24px 24px; }
.receipts-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--card-bg, #111a14); border: 1px solid var(--border-color, #111a14); border-radius: 12px; overflow: hidden; }
.receipts-divider { width: 12px; flex-shrink: 0; }
.receipts-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-color, #111a14); }
.receipts-panel-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; color: var(--text-primary, #faf9f6); }
.receipts-panel-icon { font-size: 1rem; }
.receipts-badge { background: var(--badge-bg, #111a14); color: var(--text-secondary, #94a3b8); font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.receipts-table-wrap { flex: 1; overflow-y: auto; }
.receipts-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.receipts-table thead th { padding: 9px 12px; text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--text-muted, #475569); letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color, #111a14); position: sticky; top: 0; background: var(--card-bg, #111a14); z-index: 1; }
.receipts-table tbody tr { border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04)); transition: background 0.15s; }
.receipts-table tbody tr:hover { background: var(--row-hover, rgba(255,255,255,0.03)); }
.receipts-table tbody td { padding: 9px 12px; color: var(--text-secondary, #94a3b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.receipts-table .col-order { color: var(--accent, #22a559); font-weight: 600; }
.receipts-table .col-amount { color: var(--text-primary, #faf9f6); font-weight: 600; }
.receipts-table .col-amount.refund { color: #f87171; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; }
.status-PAID { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-UNPAID { background: rgba(239,68,68,0.12); color: #f87171; }
.status-PARTIAL { background: rgba(251,191,36,0.12); color: #fbbf24; }
.status-REFUNDED { background: rgba(239,68,68,0.12); color: #f87171; }
.status-PENDING { background: rgba(148,163,184,0.12); color: #94a3b8; }
.type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; background: rgba(34,165,89,0.1); color: #4ade80; }
.type-badge.refund { background: rgba(239,68,68,0.12); color: #f87171; }
.receipts-loading td { color: var(--text-muted, #475569); padding: 24px 12px; }
.receipts-empty td { color: var(--text-muted, #475569); padding: 24px 12px; text-align: center; }
.receipts-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #f87171; padding: 10px 16px; border-radius: 8px; font-size: 0.85rem; margin: 0 24px 12px; }
.page-header { padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--text-primary, #faf9f6); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.main-content { display: flex; flex-direction: column; margin-left: 120px; padding-left: 0; }
.store-tabs { display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--border-color, #111a14); background: rgba(255,255,255,0.02); }
.store-tab { padding: 5px 14px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-secondary, #94a3b8); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.store-tab:hover { background: rgba(255,255,255,0.05); color: var(--text-primary, #faf9f6); }
.store-tab.active { background: rgba(34,165,89,0.12); border-color: rgba(34,165,89,0.25); color: #4ade80; }


/* --- woo-connect-pending-thereconciliator (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: center; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 64px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 400px; height: 200px; background: radial-gradient(ellipse, rgba(34,165,89,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; max-width: 400px; margin: 0 auto; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 40px 32px; }
.cs-spinner { width: 40px; height: 40px; border: 3px solid #111a14; border-top-color: #22a559; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.cs-waiting-msg { font-size: 1rem; color: #94a3b8; margin: 0 0 8px; }
.cs-waiting-sub { font-size: 0.85rem; color: #475569; margin: 0; }
.cs-btn-primary { display: inline-block; padding: 12px 28px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.cs-btn-primary:hover { background: #16a34a; }

/* Bottom-right pinned card actions */
.card-actions-bottom {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── AI Analysis (receipts page) ─────────────────────────────────────────── */
.page-title-group { display: flex; align-items: center; gap: 16px; }
.btn-ai { background: linear-gradient(135deg, #22a559, #22a559); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: opacity 0.2s, transform 0.1s; text-decoration: none; }
.btn-ai:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ai:active { transform: translateY(0); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500; display: none; align-items: center; justify-content: center; }
.modal-overlay[style*="flex"] { display: flex !important; }
.modal-dialog { background: #111a14; border: 1px solid #1a2820; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.ai-modal-dialog { max-width: 680px; width: 90%; max-height: 80vh; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #1a2820; }
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #faf9f6; display: flex; align-items: center; }
.modal-buttons { display: flex; gap: 8px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #64748b; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: #faf9f6; }
.modal-body { overflow-y: auto; padding: 16px 20px; max-height: calc(80vh - 120px); }
.modal-footer { padding: 12px 20px; border-top: 1px solid #1a2820; display: flex; justify-content: flex-end; gap: 8px; }

.prompt-modal-body { padding: 16px 20px 8px; }
.prompt-hint { margin: 0 0 10px; font-size: 13px; color: #64748b; }
#ai-prompt-textarea { width: 100%; height: 280px; font-size: 12px; font-family: monospace; line-height: 1.6; padding: 12px; border: 1px solid #1a2820; border-radius: 6px; resize: vertical; box-sizing: border-box; background: #0f1109; color: #e2dfd7; outline: none; transition: border-color 0.15s; }
#ai-prompt-textarea:focus { border-color: #22a559; }
.prompt-modal-footer { padding: 12px 20px; border-top: 1px solid #1a2820; display: flex; justify-content: flex-end; gap: 8px; background: #111a14; }
.btn-cancel { background: #111a14; color: #94a3b8; border: 1px solid #1a2820; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.btn-cancel:hover { background: #1a2820; }

.ai-result { padding: 8px 4px; }
.ai-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #111a14; margin-top: 16px; }
.ai-para { font-size: 14px; line-height: 1.7; color: #e2dfd7; margin-bottom: 6px; }
.ai-bullet { font-size: 14px; line-height: 1.6; color: #d4cfc7; padding: 2px 0 2px 8px; }
/* Payout row selection */
.payout-row:hover   { background: var(--row-hover, rgba(255,255,255,0.03)); }
.payout-row.selected { background: rgba(34,165,89,0.08) !important; box-shadow: inset 3px 0 0 #22a559; }
/* ============================================================================
   30. Dashboard — TheReconciliator
   ============================================================================ */

.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card  { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.metric-card h3 { font-size: 14px; color: #64748b; margin: 0 0 8px; }
.metric-value   { font-size: 32px; font-weight: 700; color: #111a14; }
.metric-change  { font-size: 13px; color: #22a559; margin-top: 4px; }

.quick-actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.section-header { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.section-title  { font-size: 18px; font-weight: 600; color: #f9fafb; margin: 0; }

/* ============================================================================
   31. Connection Cards
   ============================================================================ */

.connection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.connection-card  { background: white; border-radius: 12px; padding: 20px; display: flex; gap: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid #e2dfd7; transition: all 0.2s; align-items: flex-start; }
.connection-card:hover { border-color: #d4cfc7; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.connection-card#qbo-card { border-left: 4px solid #2ca01c; }
.card-content      { flex: 1; min-height: 80px; }
.card-content h3   { margin: 0 0 4px; font-size: 16px; }
.card-content .card-label { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.card-actions      { margin-top: 12px; }
.company-name, .connected-date, .store-url { font-size: 12px; color: #64748b; margin: 4px 0 0; }
.store-name        { font-size: 15px; font-weight: 600; color: #111a14; margin-bottom: 2px; }
.store-details     { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #64748b; }
.store-details span { display: flex; align-items: center; gap: 4px; }
.connection-error  { color: #dc2626; font-size: 13px; }

/* ============================================================================
   32. Action Cards
   ============================================================================ */

.action-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1200px) { .action-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .action-cards { grid-template-columns: 1fr; } }

.action-card  { background: white; border-radius: 12px; padding: 24px; cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 2px solid transparent; }
.action-card:hover  { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: #e2dfd7; }
.action-card:active { transform: translateY(0); }
.action-card.primary-action { background: linear-gradient(135deg, #22a559 0%, #22a559 100%); color: white; }
.action-card.primary-action:hover { background: linear-gradient(135deg, #16a34a 0%, #22a559 100%); box-shadow: 0 8px 24px rgba(34,165,89,0.25); }
.action-card.primary-action h3,
.action-card.primary-action p { color: white; }
.action-card.primary-action p { opacity: 0.9; }
.action-icon     { font-size: 32px; margin-bottom: 12px; }
.action-card h3  { margin: 0 0 8px; font-size: 16px; color: #111a14; }
.action-card p   { margin: 0; font-size: 13px; color: #64748b; }
.action-card.locked { opacity: 0.45; cursor: not-allowed; position: relative; border: 2px dashed #d1d5db; }
.action-card.locked:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,0.05); opacity: 0.65; border-color: #f59e0b; }
.action-card.locked .lock-badge { position: absolute; top: 10px; right: 10px; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px; }

/* ============================================================================
   33. Analysis Pages (Shared — Order & Customer)
   ============================================================================ */

.analysis-header   { margin-bottom: 24px; }
.analysis-header h2 { font-size: 24px; font-weight: 600; color: #111a14; margin: 0 0 4px; }
.analysis-subtitle { font-size: 15px; color: #64748b; }

.stats-grid     { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card      { background: white; border-radius: 10px; padding: 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); text-align: center; }
.stat-number    { font-size: 28px; font-weight: 700; color: #111a14; }
.stat-icon      { font-size: 24px; margin-bottom: 8px; }
.stat-label     { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value     { font-size: 20px; font-weight: 600; color: #111a14; }

.match-results  { background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.match-icon     { font-size: 20px; }
.match-label    { font-size: 14px; font-weight: 500; color: #2d3b28; }

.custom-date-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 500; display: none; align-items: center; justify-content: center; }
.custom-date-overlay.active { display: flex; }
.custom-date-dialog { background: white; border-radius: 12px; padding: 24px; min-width: 320px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.custom-date-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.custom-date-header h3 { margin: 0; font-size: 18px; }
.custom-date-close { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; }
.custom-date-body   { display: flex; flex-direction: column; gap: 12px; }
.custom-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.custom-date-field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.custom-date-field input { width: 100%; padding: 8px 10px; border: 1px solid #e2dfd7; border-radius: 6px; font-size: 14px; }
.custom-date-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

.log-entry { padding: 8px 12px; border-bottom: 1px solid #faf9f6; font-size: 13px; color: #2d3b28; }

.tab-btn        { padding: 8px 16px; border: 1px solid #e2dfd7; border-radius: 6px; background: #f2f0eb; color: #2d3b28; cursor: pointer; font-size: 14px; transition: all 0.15s; }
.tab-btn:hover  { background: #e2dfd7; }
.tab-btn.active { background: #22a559; color: white; border-color: #22a559; }

/* ============================================================================
   34. Health Pages (Shared — Financial & QBO)
   ============================================================================ */

.health-container { max-width: 900px; }

.score-card-main { background: linear-gradient(135deg, #152818 0%, #18261c 100%); border-radius: 16px; padding: 32px; color: white; display: flex; gap: 32px; align-items: center; margin-bottom: 32px; }
.score-circle-wrapper { position: relative; }
.score-circle { width: 140px; height: 140px; border-radius: 50%; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-number { font-size: 48px; font-weight: 700; color: #111a14; line-height: 1; }
.score-label  { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.score-info h2 { font-size: 24px; margin-bottom: 8px; }
.score-info p  { opacity: 0.85; font-size: 15px; }
.score-date    { font-size: 13px; opacity: 0.7; margin-top: 8px; }

.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.category-card   { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.category-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.category-icon   { font-size: 24px; }
.category-score  { font-size: 20px; font-weight: 700; color: #111a14; margin-left: auto; }
.category-bar    { height: 8px; background: #e2dfd7; border-radius: 4px; overflow: hidden; }
.category-bar-fill { height: 100%; border-radius: 4px; background: #22a559; }

.issues-section  { margin-bottom: 32px; }
.issues-section h3 { font-size: 20px; font-weight: 600; color: #111a14; margin-bottom: 16px; }
.issue-group     { border: 1px solid #e2dfd7; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.issue-group-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background 0.15s; }
.issue-group-header:hover { background: #f2f0eb; }
.issue-group-icon  { font-size: 20px; }
.issue-group-title { flex: 1; font-weight: 500; color: #111a14; }
.issue-group-count { font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 10px; }
.issue-group-count.medium { background: #fef3c7; color: #92400e; }
.issue-group-count.low    { background: #d1fae5; color: #065f46; }
.issue-group-chevron { font-size: 12px; color: #64748b; transition: transform 0.2s; }
.issue-group.expanded .issue-group-chevron { transform: rotate(180deg); }
.issue-group-content { display: none; padding: 0; background: #f2f0eb; }
.issue-group.expanded .issue-group-content { display: block; }

.issue-card     { padding: 16px; border-bottom: 1px solid #e2dfd7; display: flex; gap: 16px; align-items: flex-start; }
.issue-card:last-child { border-bottom: none; }
.issue-card.medium { border-left: 3px solid #f59e0b; }
.issue-card.low    { border-left: 3px solid #22a559; }
.issue-icon        { font-size: 20px; flex-shrink: 0; }
.issue-content     { flex: 1; }
.issue-title       { font-weight: 500; color: #111a14; margin-bottom: 4px; }
.issue-description { font-size: 14px; color: #64748b; line-height: 1.5; }
.issue-action      { font-size: 13px; color: #22a559; text-decoration: none; display: inline-block; margin-top: 8px; }

.progress-bar-container { background: #e2dfd7; border-radius: 8px; height: 10px; overflow: hidden; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }

.score-circle-wrapper.critical::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 3px solid #dc2626; animation: pulse-danger 2s infinite; }
@keyframes pulse-danger { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ============================================================================
   35. Inventory Page
   ============================================================================ */

.summary-row   { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.summary-row:last-child { border-bottom: none; }
.summary-label { font-size: 14px; color: #64748b; }
.summary-value { font-size: 14px; font-weight: 600; color: #111a14; }

/* ============================================================================
   36. Settings Page
   ============================================================================ */

.settings-section { background: white; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.settings-section h2 { font-size: 18px; font-weight: 600; color: #111a14; margin-bottom: 16px; }
.setting-card { padding: 16px; border: 1px solid #e2dfd7; border-radius: 8px; margin-bottom: 12px; }
.header-actions select { padding: 8px 12px; border: 1px solid #e2dfd7; border-radius: 6px; font-size: 14px; }

/* ============================================================================
   42. TheReconciliator Dashboard — Dark Sidebar Layout
        (dashboard-thereconciliator.pug)
   ============================================================================ */

/* Account bar at top of dark dashboard pages */
.dashboard .account-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 0;
  margin-bottom: 12px;
}

.dashboard .header-left h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: #f9fafb;
}

.dashboard .header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Connection Cards — dark sidebar variant */
.dashboard .connection-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.dashboard .connection-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 28px 32px 64px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  min-height: 160px;
  position: relative;
}

.dashboard .connection-icon {
  font-size: 48px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 14px;
  flex-shrink: 0;
}

.dashboard .connection-info { flex: 1; }

.dashboard .connection-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
  margin: 0 0 4px;
}

.dashboard .connection-name { font-size: 14px; color: #9ca3af; margin: 0 0 8px; }

.dashboard .connection-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.dashboard .connection-badge.connected { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.dashboard .connection-badge.disconnected { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.qbo-connect-btn { height: 32px; width: auto; display: block; }
.qbo-connect-btn:hover { content: url('/images/qbo/Connect_to_QuickBooks_SVG/C2QB_green_btn_med_hover.svg'); }
.env-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; margin-left: 8px; vertical-align: middle; }
.env-sandbox { background: rgba(234, 179, 8, 0.2); color: #ca8a04; border: 1px solid rgba(234,179,8,0.3); }
.env-production { background: rgba(16, 185, 129, 0.2); color: #059669; border: 1px solid rgba(16,185,129,0.3); }
.connection-detail { font-size: 12px; color: var(--text-mid, #8a99ad); margin: 2px 0; }
.connection-detail-row { display: flex; gap: 16px; margin-top: 4px; }
.platform-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: rgba(34,165,89,0.12); color: #4ade80; border: 1px solid rgba(34,165,89,0.2); margin-left: 6px; }
.connected-stores-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.connected-store-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 8px; background: rgba(34,165,89,0.05); border: 1px solid rgba(34,165,89,0.12); }
.connected-store-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.connected-store-detail { font-size: 11px; color: var(--text-mid, #8a99ad); }
.btn-disconnect { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 5px; background: rgba(239,68,68,0.75); color: #ffffff; border: 1px solid rgba(239,68,68,0.5); text-decoration: none; white-space: nowrap; transition: background 0.15s; }
.btn-disconnect:hover { background: rgba(239,68,68,0.95); }

.dashboard .btn-link {
  color: #22a559;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.dashboard .btn-link:hover { text-decoration: underline; }

/* Metrics Grid — dark sidebar variant */
.dashboard .metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dashboard .metric-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard .metric-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 10px;
}

.dashboard .metric-content { flex: 1; }

.dashboard .metric-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dashboard .metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.2;
}

.dashboard .metric-sublabel { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* Quick Actions — dark sidebar variant */
.dashboard .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dashboard .quick-action-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.dashboard .quick-action-card:hover {
  border-color: #22a559;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.dashboard .quick-action-card.card-highlight {
  background: linear-gradient(135deg, #152818 0%, #18261c 100%);
  border-color: #22a559;
}

.dashboard .qa-icon { font-size: 36px; margin-bottom: 16px; }

.dashboard .qa-content h3 { font-size: 16px; font-weight: 600; color: #f9fafb; margin: 0 0 6px; }
.dashboard .qa-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

/* Tools Grid — dark sidebar variant */
.dashboard .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.dashboard .tool-card {
  background: #0f1812;
  border: 1px solid #152818;
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.dashboard .tool-card:not(.disabled):hover {
  border-color: #22a559;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}

.dashboard .tool-card.disabled { opacity: 0.6; cursor: not-allowed; }

.dashboard .tool-icon { font-size: 32px; }

.dashboard .tool-content h3 { font-size: 15px; font-weight: 600; color: #f9fafb; margin: 0 0 4px; }
.dashboard .tool-content p  { font-size: 13px; color: #9ca3af; margin: 0; }

.dashboard .tool-content .coming-soon {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  background: #152818;
  padding: 3px 8px;
  border-radius: 4px;
  color: #9ca3af;
  text-transform: uppercase;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .dashboard .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .dashboard .quick-actions-grid { grid-template-columns: 1fr; }
  .dashboard .metrics-grid       { grid-template-columns: 1fr; }
}



/* --- connect-bigcommerce (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-back-method { display: inline-block; color: #475569; font-size: 0.85rem; text-decoration: none; margin-bottom: 20px; }
.cs-back-method:hover { color: #94a3b8; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(34,197,94,0.12) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-method-cards { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 480px; }
.cs-method-card { position: relative; background: #111a14; border: 1px solid #111a14; border-radius: 14px; padding: 24px; text-decoration: none; color: inherit; display: block; transition: border-color 0.2s, transform 0.15s; cursor: pointer; }
.cs-method-card:hover { border-color: #16a34a; transform: translateY(-2px); }
.cs-method-badge { position: absolute; top: 14px; right: 14px; background: #16a34a; color: #fff; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.05em; padding: 3px 8px; border-radius: 20px; }
.cs-method-icon { font-size: 1.8rem; margin-bottom: 10px; display: block; }
.cs-method-title { font-size: 1rem; font-weight: 700; color: #faf9f6; margin: 0 0 6px; }
.cs-method-desc { font-size: 0.82rem; color: #475569; margin: 0; line-height: 1.6; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 16px; line-height: 1.6; }
.cs-hint { font-size: 0.8rem; color: #1a2820; margin: 0 0 14px; line-height: 1.6; }
.cs-hint code { background: #111a14; padding: 1px 6px; border-radius: 4px; color: #94a3b8; font-size: 0.78rem; }
.cs-label { display: block; font-size: 0.8rem; font-weight: 600; color: #64748b; margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-input { width: 100%; padding: 10px 12px; background: #0f1109; border: 1px solid #111a14; border-radius: 8px; color: #faf9f6; font-size: 0.9rem; box-sizing: border-box; outline: none; }
.cs-input:focus { border-color: #22c55e; }
.cs-btn-primary { display: block; text-align: center; padding: 12px; background: #22c55e; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s; width: 100%; box-sizing: border-box; }
.cs-btn-primary:hover { background: #22a559; color: #fff; }
.cs-connected-state { text-align: center; }
.cs-connected-icon { font-size: 2rem; color: #4ade80; margin-bottom: 8px; display: block; }
.cs-btn-danger { display: block; width: 100%; text-align: center; padding: 10px; background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 12px; transition: background 0.2s; box-sizing: border-box; }
.cs-btn-danger:hover { background: rgba(239,68,68,0.2); }


/* --- connect-store (migrated from inline style block) --- */
/* Allow full page scroll on this view */
.page-wrapper { height: auto !important; overflow: visible !important; min-height: 100vh; }
.main-content { overflow-y: visible !important; height: auto !important; }
/* ── Connect Store Page ──────────────────────────────────── */
.cs-page {
  min-height: 100vh;
  background: #0b1108;
  font-family: inherit;
}

/* Header */
.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cs-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

/* Hero */
.cs-hero {
  position: relative;
  text-align: center;
  padding: 56px 40px 40px;
  overflow: hidden;
}
.cs-hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(34,165,89,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon {
  font-size: 2.75rem;
  display: block;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(34,165,89,0.35));
}
.cs-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #faf9f6;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}
.cs-hero-subtitle {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 auto;
  max-width: 480px;
  line-height: 1.7;
}

/* Cards grid */
.cs-cards-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 40px 64px;
}
.cs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1000px;
}
.cs-card {
  background: #111a14;
  border: 1px solid #111a14;
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  cursor: pointer;
}
.cs-card:not(.cs-card-disabled):hover {
  border-color: #22a559;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(34,165,89,0.12);
}
.cs-card-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Card Header */
.cs-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cs-card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.cs-card-emoji { line-height: 1; }
.cs-woo        { background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-amazon     { background: rgba(255,153,0,0.12);  border: 1px solid rgba(255,153,0,0.2);  }
.cs-bigcommerce{ background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-wix        { background: rgba(250,204,21,0.10); border: 1px solid rgba(250,204,21,0.2); }
.cs-s4s        { background: rgba(34,165,89,0.1); border: 1px solid rgba(34,165,89,0.15); }
.cs-ebay       { background: rgba(231,76,60,0.10);  border: 1px solid rgba(231,76,60,0.2);  }
.cs-shopify    { background: rgba(149,191,71,0.10); border: 1px solid rgba(149,191,71,0.2); }
.cs-card-img   { width: 28px; height: 28px; object-fit: contain; }

.cs-card-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 20px;
}
.cs-status-connected {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.25);
}
.cs-status-available {
  background: rgba(16,185,129,0.12);
  color: #10b981;
  border: 1px solid rgba(16,185,129,0.25);
}
.cs-status-soon {
  background: rgba(148,163,184,0.08);
  color: #64748b;
  border: 1px solid rgba(148,163,184,0.15);
}

/* Card Body */
.cs-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #faf9f6;
  margin: 0 0 6px;
}
.cs-card-desc {
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
  line-height: 1.6;
}

/* Card Footer */
.cs-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #1a2318;
}
.cs-card-cta    { font-size: 0.875rem; font-weight: 600; color: #22a559; }
.cs-card-disconnect { font-size: 0.875rem; font-weight: 600; color: #ef4444; }
.cs-card-notify { font-size: 0.875rem; font-weight: 600; color: #2d3f28; }

/* Responsive */
@media (max-width: 900px) {
  .cs-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cs-header { padding: 16px 20px; }
  .cs-hero { padding: 36px 20px 28px; }
  .cs-hero-title { font-size: 1.75rem; }
  .cs-cards-wrapper { padding: 0 20px 40px; }
  .cs-cards { grid-template-columns: 1fr; }
}


/* --- connect-wix (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(250,204,21,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 24px; line-height: 1.6; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(250,204,21,0.15); border: 1px solid rgba(250,204,21,0.3); color: #fbbf24; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-input-group { margin-bottom: 16px; }
.cs-input { width: 100%; padding: 10px 14px; background: #0b1108; border: 1px solid #111a14; border-radius: 8px; color: #faf9f6; font-size: 0.875rem; outline: none; box-sizing: border-box; transition: border-color 0.2s; }
.cs-input:focus { border-color: #22a559; }
.cs-input::placeholder { color: #1a2820; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25); color: #4ade80; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-btn-primary { display: block; width: 100%; text-align: center; padding: 12px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.cs-btn-primary:hover { background: #16a34a; }
.cs-btn-primary:disabled { background: #1a2820; cursor: not-allowed; }
.cs-connected-state { text-align: center; padding: 16px 0; }
.cs-connected-icon { font-size: 2rem; color: #4ade80; display: block; margin-bottom: 10px; }
.cs-btn-danger { display: block; width: 100%; text-align: center; padding: 11px; background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 16px; transition: background 0.2s; box-sizing: border-box; }
.cs-btn-danger:hover { background: rgba(239,68,68,0.2); }


/* --- connect-woocommerce (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-back { display: flex; align-items: center; gap: 8px; color: #94a3b8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.cs-back:hover { color: #e2dfd7; }
.cs-back-arrow { font-size: 1.1rem; }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 48px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 500px; height: 250px; background: radial-gradient(ellipse at center, rgba(34,165,89,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; letter-spacing: -0.5px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; margin: 0 auto; max-width: 400px; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 680px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 32px; }
.cs-section-title { font-size: 1.1rem; font-weight: 700; color: #faf9f6; margin: 0 0 8px; }
.cs-section-desc { font-size: 0.875rem; color: #475569; margin: 0 0 24px; line-height: 1.6; }
.cs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cs-step { display: flex; align-items: center; gap: 12px; }
.cs-step-num { width: 24px; height: 24px; border-radius: 50%; background: rgba(34,165,89,0.15); border: 1px solid rgba(34,165,89,0.35); color: #4ade80; font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cs-step-text { font-size: 0.875rem; color: #94a3b8; }
.cs-store-url-input { margin-bottom: 20px; }
.cs-label { display: block; font-size: 0.8rem; font-weight: 600; color: #94a3b8; margin-bottom: 8px; letter-spacing: 0.3px; }
.cs-input { width: 100%; padding: 10px 14px; background: #0d1808; border: 1px solid #111a14; border-radius: 8px; color: #e2dfd7; font-size: 0.9rem; outline: none; transition: border-color 0.2s; box-sizing: border-box; }
.cs-input:focus { border-color: #22a559; }
.cs-input::placeholder { color: #1a2820; }
.cs-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #f87171; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; }
.cs-btn-primary { width: 100%; padding: 12px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.cs-btn-primary:hover { background: #16a34a; }
.cs-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.cs-divider { display: flex; align-items: center; gap: 16px; padding: 0 32px; color: #111a14; font-size: 0.8rem; color: #1a2820; }
.cs-divider::before, .cs-divider::after { content: ''; flex: 1; height: 1px; background: #111a14; }
.cs-form { display: flex; flex-direction: column; gap: 16px; }
.cs-form-group { display: flex; flex-direction: column; }
.cs-instructions { margin-bottom: 20px; }
.cs-instructions p { font-size: 0.875rem; color: #64748b; margin: 0 0 8px; }
.cs-instructions ol { margin: 0; padding-left: 20px; }
.cs-instructions li { font-size: 0.8rem; color: #475569; margin-bottom: 4px; line-height: 1.5; }
.cs-btn-secondary { width: 100%; padding: 12px; background: transparent; color: #22a559; border: 1px solid #22a559; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.cs-btn-secondary:hover { background: rgba(34,165,89,0.06); }


/* --- dashboard-thereconciliator (migrated from inline style block) --- */
.qbo-company-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.qbo-company-name { font-size: 13px; font-weight: 700; color: var(--text-bright, #faf9f6); letter-spacing: 0.3px; }
.qbo-company-sub { font-size: 12px; color: var(--text-mid, #8a99ad); margin: 0 0 6px; }
.env-badge.env-production { background: #fef3c7; color: #92400e; }
.env-badge.env-sandbox { background: #d1fae5; color: #16a34a; }


/* --- receipts (migrated from inline style block) --- */
.receipts-panels { display: flex; gap: 0; flex: 1; min-height: 0; padding: 0 24px 24px; }
.receipts-panel { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--card-bg, #111a14); border: 1px solid var(--border-color, #111a14); border-radius: 12px; overflow: hidden; }
.receipts-divider { width: 12px; flex-shrink: 0; }
.receipts-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-color, #111a14); }
.receipts-panel-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; color: var(--text-primary, #faf9f6); }
.receipts-panel-icon { font-size: 1rem; }
.receipts-badge { background: var(--badge-bg, #111a14); color: var(--text-secondary, #94a3b8); font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.receipts-table-wrap { flex: 1; overflow-y: auto; }
.receipts-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.receipts-table thead th { padding: 9px 12px; text-align: left; font-size: 0.7rem; font-weight: 700; color: var(--text-muted, #475569); letter-spacing: 0.05em; border-bottom: 1px solid var(--border-color, #111a14); position: sticky; top: 0; background: var(--card-bg, #111a14); z-index: 1; }
.receipts-table tbody tr { border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.04)); transition: background 0.15s; }
.receipts-table tbody tr:hover { background: var(--row-hover, rgba(255,255,255,0.03)); }
.receipts-table tbody td { padding: 9px 12px; color: var(--text-secondary, #94a3b8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.receipts-table .col-order { color: var(--accent, #22a559); font-weight: 600; }
.receipts-table .col-amount { color: var(--text-primary, #faf9f6); font-weight: 600; }
.receipts-table .col-amount.refund { color: #f87171; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; }
.status-PAID { background: rgba(34,197,94,0.15); color: #4ade80; }
.status-UNPAID { background: rgba(239,68,68,0.12); color: #f87171; }
.status-PARTIAL { background: rgba(251,191,36,0.12); color: #fbbf24; }
.status-REFUNDED { background: rgba(239,68,68,0.12); color: #f87171; }
.status-PENDING { background: rgba(148,163,184,0.12); color: #94a3b8; }
.type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; background: rgba(34,165,89,0.1); color: #4ade80; }
.type-badge.refund { background: rgba(239,68,68,0.12); color: #f87171; }
.receipts-loading td { color: var(--text-muted, #475569); padding: 24px 12px; }
.receipts-empty td { color: var(--text-muted, #475569); padding: 24px 12px; text-align: center; }
.receipts-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #f87171; padding: 10px 16px; border-radius: 8px; font-size: 0.85rem; margin: 0 24px 12px; }
.page-header { padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--text-primary, #faf9f6); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.main-content { display: flex; flex-direction: column; margin-left: 150px; padding-left: 0; }
.store-tabs { display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--border-color, #111a14); background: rgba(255,255,255,0.02); }
.store-tab { padding: 5px 14px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-secondary, #94a3b8); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.store-tab:hover { background: rgba(255,255,255,0.05); color: var(--text-primary, #faf9f6); }
.store-tab.active { background: rgba(34,165,89,0.12); border-color: rgba(34,165,89,0.25); color: #4ade80; }


/* --- woo-connect-pending-thereconciliator (migrated from inline style block) --- */
.cs-page { min-height: 100vh; background: #0b1108; display: flex; flex-direction: column; font-family: inherit; }
.cs-header { display: flex; align-items: center; justify-content: center; padding: 20px 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cs-logo-text { font-size: 1rem; font-weight: 700; color: #64748b; }
.cs-hero { position: relative; text-align: center; padding: 64px 40px 32px; overflow: hidden; }
.cs-hero-glow { position: absolute; top: -60px; left: 50%; transform: translateX(-50%); width: 400px; height: 200px; background: radial-gradient(ellipse, rgba(34,165,89,0.15) 0%, transparent 70%); pointer-events: none; }
.cs-hero-content { position: relative; z-index: 1; }
.cs-hero-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.cs-hero-title { font-size: 2rem; font-weight: 800; color: #faf9f6; margin: 0 0 10px; }
.cs-hero-subtitle { font-size: 0.9rem; color: #64748b; max-width: 400px; margin: 0 auto; line-height: 1.6; }
.cs-cards-wrapper { flex: 1; display: flex; justify-content: center; padding: 8px 40px 64px; }
.cs-single-card { width: 100%; max-width: 480px; }
.cs-connect-box { background: #111a14; border: 1px solid #111a14; border-radius: 16px; overflow: hidden; }
.cs-connect-section { padding: 40px 32px; }
.cs-spinner { width: 40px; height: 40px; border: 3px solid #111a14; border-top-color: #22a559; border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.cs-waiting-msg { font-size: 1rem; color: #94a3b8; margin: 0 0 8px; }
.cs-waiting-sub { font-size: 0.85rem; color: #475569; margin: 0; }
.cs-btn-primary { display: inline-block; padding: 12px 28px; background: #22a559; color: #fff; border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.cs-btn-primary:hover { background: #16a34a; }

/* Bottom-right pinned card actions */
.card-actions-bottom {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── AI Analysis (receipts page) ─────────────────────────────────────────── */
.page-title-group { display: flex; align-items: center; gap: 16px; }
.btn-ai { background: linear-gradient(135deg, #22a559, #22a559); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: opacity 0.2s, transform 0.1s; text-decoration: none; }
.btn-ai:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ai:active { transform: translateY(0); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 500; display: none; align-items: center; justify-content: center; }
.modal-overlay[style*="flex"] { display: flex !important; }
.modal-dialog { background: #111a14; border: 1px solid #1a2820; border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.ai-modal-dialog { max-width: 680px; width: 90%; max-height: 80vh; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #1a2820; }
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #faf9f6; display: flex; align-items: center; }
.modal-buttons { display: flex; gap: 8px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #64748b; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: #faf9f6; }
.modal-body { overflow-y: auto; padding: 16px 20px; max-height: calc(80vh - 120px); }
.modal-footer { padding: 12px 20px; border-top: 1px solid #1a2820; display: flex; justify-content: flex-end; gap: 8px; }

.prompt-modal-body { padding: 16px 20px 8px; }
.prompt-hint { margin: 0 0 10px; font-size: 13px; color: #64748b; }
#ai-prompt-textarea { width: 100%; height: 280px; font-size: 12px; font-family: monospace; line-height: 1.6; padding: 12px; border: 1px solid #1a2820; border-radius: 6px; resize: vertical; box-sizing: border-box; background: #0f1109; color: #e2dfd7; outline: none; transition: border-color 0.15s; }
#ai-prompt-textarea:focus { border-color: #22a559; }
.prompt-modal-footer { padding: 12px 20px; border-top: 1px solid #1a2820; display: flex; justify-content: flex-end; gap: 8px; background: #111a14; }
.btn-cancel { background: #111a14; color: #94a3b8; border: 1px solid #1a2820; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.btn-cancel:hover { background: #1a2820; }

.ai-result { padding: 8px 4px; }
.ai-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #475569; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid #111a14; margin-top: 16px; }
.ai-para { font-size: 14px; line-height: 1.7; color: #e2dfd7; margin-bottom: 6px; }
.ai-bullet { font-size: 14px; line-height: 1.6; color: #d4cfc7; padding: 2px 0 2px 8px; }
.ai-spacer { height: 8px; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 16px; }
.ai-table th { background: #111a14; padding: 8px 12px; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; border-bottom: 2px solid #1a2820; }
.ai-table td { padding: 8px 12px; border-bottom: 1px solid #111a14; color: #e2dfd7; vertical-align: middle; }
.ai-table tr.even td { background: #0f1109; }
.ai-table tr:hover td { background: #152818; }
.ai-status.matched { color: #4ade80; font-weight: 600; }
.ai-status.warn    { color: #fbbf24; }
.ai-status.info    { color: #22a559; }
.ai-status.error   { color: #f87171; font-weight: 600; }
/* ── Mode Switcher ────────────────────────────────────────────────────────── */
.mode-switcher { display: flex; gap: 4px; padding: 8px 12px 4px; margin-bottom: 4px; }
.mode-btn { flex: 1; padding: 4px 2px; font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 4px; border: 1px solid #111a14; background: #0f1109; color: #475569; cursor: pointer; transition: all 0.15s; }
.mode-btn:hover:not(.disabled) { background: #111a14; color: #94a3b8; }
.mode-btn.active { background: #152818; color: #22a559; border-color: #22a559; }
.mode-btn.disabled { opacity: 0.3; cursor: not-allowed; color: #d4cfc7; padding: 2px 0 2px 8px; }
.ai-spacer { height: 8px; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 16px; }
.ai-table th { background: #111a14; padding: 8px 12px; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #94a3b8; border-bottom: 2px solid #1a2820; }
.ai-table td { padding: 8px 12px; border-bottom: 1px solid #111a14; color: #e2dfd7; vertical-align: middle; }
.ai-table tr.even td { background: #0f1109; }
.ai-table tr:hover td { background: #152818; }
.ai-status.matched { color: #4ade80; font-weight: 600; }
.ai-status.warn    { color: #fbbf24; }
.ai-status.info    { color: #22a559; }
.ai-status.error   { color: #f87171; font-weight: 600; }

/* ── QBO Edit Modal — Side-by-side Shopify + QBO form ───────────────────── */
/* Revision: 2026-03-15 – Full editable QBO form with Shopify read-only panel */

.qbo-edit-dialog  { max-width: 1100px; width: 95%; max-height: calc(88vh + 60px); }
.qbo-edit-loading { padding: 32px; text-align: center; color: #94a3b8; font-size: 13px; }
.qbo-edit-error   { padding: 12px 16px; background: #450a0a; color: #fca5a5; border-radius: 6px; font-size: 13px; margin: 8px; }

/* Two-column body */
.pp-body { display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 0; }

/* ── Column headers ── */
.pp-column { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; padding: 16px; }
.pp-column + .pp-column { border-left: 1px solid #111a14; }

.pp-column-header {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 7px; margin-bottom: 12px;
  border: 1px solid #1a2820; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.pp-col-shopify { color: #4ade80; border-left: 3px solid #4ade80; background: #0f1109; }
.pp-col-qbo     { color: #4ade80; border-left: 3px solid #4ade80; background: #0f1109; }
.pp-col-refund  { color: #fca5a5; border-left: 3px solid #ef4444; background: #0f1109; }
.pp-col-invoice { color: #22a559; border-left: 3px solid #22a559; background: #0f1109; }

/* ── Shopify read-only column ── */
.pp-order-info {
  background: #0f1812; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 10px;
  border: 1px solid #111a14; font-size: 13px;
}
.pp-order-info-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pp-order-info-row:last-child { margin-bottom: 0; }
.pp-order-num  { color: #faf9f6; font-size: 14px; }
.pp-date       { color: #64748b; font-size: 12px; }
.pp-customer   { color: #94a3b8; font-size: 12px; }

.smc-status-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 8px; border-radius: 3px;
}
.smc-status-paid    { background: #052e16; color: #4ade80; }
.smc-status-unpaid  { background: #422006; color: #fb923c; }
.smc-status-refunded { background: #450a0a; color: #fca5a5; }
.smc-status-pending { background: #111a14; color: #94a3b8; }

.pp-shopify-card {
  background: #0f1109; border-radius: 8px;
  border: 1px solid #111a14; overflow: hidden; flex: 1;
}
.pp-shopify-card-header {
  padding: 8px 12px; background: #0f1812;
  border-bottom: 1px solid #111a14;
  font-size: 11px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pp-shopify-items { padding: 8px 12px; }
.pp-shopify-col-headers {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #475569; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding-bottom: 6px; margin-bottom: 4px;
  border-bottom: 1px solid #111a14;
}
.pp-shopify-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #0f1109; font-size: 12px;
}
.pp-shopify-item:last-child { border-bottom: none; }
.pp-shopify-item-name  { color: #d4cfc7; }
.pp-shopify-item-amount { display: flex; align-items: center; gap: 6px; }
.pp-shopify-item-amount strong { color: #faf9f6; }
.pp-shopify-item-muted { color: #475569; font-style: italic; }
.smc-kind-badge {
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; background: #111a14; color: #94a3b8;
  text-transform: uppercase;
}
.pp-shopify-totals {
  padding: 8px 12px; border-top: 1px solid #111a14;
  background: #0f1812;
}
.pp-shopify-total-row {
  display: flex; justify-content: space-between;
  font-size: 13px;
}
.pp-shopify-total-grand { font-weight: 700; color: #faf9f6; }

/* No match state */
.pp-no-match {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center;
  background: #0f1109; border-radius: 8px; border: 1px dashed #111a14;
}
.pp-no-match-icon { font-size: 28px; margin-bottom: 10px; }
.pp-no-match-text { color: #64748b; font-size: 13px; font-weight: 500; }
.pp-no-match-sub  { color: #1a2820; font-size: 11px; margin-top: 4px; }

/* ── QBO editable form column ── */
.pp-qbo-form { display: flex; flex-direction: column; gap: 10px; }

.pp-form-row      { display: flex; flex-direction: column; gap: 6px; }
.pp-form-row-2    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-form-group    { display: flex; flex-direction: column; gap: 4px; }
.pp-label {
  font-size: 10px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pp-input {
  background: #0f1812; border: 1px solid #1a2820; border-radius: 6px;
  padding: 7px 10px; color: #e2dfd7; font-size: 13px;
  outline: none; transition: border-color 0.15s;
  width: 100%; box-sizing: border-box;
}
.pp-input:focus { border-color: #22a559; background: #111a14; }
.pp-input[readonly] { opacity: 0.5; cursor: default; }

/* Line items table */
.pp-lines-section { display: flex; flex-direction: column; gap: 6px; }
.pp-lines-header  {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.pp-lines-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
}
.pp-lines-table th {
  padding: 5px 6px; text-align: left; background: #0f1109;
  border-bottom: 1px solid #1a2820; font-size: 10px;
  font-weight: 600; color: #475569; text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pp-th-desc  { width: 35%; }
.pp-th-item  { width: 30%; }
.pp-th-qty   { width: 10%; }
.pp-th-amt   { width: 18%; }
.pp-th-del   { width: 7%; }
.pp-line-row td { padding: 3px 3px; border-bottom: 1px solid #111a14; vertical-align: middle; }
.pp-line-row:last-child td { border-bottom: none; }
.pp-line-neg .pp-line-amt { color: #fca5a5; }
.pp-line-input { padding: 5px 7px; font-size: 12px; }
.pp-line-qty   { text-align: center; }
.pp-line-amt   { text-align: right; }
.pp-line-del {
  background: none; border: none; color: #475569; font-size: 16px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.pp-line-del:hover { color: #ef4444; background: #450a0a; }

.pp-add-line-btn {
  align-self: flex-start; background: none; border: 1px dashed #1a2820;
  color: #22a559; font-size: 12px; padding: 5px 12px; border-radius: 6px;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.pp-add-line-btn:hover { background: #152818; border-color: #22a559; }

/* Running total */
.pp-form-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; background: #0f1109; border-radius: 7px;
  border: 1px solid #111a14; margin-top: 4px;
}
.pp-form-total-label { font-size: 12px; font-weight: 600; color: #94a3b8; }
.pp-form-total-value { font-size: 16px; font-weight: 700; color: #4ade80; }

/* Row action buttons in receipts table */
.row-action-btn {
  background: none; border: 1px solid transparent;
  border-radius: 4px; padding: 4px 7px;
  cursor: pointer; font-size: 13px; line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  color: #64748b;
}
.row-action-btn:hover        { background: #111a14; border-color: #1a2820; color: #e2dfd7; }
.row-action-btn.delete:hover { background: #450a0a; border-color: #ef4444; color: #fca5a5; }
.col-actions { white-space: nowrap; }

.pp-gc-notice {
  padding: 8px 12px; background: #422006; border: 1px solid #b45309;
  border-radius: 6px; font-size: 11px; color: #fcd34d; line-height: 1.4;
}

/* Tax section in edit form */
.pp-tax-section {
  background: #0f1109; border-radius: 7px; border: 1px solid #111a14;
  padding: 8px 12px; display: flex; flex-direction: column; gap: 4px;
}
.pp-tax-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.pp-tax-label { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.pp-tax-input { width: 100px; text-align: right; padding: 4px 8px; font-size: 12px; }
.pp-tax-breakdown-row {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #475569; padding: 1px 0;
}
.pp-line-badge {
  display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 5px;
  border-radius: 3px; background: #111a14; color: #94a3b8; text-transform: uppercase;
}
.pp-line-discount .pp-line-badge { background: #422006; color: #fb923c; }
.pp-line-shipping .pp-line-badge { background: #0c1f10; color: #22a559; }
.pp-line-ro-amt { color: #94a3b8; font-size: 12px; text-align: right; }
.pp-line-other-label { color: #64748b; font-size: 11px; font-style: italic; }

.pp-tax-value { font-size: 13px; font-weight: 600; color: #e2dfd7; }

/* Shopify column — posting preview style */
.pp-shopify-item-qty  { color: #64748b; font-size: 11px; }
.pp-shopify-item-price { font-weight: 500; color: #faf9f6; white-space: nowrap; }
.pp-shopify-card-name  { font-size: 11px; color: #64748b; font-family: monospace; font-weight: 400; }
.pp-shopify-txns { padding: 8px 12px; border-top: 1px dashed #111a14; display: flex; flex-direction: column; gap: 4px; }
.pp-shopify-txn-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.pp-shopify-txn-method { flex: 1; color: #d4cfc7; }
.pp-shopify-txn-amt { font-weight: 600; color: #4ade80; }

/* Linked transaction warning in QBO edit form */
.pp-linked-warning {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; background: #1c1a00; border: 1px solid #854d0e;
  border-radius: 7px; font-size: 12px; color: #fef08a; line-height: 1.5;
}
.pp-linked-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.pp-linked-text strong { color: #fde047; display: block; margin-bottom: 2px; }

/* Receipts page header — matches receipts-panels padding for perfect alignment */
.receipts-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
}
.receipts-header h1 {
  margin: 0; font-size: 1.6rem; font-weight: 800;
  color: var(--text-primary, #faf9f6);
}

/* ── Inline bridge selector in page headers ───────────────────────────────── */
.bridge-selector-bar {
  display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center;
}
.bridge-selector-label {
  font-size: 9px; font-weight: 800; color: #22a559; letter-spacing: .12em;
  border: 1px solid #22a559; border-radius: 10px; padding: 3px 8px;
  background: rgba(34,165,89,0.08); white-space: nowrap; flex-shrink: 0;
}
.bridge-selector-dropdown {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #22a559;
  border-radius: 16px;
  padding: 5px 28px 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 200px;
  max-width: 340px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2322a559'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color .15s, color .15s;
}
.bridge-selector-dropdown:focus { outline: none; border-color: #22a559; color: #e2dfd7; }
.bridge-selector-dropdown:hover { color: #e2dfd7; border-color: #2ecc71; }
.bridge-selector-dropdown option { background: #0c1409; color: #e2dfd7; }
/* When a bridge IS selected, highlight it green */
.bridge-selector-dropdown.bridge-active { color: #22a559; }

.linked-indicator { font-size: 11px; opacity: 0.6; cursor: default; margin-right: 2px; }

/* QBO multi-select */
.qbo-row-selected { background: rgba(34,165,89,0.1) !important; outline: 1px solid rgba(34,165,89,0.25); }
.qbo-row { user-select: none; }
.qbo-bulk-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: #1a2018;
  border-bottom: 1px solid #16a34a; font-size: 13px; color: #4ade80;
}
#qbo-bulk-count { font-weight: 600; flex: 1; }
.row-action-btn svg { display: block; }

/* Flagged page */
.flagged-container { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 0; }
.flagged-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; gap: 12px; }
.flagged-empty-icon { font-size: 48px; }
.flagged-empty-title { font-size: 1.2rem; font-weight: 700; color: #faf9f6; }
.flagged-empty-sub { font-size: 13px; color: #475569; text-align: center; }
.flagged-table-wrap { background: var(--card-bg, #111a14); border: 1px solid var(--border-color, #111a14); border-radius: 12px; overflow: hidden; }
.flagged-row { cursor: pointer; }
.flagged-reason { font-size: 11px; color: #64748b; max-width: 320px; white-space: normal; line-height: 1.4; }
.flagged-sev-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.flagged-sev-critical { background: rgba(239,68,68,0.15); color: #fca5a5; }
.flagged-sev-warning  { background: rgba(234,179,8,0.15);  color: #fde047; }

/* Flagged indicator in receipts table */
.flagged-indicator { font-size: 11px; opacity: 0.85; cursor: default; margin-left: 2px; }
.flagged-critical  { opacity: 1; }

/* Clear flag button in edit modal */
.btn-flag {
  background: #1c1a00; border: 1px solid #854d0e; color: #fde047;
  padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.btn-flag:hover { background: #292200; }

/* Flagged nav badge */
.nav-flagged-badge {
  margin-left: auto; background: #ef4444; color: #fff;
  font-size: 13px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0 5px; line-height: 1;
}
.flagged-page-count {
  font-size: 13px; font-weight: 600; color: white;
  background: #111a14; padding: 2px 10px; border-radius: 10px; margin-left: 4px;
}

/* Source switcher */
.receipts-panel-header-right { display: flex; align-items: center; gap: 8px; }
.btn-csv-upload { background: none; border: 1px solid #111a14; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 14px; color: #64748b; transition: all 0.15s; }
.btn-csv-upload:hover { background: #111a14; color: #e2dfd7; }
.source-switcher { display: flex; border-bottom: 1px solid #111a14; }
.source-tab { flex: 1; padding: 7px 12px; background: none; border: none; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; transition: all 0.15s; text-transform: uppercase; letter-spacing: 0.05em; }
.source-tab.active { color: #22a559; border-bottom-color: #22a559; }
.source-tab:hover:not(.active) { color: #94a3b8; }
.csv-upload-selector { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid #111a14; }
.csv-upload-selector select { flex: 1; background: #0f1109; border: 1px solid #111a14; color: #e2dfd7; border-radius: 6px; padding: 5px 8px; font-size: 12px; }
.btn-icon-sm { background: none; border: 1px solid #111a14; border-radius: 4px; padding: 4px 7px; cursor: pointer; font-size: 13px; color: #64748b; }
.btn-icon-sm:hover { background: #450a0a; border-color: #ef4444; }

/* CSV upload modal */
.csv-drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; border: 2px dashed #111a14; border-radius: 10px; margin: 8px; cursor: pointer; transition: border-color 0.15s; }
.csv-drop-zone:hover { border-color: #22a559; }
.csv-drop-icon { font-size: 36px; }
.csv-drop-text { font-size: 14px; font-weight: 600; color: #e2dfd7; }
.csv-drop-sub { font-size: 12px; color: #475569; }
.csv-preview { padding: 0 8px 8px; }
.csv-preview-info { font-size: 13px; color: #94a3b8; padding: 8px 4px 10px; }

.pp-csv-note { display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; background: #0f1109; border: 1px dashed #1a2820; border-radius: 7px; font-size: 12px; color: #64748b; line-height: 1.5; margin: 4px 0 8px; }
.pp-csv-note-icon { flex-shrink: 0; font-size: 14px; }

/* Reconciliation engine warnings */
.recon-warning { padding: 9px 14px; border-radius: 6px; font-size: 12px; margin: 6px 0; line-height: 1.5; }
.recon-warning-info    { background: #0f1109; border: 1px solid #152818; color: #22a559; }
.recon-warning-warning { background: #1c1208; border: 1px solid #78350f; color: #fbbf24; }
.recon-warning-success { background: #052e16; border: 1px solid #14532d; color: #4ade80; }
.recon-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.recon-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.recon-stat-val { font-size: 24px; font-weight: 700; color: #e2dfd7; }
.recon-stat-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }

/* Year picker modal */
.year-picker-totals { display: flex; gap: 20px; padding: 10px 14px; background: #0f1109; border-radius: 8px; margin-bottom: 12px; }
.year-picker-total-item { font-size: 13px; color: #94a3b8; }
.year-picker-total-item strong { color: #e2dfd7; }
.year-picker-grid { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.year-picker-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; transition: all 0.12s; }
.year-picker-row:hover { background: #111a14; border-color: #1a2820; }
.year-picker-all { background: #0f1109; border-color: #111a14 !important; margin-bottom: 4px; }
.year-picker-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.year-picker-info { flex: 1; display: flex; align-items: center; gap: 10px; }
.year-picker-label { font-size: 14px; font-weight: 600; color: #e2dfd7; min-width: 40px; }
.year-picker-sub { font-size: 11px; color: #475569; }
.year-picker-badge { font-size: 10px; padding: 2px 7px; border-radius: 10px; background: #450a0a; color: #fca5a5; font-weight: 600; }
.year-picker-badge-clean { background: #052e16; color: #4ade80; }
.year-picker-stats { display: flex; gap: 10px; flex-shrink: 0; }
.year-stat { font-size: 11px; color: #64748b; }

/* Guest mode */
.guest-mode-badge { font-size: 12px; color: #94a3b8; padding: 6px 10px; background: #111a14; border-radius: 6px; border: 1px solid #1a2820; }

/* Guest feature wall */
.guest-feature-wall { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:80px 24px; text-align:center; gap:12px; }
.guest-feature-icon { font-size:56px; }
.guest-feature-wall h2 { font-size:24px; font-weight:700; color:#e2dfd7; margin:0; }
.guest-feature-wall p { color:#94a3b8; margin:0; max-width:400px; }
.guest-feature-sub { font-size:13px !important; color:#64748b !important; }

/* Guest signup nudge bar */
.guest-signup-nudge { margin: 16px 0; padding: 16px 20px; background: #111a14; border: 1px solid #1a2820; border-radius: 10px; }
.guest-signup-nudge-content { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.guest-signup-nudge-icon { font-size: 22px; flex-shrink: 0; }
.guest-signup-nudge-content div { flex: 1; font-size: 13px; color: #94a3b8; }
.guest-signup-nudge-content strong { color: #e2dfd7; }
.guest-signup-nudge-content .btn { flex-shrink: 0; }

/* Guest account modal */
.account-avatar-guest { background: #1a2820 !important; cursor: pointer; }
.guest-modal-divider { height: 1px; background: #1a2820; margin: 8px 0; width: 100%; }
.account-link-signup { color: #22a559 !important; font-weight: 600; }
.account-link-signup:hover { background: rgba(34,165,89,0.1) !important; }
/* ── Admin Dashboard ──────────────────────────────────────────────────────── */
.admin-search { background:#111a14; border:1px solid #1a2518; color:#e2dfd7; border-radius:8px; padding:8px 14px; font-size:14px; width:280px; outline:none; }
.admin-search:focus { border-color:#22a559; }
.section-actions { display:flex; align-items:center; gap:12px; }
.admin-table-wrap { overflow-x:auto; border-radius:12px; border:1px solid #1a2518; }
.admin-table { width:100%; border-collapse:collapse; font-size:13px; }
.admin-table thead tr { background:#0d1109; border-bottom:1px solid #1a2518; }
.admin-table th { padding:10px 14px; text-align:left; color:#64748b; font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.05em; white-space:nowrap; }
.admin-table td { padding:10px 14px; border-bottom:1px solid #0c1409; vertical-align:middle; }
.admin-table tbody tr:last-child td { border-bottom:none; }
.admin-table tbody tr:hover { background:rgba(255,255,255,0.02); }
.admin-loading td { color:#64748b; padding:24px 14px; }
.admin-id { color:#475569; font-size:12px; }
.admin-email { color:#e2dfd7; font-weight:500; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-center { text-align:center; }
.admin-store { color:#94a3b8; font-size:12px; max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; }
.admin-platform { color:#64748b; font-size:12px; }
.admin-role { color:#64748b; font-size:12px; }
.admin-date { color:#475569; font-size:12px; white-space:nowrap; }
.admin-actions { white-space:nowrap; }
.admin-badge { display:inline-flex; align-items:center; padding:2px 7px; border-radius:4px; font-size:11px; font-weight:600; }
.badge-green { background:rgba(34,165,89,0.15); color:#22a559; }
.badge-dim { color:#1a2820; }
.badge-purple { background:rgba(34,165,89,0.12); color:#4ade80; margin-left:6px; }
.btn-admin-sm { background:#111a14; border:1px solid #1a2820; color:#94a3b8; border-radius:6px; padding:4px 10px; font-size:12px; cursor:pointer; transition:all .15s; }
.btn-admin-sm:hover { background:#22a559; border-color:#22a559; color:#fff; }

/* ── Admin client grouping ────────────────────────────────────────────────── */
.admin-client-header td { background:#0d1109; padding:10px 14px; border-bottom:1px solid #1a2518; border-top:2px solid #1a2518; }
.admin-client-header:first-child td { border-top:none; }
.admin-client-name { font-weight:700; color:#e2dfd7; font-size:13px; margin-right:12px; }
.admin-client-meta { color:#475569; font-size:12px; }
.admin-row-indented td:first-child { padding-left:28px; }
.admin-client-tag { display:inline-flex; align-items:center; gap:6px; color:#94a3b8; font-size:12px; }
.btn-admin-link { background:none; border:none; color:#22a559; font-size:12px; cursor:pointer; padding:0; text-decoration:underline; }
.btn-admin-link:hover { color:#22a559; }

/* ── Admin firm hierarchy blocks ──────────────────────────────────────────── */
.admin-firm-block { border:1px solid #1a2518; border-radius:12px; margin-bottom:16px; overflow:hidden; }
.admin-firm-header { display:flex; align-items:center; justify-content:space-between; padding:14px 20px; background:#0d1109; border-bottom:1px solid #1a2518; }
.admin-firm-title { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.admin-firm-name { font-weight:700; color:#e2dfd7; font-size:15px; }
.admin-firm-actions { display:flex; gap:8px; flex-shrink:0; }
.admin-firm-body { display:grid; grid-template-columns:1fr 1fr; gap:0; }
.admin-firm-col { padding:16px 20px; }
.admin-firm-col:first-child { border-right:1px solid #1a2518; }
.admin-col-label { font-size:11px; font-weight:600; color:#475569; text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.admin-bk-row { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:1px solid #0c1409; }
.admin-bk-row:last-child { border-bottom:none; }
.admin-bk-role { width:20px; height:20px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; flex-shrink:0; }
.admin-bk-role-owner  { background:rgba(34,165,89,0.15); color:#4ade80; }
.admin-bk-role-admin  { background:rgba(34,165,89,0.2);  color:#22a559; }
.admin-bk-role-member { background:rgba(100,116,139,0.2); color:#94a3b8; }
.admin-bk-email { font-size:13px; color:#d4cfc7; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-client-row { display:flex; align-items:flex-start; gap:8px; padding:5px 0; border-bottom:1px solid #0c1409; }
.admin-client-row:last-child { border-bottom:none; }
.admin-client-dot { flex-shrink:0; font-size:13px; }
.admin-client-info { display:flex; flex-direction:column; }
.admin-client-row-name { font-size:13px; color:#d4cfc7; font-weight:500; }
.admin-client-row-meta { font-size:11px; color:#475569; margin-top:2px; }
.admin-empty { color:#1a2820; font-size:13px; font-style:italic; }
.admin-form-row { margin-bottom:14px; }
.admin-form-row label { display:block; font-size:12px; color:#94a3b8; margin-bottom:5px; }
.badge-blue { background:rgba(34,165,89,0.12); color:#22a559; }

/* ── Firm Owner Dashboard ─────────────────────────────────────────────────── */
.firm-header { display:flex; align-items:center; justify-content:space-between; padding:20px 0 16px; border-bottom:1px solid #1a2518; margin-bottom:4px; flex-wrap:wrap; gap:12px; }
.firm-header-info { display:flex; align-items:center; gap:12px; }
.firm-name { font-size:22px; font-weight:700; color:#e2dfd7; margin:0; }
.firm-plan-badge { background:rgba(34,165,89,0.15); color:#22a559; border-radius:6px; padding:3px 10px; font-size:12px; font-weight:600; text-transform:uppercase; }
.firm-header-meta { display:flex; gap:20px; }
.firm-meta-item { color:#64748b; font-size:13px; }
.firm-clients-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-top:4px; }
.firm-client-card { background:#0d1109; border:1px solid #1a2518; border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:12px; transition:border-color .15s; }
.firm-client-card:hover { border-color:#22a559; }
.firm-client-card-header { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.firm-client-name { font-size:16px; font-weight:600; color:#e2dfd7; }
.bridge-badge { font-size:11px; font-weight:600; padding:2px 8px; border-radius:4px; }
.badge-qbo   { background:rgba(34,165,89,0.15); color:#22a559; }
.badge-store { background:rgba(34,165,89,0.12); color:#4ade80; }
.firm-client-meta { flex:1; }
.firm-client-store { font-size:13px; color:#64748b; }
.firm-client-store.muted { color:#1a2820; font-style:italic; }
.firm-client-actions { display:flex; gap:8px; }
.btn-sm { padding:6px 14px; font-size:12px; border-radius:6px; }
.btn-secondary { background:#111a14; border:1px solid #1a2820; color:#94a3b8; cursor:pointer; }
.btn-secondary:hover { background:#1a2820; color:#e2dfd7; }
.firm-empty { padding:40px; text-align:center; color:#475569; border:1px dashed #1a2518; border-radius:12px; margin-top:4px; }
.firm-empty p { margin-bottom:16px; }
.firm-bk-list { display:flex; flex-direction:column; gap:2px; margin-top:4px; }
.firm-bk-row { display:flex; align-items:center; gap:12px; padding:10px 14px; background:#0d1109; border:1px solid #1a2518; border-radius:8px; }
.firm-bk-avatar { width:32px; height:32px; border-radius:50%; background:#111a14; color:#94a3b8; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; flex-shrink:0; }
.firm-bk-info { display:flex; flex-direction:column; flex:1; }
.firm-bk-email { font-size:13px; color:#e2dfd7; }
.firm-bk-role { font-size:11px; color:#475569; text-transform:capitalize; margin-top:1px; }
.firm-bk-last { font-size:12px; color:#475569; }
.firm-bk-last.muted { color:#1a2820; font-style:italic; }

/* ── Firm client blocks (clients-first hierarchy) ─────────────────────────── */
.firm-clients-list { display:flex; flex-direction:column; gap:12px; margin-top:4px; }
.firm-client-block { background:#0d1109; border:1px solid #1a2518; border-radius:12px; overflow:hidden; transition:border-color .15s; }
.firm-client-block:hover { border-color:#22a559; }
.firm-client-block-header { display:flex; align-items:center; justify-content:space-between; padding:16px 20px; gap:12px; flex-wrap:wrap; }
.firm-client-block-title { display:flex; flex-direction:column; gap:3px; }
.firm-client-block-name { font-size:16px; font-weight:600; color:#e2dfd7; }
.firm-client-block-store { font-size:12px; color:#475569; }
.firm-client-block-actions { display:flex; gap:8px; flex-shrink:0; }
.firm-client-bk-list { border-top:1px solid #1a2518; padding:10px 20px 12px; display:flex; flex-direction:column; gap:2px; }
.firm-client-bk-row { display:flex; align-items:center; gap:10px; padding:6px 0; }
.firm-client-bk-empty { border-top:1px solid #1a2518; padding:10px 20px; font-size:12px; color:#1a2820; font-style:italic; }

/* ── Firm page — full width, no sidebar ───────────────────────────────────── */
.firm-page { width:100%; min-height:calc(100vh - 56px); background:var(--bg-base, #0f1109); }
.firm-page-inner { max-width:860px; margin:0 auto; padding:32px 24px 64px; }

/* ── Clickable bookkeeper rows ────────────────────────────────────────────── */
.firm-client-bk-clickable { cursor:pointer; border-radius:6px; transition:background .15s; padding:6px 8px; margin:0 -8px; }
.firm-client-bk-clickable:hover { background:rgba(34,165,89,0.08); }
.firm-client-bk-clickable:hover .firm-bk-email { color:#22a559; }
.firm-bk-open-hint { margin-left:auto; color:#1a2820; font-size:14px; transition:color .15s; }
.firm-client-bk-clickable:hover .firm-bk-open-hint { color:#22a559; }

/* ── Bookkeeper remove button ─────────────────────────────────────────────── */
.firm-bk-remove { background:none; border:none; cursor:pointer; padding:4px 6px; border-radius:6px; color:#1a2820; display:flex; align-items:center; flex-shrink:0; margin-left:4px; transition:all .15s; }
.firm-bk-remove:hover { background:rgba(220,38,38,0.1); color:#dc2626; }

/* ── Client bridges ───────────────────────────────────────────── */
.firm-client-bridge-section { border-top:1px solid #1a2518; padding:12px 20px 4px; }
.bridge-section-label { font-size:10px; font-weight:700; color:#1a2820; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; }
.bridge-row { display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid #0c1409; }
.bridge-row:last-child { border-bottom:none; }
.bridge-icon { font-size:15px; flex-shrink:0; width:22px; text-align:center; }
.bridge-info { flex:1; display:flex; flex-direction:column; gap:1px; }
.bridge-platform { font-size:12px; font-weight:600; color:#94a3b8; }
.bridge-detail { font-size:11px; color:#475569; }
.bridge-detail.muted { color:#2d3728; font-style:italic; }
.btn-bridge { border:none; border-radius:5px; padding:3px 10px; font-size:11px; font-weight:600; cursor:pointer; flex-shrink:0; transition:all .15s; }
.btn-bridge-add { background:rgba(34,165,89,0.12); color:#22a559; }
.btn-bridge-add:hover { background:rgba(34,165,89,0.25); }
.btn-bridge-remove { background:rgba(100,116,139,0.1); color:#64748b; }
.btn-bridge-remove:hover { background:rgba(220,38,38,0.1); color:#dc2626; }

/* ── Firm client card grid ────────────────────────────────────────────────── */
.firm-card-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:16px; margin-top:8px; }
@media (max-width:1100px) { .firm-card-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:700px)  { .firm-card-grid { grid-template-columns:1fr; } }

.firm-card { background:#0d1109; border:1px solid #1a2518; border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:12px; transition:border-color .15s; }
.firm-card:hover { border-color:#22a559; }

.firm-card-top { display:flex; flex-direction:column; gap:4px; }
.firm-card-name { font-size:17px; font-weight:700; color:#e2dfd7; }
.firm-card-industry { font-size:11px; color:#475569; text-transform:uppercase; letter-spacing:.05em; }

.firm-card-store { display:flex; align-items:center; gap:6px; font-size:12px; color:#64748b; }
.firm-card-store-icon { flex-shrink:0; }

.firm-card-section-label { font-size:10px; font-weight:700; color:#1a2820; text-transform:uppercase; letter-spacing:.08em; margin-top:4px; }

.firm-card-contact { display:flex; flex-direction:column; gap:4px; }
.firm-card-contact-row { display:flex; align-items:center; gap:7px; font-size:12px; color:#94a3b8; }
.firm-card-contact-row a { color:#94a3b8; text-decoration:none; }
.firm-card-contact-row a:hover { color:#22a559; }
.firm-card-contact-icon { font-size:12px; flex-shrink:0; }

.firm-card-conns { display:flex; gap:8px; flex-wrap:wrap; }
.bridge-pill { font-size:11px; font-weight:600; padding:3px 10px; border-radius:20px; }
.bridge-ok      { background:rgba(34,165,89,0.12); color:#22a559; }
.bridge-missing { background:rgba(26,40,28,0.4); color:#475569; }

.firm-card-bks { display:flex; flex-direction:column; gap:4px; }
.firm-card-bk-row { display:flex; align-items:center; gap:8px; padding:4px 6px; border-radius:6px; cursor:pointer; transition:background .15s; }
.firm-card-bk-row:hover { background:rgba(34,165,89,0.08); }
.firm-card-bk-row:hover .firm-card-bk-email { color:#22a559; }
.firm-card-bk-avatar { width:22px; height:22px; border-radius:50%; background:#111a14; color:#94a3b8; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; flex-shrink:0; }
.firm-card-bk-email { font-size:12px; color:#d4cfc7; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.firm-card-bk-role { font-size:10px; color:#475569; flex-shrink:0; text-transform:capitalize; }

.firm-card-actions { display:flex; gap:8px; margin-top:auto; padding-top:8px; border-top:1px solid #1a2518; }

/* ── Client card contact edit ─────────────────────────────────────────────── */
.firm-card-contact-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.firm-card-edit-btn { background:none; border:none; cursor:pointer; color:#1a2820; padding:2px 4px; border-radius:4px; display:flex; align-items:center; transition:all .15s; }
.firm-card-edit-btn:hover { color:#22a559; background:rgba(34,165,89,0.1); }

/* ── Client modal ─────────────────────────────────────────────────────────── */
.client-modal-loading { color:#64748b; padding:24px; text-align:center; font-size:13px; }
.client-modal-section-label { font-size:10px; font-weight:700; color:cyan; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; }
.client-modal-conns { display:flex; flex-direction:column; gap:2px; }
.bridge-modal-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #0c1409; }
.bridge-modal-row:last-child { border-bottom:none; }
.bridge-modal-icon { font-size:16px; flex-shrink:0; width:22px; text-align:center; }
.bridge-modal-info { flex:1; display:flex; flex-direction:column; gap:1px; }
.bridge-modal-label { font-size:12px; font-weight:600; color:#94a3b8; }
.bridge-modal-detail { font-size:11px; color:#475569; }
.client-modal-users { display:flex; flex-direction:column; gap:2px; }
.client-modal-user-row { display:flex; align-items:center; gap:10px; padding:7px 6px; border-radius:7px; cursor:pointer; transition:background .15s; }
.client-modal-user-row:hover { background:rgba(34,165,89,0.07); }
.client-modal-user-row:hover .firm-bk-email { color:#22a559; }

/* ── Bridge available accounts ────────────────────────────────────────────── */
.bridge-modal-list { display:flex; flex-direction:column; gap:2px; }
.bridge-avail-list { display:flex; flex-direction:column; gap:2px; }
.bridge-avail-row  { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid #0c1409; }
.bridge-avail-row:last-child { border-bottom:none; }

/* ── Bridge visual (two-sided) ────────────────────────────────────────────── */
.bridge-visuals-list { display:flex; flex-direction:column; gap:12px; }
.bridge-visual { display:flex; align-items:center; gap:0; background:#090f0b; border:1px solid #1a2518; border-radius:10px; padding:14px 16px; position:relative; }
.bridge-side { display:flex; flex-direction:column; align-items:center; gap:3px; min-width:110px; }
.bridge-side-icon { font-size:22px; }
.bridge-side-label { font-size:12px; font-weight:600; color:#94a3b8; text-align:center; }
.bridge-side-detail { font-size:11px; color:#475569; text-align:center; max-width:100px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* bridge-center and bridge-line canonical rules live in bridge.css */
.bridge-arch { font-size:9px; font-weight:800; color:#22a559; letter-spacing:.1em; white-space:nowrap; padding:3px 10px; border:1px solid #22a559; border-radius:10px; background:rgba(34,165,89,0.08); }
.bridge-visual .btn-bridge-remove { position:absolute; top:8px; right:10px; font-size:10px; padding:2px 8px; }

/* ── Build a Bridge ───────────────────────────────────────────────────────── */
.bridge-build-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 0 4px; }
.bridge-build-select { background:#111a14; border:1px solid #1a2518; color:#e2dfd7; border-radius:7px; padding:7px 10px; font-size:12px; flex:1; min-width:140px; outline:none; cursor:pointer; }
.bridge-build-select:focus { border-color:#22a559; }
.bridge-build-arrow { color:#22a559; font-size:18px; font-weight:700; flex-shrink:0; }
.bridge-build-name-row { display:flex; align-items:center; gap:10px; padding:6px 0 10px; }
.bridge-build-name-input { background:#111a14; border:1px solid #1a2518; color:#e2dfd7; border-radius:7px; padding:7px 10px; font-size:12px; flex:1; outline:none; }
.bridge-build-name-input:focus { border-color:#22a559; }
.bridge-build-name-input::placeholder { color:#475569; }

/* ── Standard bridge display (reusable partial) ───────────────────────────── */
.bridge-display { display:flex; align-items:center; background:#090f0b; border:1px solid #1a2518; border-radius:12px; padding:16px 28px; gap:0; }
.bridge-display-side { display:flex; align-items:center; gap:14px; flex:1; }
.bridge-display-side:last-child { justify-content:flex-end; flex-direction:row-reverse; text-align:right; }
.bridge-display-icon { font-size:32px; flex-shrink:0; }
.bridge-display-info { display:flex; flex-direction:column; gap:2px; }
.bridge-display-type { font-size:11px; font-weight:700; color:#475569; text-transform:uppercase; letter-spacing:.06em; }
.bridge-display-name { font-size:16px; font-weight:700; color:#e2dfd7; }
.bridge-display-status { font-size:12px; color:#22a559; }
.bridge-display-center { display:flex; align-items:center; gap:10px; padding:0 24px; flex-shrink:0; }
.bridge-display-line { width:48px; height:2px; background:linear-gradient(90deg, #1a2518, #22a559); }
.bridge-display-side:last-child ~ .bridge-display-center .bridge-display-line,
.bridge-display-center .bridge-display-line:last-child { background:linear-gradient(90deg, #22a559, #1a2518); }
.bridge-display-arch { font-size:10px; font-weight:800; color:#22a559; letter-spacing:.12em; white-space:nowrap; padding:4px 14px; border:1px solid #22a559; border-radius:20px; background:rgba(34,165,89,0.08); }
.bridge-display-sub { font-size:11px; color:#64748b; margin-top:1px; }

/* ── B.R.I.D.G.E. tooltip ─────────────────────────────────────────────────── */
.bridge-acronym { position:relative; cursor:default; letter-spacing:.12em; }
.bridge-acronym::after {
  content:'Business Reconciliation & Integration Data Gateway Engine';
  position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%);
  background:#0d1109; border:1px solid #22a559; color:#94a3b8;
  font-size:11px; font-weight:400; letter-spacing:.01em; white-space:nowrap;
  padding:6px 12px; border-radius:8px; pointer-events:none;
  opacity:0; transition:opacity .2s; z-index:100;
}
.bridge-acronym:hover::after { opacity:1; }

/* ── Bridge modal card — cyan contrast fixes ──────────────────────────────── */
.bridge-visual .bridge-side-label  { color:#67e8f9; }
.bridge-visual .bridge-side-detail { color:#a5f3fc; }
.bridge-visual .bridge-arch        { color:#22a559; border-color:#22a559; }
.bridge-visual .btn-bridge-remove  { color:#67e8f9; border-color:#1a3a28; background:rgba(103,232,249,0.06); }
.bridge-visual .btn-bridge-remove:hover { background:rgba(220,38,38,0.15); color:#f87171; border-color:#f87171; }
.client-modal-user-row .firm-bk-remove { color:#67e8f9; }
.client-modal-user-row .firm-bk-remove:hover { color:#f87171; background:rgba(220,38,38,0.1); }
/* ============================================================================
   Light Theme Overrides — dashboard.css
   Revision: 2026-03-18 – Light theme for receipts panels, tabs, badges, toolbar
   ============================================================================ */

/* Receipts panels */
[data-theme="light"] .receipts-panels                   { background: transparent; }
[data-theme="light"] .receipts-panel                    { background: #ffffff; border: 1px solid #e2dfd7; box-shadow: 0 1px 4px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.04); border-radius: 12px; }
[data-theme="light"] .receipts-panel-header             { background: #fafbfc; border-bottom: 1px solid #faf9f6; }
[data-theme="light"] .receipts-panel-title              { color: #0f1109; }
[data-theme="light"] .receipts-badge                    { background: #faf9f6; color: #475569; border: 1px solid #e2dfd7; }
[data-theme="light"] .receipts-table thead th           { background: #fafbfc; color: #64748b; border-bottom: 1px solid #faf9f6; }
[data-theme="light"] .receipts-table tbody tr           { border-bottom: 1px solid rgba(0,0,0,0.04); }
[data-theme="light"] .receipts-table tbody tr:hover     { background: #f2f0eb; }
[data-theme="light"] .receipts-table tbody td           { color: #475569; }
[data-theme="light"] .receipts-table .col-order         { color: #1a4a3a; }
[data-theme="light"] .receipts-table .col-amount        { color: #0f1109; }

/* Source tabs (LIVE SHOPIFY / UPLOADED CSV) */
[data-theme="light"] .source-tab-bar                    { background: #faf9f6; border-bottom: 1px solid #e2dfd7; }
[data-theme="light"] .source-tab                        { color: #64748b; }
[data-theme="light"] .source-tab.active                 { color: #1a4a3a; border-bottom-color: #1a4a3a; background: transparent; }
[data-theme="light"] .source-tab:hover:not(.active)     { color: #0f1109; background: rgba(0,0,0,0.03); }

/* Toolbar (date picker, buttons) */
[data-theme="light"] .receipts-toolbar                  { background: #f2f0eb; border-bottom: 1px solid #faf9f6; }
[data-theme="light"] .receipts-content-header           { background: #f2f0eb; }
[data-theme="light"] .page-content-header               { background: #f2f0eb; border-bottom: 1px solid #faf9f6; }

/* Status badges */
[data-theme="light"] .smc-status-badge                  { font-weight: 600; }
[data-theme="light"] .smc-status-paid                   { background: #dcfce7; color: #15803d; }
[data-theme="light"] .smc-status-refunded               { background: #fee2e2; color: #b91c1c; }
[data-theme="light"] .smc-status-pending                { background: #fef9c3; color: #a16207; }

/* QBO type badge */
[data-theme="light"] .qbo-type-badge,
[data-theme="light"] .type-badge                        { font-size: 0.65rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: 0.03em; }
[data-theme="light"] .type-badge-invoice                { background: #e8f0ed; color: #16a34a; border: 1px solid #a7f3d0; }
[data-theme="light"] .type-badge-receipt                { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
[data-theme="light"] .type-badge-refund                 { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* Connection cards / dashboard cards */
[data-theme="light"] .connection-card                   { background: #ffffff; border: 1px solid #e2dfd7; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
[data-theme="light"] .connection-card:hover             { box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-color: #d4cfc7; }
[data-theme="light"] .action-card                       { background: #ffffff; border: 1px solid #e2dfd7; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
[data-theme="light"] .dashboard-card                    { background: #ffffff; border: 1px solid #e2dfd7; }

/* Quick report panel */
[data-theme="light"] .qr-overlay                        { background: rgba(255,255,255,0.97); }
[data-theme="light"] .qr-panel                          { background: #ffffff; border: 1px solid #e2dfd7; box-shadow: 0 4px 24px rgba(0,0,0,0.1); }
[data-theme="light"] .qr-panel-header                   { background: #fafbfc; border-bottom: 1px solid #faf9f6; }
[data-theme="light"] .qr-section-title                  { color: #64748b; }
[data-theme="light"] .qr-table td                       { border-bottom: 1px solid rgba(0,0,0,0.05); color: #111a14; }

/* Edit modal (pp- classes) */
[data-theme="light"] .pp-body                           { background: #f2f0eb; }
[data-theme="light"] .pp-column                         { background: #ffffff; }
[data-theme="light"] .pp-column + .pp-column            { border-left: 1px solid #faf9f6; }
[data-theme="light"] .pp-column-header                  { background: #f2f0eb; }
[data-theme="light"] .pp-col-shopify                    { background: #f0f7f2; color: #16a34a; border-left-color: #16a34a; }
[data-theme="light"] .pp-col-qbo                        { background: #f0fdf4; color: #15803d; border-left-color: #15803d; }
[data-theme="light"] .pp-col-invoice                    { background: #e8f0ed; color: #16a34a; border-left-color: #16a34a; }
[data-theme="light"] .pp-col-refund                     { background: #fff5f5; color: #b91c1c; border-left-color: #ef4444; }
[data-theme="light"] .pp-shopify-card                   { background: #f2f0eb; border: 1px solid #e2dfd7; border-radius: 8px; }
[data-theme="light"] .pp-shopify-card-header            { background: #faf9f6; color: #475569; border-bottom: 1px solid #e2dfd7; }
[data-theme="light"] .pp-shopify-total-row              { color: #475569; border-bottom: 1px solid #faf9f6; }
[data-theme="light"] .pp-shopify-total-grand            { color: #0f1109; }
[data-theme="light"] .pp-input                          { background: #ffffff; border: 1px solid #d4cfc7; color: #0f1109; }
[data-theme="light"] .pp-input:focus                    { border-color: #1a4a3a; box-shadow: 0 0 0 3px rgba(34,165,89,0.1); }
[data-theme="light"] .pp-label                          { color: #64748b; }
[data-theme="light"] .pp-order-info                     { background: #f2f0eb; border: 1px solid #e2dfd7; border-radius: 8px; }
[data-theme="light"] .pp-order-num                      { color: #0f1109; }
[data-theme="light"] .pp-customer                       { color: #475569; }
[data-theme="light"] .pp-date                           { color: #64748b; }
[data-theme="light"] .pp-shopify-item-name              { color: #111a14; }
[data-theme="light"] .pp-shopify-item-price             { color: #0f1109; }
[data-theme="light"] .pp-shopify-txn-method             { color: #475569; }
[data-theme="light"] .pp-shopify-txn-amt                { color: #0f1109; }

/* Flagged page */
[data-theme="light"] .nav-flagged-badge     { color: yellow;  background: red; }
[data-theme="light"] .flagged-card                      { background: #ffffff; border: 1px solid #e2dfd7; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
[data-theme="light"] .flagged-header                    { background: #fafbfc; border-bottom: 1px solid #faf9f6; }

/* ── Journal Impact + Source line (receipts edit modal) ─────────────────── */
.pp-journal-impact        { border-top: 1px solid var(--border, rgba(255,255,255,0.08)); padding-top: 14px; margin-top: 8px; }
.pp-journal-impact-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 6px; }
.pp-source-line           { display: flex; gap: 16px; align-items: center; font-size: 0.75rem; color: var(--text-muted, #64748b); padding: 4px 0 2px; flex-wrap: wrap; }
.pp-source-dim            { opacity: 0.5; }
/* ── Light mode: mode-switcher ───────────────────────────────────────────── */
/* Revision: 2026-04-21 – Light mode overrides for mode-btn                  */
[data-theme="light"] .mode-btn              { background: #f2f0eb; border-color: #e2dfd7; color: #7a7870; }
[data-theme="light"] .mode-btn:hover:not(.disabled) { background: #e2dfd7; color: #3d3c39; }
[data-theme="light"] .mode-btn.active       { background: #e8f0ed; color: #1a4a3a; border-color: #1a4a3a; }
