/* 8com Invest — POC (navy fintech theme, Investax-inspired) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* InvestaX-style palette */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --navy: #1a1d2e;
  --navy-light: #252836;
  --accent: #22c55e;
  --sidebar-bg: #1a1d2e;
  --sidebar-text: #9ca3af;
  --sidebar-active: #3b82f6;
  --bg: #f5f7fb;
  --kpi-green: #10b981;
  --kpi-purple: #8b5cf6;
  --kpi-amber: #d97706;
  --kpi-blue: #3b82f6;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.12);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --sidebar-width: 280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

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

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.92;
}
.btn.is-loading::before {
  content: '';
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ui-spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-icon {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.btn-icon:hover {
  background: var(--bg);
}

/* ——— Forms ——— */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--text);
}
.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-control-readonly,
.form-control[readonly] {
  background: var(--bg);
  color: var(--text);
  cursor: default;
}
.form-control[readonly]:focus {
  border-color: var(--border);
  box-shadow: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-control.is-invalid {
  border-color: var(--danger);
}
.form-control.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.report-send-investor {
  margin-top: 0.75rem;
}
.report-send-investor .form-hint {
  margin-top: 0.35rem;
  margin-bottom: 0;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* ——— Flash & validation alerts ——— */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 500;
}
.alert ul {
  margin: 0;
  padding-left: 1.25rem;
}
.alert li + li {
  margin-top: 0.35rem;
}
.alert-line {
  margin: 0;
}
.alert-line + .alert-line {
  margin-top: 0.5rem;
}
.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}
.alert-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}
.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
.auth-form-wrap .alert {
  margin-bottom: 1.5rem;
}
.auth-form-wrap .alert-danger {
  box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08);
}

/* ——— Cards & KPIs ——— */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card-body {
  padding: 1.25rem;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}
