/* ==========================================================================
   UNICORP AUTO PAINTS - Component Styles
   ========================================================================== */

/* 1. Stat Cards - Matching Unicorp Design Pattern */
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.stat-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin: 0;
}

.stat-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Pastel Badge Variants */
.badge-icon-blue { background-color: #EBF5FF; color: #1877F2; }
.badge-icon-green { background-color: #ECFDF5; color: #10B981; }
.badge-icon-amber { background-color: #FFFBEB; color: #D97706; }
.badge-icon-purple { background-color: #F3E8FF; color: #9333EA; }
.badge-icon-sky { background-color: #F0F9FF; color: #0284C7; }
.badge-icon-rose { background-color: #FFE4E6; color: #E11D48; }

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.stat-trend {
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-trend.trend-up { color: var(--success); }
.stat-trend.trend-down { color: var(--danger); }
.stat-trend.trend-neutral { color: var(--text-muted); }

/* 2. Welcome Banner */
.unicorp-welcome-banner {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.unicorp-welcome-banner .welcome-text {
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 3. Data Tables */
.table-responsive-wrapper {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
}

.custom-table thead th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  vertical-align: middle;
}

.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

.custom-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--text-main);
}

.custom-table tbody tr:last-child td {
  border-bottom: none;
}

/* Color Swatches */
.color-swatch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 600;
}

.swatch-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  display: inline-block;
  flex-shrink: 0;
}

.swatch-pill {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
  vertical-align: middle;
}

/* Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-success {
  background-color: var(--success-bg);
  color: #065f46;
}
.badge-success .badge-status-dot { background-color: var(--success); }

.badge-warning {
  background-color: var(--warning-bg);
  color: #92400e;
}
.badge-warning .badge-status-dot { background-color: var(--warning); }

.badge-danger {
  background-color: var(--danger-bg);
  color: #991b1b;
}
.badge-danger .badge-status-dot { background-color: var(--danger); }

.badge-info {
  background-color: var(--info-bg);
  color: #0369a1;
}
.badge-info .badge-status-dot { background-color: var(--info); }

.badge-secondary {
  background-color: #f1f5f9;
  color: #475569;
}
.badge-secondary .badge-status-dot { background-color: #64748b; }

.badge-accent {
  background-color: var(--accent-light);
  color: var(--accent);
}
.badge-accent .badge-status-dot { background-color: var(--accent); }

/* Buttons */
.btn-primary-custom,
.btn-accent-custom {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(24, 119, 242, 0.2);
}
.btn-primary-custom:hover,
.btn-accent-custom:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.btn-outline-custom {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
}
.btn-outline-custom:hover {
  background-color: var(--bg-main);
  color: var(--primary);
  border-color: #cbd5e1;
}

.btn-icon-action {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.btn-icon-action:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}
.btn-icon-action.btn-action-delete:hover {
  background-color: var(--danger-bg);
  color: var(--danger);
  border-color: #fca5a5;
}

/* Filter Bar */
.filter-bar {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-inputs-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}

/* 4. Calculator Dedicated Workspace */
.calculator-header-banner {
  background: linear-gradient(135deg, #1877F2 0%, #0d4db0 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
}

.calc-section-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.calc-section-header {
  padding: 0.9rem 1.25rem;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-section-header h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #0f172a;
}

.calc-summary-panel {
  position: sticky;
  top: calc(var(--topnav-height) + 1.5rem);
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calc-summary-header {
  background-color: var(--primary);
  color: #ffffff;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calc-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}

.calc-summary-row.total-row {
  background-color: #fafbfc;
  font-weight: 700;
  font-size: 1.15rem;
  color: #0f172a;
  border-top: 2px dashed var(--border-color);
  border-bottom: none;
}

.calc-badge-prototype {
  font-size: 0.72rem;
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  display: block;
  text-align: center;
  margin: 0.85rem 1.25rem;
}

/* 5. Settings Left Sidebar Layout */
.settings-container {
  display: flex;
  gap: 1.5rem;
}

.settings-nav-card {
  width: 260px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: calc(var(--topnav-height) + 1.5rem);
  align-self: flex-start;
}

.settings-nav-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  background-color: #f8fafc;
}

.settings-nav-list {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
}

.settings-nav-item a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border-radius: var(--radius-sm);
}

.settings-nav-item a i {
  font-size: 1.05rem;
  color: #9ca3af;
  width: 20px;
  text-align: center;
}

.settings-nav-item a:hover {
  background-color: #f8fafc;
  color: var(--primary);
}

.settings-nav-item a.active {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
}

.settings-nav-item a.active i {
  color: #ffffff;
}

.settings-content-card {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
}

/* 7. Overview Layout Specific Styles (Matching Reference) */
.view-as-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: #64748b;
}

.view-as-btn {
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-as-btn:hover {
  background: #f8fafc;
  color: var(--primary);
}

.view-as-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(24, 119, 242, 0.2);
}

.btn-mix-colour {
  background-color: var(--primary);
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.48rem 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(24, 119, 242, 0.25);
  transition: all 0.15s ease;
}

.btn-mix-colour:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

/* Month Metric Item */
.month-metric-item {
  padding: 0.5rem 0.25rem 1rem;
}

.month-metric-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.month-metric-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.month-metric-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.metric-bar {
  height: 4px;
  border-radius: 2px;
  width: 75%;
}

.metric-bar-green { background-color: #10B981; }
.metric-bar-purple { background-color: #8B5CF6; }
.metric-bar-amber { background-color: #F59E0B; }
.metric-bar-blue { background-color: #1877F2; }

/* Status Badges Matching Reference */
.badge-paid-ref {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
}

.badge-unpaid-ref {
  background-color: #FFFBEB;
  color: #B45309;
  border: 1px solid #FDE68A;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
}

/* 8. Dedicated Mixing Layout Styles (Matching Reference) */
.mix-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.mix-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.mix-empty-placeholder {
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.mix-items-list {
  margin-top: 1rem;
}

.mix-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.mix-item-row:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.price-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--topnav-height) + 1.5rem);
}

.price-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.price-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  font-size: 0.92rem;
  color: #475569;
}

.price-sell-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 1.25rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.price-sell-value {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 800;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-add-mix {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-add-mix:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-save-invoice {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  border: none;
  width: 100%;
  transition: all 0.15s ease;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.25);
  display: block;
  text-align: center;
}
.btn-save-invoice:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* 9. Paint Catalog Components */
.swatch-square {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-action-pill {
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: #475569;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-action-pill:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: #cbd5e1;
}
.btn-action-pill.btn-delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* 10. Reports Dedicated Components */
.report-metric-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.report-metric-label {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.report-metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.share-progress-track {
  background-color: #f1f5f9;
  border-radius: 4px;
  height: 8px;
  width: 100%;
  max-width: 320px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.share-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Status Pills for Shops & Users */
.badge-active {
  background-color: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
}

.badge-off {
  background-color: #F8FAFC;
  color: #64748B;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.2rem 0.65rem;
}





