/* SolarQuote theme — aligned with Pak SolarOS retail ERP styling. */

:root {
  --sq-primary: #d97706;
  --sq-primary-dark: #b45309;
  --sq-primary-light: #fbbf24;
  --sq-sidebar: #0f172a;
  --sq-sidebar-hover: #1e293b;
  --sq-bg: #f1f5f9;
  --sq-card: #ffffff;
  --sq-text: #0f172a;
  --sq-muted: #64748b;
  --sq-border: #e2e8f0;
  --sq-radius: 0.75rem;
  --sq-shadow: 0 1px 3px rgb(15 23 42 / 8%), 0 4px 12px rgb(15 23 42 / 6%);
}

body.sq-app {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--sq-bg);
  color: var(--sq-text);
}

.sq-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.sq-sidebar a.active,
.sq-sidebar a:hover {
  background: var(--sq-sidebar-hover);
}

.sq-sidebar a.active {
  border-left: 3px solid var(--sq-primary);
}

.sq-card {
  background: var(--sq-card);
  border-radius: var(--sq-radius);
  box-shadow: var(--sq-shadow);
  border: 1px solid var(--sq-border);
}

.sq-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  border: none;
  cursor: pointer;
}

.sq-btn-primary {
  background: var(--sq-primary);
  color: #fff;
}

.sq-btn-primary:hover {
  background: var(--sq-primary-dark);
}

.sq-btn-secondary {
  background: #1e293b;
  color: #fff;
}

.sq-btn-ghost {
  background: #fff;
  border: 1px solid var(--sq-border);
  color: var(--sq-text);
}

.sq-btn-danger {
  background: #dc2626;
  color: #fff;
}

.sq-input {
  width: 100%;
  border: 1px solid var(--sq-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.sq-input:focus {
  outline: none;
  border-color: var(--sq-primary);
  box-shadow: 0 0 0 3px rgb(217 119 6 / 20%);
}

.sq-stat-card {
  background: var(--sq-card);
  border-radius: var(--sq-radius);
  padding: 1.25rem;
  box-shadow: var(--sq-shadow);
  border-left: 4px solid var(--sq-primary);
}

.sq-table th {
  background: #f8fafc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sq-muted);
}

.sq-table td,
.sq-table th {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--sq-border);
}

.sq-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #f1f5f9;
}

/* Toast notifications. */
#sq-toast-root {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 24rem;
  pointer-events: none;
}

.sq-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgb(0 0 0 / 12%);
  border: 2px solid transparent;
  animation: sq-slide-in 0.3s ease;
}

.sq-toast-success { background: #ecfdf5; border-color: #34d399; color: #065f46; }
.sq-toast-error { background: #fef2f2; border-color: #f87171; color: #991b1b; }
.sq-toast-warning { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.sq-toast-info { background: #eff6ff; border-color: #60a5fa; color: #1e40af; }

.sq-toast-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sq-toast-success .sq-toast-icon { background: #10b981; }
.sq-toast-error .sq-toast-icon { background: #ef4444; }
.sq-toast-warning .sq-toast-icon { background: #f59e0b; }
.sq-toast-info .sq-toast-icon { background: #3b82f6; }

@keyframes sq-slide-in {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* Modal. */
#sq-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 50%);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#sq-modal-backdrop.open { display: flex; }

.sq-modal {
  background: #fff;
  border-radius: 1rem;
  max-width: 28rem;
  width: 100%;
  box-shadow: 0 25px 50px rgb(0 0 0 / 20%);
  overflow: hidden;
}

.sq-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--sq-border);
  font-weight: 700;
  font-size: 1.1rem;
}

.sq-modal-body { padding: 1.25rem 1.5rem; color: var(--sq-muted); }

.sq-modal-footer {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  background: #f8fafc;
}

/* Setup wizard. */
.sq-setup-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--sq-muted);
}

.sq-setup-step.active { color: var(--sq-primary-dark); font-weight: 700; }
.sq-setup-step.done { color: #059669; }

.sq-setup-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  font-weight: 700;
}

.sq-setup-step.active .sq-setup-dot { background: var(--sq-primary); color: #fff; }
.sq-setup-step.done .sq-setup-dot { background: #10b981; color: #fff; }

.sq-section-alt { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); }

.sq-catalog-select {
  border: 2px solid #fbbf24 !important;
  background: #fffbeb;
}

.sq-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(15 23 42 / 55%);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.sq-modal-lg { max-width: 32rem; width: 100%; }

[x-cloak] { display: none !important; }

@media print {
  .no-print { display: none !important; }
}