.card-header-products {
  flex-wrap: wrap;
}
.products-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.products-toolbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.products-search-input {
  width: 16rem;
  min-width: 10rem;
  max-width: 20rem;
}
.products-status-filter,
.products-filter-select {
  width: 9.5rem;
  flex-shrink: 0;
}
.products-business-filter {
  width: 12.5rem;
}
.product-lov-field {
  position: relative;
  width: 14rem;
  flex-shrink: 0;
}
.lov-input-wrap {
  position: relative;
}
.lov-input-wrap .lov-input {
  width: 100%;
  padding-right: 2rem;
}
.lov-clear {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.lov-clear:hover {
  color: var(--text);
}
.lov-dropdown {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  right: 0;
  z-index: 120;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.lov-option,
.lov-empty {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}
.lov-option {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.lov-option strong {
  font-size: 0.875rem;
  font-weight: 600;
}
.lov-option span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.lov-option:hover,
.lov-option.is-active {
  background: var(--primary-light);
}
.lov-empty {
  color: var(--text-muted);
  font-size: 0.8125rem;
  cursor: default;
}
@media (max-width: 720px) {
  .products-toolbar {
    flex-wrap: wrap;
    width: 100%;
  }
  .products-toolbar-search {
    flex: 1 1 100%;
  }
  .products-search-input {
    flex: 1;
    max-width: none;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon.teal {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.kpi-icon.green {
  background: #d1fae5;
  color: var(--accent);
}
.kpi-icon.blue {
  background: #dbeafe;
  color: var(--info);
}
.kpi-icon.amber {
  background: #fef3c7;
  color: #d97706;
}
.kpi-icon.slate {
  background: #f1f5f9;
  color: #475569;
}
.kpi-icon.red {
  background: #fee2e2;
  color: #b91c1c;
}

.kpi-card-content {
  flex: 1;
  min-width: 0;
}

.kpi-card small {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.kpi-card strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.15rem 0;
}
.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
}
.kpi-trend.up {
  color: var(--success);
}
.kpi-trend.down {
  color: var(--danger);
}

/* ——— Badges & tags ——— */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  text-transform: capitalize;
}
.badge-success {
  background: #d1fae5;
  color: #047857;
}
.badge-warning {
  background: #fef3c7;
  color: #b45309;
}
.badge-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.badge-info {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge-muted {
  background: #f1f5f9;
  color: #64748b;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tag-featured {
  background: #ede9fe;
  color: #6d28d9;
}
.tag-demand {
  background: #fee2e2;
  color: #b91c1c;
}
.tag-fast {
  background: #ffedd5;
  color: #c2410c;
}

/* ——— Progress ——— */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.progress {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.progress-primary {
  background: linear-gradient(90deg, var(--primary), #3b82f6);
}
.progress-funding {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}
.progress-sales {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.progress-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 36px;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data-table th,
table.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data-table tbody tr:hover {
  background: #f8fafc;
}
table.data-table .col-thumb {
  width: 3.5rem;
  padding-right: 0.5rem;
}
.data-table-thumb-btn {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
.data-table-thumb-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.data-table-thumb {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.2rem;
}
a.data-table-link {
  color: inherit;
  text-decoration: none;
}
a.data-table-link:hover {
  color: var(--primary);
  text-decoration: underline;
}
.admin-withdrawal-detail-modal {
  max-width: 560px;
}
.admin-kyc-review-modal {
  max-width: 720px;
}
.kyc-review-body {
  margin-bottom: 0.5rem;
}
.kyc-document-preview {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  min-height: 280px;
  max-height: 420px;
}
.kyc-document-preview iframe,
.kyc-document-preview img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: contain;
  border: none;
  background: #fff;
}
.kyc-document-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.kyc-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.btn-kyc-review {
  border-color: #d97706;
  color: #b45309;
}
.btn-kyc-review:hover {
  background: #fffbeb;
  border-color: #b45309;
  color: #92400e;
}
.withdrawal-detail-body {
  margin-bottom: 0.5rem;
}
.withdrawal-detail-list li strong {
  text-align: right;
  max-width: 62%;
  word-break: break-word;
}
.withdrawal-detail-actions {
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.withdrawal-detail-actions:not([hidden]) {
  display: flex;
}
.withdrawal-detail-actions[hidden] {
  display: none !important;
}
table.data-table .col-icon {
  width: 3rem;
  text-align: center;
}
table.data-table .col-actions {
  white-space: nowrap;
}
.admin-image-lightbox {
  max-width: min(920px, calc(100vw - 2rem));
}
.admin-image-lightbox-inner {
  padding-bottom: 1.25rem;
}
.admin-image-lightbox-body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}
.admin-image-lightbox-body img {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  max-height: min(70vh, 720px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
}
.image-lightbox-nav {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.image-lightbox-nav:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.image-lightbox-nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.image-lightbox-counter {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ——— App shell (dashboard layout) ——— */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
}
.brand-icon.logo-8com {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.sidebar-brand strong {
  color: #fff;
  display: block;
  font-size: 1rem;
}
.sidebar-brand small {
  font-size: 0.6875rem;
  opacity: 0.7;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--sidebar-text);
  border-radius: var(--radius-sm);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-item > span:not(.nav-badge) {
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--sidebar-active);
  color: #fff;
}
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.nav-item svg {
  width: 20px;
  height: 20px;
}

/* Investor portal — slightly larger sidebar menu labels */
body.investor-portal .sidebar .nav-item {
  font-size: 0.9375rem;
  padding: 0.8125rem 1rem;
}
body.investor-portal .sidebar .nav-item svg {
  width: 21px;
  height: 21px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.user-chip {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.user-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.user-chip strong {
  color: #fff;
  font-size: 0.875rem;
  display: block;
}
.user-chip small {
  font-size: 0.75rem;
}
.sidebar-footer .btn-ghost {
  color: var(--sidebar-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-footer .btn-ghost:hover {
  background: var(--sidebar-active);
  color: #fff;
}

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  flex: 1;
  min-width: 0;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}
.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.topbar .topbar-profile {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.topbar .topbar-profile:hover {
  border-color: var(--primary);
}
.topbar .topbar-profile strong {
  display: block;
  font-size: 0.875rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu-btn {
  display: none;
}

.page-content {
  padding: 1.5rem;
  flex: 1;
}

/* ——— Grid layouts ——— */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.chart-card {
  min-height: 280px;
}
.chart-container {
  height: 220px;
  position: relative;
}

/* ——— Product cards ——— */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.product-card-image {
  height: 180px;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.product-card-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.product-card-tags {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-body h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.product-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.product-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
  font-size: 0.8125rem;
}
.product-stats dt {
  color: var(--text-muted);
}
.product-stats dd {
  font-weight: 600;
  text-align: right;
}
.product-card-footer {
  padding: 0 1rem 1rem;
  margin-top: auto;
}

.roi-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #d1fae5;
  color: #047857;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

/* ——— Filters bar ——— */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}
.filters-bar .form-control {
  max-width: 200px;
}
.filters-bar .search-input {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}

.kpi-grid-filters {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}
@media (max-width: 1100px) {
  .kpi-grid-filters {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .kpi-grid-filters {
    grid-template-columns: 1fr;
  }
}

.investor-stats-panel {
  margin-bottom: 1.25rem;
}

.admin-settings-collapsible {
  border-radius: var(--radius);
}
.admin-settings-collapsible-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  user-select: none;
}
.admin-settings-collapsible-summary::-webkit-details-marker {
  display: none;
}
.admin-settings-collapsible-summary::marker {
  content: '';
}
.admin-settings-collapsible-meta {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
}
.admin-settings-collapsible-meta strong {
  color: var(--text);
}
.admin-settings-collapsible-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.admin-settings-collapsible[open] .admin-settings-collapsible-summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.admin-settings-collapsible[open] .admin-settings-collapsible-chevron {
  transform: rotate(180deg);
}
.admin-settings-collapsible-body {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: -1px;
}

.investor-stats-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kpi-card-filter {
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  align-items: center;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.kpi-card-filter::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  border-radius: var(--radius) 0 0 var(--radius);
  transition: background 0.2s;
}
.kpi-card-filter:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.kpi-card-filter.is-active {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}
.kpi-filter-all.is-active {
  border-color: #94a3b8;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.kpi-filter-all.is-active::before {
  background: #64748b;
}
.kpi-filter-active.is-active {
  border-color: #6ee7b7;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}
.kpi-filter-active.is-active::before {
  background: var(--accent);
}
.kpi-filter-pending.is-active {
  border-color: #fcd34d;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}
.kpi-filter-pending.is-active::before {
  background: #f59e0b;
}
.kpi-filter-suspended.is-active {
  border-color: #fca5a5;
  background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}
.kpi-filter-suspended.is-active::before {
  background: var(--danger);
}

.kpi-card-filter small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
.kpi-card-filter.is-active small {
  color: var(--text);
}
.kpi-filter-meta {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.kpi-card-filter.is-active.kpi-filter-all .kpi-filter-meta { color: #475569; }
.kpi-card-filter.is-active.kpi-filter-active .kpi-filter-meta { color: #047857; }
.kpi-card-filter.is-active.kpi-filter-pending .kpi-filter-meta { color: #b45309; }
.kpi-card-filter.is-active.kpi-filter-suspended .kpi-filter-meta { color: #b91c1c; }

.investor-search-card {
  margin-bottom: 1.25rem;
}
.investor-search-card .card-body {
  padding: 1rem 1.25rem;
}
.filters-bar-investors {
  margin-bottom: 0;
  align-items: center;
}
.filters-bar-investors .search-input {
  max-width: none;
  flex: 1;
}
.filters-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.filters-bar-icon svg {
  width: 18px;
  height: 18px;
}

/* ——— Landing page ——— */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--text);
}
.landing-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.landing-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}
.landing-links a:hover {
  color: var(--primary-dark);
}

.hero {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero h1 span {
  color: var(--primary);
}
.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-visual {
  background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.hero-stat {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
}
.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary-dark);
}

.section {
  padding: 4rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}
.feature-card .icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.feature-card h3 {
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.landing-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* ——— Auth pages (split login / register) ——— */
body.auth-layout {
  background: var(--surface);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
.auth-split {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}
.auth-panel-brand {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 3rem;
  background: linear-gradient(145deg, #1a1d2e 0%, #252836 40%, #1e3a5f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
.auth-panel-brand::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -15%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.auth-panel-brand::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.auth-panel-brand > * {
  position: relative;
  z-index: 1;
}
.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.auth-brand-logo {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.auth-brand-text strong {
  font-size: 1.25rem;
  display: block;
}
.auth-brand-text small {
  font-size: 0.6875rem;
  opacity: 0.75;
  letter-spacing: 0.08em;
}
.auth-hero-title {
  font-size: 2.125rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  max-width: 420px;
}
.auth-hero-title em {
  font-style: normal;
  color: #93c5fd;
}
.auth-hero-text {
  font-size: 1.0625rem;
  opacity: 0.88;
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 2rem;
}
.auth-value-list {
  list-style: none;
  margin-bottom: 2rem;
}
.auth-value-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  opacity: 0.95;
}
.auth-value-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #93c5fd;
}
.auth-preview-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: auto;
}
.auth-preview-card h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 0.75rem;
}
.auth-preview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem 0.625rem;
}
.auth-preview-stat strong {
  display: block;
  font-size: 0.9375rem;
  color: #86efac;
  line-height: 1.25;
}
.auth-preview-stat span {
  font-size: 0.6875rem;
  opacity: 0.75;
}
.auth-product-chips {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.auth-product-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.2rem 0.6rem 0.2rem 0.2rem;
  font-size: 0.6875rem;
  line-height: 1.2;
}
.auth-product-chip img {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.1rem;
}

.auth-panel-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
  min-height: 100vh;
  min-height: 100dvh;
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-form-wrap h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.auth-form-wrap .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}
.auth-input-icon {
  position: relative;
}
.auth-input-icon .form-control {
  padding-left: 2.75rem;
}
.auth-input-icon > i,
.auth-input-icon > svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
.auth-remember-row {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}
.auth-remember-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.auth-remember-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary);
  cursor: pointer;
}
.auth-trust-badges {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.625rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-trust-badge i {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  border: 1px solid var(--border);
}
.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.auth-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}
.auth-divider {
  text-align: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before {
  left: 0;
}
.auth-divider::after {
  right: 0;
}
.demo-buttons {
  display: grid;
  gap: 0.5rem;
}

@media (max-width: 960px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-panel-brand {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .auth-hero-title {
    font-size: 1.625rem;
  }
  .auth-preview-card {
    margin-top: 1.5rem;
  }
  .auth-preview-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .auth-value-list {
    margin-bottom: 1rem;
  }
}

/* ——— Product detail ——— */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}
.detail-grid-sidebar-wide {
  grid-template-columns: minmax(0, 1fr) minmax(480px, 560px);
}
.investment-side-panel {
  min-width: 0;
}
.investment-side-panel .table-wrap {
  overflow-x: visible;
}
.investment-side-panel table.data-table {
  table-layout: fixed;
}
.investment-side-panel .data-table th,
.investment-side-panel .data-table td {
  padding: 0.65rem 0.75rem;
}
.investment-side-panel .data-table .col-date {
  width: 26%;
}
.investment-side-panel .data-table .col-reference {
  width: 36%;
  word-break: break-word;
  font-size: 0.8125rem;
}
.investment-side-panel .data-table .col-amount {
  width: 20%;
  white-space: nowrap;
}
.investment-side-panel .data-table .col-type {
  width: 18%;
}
.product-detail-top {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.product-detail-intro {
  flex: 1;
  min-width: 0;
}
.detail-gallery {
  flex: 0 0 auto;
  width: 15rem;
  max-width: 15rem;
  padding: 0;
}
.detail-gallery-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: 16rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  width: 100%;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.detail-gallery-main:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
.detail-gallery-main:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.detail-gallery-main img {
  display: block;
  max-width: 100%;
  max-height: 13rem;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}
.gallery-thumbs {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem 0 0;
  overflow-x: auto;
}
.gallery-thumb {
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  padding: 0.2rem;
  border: 2px solid transparent;
  border-radius: calc(var(--radius) - 2px);
  background: #f8fafc;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumb.active {
  border-color: var(--primary);
}
.gallery-thumb img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
}
.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}
.admin-image-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f8fafc;
  padding: 0.5rem;
}
.admin-image-item img {
  display: block;
  max-width: 100%;
  max-height: 7rem;
  width: auto;
  height: auto;
  object-fit: contain;
}
.admin-image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ——— Admin product form ——— */
.admin-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  align-items: start;
}
.admin-form-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.admin-form-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 5.5rem;
}
.form-section .card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-section .card-body > .form-group {
  margin-bottom: 0;
}
.form-section .card-body .grid-2,
.form-section .card-body .grid-3 {
  gap: 1rem;
}
.form-section .card-body .grid-2 .form-group,
.form-section .card-body .grid-3 .form-group {
  margin-bottom: 0;
}
.form-section-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}
.form-section-header-compact {
  padding: 1rem 1.25rem;
}
.form-section-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.form-section-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}
.form-section-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
}
.form-section-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.form-grid-tight {
  gap: 1rem;
}
.catalog-lookup-panel {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.catalog-lookup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  align-items: stretch;
}
.catalog-lookup-row .form-control {
  flex: 1 1 12rem;
  min-width: 0;
}
.catalog-lookup-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.catalog-lookup-panel .form-hint code {
  font-size: 0.8125rem;
}
.admin-image-item-catalog img {
  object-fit: contain;
  background: #fff;
}
.form-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.25rem;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
}
.form-summary-strip small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.form-summary-strip strong {
  font-size: 1.0625rem;
}
.form-summary-strip strong.positive {
  color: var(--success);
}
.form-summary-strip-profit {
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.2);
}
.file-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.file-upload-zone:hover:not(.is-disabled),
.file-upload-zone.is-dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.file-upload-zone.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.file-upload-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  margin-bottom: 0.25rem;
}
.file-upload-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}
.file-upload-zone strong {
  font-size: 0.9375rem;
}
.admin-image-grid-sidebar {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 1rem;
}
.admin-image-grid.is-empty {
  display: none;
}
.btn-image-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-image-delete:hover {
  background: rgba(239, 68, 68, 0.08);
}
.btn-image-delete svg {
  width: 0.875rem;
  height: 0.875rem;
}
.admin-image-item-pending {
  border-style: dashed;
}
.file-upload-zone.is-uploading {
  opacity: 0.65;
  pointer-events: none;
}
.product-image-manager #pending-images-grid {
  margin-bottom: 1rem;
}
.product-identity-list {
  margin-top: 0.25rem;
}
.admin-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg);
  margin: 0;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.admin-modal:not([open]) {
  display: none;
}
.admin-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.admin-modal-inner {
  padding: 1.25rem 1.5rem 1.5rem;
}
.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.admin-modal-header h3 {
  margin: 0;
  font-size: 1.0625rem;
}
.form-flag-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.form-flag-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.form-flag-option:hover {
  border-color: var(--primary);
  background: var(--bg);
}
.form-flag-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.form-flag-option input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}
.form-flag-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.form-flag-content strong {
  font-size: 0.875rem;
}
.form-flag-content small {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.form-actions-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.form-actions-card .btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.form-actions-card .btn-block svg {
  width: 1.125rem;
  height: 1.125rem;
}

@media (max-width: 1200px) {
  .admin-form-layout {
    grid-template-columns: 1fr;
  }
  .admin-form-sidebar {
    position: static;
  }
}

@media (max-width: 1024px) {
  .form-section-header + .card-body .grid-3 {
    grid-template-columns: 1fr;
  }
}
.detail-info .meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.info-list {
  list-style: none;
  margin: 1rem 0;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.info-list li span:first-child {
  color: var(--text-muted);
}

.invest-panel {
  position: sticky;
  top: 5rem;
}
.unit-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}
.unit-stepper button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
}
.unit-stepper input {
  width: 60px;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.checkout-summary {
  background: var(--bg);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  font-size: 0.9375rem;
}
.checkout-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
}
.checkout-summary .total {
  font-weight: 700;
  font-size: 1.125rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* ——— Modal ——— */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-body {
  padding: 1.25rem;
}
.modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* ——— Toast ——— */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text);
  color: #fff;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 360px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success {
  background: var(--success);
}
.toast-error {
  background: var(--danger);
}

/* ——— Empty state ——— */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .detail-grid,
  .detail-grid-sidebar-wide {
    grid-template-columns: 1fr;
  }
  .investment-side-panel .table-wrap {
    overflow-x: auto;
  }
  .product-detail-top {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-gallery {
    width: 100%;
    max-width: 17rem;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .landing-nav {
    padding: 1rem;
  }
  .landing-links {
    gap: 0.75rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .product-stats {
    grid-template-columns: 1fr;
  }
  .product-stats dd {
    text-align: left;
  }
}

/* ——— Investax-style extensions ——— */
.kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi-card-compact {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.kpi-card-compact small {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: block;
}
.kpi-card-compact strong {
  font-size: 1.375rem;
  font-weight: 700;
  display: block;
  margin: 0.25rem 0;
  letter-spacing: -0.02em;
}
.kpi-card-compact .sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kpi-card-compact .trend-up {
  color: var(--kpi-green);
  font-size: 0.75rem;
  font-weight: 600;
}
.kpi-card-compact .hint-green { color: var(--kpi-green); font-size: 0.75rem; font-weight: 600; }
.kpi-card-compact .hint-purple { color: var(--kpi-purple); font-size: 0.75rem; font-weight: 600; }
.kpi-card-compact .hint-amber { color: var(--kpi-amber); font-size: 0.75rem; font-weight: 500; }
.kpi-card-compact .hint-blue { color: var(--kpi-blue); font-size: 0.75rem; font-weight: 500; }

/* Product detail — per-item financials */
.detail-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
.metric-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}
.metric-tile.highlight {
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border-color: #bfdbfe;
}
.metric-tile small {
  display: block;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.metric-tile strong {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.metric-tile .metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.metric-tile .metric-profit {
  color: var(--kpi-green);
}
.metric-tile .metric-roi {
  color: var(--primary);
}

.financial-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
}
.financial-panel-header {
  padding: 0.75rem 1rem;
  background: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.financial-panel-body {
  padding: 0;
}
.fin-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.fin-row:last-child {
  border-bottom: none;
}
.fin-row span:first-child {
  color: var(--text-muted);
}
.fin-row.fin-row-bulk {
  background: #fafbfc;
  font-size: 0.8125rem;
}
.fin-row.fin-row-bulk span:first-child {
  font-style: italic;
}
.fin-row strong.positive {
  color: var(--kpi-green);
}

.sales-velocity-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
}
.sales-velocity-card .velocity-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sales-velocity-card strong {
  font-size: 1.375rem;
  display: block;
}

.roi-hero {
  text-align: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #1a1d2e 0%, #2d3250 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.roi-hero small {
  opacity: 0.8;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.roi-hero strong {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  margin: 0.35rem 0;
  color: #93c5fd;
}
.roi-hero span {
  font-size: 0.8125rem;
  opacity: 0.9;
}

.table-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.table-pagination button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
}
.table-pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 900px) {
  .detail-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.topbar-investor {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-investor .topbar-spacer {
  flex: 1;
}

.welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.welcome-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
}
.welcome-header .welcome-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-user .notif-btn {
  position: relative;
}
.notif-wrap {
  position: relative;
}
.header-user .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--surface);
}
.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  border: 2px solid var(--surface);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 0.875rem;
  text-align: center;
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(22rem, calc(100vw - 2rem));
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}
.notif-dropdown-header strong {
  font-size: 0.9375rem;
}
.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 18rem;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background: #f8fafc;
}
.notif-item-unread {
  background: #eff6ff;
}
.notif-item-unread:hover {
  background: #dbeafe;
}
.notif-item strong {
  font-size: 0.875rem;
  color: var(--text);
}
.notif-item span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.notif-item small {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.notif-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.header-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.header-profile img,
.header-profile .avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-dark);
}
.header-profile small {
  display: block;
  color: var(--text-muted);
  font-size: 0.6875rem;
}

