/* ==========================================================================
   COMPONENTS.CSS - All UI Component Styles
   All reusable component classes (buttons, inputs, cards, etc.)
   ========================================================================== */

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-primary {
  padding: 0.625rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
  background-color: #4f46e5;
  color: white;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  background-color: #4338ca;
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary:disabled:hover {
  transform: scale(1);
}

.btn-primary-nav {
  font-size: 0.875rem;
  padding: 0.5rem 1.125rem;
}

.btn-primary-slim {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 0.5rem;
  background-color: #4f46e5;
  color: white;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary-slim:hover {
  background-color: #4338ca;
  box-shadow: 0 2px 6px rgb(79 70 229 / 0.35);
}

.btn-primary-slim:active {
  background-color: #3730a3;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.btn-primary-slim .btn-icon {
  width: 1rem;
  height: 1rem;
}

.btn-secondary {
  padding: 0.5rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  background-color: #eef1f6;
  color: #1e2430;
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid var(--border-subtle, #e4e8ee);
}

.btn-secondary:hover {
  background-color: #d1d5db;
}

.btn-link {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  color: #4f46e5;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover {
  color: #4338ca;
}

/* ==========================================================================
   INPUTS & FORMS
   ========================================================================== */

.input-search {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle, #e4e8ee);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  background-color: var(--surface, white);
  color: #1e2430;
  transition: all 0.2s;
}

.input-search:focus {
  border-color: #4f46e5;
  outline: none;
}

.input-search::-moz-placeholder {
  color: #6b7280;
}

.input-search::placeholder {
  color: #6b7280;
}

.input-text {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background-color: white;
  color: #111827;
}

.input-text:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  background-color: var(--surface, white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  border: 1px solid var(--border-subtle, #e4e8ee);
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}

.card-hover {
  background-color: var(--surface, white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  border: 1px solid var(--border-subtle, #e4e8ee);
  padding: 1rem;
  transition: all 0.2s;
  cursor: pointer;
}

.card-hover:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
  transform: scale(1.01);
}

.card-content {
  padding: 1rem;
  background-color: var(--surface, white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  border: 1px solid var(--border-subtle, #e4e8ee);
}

/* ==========================================================================
   BADGES & TAGS
   ========================================================================== */

.badge-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #eef2ff;
  color: #4338ca;
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  background-color: #d1fae5;
  color: #065f46;
}

.badge-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  background-color: #fef3c7;
  color: #92400e;
}

/* ==========================================================================
   ICONS & SVG
   ========================================================================== */

.icon-md {
  height: 1.25rem;
  width: 1.25rem;
}

.icon-lg {
  height: 1.5rem;
  width: 1.5rem;
}

.icon-xl {
  height: 2rem;
  width: 2rem;
}

.icon-2xl {
  height: 3rem;
  width: 3rem;
}

.icon-hero {
  margin-left: auto;
  margin-right: auto;
  height: 6rem;
  width: 6rem;
  color: #9ca3af;
}

/* ==========================================================================
   LOADING & SKELETON
   ========================================================================== */

/* ── Full-page loading overlay ─────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--background, #f5f7fa);
}

/* ── Animated ring spinner ─────────────────────────────────── */
.loading-ring {
  position: relative;
  width: 3rem;
  height: 3rem;
}

.loading-ring::before,
.loading-ring::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 3px solid transparent;
}

.loading-ring::before {
  border-top-color: var(--primary-600, #4f46e5);
  border-right-color: var(--primary-600, #4f46e5);
  animation: loading-rotate 0.8s linear infinite;
}

.loading-ring::after {
  border-bottom-color: var(--primary-100, #e0e7ff);
  border-left-color: var(--primary-100, #e0e7ff);
  animation: loading-rotate 1.6s linear infinite reverse;
}

@keyframes loading-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ── Loading text label ────────────────────────────────────── */
.loading-text {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--gray-400, #9ca3af);
  animation: loading-fade 1.5s ease-in-out infinite;
}

@keyframes loading-fade {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ── Inline spinner (buttons, small areas) ─────────────────── */
.loading-spinner {
  animation: loading-rotate 0.8s linear infinite;
  height: 1.25rem;
  width: 1.25rem;
  border: 2.5px solid var(--primary-100, #e0e7ff);
  border-top-color: var(--primary-600, #4f46e5);
  border-radius: 9999px;
}

/* ── Content-area centered loader ──────────────────────────── */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 40vh;
  width: 100%;
}

/* ── Skeleton placeholder ──────────────────────────────────── */
.skeleton {
  animation: loading-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background-color: #e5e7eb;
  border-radius: 0.25rem;
}

@keyframes loading-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ==========================================================================
   AUTH COMPONENTS (Login, Register, Forms)
   ========================================================================== */

.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--background, #f5f7fa);
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  background-color: var(--surface, white);
  border-radius: 0.75rem;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.07);
  border: 1px solid var(--border-subtle, #e4e8ee);
  padding: 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #1e2430;
  margin-bottom: 0.375rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  font-size: 0.9375rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle, #e4e8ee);
  background-color: var(--surface, white);
  color: #1e2430;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}.form-input::-moz-placeholder {
  color: #9ca3af;
}.form-input::placeholder {
  color: #9ca3af;
}

.form-checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  cursor: pointer;
}

.form-checkbox:checked {
  background-color: #4f46e5;
  border-color: #4f46e5;
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
}

.form-submit {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  background-color: #4f46e5;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover {
  background-color: #4338ca;
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-error {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: #fee2e2;
  color: #991b1b;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   ROLE BADGES
   ========================================================================== */

.role-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
  white-space: nowrap;
  background-color: #e5e7eb;
  color: #374151;
}

.role-badge[data-role="super_admin"] {
  background-color: #fef3c7;
  color: #92400e;
}

.role-badge[data-role="company_admin"] {
  background-color: #dbeafe;
  color: #1e40af;
}

.role-badge[data-role="subscriber"] {
  background-color: #d1fae5;
  color: #065f46;
}

.role-badge[data-role="free_viewer"] {
  background-color: #f3f4f6;
  color: #6b7280;
}

.form-success {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background-color: #dcfce7;
  color: #166534;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.auth-divider-text {
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.auth-back-link {
  margin-top: 1rem;
}

/* Google OAuth Button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #dadce0;
  background: white;
  color: #3c4043;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, border-color 0.15s;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #c6c9cc;
  box-shadow: 0 1px 3px rgb(60 64 67 / 0.15);
}

.btn-google:active {
  background: #f1f3f4;
}

.btn-google-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}/* ==========================================================================
   DASHBOARD USER INFO
   ========================================================================== */

.user-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111827;
}

.user-email {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   STAT CARD EXTENSIONS
   ========================================================================== */

.stat-description {
  margin-top: 0.5rem;
}

/* ==========================================================================
   CARD VARIANTS
   ========================================================================== */

.card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

.card-disabled {
  opacity: 0.6;
}

.card-body {
  padding: 0.5rem;
}

/* ==========================================================================
   ACTION ICONS (Dashboard Quick Actions)
   ========================================================================== */

.icon-action {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  color: #4f46e5;
}.icon-action-muted {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  color: #6b7280;
}/* ==========================================================================
   RESULTS PAGE COMPONENTS
   ========================================================================== */

.results-query-highlight {
  font-weight: 600;
}

.results-empty-icon {
  margin-bottom: 1.5rem;
}

.results-empty-description {
  margin-bottom: 1.5rem;
}

.results-status-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.results-loading-text {
  font-size: 1.25rem;
  color: #6b7280;
}/* ==========================================================================
   PROFILE SECTION COMPONENTS
   ========================================================================== */

.profile-section {
  margin-top: 0;
  padding-top: 0;
}

.profile-back-icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.375rem;
  display: inline-block;
  vertical-align: middle;
}

.profile-panels {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .profile-panels {
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
  }
}

.profile-panel {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  border: 1px solid #e5e7eb;
}.profile-panel-title {
  margin-bottom: 0.25rem;
}

.profile-panel-subtitle {
  color: #6b7280;
  margin-bottom: 1.25rem;
}.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .profile-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.profile-input-readonly {
  background-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.7;
}.profile-email-hint {
  color: #9ca3af;
  margin-top: 0.25rem;
}

.profile-save-btn {
  align-self: flex-start;
  margin-top: 0.5rem;
}

.profile-msg-success {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}.profile-msg-error {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}/* ============================================================
   Support Ticket Components
   ============================================================ */

/* Ticket card */
.ticket-card {
  display: block;
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: white;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ticket-card:hover {
  border-color: #818cf8;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}.ticket-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.ticket-subject {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #1f2937;
  line-height: 1.4;
}.ticket-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: #6b7280;
  flex-wrap: wrap;
}

/* Status badges */
.ticket-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.ticket-status-badge[data-status="open"] {
  background: #dbeafe;
  color: #1d4ed8;
}

.ticket-status-badge[data-status="in_progress"] {
  background: #fef3c7;
  color: #b45309;
}

.ticket-status-badge[data-status="resolved"] {
  background: #d1fae5;
  color: #047857;
}

.ticket-status-badge[data-status="closed"] {
  background: #f3f4f6;
  color: #6b7280;
}/* Priority badges */
.ticket-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.ticket-priority-badge[data-priority="low"] {
  background: #d1fae5;
  color: #047857;
}

.ticket-priority-badge[data-priority="medium"] {
  background: #fef3c7;
  color: #b45309;
}

.ticket-priority-badge[data-priority="high"] {
  background: #fee2e2;
  color: #dc2626;
}/* Small buttons for ticket actions */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.btn-outline {
  background: white;
  border-color: #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-success-outline {
  background: white;
  border-color: #86efac;
  color: #047857;
}

.btn-success-outline:hover {
  background: #f0fdf4;
  border-color: #22c55e;
}

.btn-danger-outline {
  background: white;
  border-color: #fca5a5;
  color: #dc2626;
}

.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #ef4444;
}.btn-sm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button icon */
.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Secondary button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: white;
  border: 1px solid #d1d5db;
  color: #374151;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: all 0.15s;
  line-height: 1.4;
}

.btn-secondary:hover {
  background: #f3f4f6;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}/* Loading spinner small */
.loading-spinner-sm {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Form styles for ticket form */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}.form-required {
  color: #ef4444;
}

.form-input, .form-select, .form-textarea {
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  background: white;
  font-size: 0.9rem;
  color: #1f2937;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Alert styles */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}/* ============================================================
   ANALYTICS & MARKET INSIGHTS COMPONENTS
   ============================================================ */

/* Utility text colours for market data */
.text-up    { color: #10b981; }
.text-down  { color: #ef4444; }
.text-muted { color: #6b7280; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }

.stat-value--up { color: #10b981; }

/* Loading spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* KPI icon box */
.kpi-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 1.375rem; height: 1.375rem; }
.kpi-icon--blue   { background: #dbeafe; color: #1d4ed8; }
.kpi-icon--green  { background: #dcfce7; color: #15803d; }
.kpi-icon--amber  { background: #fef3c7; color: #b45309; }
.kpi-icon--purple { background: #ede9fe; color: #6d28d9; }/* Movers summary cards */
.movers-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.movers-card--up   { border-left: 3px solid #10b981; }
.movers-card--down { border-left: 3px solid #ef4444; }

.movers-label  { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.movers-symbol { font-size: 1rem; font-weight: 700; color: #111827; }
.movers-pct    { font-size: 0.875rem; font-weight: 600; }
.movers-pct--up   { color: #10b981; }
.movers-pct--down { color: #ef4444; }
.movers-count      { font-size: 1.5rem; font-weight: 700; color: #111827; }
.movers-count--up  { color: #10b981; }
.movers-sublabel   { font-size: 0.75rem; color: #6b7280; }
.movers-na { font-size: 0.875rem; color: #9ca3af; font-style: italic; }/* Data table */
.table-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.data-table thead th {
  background: #f8fafc;
  padding: 0.625rem 0.875rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.data-table tbody td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
  white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }

.stock-symbol { font-weight: 700; color: #111827; font-family: monospace; }
.stock-name   { color: #6b7280; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.stock-price  { font-weight: 600; color: #111827; }/* Chart card */
.chart-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}
.chart-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}
.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: #9ca3af;
  font-size: 0.875rem;
  font-style: italic;
}/* Section dot accent */
.section-dot {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  margin-right: 0.5rem;
  flex-shrink: 0;
}
.section-dot--blue  { background: #3b82f6; }
.section-dot--green { background: #10b981; }
.section-dot--amber { background: #f59e0b; }



/* ==========================================================================
   AGENT ANALYTICS — Global Styles
   Added 2026-04-09: Consistent styling across all 10 analytics tabs
   ========================================================================== */

/* ── Tab navigation bar ─────────────────────────────────── */
.analytics-tab-bar {
  margin-bottom: 1.5rem;
}

/* desktop: no border-bottom; pills wrap naturally */

.analytics-tab-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 0.5rem;
}

@media (min-width: 768px) {
  .analytics-tab-bar nav {
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
  }
}

.analytics-tab-btn {
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  min-height: 2.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  background: #f9fafb;
  cursor: pointer;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .analytics-tab-btn {
    font-size: 0.875rem;
  }
}

.analytics-tab-btn:hover {
  color: #374151;
  background-color: #f3f4f6;
  border-color: #d1d5db;
}



.analytics-tab-btn:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: -2px;
  border-radius: 2px;
}

.analytics-tab-btn--active {
  color: #4f46e5;
  border-color: #4f46e5;
  background-color: #eef2ff;
  font-weight: 600;
}



/* ── KPI group wrapper ──────────────────────────────────── */
.analytics-kpi-group {
  margin-bottom: 1rem;
  background-color: rgba(249, 250, 251, 0.5);
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid #f3f4f6;
}

@media (min-width: 640px) {
  .analytics-kpi-group {
    padding: 0.75rem;
  }
}

.analytics-kpi-group-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.analytics-kpi-group-dot {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .analytics-kpi-grid {
    gap: 0.75rem;
  }
}

@media (min-width: 768px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ── KPI card ───────────────────────────────────────────── */
.analytics-kpi-card {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: box-shadow 0.15s, transform 0.15s;
}

.analytics-kpi-card:hover {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
  transform: translateY(-1px);
}

.analytics-kpi-label {
  font-size: 0.625rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.125rem;
}

@media (min-width: 640px) {
  .analytics-kpi-label {
    font-size: 0.75rem;
  }
}

.analytics-kpi-value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .analytics-kpi-value {
    font-size: 1.25rem;
  }
}

.analytics-kpi-sub {
  font-size: 0.625rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}

/* ── Section card ───────────────────────────────────────── */
.analytics-section {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.04);
  overflow: hidden;
}

.analytics-section-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
}

@media (min-width: 640px) {
  .analytics-section-header {
    padding: 1rem 1.5rem;
  }
}

.analytics-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.analytics-section-body {
  padding: 0.75rem;
}

@media (min-width: 640px) {
  .analytics-section-body {
    padding: 1.25rem;
  }
}

/* ── Analytics table ────────────────────────────────────── */
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.analytics-table thead th {
  background-color: #f8fafc;
  padding: 0.5rem 0.625rem;
  text-align: left;
  font-size: 0.625rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.analytics-table tbody td {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
}

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

.analytics-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.analytics-table tbody tr:hover td {
  background-color: #f0f4ff;
}

/* ── Two-column section grid ────────────────────────────── */
.analytics-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .analytics-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Section spacing ────────────────────────────────────── */
.analytics-spacing {
  margin-bottom: 1.5rem;
}

/* ── Loading spinner ────────────────────────────────────── */
.analytics-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
}

.analytics-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.analytics-loading-ring {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-bottom-color: #4f46e5;
  animation: loading-rotate 0.8s linear infinite;
}

.analytics-loading-text {
  font-size: 0.875rem;
  color: #6b7280;
}

/* ── Progress bar with hover ────────────────────────────── */
.analytics-progress-track {
  width: 100%;
  background-color: #f3f4f6;
  border-radius: 9999px;
  height: 0.5rem;
  overflow: hidden;
}

.analytics-progress-bar {
  height: 0.5rem;
  border-radius: 9999px;
  transition: width 0.4s ease, opacity 0.15s;
}

.analytics-progress-track:hover .analytics-progress-bar {
  opacity: 0.85;
}

/* ── Ranked list item (Top companies, cities, etc.) ────── */
.analytics-ranked-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.analytics-ranked-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  width: 1.25rem;
  text-align: right;
  flex-shrink: 0;
}

.analytics-ranked-content {
  flex: 1;
  min-width: 0;
}

.analytics-ranked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.125rem;
}

.analytics-ranked-label {
  font-size: 0.75rem;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.5rem;
}

.analytics-ranked-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
}

.analytics-ranked-pct {
  font-weight: 400;
  color: #9ca3af;
  margin-left: 0.25rem;
}

/* ── Directory search controls ──────────────────────────── */
.analytics-dir-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .analytics-dir-controls {
    flex-direction: row;
  }
}

.analytics-dir-search {
  flex: 1;
  position: relative;
}

.analytics-dir-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  color: #1f2937;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.analytics-dir-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

.analytics-dir-input::-moz-placeholder {
  color: #9ca3af;
}

.analytics-dir-input::placeholder {
  color: #9ca3af;
}

.analytics-dir-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: white;
  color: #1f2937;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.analytics-dir-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

/* ── Pagination ─────────────────────────────────────────── */
.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f3f4f6;
}

.analytics-page-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.analytics-page-btn:hover:not(:disabled) {
  background-color: #f9fafb;
}

.analytics-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.analytics-page-num {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
  color: #4b5563;
  border: none;
  background: none;
}

.analytics-page-num:hover {
  background-color: #f3f4f6;
}

.analytics-page-num--active {
  background-color: #4f46e5;
  color: white;
}

.analytics-page-num--active:hover {
  background-color: #4338ca;
}

/* ── Chart container ────────────────────────────────────── */
.analytics-chart-note {
  font-size: 0.625rem;
  color: #9ca3af;
  text-align: center;
  margin-top: 0.5rem;
}

/* ── Heatmap cells ──────────────────────────────────────── */
.analytics-heatmap-cell {
  padding: 0.375rem 0.5rem;
  text-align: center;
  font-weight: 500;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

/* ── Completeness stat card (Data Quality tab) ──────────── */
.analytics-completeness-card {
  text-align: center;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.75rem;
  border: 1px solid #f3f4f6;
  transition: border-color 0.15s;
}

.analytics-completeness-card:hover {
  border-color: #e5e7eb;
}

.analytics-completeness-value {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.analytics-completeness-label {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.analytics-completeness-bar-track {
  width: 100%;
  background-color: #e5e7eb;
  border-radius: 9999px;
  height: 0.5rem;
  overflow: hidden;
}

.analytics-completeness-bar-fill {
  height: 0.5rem;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.analytics-completeness-detail {
  font-size: 0.625rem;
  color: #9ca3af;
  margin-top: 0.25rem;
}

/* ── Duplicate stats highlight ──────────────────────────── */
.analytics-highlight-card {
  text-align: center;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid;
}

.analytics-highlight-card--amber {
  background-color: #fffbeb;
  border-color: #fef3c7;
}

.analytics-highlight-card--gray {
  background-color: #f9fafb;
  border-color: #f3f4f6;
}

.analytics-highlight-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  line-height: 1;
}

.analytics-highlight-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Market Concentration HHI card ──────────────────────── */
.analytics-hhi-card {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: box-shadow 0.15s;
}

.analytics-hhi-card:hover {
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.06);
}

.analytics-hhi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.analytics-hhi-state {
  font-size: 1.125rem;
  font-weight: 700;
}

.analytics-hhi-badge {
  font-size: 0.625rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
}

.analytics-hhi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.analytics-hhi-sub {
  font-size: 0.625rem;
  color: #9ca3af;
}

/* ── Growth rate card ───────────────────────────────────── */
.analytics-growth-card {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #f3f4f6;
  transition: border-color 0.15s;
}

.analytics-growth-card:hover {
  border-color: #e5e7eb;
}

.analytics-growth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.analytics-growth-state {
  font-weight: 700;
  font-size: 0.875rem;
}

.analytics-growth-pct {
  font-size: 0.75rem;
  font-weight: 500;
}

.analytics-growth-pct--up {
  color: #059669;
}

.analytics-growth-pct--down {
  color: #dc2626;
}

.analytics-growth-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.analytics-growth-sub {
  font-size: 0.625rem;
  color: #9ca3af;
}

/* ── Calculator slider — custom thumb, cross-browser ──────────────────────── */

/* Remove default browser styles */
.calc-slider {
  touch-action: none;
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  height: 6px;
  border-radius: 9999px;
  cursor: pointer;
  outline: none;
  border: none;
  transition: background 0.05s ease;
}

/* WebKit (Chrome, Safari, Edge) — custom thumb */
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4f46e5;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #4f46e5, 0 2px 6px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  -webkit-transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.calc-slider::-webkit-slider-thumb:hover {
  background: #4338ca;
  box-shadow: 0 0 0 2px #4338ca, 0 3px 10px rgba(79, 70, 229, 0.5);
  transform: scale(1.1);
}

.calc-slider::-webkit-slider-thumb:active {
  background: #3730a3;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3), 0 2px 6px rgba(79, 70, 229, 0.4);
  transform: scale(1.15);
}

/* Firefox — custom thumb */
.calc-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4f46e5;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #4f46e5, 0 2px 6px rgba(79, 70, 229, 0.4);
  cursor: pointer;
  -moz-transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.calc-slider::-moz-range-thumb:hover {
  background: #4338ca;
}

.calc-slider::-moz-range-thumb:active {
  background: #3730a3;
}

/* Firefox — track styling */
.calc-slider::-moz-range-track {
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
}

/* Focus ring for keyboard navigation */
.calc-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.45), 0 2px 6px rgba(79, 70, 229, 0.4);
}

.calc-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.45), 0 2px 6px rgba(79, 70, 229, 0.4);
}

/* Disabled state */
.calc-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.calc-slider:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
}

