/**
 * ADMIN TRIAL FUNNEL — scoped under .admin-trial-dashboard / .trial-*
 */

.admin-trial-dashboard {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: rgba(245, 240, 232, 0.92);
}

.trial-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.25);
}

.trial-dash-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #f3f4f6;
  text-shadow: 0 2px 12px rgba(212, 168, 83, 0.25);
}

.trial-dash-sub {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(232, 213, 176, 0.9);
  opacity: 0.9;
}

.trial-dash-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.trial-btn-refresh {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, #d4a853, #b8943a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(184, 148, 50, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.trial-btn-refresh:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 168, 83, 0.45);
}

.trial-btn-reset {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  background: rgba(220, 60, 60, 0.2);
  color: #e57373;
  border: 1px solid rgba(220, 60, 60, 0.35);
  transition: background 0.2s, transform 0.2s;
}

.trial-btn-reset:hover {
  background: rgba(220, 60, 60, 0.35);
  transform: translateY(-1px);
}

.trial-period-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.trial-period-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-right: 8px;
}

.trial-period-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 83, 0.35);
  background: rgba(30, 27, 46, 0.9);
  color: #d1d5db;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.trial-period-btn:hover {
  border-color: rgba(232, 213, 176, 0.6);
  color: #fff;
}

.trial-period-btn.trial-period-active {
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.45), rgba(184, 148, 50, 0.55));
  border-color: rgba(245, 230, 200, 0.7);
  color: #fff;
}

/* Summary cards */
.trial-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.trial-card {
  background: linear-gradient(145deg, rgba(10, 18, 32, 0.96), rgba(18, 31, 49, 0.98));
  border-radius: 16px;
  padding: 22px;
  border: 1px solid rgba(212, 168, 83, 0.22);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.trial-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(212, 168, 83, 0.2);
  border-color: rgba(232, 213, 176, 0.4);
}

.trial-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.trial-card-icon {
  font-size: 1.35rem;
}

.trial-card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.trial-card-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: #f9fafb;
  line-height: 1.1;
}

.trial-card-value-sm {
  font-size: 1.75rem;
}

.trial-hours-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: #c4b5fd;
}

.trial-card-label {
  font-size: 0.9rem;
  color: #a1a1aa;
  margin-top: 6px;
}

.trial-card-label-strong {
  font-weight: 600;
  color: #e4e4e7;
  margin-bottom: 12px;
}

.trial-card-sublabel {
  font-size: 0.8rem;
  color: #71717a;
  margin-top: 6px;
}

.trial-conv-big {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #34d399, #10b981);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(16, 185, 129, 0.35));
}

.trial-conv-pct {
  font-size: 1.5rem;
  font-weight: 700;
  margin-left: 2px;
}

.trial-q-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trial-q-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #d4d4d8;
}

.trial-mini-bar {
  position: relative;
  height: 22px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212, 168, 83, 0.2);
}

.trial-mini-bar-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #d4a853, #b8943a);
  transition: width 0.5s ease;
}

.trial-mini-bar-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #f4f4f5;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Sections */
.trial-section {
  margin-bottom: 32px;
}

.trial-section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #f3f4f6;
}

.trial-section-hint {
  font-size: 0.85rem;
  font-weight: 500;
  color: #d4a853;
}

/* Funnel */
.trial-funnel-visual {
  background: linear-gradient(180deg, rgba(24, 22, 36, 0.95), rgba(18, 16, 28, 0.98));
  border-radius: 16px;
  padding: 24px 20px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.trial-funnel-row {
  margin-bottom: 18px;
}

.trial-funnel-row:last-child {
  margin-bottom: 0;
}

.trial-funnel-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 8px;
}

.trial-funnel-label {
  font-weight: 700;
  color: rgba(245, 240, 232, 0.92);
  min-width: 72px;
}

.trial-funnel-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.trial-funnel-drop {
  font-size: 12px;
  color: #a1a1aa;
}

.trial-funnel-track {
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.trial-funnel-bar {
  height: 100%;
  border-radius: 12px;
  min-width: 4%;
  position: relative;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.25);
}

