.grp-preview {
  --grp-navy: #091426; --grp-blue: #12335d; --grp-red: #dc2638;
  --grp-green: #10a765; --grp-ink: #172033; --grp-muted: #667085;
  padding: 14px; border: 1px solid #d9e2ef; border-radius: 16px;
  background: #f4f7fb; color: var(--grp-ink);
  box-shadow: 0 18px 48px rgba(9, 20, 38, 0.12);
}

body.grp-fullscreen .dashboard-shell { grid-template-columns: minmax(0, 1fr); }
body.grp-fullscreen .dashboard-sidebar,
body.grp-fullscreen .dashboard-topbar { display: none; }
body.grp-fullscreen .dashboard-main { min-height: 100vh; }
body.grp-fullscreen .dashboard-content { padding: 10px; }

.grp-preview-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }

.game-detail-page.grp-preview-mode > .game-back-button,
.game-detail-page.grp-preview-mode > .game-summary-card,
.game-detail-page.grp-preview-mode > .game-options-card {
  display: none;
}

.game-detail-page.grp-preview-mode > .game-action-content {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.grp-hero, .grp-team-header, .grp-position-heading, .grp-live-note {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.grp-hero {
  position: relative; overflow: hidden; flex-direction: row; align-items: center;
  min-height: 52px; padding: 7px 16px; border-radius: 10px;
  background: linear-gradient(125deg, var(--grp-navy), var(--grp-blue)); color: #fff;
}

.grp-logo { position:relative;z-index:1;flex:0 0 auto;width:104px;height:38px;border-radius:6px;object-fit:contain;background:#fff; }

.grp-hero::after {
  content: ""; position: absolute; right: -45px; width: 180px; height: 180px;
  border: 22px solid rgba(255, 255, 255, 0.06); border-radius: 50%;
}

.grp-eyebrow { color: #ff6070; font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.grp-hero h2 { display: inline; margin: 0 8px 0 0; color: #fff; font-size: clamp(18px, 2vw, 22px); line-height: 1; }
.grp-hero p { display: inline; margin: 0; color: #cfdaea; font-size: 12px; font-weight: 700; }

.grp-back, .grp-error button {
  position: relative; z-index: 1; min-height: 52px; padding: 0 16px; border: 0;
  border-radius: 10px; color: #fff; font-weight: 900; cursor: pointer;
}

.grp-back { background: var(--grp-red); box-shadow: 0 7px 18px rgba(220, 38, 56, 0.3); }
.grp-error button { background: var(--grp-green); box-shadow: 0 7px 18px rgba(16, 167, 101, 0.28); }
.grp-back:hover, .grp-error button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.grp-live-note { justify-content: flex-start; margin: 9px 4px 12px; color: #3d526f; font-size: 12px; font-weight: 800; }
.grp-live-note span { width: 9px; height: 9px; border-radius: 50%; background: var(--grp-green); box-shadow: 0 0 0 5px rgba(16, 167, 101, 0.13); }
.grp-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grp-team-card { overflow: hidden; border: 1px solid #d7e0ec; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(25, 47, 78, 0.08); }
.grp-team-header { min-height: 68px; padding: 11px 16px; border-bottom: 4px solid var(--grp-red); background: #fff; }
.grp-team-home .grp-team-header { border-bottom-color: #155eef; }
.grp-side-label { display: inline-block; margin-bottom: 4px; color: var(--grp-red); font-size: 11px; font-weight: 950; letter-spacing: 1.5px; }
.grp-team-home .grp-side-label { color: #155eef; }
.grp-team-header h3 { margin: 0; color: var(--grp-navy); font-size: clamp(21px, 2vw, 27px); line-height: 1.15; }
.grp-count { flex: 0 0 auto; padding: 8px 11px; border-radius: 10px; background: #edf2f8; color: #4b607a; font-size: 11px; font-weight: 800; text-align: center; }
.grp-count strong { display: block; color: var(--grp-navy); font-size: 21px; line-height: 1; }
.grp-team-body { padding: 10px; }
.grp-position-group + .grp-position-group { margin-top: 14px; }
.grp-position-heading { padding: 10px 13px; border-radius: 9px 9px 0 0; background: var(--grp-navy); color: #fff; }
.grp-position-heading span { font-size: 16px; font-weight: 950; letter-spacing: 0.8px; }
.grp-position-heading strong { color: #d6e0ed; font-size: 13px; }
.grp-table-scroll { overflow-x: auto; border: 1px solid #dce3ec; border-top: 0; border-radius: 0 0 9px 9px; }
.grp-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.grp-table th { padding: 11px 9px; background: #edf2f7; color: #33445c; text-align: left; white-space: nowrap; font-size: 13px; }
.grp-table td { padding: 11px 9px; border-top: 1px solid #e4e9f0; color: #24344a; vertical-align: middle; }
.grp-table tbody tr:nth-child(even) { background: #f8fafc; }
.grp-table tbody tr:hover { background: #eef5ff; }
.grp-number { color: var(--grp-red) !important; font-weight: 950; }
.grp-name { min-width: 165px; color: var(--grp-navy) !important; font-size: 15px; font-weight: 900; }
.grp-position-chip { display: inline-block; padding: 4px 7px; border-radius: 6px; background: #e8eef7; color: var(--grp-blue); font-weight: 950; }
.grp-comment { min-width: 120px; color: var(--grp-muted) !important; }
.grp-empty, .grp-loading, .grp-error { display: grid; place-items: center; min-height: 145px; padding: 18px; text-align: center; }
.grp-empty span { font-size: 34px; }
.grp-empty strong, .grp-error strong { margin-top: 7px; color: var(--grp-navy); font-size: 18px; }
.grp-empty p, .grp-error span { margin: 5px 0 14px; color: var(--grp-muted); }
.grp-spinner { width: 34px; height: 34px; margin-bottom: 12px; border: 4px solid #dbe5f1; border-top-color: var(--grp-red); border-radius: 50%; animation: grp-spin 0.8s linear infinite; }
@keyframes grp-spin { to { transform: rotate(360deg); } }

.grp-density-compact .grp-team-header { min-height: 60px; padding: 8px 13px; }
.grp-density-compact .grp-team-body { padding: 7px; }
.grp-density-compact .grp-position-group + .grp-position-group { margin-top: 8px; }
.grp-density-compact .grp-position-heading { padding: 7px 10px; }
.grp-density-compact .grp-table th,
.grp-density-compact .grp-table td { padding: 7px 7px; }

.grp-density-dense .grp-team-header { min-height: 54px; padding: 6px 11px; }
.grp-density-dense .grp-team-header h3 { font-size: 20px; }
.grp-density-dense .grp-count { padding: 5px 8px; }
.grp-density-dense .grp-count strong { font-size: 17px; }
.grp-density-dense .grp-team-body { padding: 5px; }
.grp-density-dense .grp-position-group + .grp-position-group { margin-top: 5px; }
.grp-density-dense .grp-position-heading { padding: 5px 8px; }
.grp-density-dense .grp-position-heading span { font-size: 14px; }
.grp-density-dense .grp-position-heading strong { font-size: 11px; }
.grp-density-dense .grp-table { font-size: 12px; }
.grp-density-dense .grp-table th { padding: 5px 6px; font-size: 11px; }
.grp-density-dense .grp-table td { padding: 5px 6px; }
.grp-density-dense .grp-name { font-size: 13px; }
.grp-density-dense .grp-position-chip { padding: 2px 5px; }

@media (max-width: 820px) { .grp-teams { grid-template-columns: 1fr; } }
@media (max-width: 620px) {
  body.grp-fullscreen .dashboard-content { padding: 0; }
  .grp-preview { padding: 8px; border-radius: 0; }
  .grp-preview-top { grid-template-columns: 1fr; }
  .grp-hero { align-items: center; min-height: 48px; padding: 6px 9px; }
  .grp-logo { width:82px;height:30px; }
  .grp-team-header { flex-direction: column; }
  .grp-back { width: 100%; }
  .grp-team-header { align-items: stretch; }
  .grp-count { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .grp-spinner { animation-duration: 1.8s; }
  .grp-back { transition: none; }
}
