/* Go2Core dashboard. Uses the site theme tokens (--gc-*) from custom.css,
   with fallbacks so it still looks right without them. */

.gc-dash {
  --d-surface: var(--gc-surface, #F4F5FB);
  --d-card: var(--gc-bg, #fff);
  --d-border: var(--gc-border, #d7d7e4);
  --d-text: var(--gc-text, #1b1c2b);
  --d-muted: var(--gc-muted, #6b6f85);
  --d-brand: var(--gc-brand, #2E318E);
  --d-link: var(--gc-link, #2E318E);
  --d-orange: var(--gc-orange, #FF6B17);
  --d-hover: var(--gc-hover-bg, #FFF4EC);
  --d-radius: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: .5em 0 2em;
  color: var(--d-text);
}
.gc-dash a, .gc-dash a:hover { border-bottom: 0; box-shadow: none; background: none; }

/* header */
.gc-dash-head { display: flex; flex-wrap: wrap; gap: 1em; align-items: flex-end; justify-content: space-between; margin: .6em 0 1.4em; }
.gc-dash-head h1 { margin: 0; font-size: 2em; letter-spacing: -.02em; }
.gc-dash-sub { margin: .25em 0 0; color: var(--d-muted); }
.gc-dash-actions { display: flex; flex-wrap: wrap; gap: .5em; }
.gc-btn {
  display: inline-block; padding: .55em 1em; border-radius: 999px; font-weight: 600; font-size: .92em;
  border: 1px solid var(--d-border) !important; color: var(--d-text) !important; background: var(--d-card) !important;
  transition: border-color .15s, background .15s;
}
.gc-btn:hover { border-color: var(--d-link) !important; background: var(--d-hover) !important; }
.gc-btn-primary { background: var(--d-orange) !important; border-color: var(--d-orange) !important; color: #fff !important; }
.gc-btn-primary:hover { filter: brightness(.95); background: var(--d-orange) !important; }

/* KPI tiles */
.gc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9em; margin-bottom: 1.4em; }
.gc-kpi {
  position: relative; display: flex; flex-direction: column; gap: .15em; padding: 1em 1.1em 1.05em;
  border-radius: var(--d-radius); background: var(--d-card) !important; border: 1px solid var(--d-border) !important;
  color: var(--d-text) !important; overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gc-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--d-border); }
.gc-kpi:hover { transform: translateY(-2px); border-color: var(--d-link) !important; box-shadow: 0 8px 22px -12px rgba(30, 33, 99, .45) !important; }
.gc-kpi-label { font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--d-muted); }
.gc-kpi-value { font-size: 2.3em; font-weight: 700; line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.gc-kpi-hint { font-size: .8em; color: var(--d-muted); }
.gc-kpi-primary { background: var(--d-brand) !important; border-color: var(--d-brand) !important; color: #fff !important; }
.gc-kpi-primary::before { background: var(--d-orange); }
.gc-kpi-primary .gc-kpi-label, .gc-kpi-primary .gc-kpi-hint { color: rgba(255, 255, 255, .78); }
.gc-kpi-orange::before { background: var(--d-orange); }
.gc-kpi-warn::before { background: #E5A00D; }
.gc-kpi-good::before { background: #2FA36B; }

/* panels */
.gc-dash-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: .9em; margin-bottom: 1.6em; }
@media (max-width: 1000px) { .gc-dash-grid { grid-template-columns: 1fr 1fr; } .gc-panel-recent { grid-column: 1 / -1; } }
@media (max-width: 640px) { .gc-dash-grid { grid-template-columns: 1fr; } }
.gc-panel { background: var(--d-card); border: 1px solid var(--d-border); border-radius: var(--d-radius); padding: 1em 1.1em; min-width: 0; }
.gc-panel h2, .gc-reports h2 { margin: 0 0 .7em; font-size: 1em; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--d-muted); }
.gc-empty { color: var(--d-muted); margin: .3em 0; }

/* bar lists */
.gc-bars { list-style: none; margin: 0; padding: 0; }
.gc-bars a { display: grid; grid-template-columns: 6.5em 1fr 2.2em; align-items: center; gap: .6em; padding: .32em .3em; border-radius: 8px; color: var(--d-text) !important; }
.gc-bars a:hover { background: var(--d-hover) !important; }
.gc-bar-name { font-size: .9em; text-transform: capitalize; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-bar-track { height: 8px; border-radius: 99px; background: var(--d-surface); overflow: hidden; }
.gc-bar { display: block; height: 100%; border-radius: 99px; min-width: 2px; }
.gc-bar-count { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.gc-bar-p0 { background: #E5484D; }
.gc-bar-p1 { background: var(--d-orange); }
.gc-bar-p2 { background: var(--d-link); }
.gc-bar-p3 { background: #7C86D8; }
.gc-bar-p4, .gc-bar-p5 { background: #A3A8BF; }
.gc-bar-type { background: var(--d-link); }

/* recent list */
.gc-recent { list-style: none; margin: 0; padding: 0; }
.gc-recent li + li { border-top: 1px solid var(--d-border); }
.gc-recent a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .7em; padding: .5em .3em; border-radius: 8px; color: var(--d-text) !important; }
.gc-recent a:hover { background: var(--d-hover) !important; }
.gc-recent-id { grid-row: 1 / 3; align-self: center; font-weight: 700; color: var(--d-link); font-variant-numeric: tabular-nums; min-width: 2.4em; }
.gc-recent-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.gc-recent-meta { font-size: .8em; color: var(--d-muted); }
.gc-status { display: inline-block; padding: 0 .5em; margin-right: .35em; border-radius: 99px; background: var(--d-surface); font-weight: 600; font-size: .95em; }
.gc-status-closed { color: #2FA36B; }
.gc-status-new { color: var(--d-orange); }
.gc-chip { display: inline-block; margin-left: .4em; padding: 0 .5em; border-radius: 99px; font-size: .72em; font-weight: 700; vertical-align: middle; }
.gc-chip-private { background: color-mix(in srgb, var(--d-orange) 15%, transparent); color: var(--d-orange); }

/* report cards */
.gc-report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9em; }
.gc-report {
  display: flex; flex-direction: column; gap: .35em; padding: 1em 1.1em 1.1em; min-height: 7.5em;
  border-radius: var(--d-radius); background: var(--d-card) !important; border: 1px solid var(--d-border) !important;
  color: var(--d-text) !important; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gc-report:hover { transform: translateY(-2px); border-color: var(--d-link) !important; box-shadow: 0 8px 22px -12px rgba(30, 33, 99, .45) !important; }
.gc-report-top { display: flex; align-items: baseline; justify-content: space-between; }
.gc-report-id { font-size: .8em; font-weight: 700; color: var(--d-muted); letter-spacing: .04em; }
.gc-report-count { font-size: 1.9em; font-weight: 700; letter-spacing: -.03em; color: var(--d-link); font-variant-numeric: tabular-nums; }
.gc-report-zero { color: var(--d-muted); opacity: .7; }
.gc-report-title { font-weight: 700; font-size: 1.02em; line-height: 1.3; }
.gc-report-desc { font-size: .85em; color: var(--d-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .gc-kpi, .gc-report { transition: none; } .gc-kpi:hover, .gc-report:hover { transform: none; } }
.gc-bar[style*="width: 0%"] { display: none; }