.trial-funnel-bar--blue {
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.trial-funnel-bar--teal {
  background: linear-gradient(90deg, #2dd4bf, #0d9488);
}

.trial-funnel-bar--orange {
  background: linear-gradient(90deg, #fb923c, #ea580c);
}

.trial-funnel-bar--red {
  background: linear-gradient(90deg, #f87171, #dc2626);
}

.trial-funnel-bar--green {
  background: linear-gradient(90deg, #4ade80, #16a34a);
}

.trial-funnel-bar-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 45%,
    transparent 70%
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Daily chart */
.trial-chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #d4d4d8;
}

.trial-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.trial-legend-signup {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.trial-legend-conv {
  background: linear-gradient(180deg, #4ade80, #15803d);
}

.trial-daily-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.trial-daily-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 180px;
  padding: 12px 8px 4px;
  background: rgba(15, 14, 24, 0.85);
  border-radius: 14px;
  border: 1px solid rgba(212, 168, 83, 0.15);
}

.trial-daily-col {
  flex: 1 0 10px;
  min-width: 8px;
  max-width: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trial-daily-bars {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 140px;
  width: 100%;
  cursor: default;
  transition: opacity 0.2s;
}

.trial-daily-bars:hover {
  opacity: 0.92;
}

.trial-daily-bar {
  flex: 1;
  min-height: 2px;
  border-radius: 4px 4px 2px 2px;
  transition: height 0.35s ease, filter 0.2s;
  align-self: flex-end;
}

.trial-daily-bars:hover .trial-daily-bar {
  filter: brightness(1.08);
}

.trial-daily-bar--signup {
  background: linear-gradient(180deg, #93c5fd, #2563eb);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

.trial-daily-bar--conv {
  background: linear-gradient(180deg, #86efac, #16a34a);
  box-shadow: 0 0 12px rgba(22, 163, 74, 0.35);
}

.trial-daily-date {
  font-size: 9px;
  color: #71717a;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: center top;
  height: 28px;
}

.trial-chart-empty {
  color: #9ca3af;
  font-size: 14px;
  margin: 0;
  padding: 24px;
  text-align: center;
}

/* Snapshot */
.trial-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.trial-snap {
  background: linear-gradient(135deg, rgba(55, 48, 78, 0.9), rgba(35, 32, 52, 0.95));
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(212, 168, 83, 0.18);
  text-align: center;
}

.trial-snap-wide {
  grid-column: span 1;
}

.trial-snap-val {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #f9fafb;
}

.trial-snap-lbl {
  display: block;
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 6px;
  line-height: 1.35;
}

/* Tables */
.trial-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(212, 168, 83, 0.2);
  background: rgba(12, 11, 20, 0.6);
}

.trial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.trial-table th,
.trial-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trial-table th {
  background: rgba(212, 168, 83, 0.12);
  color: rgba(245, 240, 232, 0.92);
  font-weight: 600;
  white-space: nowrap;
}

.trial-th-sort {
  cursor: pointer;
  user-select: none;
}

.trial-th-sort:hover {
  color: #c4b5fd;
}

.trial-sort-icon {
  opacity: 0.35;
  font-size: 11px;
  margin-left: 4px;
}

.trial-sort-icon.sorted {
  opacity: 1;
  color: #d4a853;
}

.trial-table tbody tr:hover td {
  background: rgba(212, 168, 83, 0.06);
}

.trial-table-empty {
  text-align: center;
  color: #9ca3af;
  padding: 28px !important;
}

.trial-td-email {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status badges */
.trial-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: capitalize;
}

.trial-status-converted {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.trial-status-active {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.trial-status-exhausted {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.trial-status-abandoned {
  background: rgba(161, 161, 170, 0.15);
  color: #d4d4d8;
  border: 1px solid rgba(161, 161, 170, 0.35);
}

/* Question dots */
.trial-q-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  vertical-align: middle;
}

.trial-q-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-sizing: border-box;
}

.trial-q-dot-filled {
  background: linear-gradient(135deg, #d4a853, #b8943a);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.45);
}

.trial-q-dot-empty {
  background: transparent;
  border: 2px solid #52525b;
}

/* Drip progress */
.trial-drip-progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-width: 160px;
}

.trial-drip-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #10b981);
  transition: width 0.4s ease;
}

.trial-drip-pct {
  display: block;
  font-size: 11px;
  color: #a1a1aa;
  margin-top: 4px;
}

/* Filters */
.trial-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.trial-filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 83, 0.3);
  background: rgba(30, 27, 42, 0.95);
  color: #d4d4d8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.trial-filter-btn:hover {
  border-color: rgba(245, 230, 200, 0.55);
  color: #fff;
}

.trial-filter-btn-active {
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.4), rgba(91, 33, 182, 0.5));
  border-color: rgba(245, 230, 200, 0.65);
  color: #fff;
}

/* Pagination */
.trial-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.trial-page-info {
  font-size: 13px;
  color: #9ca3af;
}

.trial-page-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(212, 168, 83, 0.35);
  background: rgba(35, 32, 48, 0.95);
  color: rgba(245, 240, 232, 0.92);
  font-weight: 600;
  cursor: pointer;
}

.trial-page-btn:hover:not(:disabled) {
  border-color: #d4a853;
  color: #fff;
}

.trial-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Error */
.trial-dash-error-wrap {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trial-dash-error {
  text-align: center;
  padding: 32px;
  background: rgba(127, 29, 29, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 16px;
  max-width: 420px;
}

.trial-dash-error p {
  margin: 0 0 16px;
  color: #fecaca;
}

@media (min-width: 900px) {
  .trial-snap-wide {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .admin-trial-dashboard {
    padding: 14px 12px;
  }

  .trial-dash-title {
    font-size: 1.65rem;
  }

  .trial-conv-big {
    font-size: 2.5rem;
  }

  .trial-table th,
  .trial-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .trial-funnel-label {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .trial-period-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .trial-daily-col {
    min-width: 6px;
  }
}
