/* ========================================
   MANIFESTING DASHBOARD
   Sales tracking spreadsheet for new MRC
   ======================================== */

/* Hero banner */
.manifesting-hero {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

[data-theme="dark"] .manifesting-hero {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.manifesting-hero-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.manifesting-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.manifesting-hero-text h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  color: white;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  letter-spacing: -0.02em;
}

.manifesting-hero-text p {
  margin: 0;
  opacity: 0.9;
}

.manifesting-hero-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.manifesting-sale-count {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-weight: 600;
}

.manifesting-next-milestone {
  text-align: right;
}

.manifesting-milestone-label {
  font-size: var(--bulma-size-small);
  opacity: 0.95;
}

.manifesting-progress-bar {
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  margin-top: 0.375rem;
  overflow: hidden;
}

.manifesting-progress-fill {
  height: 100%;
  background: white;
  border-radius: 9999px;
  transition: width 0.6s ease;
}

/* Milestone badges */
.manifesting-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.manifesting-milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: var(--bulma-size-small);
  font-weight: 600;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid #fcd34d;
}

[data-theme="dark"] .manifesting-milestone-badge {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  color: #fde68a;
  border-color: #b45309;
}

.manifesting-milestone-badge i {
  color: #d97706;
}

[data-theme="dark"] .manifesting-milestone-badge i {
  color: #fbbf24;
}

/* Spreadsheet container */
.manifesting-spreadsheet {
  background: white;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  overflow-x: auto;
}

[data-theme="dark"] .manifesting-spreadsheet {
  background: #1f2937;
  border-color: #374151;
}

/* Table styling to mimic spreadsheet */
.manifesting-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--bulma-size-normal);
}

.manifesting-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.manifesting-table thead th {
  background: #f9fafb;
  border-bottom: 2px solid #d1d5db;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: var(--bulma-size-small);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  white-space: nowrap;
}

[data-theme="dark"] .manifesting-table thead th {
  background: #1a2332;
  border-bottom-color: #4b5563;
  color: #9ca3af;
}

.manifesting-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

[data-theme="dark"] .manifesting-table tbody td {
  border-bottom-color: #2d3748;
}

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

/* Alternating row colors with green tint */
.manifesting-row:nth-child(even) td {
  background: #f0fdf4;
}

[data-theme="dark"] .manifesting-row:nth-child(even) td {
  background: #052e16;
}

/* Column widths */
.manifesting-col-row { width: 3rem; text-align: center; }
.manifesting-col-date { width: 8rem; }
.manifesting-col-customer { width: auto; }
.manifesting-col-service { width: auto; }
.manifesting-col-mrc { width: 7rem; text-align: right; }
.manifesting-col-cumulative { width: 9rem; text-align: right; }

/* Cell styles */
.manifesting-cell-row {
  text-align: center;
  color: #9ca3af;
  font-size: var(--bulma-size-small);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

[data-theme="dark"] .manifesting-cell-row {
  color: #6b7280;
}

.manifesting-cell-date {
  white-space: nowrap;
  color: #6b7280;
}

[data-theme="dark"] .manifesting-cell-date {
  color: #9ca3af;
}

.manifesting-cell-customer {
  font-weight: 500;
}

.manifesting-cell-service {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.manifesting-cell-currency {
  text-align: right;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-weight: 500;
  white-space: nowrap;
}

/* Cumulative column subtle green that intensifies */
.manifesting-cell-cumulative {
  color: #059669;
}

[data-theme="dark"] .manifesting-cell-cumulative {
  color: #34d399;
}

/* Resource type icons */
.manifesting-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.manifesting-type-vps {
  background: #eff6ff;
  color: #3b82f6;
}

.manifesting-type-ip_block {
  background: #f0fdf4;
  color: #16a34a;
}

.manifesting-type-bgp {
  background: #fef3c7;
  color: #d97706;
}

.manifesting-type-backup {
  background: #f3e8ff;
  color: #7c3aed;
}

[data-theme="dark"] .manifesting-type-vps {
  background: #1e3a5f;
  color: #60a5fa;
}

[data-theme="dark"] .manifesting-type-ip_block {
  background: #052e16;
  color: #4ade80;
}

[data-theme="dark"] .manifesting-type-bgp {
  background: #78350f;
  color: #fcd34d;
}

[data-theme="dark"] .manifesting-type-backup {
  background: #4c1d95;
  color: #c4b5fd;
}

/* Month subtotal rows */
.manifesting-month-subtotal td {
  background: #f9fafb !important;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  color: #374151;
}

[data-theme="dark"] .manifesting-month-subtotal td {
  background: #1a2332 !important;
  border-bottom-color: #4b5563;
  border-top-color: #4b5563;
  color: #d1d5db;
}

/* Grand total row */
.manifesting-grand-total td {
  background: #ecfdf5 !important;
  font-weight: 700;
  font-size: 1.05em;
  border-bottom: 3px double #10b981;
  color: #065f46;
  padding: 0.75rem;
}

[data-theme="dark"] .manifesting-grand-total td {
  background: #064e3b !important;
  border-bottom-color: #34d399;
  color: #a7f3d0;
}

/* Empty state */
.manifesting-empty {
  text-align: center;
  padding: 4rem 2rem;
}

.manifesting-empty-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #10b981;
}

[data-theme="dark"] .manifesting-empty-icon {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #34d399;
}

.manifesting-empty h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .manifesting-empty h3 {
  color: #f3f4f6;
}

.manifesting-empty p {
  color: #6b7280;
}

[data-theme="dark"] .manifesting-empty p {
  color: #9ca3af;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .manifesting-hero {
    flex-direction: column;
    text-align: center;
  }

  .manifesting-hero-content {
    flex-direction: column;
  }

  .manifesting-hero-stats {
    align-items: center;
  }

  .manifesting-hero-text h2 {
    font-size: 2rem;
  }

  .manifesting-progress-bar {
    width: 160px;
  }

  .manifesting-next-milestone {
    text-align: center;
  }
}
