@import './components.css';
@import './header.css';
@import './nav.css';
@import './variables.css';
@import './login.css';
@import './table.css';
@import './modal.css';
@import './upload.css';



.sync-tabs {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}

.sync-tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-bottom: -2px;
}

.sync-tab:hover {
  color: var(--text-primary);
  background: var(--bs-primary-light);
}

.sync-tab.active {
  color: var(--bs-accent);
  border-bottom-color: var(--bs-accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.tab-info {
  padding: 1rem;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--border-radius-sm);
  margin-bottom: 1rem;
}

.tab-info p {
  margin: 0;
  color: var(--text-secondary);
}

/* ...existing modal styles... */

/* ========================================
   SYNC MODAL STYLES
   ======================================== */

.modal-large .modal-content {
  max-width: 900px;
}

.sync-status {
  padding: 2rem;
  text-align: center;
}

.sync-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sync-loading i {
  font-size: 3rem;
  color: var(--bs-accent);
}

.spinning {
  animation: spin 1s linear infinite;
}

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

.sync-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bs-primary-light);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: 1.25rem;
  text-align: center;
}

.stat-card.success {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.stat-card.warning {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
}

.stat-card.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-card.success .stat-value {
  color: #34d399;
}

.stat-card.warning .stat-value {
  color: #fbbf24;
}

.stat-card.danger .stat-value {
  color: #f87171;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sync-table-container {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
}

.sync-table {
  margin: 0;
}

.sync-table tbody tr.will-update {
  background: rgba(16, 185, 129, 0.05);
}

.sync-table tbody tr.inactive {
  background: rgba(251, 191, 36, 0.05);
}

.sync-table tbody tr.no-data {
  background: rgba(239, 68, 68, 0.05);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-badge.will-update {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.skip {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
}

.status-badge.inactive {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-badge.no-data {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: var(--bs-primary-light);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: var(--bs-primary);
  border-color: var(--border-light);
}

.location-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.location-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* ── Barber Performance ── */
.breakdown-stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-label {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breakdown-value {
  font-weight: 600;
  font-size: 0.9rem;
}

.breakdown-value.highlight {
  color: var(--primary-color);
  font-size: 1.1rem;
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(245, 197, 66, 0.08);
  border-left: 3px solid var(--primary-color);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-danger  { background: rgba(239,68,68,0.12);  color: #ef4444; }
.badge-warning { background: rgba(249,115,22,0.12); color: #f97316; }

.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger  { color: var(--danger-color);  }

.btn-group {
  display: flex;
  gap: 0.25rem;
}

.btn-group .btn-secondary.active {
  background: var(--primary-color);
  color: var(--bg-primary);
  border-color: var(--primary-color);
}

.page-actions-barbers {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* ── Occupancy Debug Panel ── */
.debug-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.debug-step {
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.debug-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
}

.debug-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--bg-primary);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.debug-step-body {
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

.debug-step-body p {
  margin: 0 0 0.4rem;
}

.debug-empty {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.badge-success { background: rgba(16,185,129,0.12); color: #10b981; }

/* ========================================
   CLIENT BEHAVIOUR PAGE
   ======================================== */

/* Danger summary card variant */
.summary-card.danger {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.2);
}

.summary-card.danger .summary-icon {
  background: rgba(239, 68, 68, 0.1);
}

.summary-card.danger .summary-icon i {
  color: var(--danger);
}

.summary-card.danger .summary-value {
  color: var(--danger);
}

/* Cohort table sticky column */
.cohort-sticky {
  position: sticky;
  left: 0;
  background: var(--bs-primary);
  z-index: 1;
}

/* At-risk urgency rows */
.risk-row-urgent {
  background: rgba(239, 68, 68, 0.04);
}

.risk-row-soon {
  background: rgba(245, 158, 11, 0.04);
}

/* Quick range buttons active state */
.quick-range-btn.active {
  background: var(--bs-primary-light);
  border-color: var(--bs-accent);
  color: var(--bs-accent);
}