.refer-card {
  margin: 1rem 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  color: #fff;
  font-size: 0.8125rem;
}
.refer-card strong {
  display: block;
  margin-bottom: 0.35rem;
}
.refer-card-text {
  margin: 0 0 0.65rem;
  line-height: 1.45;
  opacity: 0.95;
}
.refer-card-text strong {
  display: inline;
  margin: 0;
}
.refer-card-url {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.6875rem;
  margin-bottom: 0.5rem;
}
.refer-card .btn {
  margin-top: 0;
  background: #fff;
  color: var(--primary-dark);
  width: 100%;
  font-size: 0.75rem;
}
.refer-card .btn.refer-copied {
  background: #dcfce7;
  color: #166534;
}
.refer-card-earned {
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  line-height: 1.45;
}
.refer-card-earned strong {
  display: inline;
  margin: 0;
}
.auth-referral-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.875rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 0.875rem;
}
.auth-referral-banner i {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.auth-referral-banner strong {
  display: block;
  margin-bottom: 0.2rem;
}
.auth-referral-banner span {
  color: var(--text-muted);
  line-height: 1.45;
}
.sidebar-support {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: var(--sidebar-text);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-support a {
  color: #93c5fd;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.dashboard-bottom {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}

.category-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.category-pill.beauty { background: #fce7f3; color: #be185d; }
.category-pill.tech { background: #dbeafe; color: #1d4ed8; }
.category-pill.home { background: #ffedd5; color: #c2410c; }
.category-pill.pets { background: #d1fae5; color: #047857; }
.category-pill.fashion { background: #ede9fe; color: #6d28d9; }
.category-pill.electronics { background: #e0e7ff; color: #4338ca; }
.category-pill.pet { background: #d1fae5; color: #047857; }
.category-pill.car-parts { background: #f1f5f9; color: #475569; }
.category-pill.fresh { background: #ecfccb; color: #3f6212; }

.lifecycle-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.lifecycle-selling { background: #d1fae5; color: #047857; }
.lifecycle-in_stock { background: #dbeafe; color: #1d4ed8; }
.lifecycle-shipping { background: #fef3c7; color: #b45309; }
.lifecycle-in_transit { background: #ede9fe; color: #6d28d9; }
.lifecycle-funding_open { background: #e0f2fe; color: #0369a1; }
.lifecycle-completed { background: #f1f5f9; color: #64748b; }

.table-product-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.table-product-cell img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 0.15rem;
  flex-shrink: 0;
}

.wallet-card .wallet-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}
.wallet-card .wallet-row strong {
  font-size: 1rem;
}
.wallet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.activity-list {
  list-style: none;
}
.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-item small {
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
}

/* Opportunity cards (listing page) */
.opportunities-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.opportunities-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.opportunities-header p {
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.opp-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.opp-card-image {
  position: relative;
  height: 200px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  overflow: hidden;
}
.opp-card-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.opp-funding-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  color: #fff;
}
.opp-funding-badge.funded {
  background: #22c55e;
}
.opp-funding-badge.full {
  background: #dc2626;
}
.opp-funding-badge.open {
  background: #3b82f6;
}

.funding-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.funding-status-full {
  background: #dc2626;
  text-transform: none;
  letter-spacing: normal;
}
.funding-status-partial {
  background: #22c55e;
}
.funding-status-open {
  background: #3b82f6;
}

.invest-panel-closed .card-header h3 {
  color: var(--text-muted);
}

.fully-funded-callout {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
  background: #fffbeb;
}
.fully-funded-callout-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fully-funded-callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #92400e;
}
.fully-funded-callout p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #78350f;
}

.funding-alert-confirmed {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}
.funding-alert-confirmed > i,
.funding-alert-confirmed > svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #15803d;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.funding-alert-confirmed strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #166534;
}
.funding-alert-confirmed p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #166534;
}

.funding-admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.funding-admin-summary small {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}
.funding-admin-summary strong {
  font-size: 1rem;
}

.opp-brand-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--navy);
}
.opp-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.opp-category-label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.opp-product-category {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: -0.5rem 0 0.75rem;
}
.opp-card-body h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.35;
}
.opp-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
  text-align: center;
}
.opp-metrics dt {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.opp-metrics dd {
  font-size: 0.875rem;
  font-weight: 700;
}
.opp-funding-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-top: 0.35rem;
  color: var(--text-muted);
}
.opp-card-footer {
  padding: 0 1.25rem 1.25rem;
}

.opportunity-mini {
  min-width: 260px;
  flex: 0 0 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.opportunity-mini > img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f8fafc;
  padding: 0.75rem;
  box-sizing: border-box;
}
.opportunity-mini .body {
  padding: 1rem;
}
.opportunities-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.chart-header-stat strong {
  font-size: 1.5rem;
  display: block;
}
.chart-header-stat .trend-up {
  color: var(--success);
  font-size: 0.8125rem;
  font-weight: 600;
}

.stub-page-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

@media (max-width: 1200px) {
  .kpi-grid-5 {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-grid,
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .kpi-grid-5 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .kpi-grid-5 {
    grid-template-columns: 1fr;
  }
}

/* Support tickets */
.ticket-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.25rem;
  align-items: start;
}
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ticket-message {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  background: #fff;
}
.ticket-message-investor {
  border-left: 4px solid var(--primary);
}
.ticket-message-staff {
  border-left: 4px solid var(--accent, #0ea5e9);
  background: #f8fafc;
}
.ticket-message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.ticket-message-meta strong {
  color: var(--text);
  font-size: 0.875rem;
}
.ticket-message-body {
  line-height: 1.55;
  word-break: break-word;
}
.ticket-detail-header h2 {
  font-size: 1.25rem;
}
.investment-support-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 960px) {
  .ticket-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Investor sales reports */
.sales-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.sales-report-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: end;
}
.sales-report-filter-actions {
  display: flex;
  align-items: flex-end;
}
.card-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.sales-report-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.report-summary-investor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.report-summary-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
}
.report-summary-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.report-summary-item strong {
  font-size: 1.05rem;
}
.report-empty {
  color: var(--text-muted);
  margin: 0;
}
.report-table-screen th {
  white-space: nowrap;
}
@media (max-width: 960px) {
  .sales-report-filters {
    grid-template-columns: 1fr 1fr;
  }
  .sales-report-filter-actions {
    grid-column: 1 / -1;
  }
  .report-summary-investor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .sales-report-filters {
    grid-template-columns: 1fr;
  }
  .report-summary-investor {
    grid-template-columns: 1fr;
  }
}
