/* ================================================================
   FINDESK — Reports & Exports Stylesheet
   Premium visual design for the reporting center.
   ================================================================ */

.reports-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.reports-hero::after {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  right: -95px;
  top: -135px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.reports-hero .eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #a5b4fc;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.reports-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 10px 0;
  line-height: 1.15;
  color: #ffffff;
}

.reports-hero p {
  max-width: 580px;
  color: #c7d2fe;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.format-guide {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.format-guide span {
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.format-guide span:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.format-guide b {
  color: #ffffff;
  margin-right: 4px;
  font-weight: 700;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 2px 20px;
}

.report-toolbar b {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.report-toolbar span {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

.secure-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--indigo-d);
  background: var(--blue-light);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--sh-xs);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.report-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: var(--sh-sm) !important;
  transition: all 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.report-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

.report-card-top {
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--line-2);
}

.report-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.4rem;
  border-radius: 12px;
  background: #eef2ff;
  color: var(--indigo-d);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.06);
}

.weekly .report-icon {
  background: #f5f3ff;
  color: #7c3aed;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.06);
}

.monthly .report-icon {
  background: #ecfdf5;
  color: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.06);
}

.cycle-label {
  font-size: 0.65rem;
  color: var(--indigo);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.weekly .cycle-label {
  color: #7c3aed;
}

.monthly .cycle-label {
  color: #059669;
}

.report-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 4px 0 2px;
  color: var(--text);
}

.report-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.report-row {
  padding: 18px 24px !important;
  display: flex;
  justify-content: space-between;
  align-items: center !important;
  gap: 12px;
  border-bottom: 1px solid var(--line-2) !important;
  transition: background-color 0.2s ease;
}

.report-row:hover {
  background-color: var(--surface-2);
}

.report-row > div {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.report-row > div > div {
  min-width: 0;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 800;
}

.report-row b {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  display: block;
}

.report-row small {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-card .export-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.report-card .export-actions a {
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--indigo-d);
  background: var(--blue-light);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 6px;
  padding: 6px 10px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.report-card .export-actions a:hover {
  background: var(--indigo-d);
  border-color: var(--indigo-d);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.report-card footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  background: var(--surface-2);
  padding: 12px 24px;
  font-size: 0.72rem;
  font-weight: 600;
  border-top: 1px solid var(--line-2);
}

/* Aggregated card has its own dark palette: it must never inherit the white card header. */
.report-card.overall { background: linear-gradient(145deg, #111a38 0%, #21194f 55%, #361747 100%) !important; border-color: rgba(196,181,253,.26) !important; box-shadow: 0 18px 40px rgba(30,27,75,.24) !important; color: #fff; }
.report-card.overall:hover { border-color: rgba(216,180,254,.6) !important; }
.report-card.overall .report-card-top { background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.025)) !important; border-bottom-color: rgba(255,255,255,.12) !important; }
.report-card.overall .report-icon { background: rgba(192,132,252,.16) !important; color: #e9d5ff !important; box-shadow: none; }
.report-card.overall .cycle-label { color: #d8b4fe !important; }
.report-card.overall h2, .report-card.overall .report-row b { color: #fff !important; }
.report-card.overall p, .report-card.overall .report-row small { color: #cbd5e1 !important; }
.report-card.overall .report-row { background: transparent !important; border-bottom-color: rgba(255,255,255,.12) !important; }
.report-card.overall .report-row:hover { background: rgba(255,255,255,.06) !important; }
.report-card.overall .row-icon { background: rgba(255,255,255,.11); color: #e9d5ff !important; }
.report-card.overall .export-actions a { background: rgba(255,255,255,.11) !important; border-color: rgba(255,255,255,.26) !important; color: #fff !important; }
.report-card.overall .export-actions a:hover { background: #a855f7 !important; border-color: #c084fc !important; }
.report-card.overall footer { background: rgba(0,0,0,.12) !important; border-top-color: rgba(255,255,255,.12) !important; color: #cbd5e1 !important; }

@media (max-width: 1100px) {
  .report-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .reports-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px;
  }
}

@media (max-width: 600px) {
  .reports-hero {
    padding: 24px 20px;
  }
  .reports-hero h1 {
    font-size: 1.8rem;
  }
  .report-toolbar {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .secure-note {
    display: none;
  }
  .report-row {
    padding: 14px 16px !important;
  }
  .report-row small {
    max-width: 150px;
  }
}
