/* POOLBAAS DESKTOP SYSTEM V1
   Desktop only. Mobile layouts below 1100px remain untouched. */

:root {
  --pb-desk-bg: #f4f1fb;
  --pb-desk-surface: #ffffff;
  --pb-desk-surface-soft: #faf8ff;
  --pb-desk-ink: #1f1633;
  --pb-desk-muted: #716985;
  --pb-desk-line: #e5def2;
  --pb-desk-primary: #281154;
  --pb-desk-primary-2: #50318f;
  --pb-desk-live: #15935c;
  --pb-desk-danger: #c13b50;
  --pb-desk-radius-sm: 12px;
  --pb-desk-radius: 18px;
  --pb-desk-radius-lg: 26px;
  --pb-desk-shadow: 0 12px 34px rgba(41, 18, 83, .09);
  --pb-desk-shadow-hover: 0 18px 44px rgba(41, 18, 83, .14);
  --pb-desk-page: min(1880px, calc(100vw - 56px));
}

@media (min-width: 1100px) {
  html { background: var(--pb-desk-bg); }

  body {
    min-width: 1100px;
    background:
      radial-gradient(circle at 82% 0%, rgba(104, 70, 171, .09), transparent 34rem),
      var(--pb-desk-bg);
    color: var(--pb-desk-ink);
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    height: 4px;
    z-index: 9999;
    background: linear-gradient(90deg, var(--pb-desk-primary), #6b45ad 68%, #b392e5);
  }

  .shell,
  main.shell,
  .page-shell,
  .content-shell,
  .pb-main,
  body > main,
  body > .content {
    width: var(--pb-desk-page);
    max-width: none;
    margin-inline: auto;
  }

  .pb-unified-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 10px 32px rgba(29, 10, 63, .18);
    backdrop-filter: blur(16px);
  }

  .pb-unified-header__inner {
    width: var(--pb-desk-page);
    min-height: 84px;
    gap: 28px;
  }

  .pb-unified-brand { min-width: 290px; }
  .pb-unified-brand__logo img { width: 54px; height: 54px; object-fit: contain; }
  .pb-unified-brand__copy strong { font-size: 1.22rem; letter-spacing: -.02em; }
  .pb-unified-brand__copy small { max-width: 330px; opacity: .76; }
  .pb-unified-mobile-context { display: none !important; }

  .pb-unified-centre {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 26px;
  }

  .pb-unified-context {
    flex: 0 0 auto;
    padding-right: 26px;
    border-right: 1px solid rgba(255,255,255,.16);
  }

  .main-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
  }

  .main-nav a {
    padding: 11px 14px;
    border-radius: 12px;
    white-space: nowrap;
    transition: background .18s ease, transform .18s ease, color .18s ease;
  }

  .main-nav a:hover { transform: translateY(-1px); background: rgba(255,255,255,.11); }
  .main-nav a.active { background: #fff; color: var(--pb-desk-primary); box-shadow: 0 8px 22px rgba(0,0,0,.13); }

  .bottom-nav,
  .pb-bottom-nav,
  [data-pb-mobile-dock],
  .pb-mobile-dock { display: none !important; }

  main,
  .page-content,
  #main-content {
    scroll-margin-top: 110px;
  }

  .card,
  .panel,
  .stat-card,
  .match-card,
  .arena-card {
    border: 1px solid var(--pb-desk-line);
    border-radius: var(--pb-desk-radius);
    background: rgba(255,255,255,.96);
    box-shadow: var(--pb-desk-shadow);
  }

  a.card,
  .card[data-href],
  .arena-card,
  .match-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }

  a.card:hover,
  .card[data-href]:hover,
  .arena-card:hover,
  .match-card:hover {
    transform: translateY(-3px);
    border-color: #cfc1e5;
    box-shadow: var(--pb-desk-shadow-hover);
  }

  .button,
  button,
  [type="submit"] {
    border-radius: 12px;
    min-height: 44px;
    font-weight: 800;
  }

  .button:not(.secondary),
  button.primary,
  [type="submit"].primary {
    background: var(--pb-desk-primary);
  }

  table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  th {
    position: sticky;
    top: 84px;
    z-index: 4;
    background: #f8f5fd;
    color: var(--pb-desk-muted);
    text-align: left;
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  th, td { padding: 14px 16px; border-bottom: 1px solid var(--pb-desk-line); }
  tbody tr:hover { background: #faf8ff; }

  /* Kantoor / dashboard */
  body[data-pb-path^="/kantoor"] .shell,
  body[data-pb-path="/"] .shell {
    width: var(--pb-desk-page);
  }

  .dashboard-arena-home-status,
  .dashboard-kantoor-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 26px 30px;
  }

  .dashboard-arena-home-actions,
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .mobile-poolbaas-top-card { display: none !important; }
  .desktop-poolbaas-side-card { display: block !important; }

  .dashboard-top-row-split {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .72fr);
    gap: 22px;
    align-items: stretch;
  }

  .dashboard-top-row-split > * { min-width: 0; }
  .hero-dashboard { height: 100%; min-height: 260px; padding: 36px; }
  .hero-dashboard h1 { max-width: 780px; font-size: clamp(2.2rem, 3.2vw, 4rem); line-height: .98; letter-spacing: -.045em; }
  .hero-dashboard p { max-width: 780px; font-size: 1.04rem; }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
  }

  .hero-stats > div {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.11);
  }

  .daily-movers-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .dashboard-prediction-status-card { padding: 28px 30px; }
  .dashboard-action-block { display: grid; grid-template-columns: 1fr auto; gap: 10px 28px; align-items: center; }
  .dashboard-action-block .eyebrow,
  .dashboard-action-block p { grid-column: 1; }
  .dashboard-action-block .button { grid-column: 2; grid-row: 1 / span 3; align-self: center; }

  /* Generic desktop collections */
  .arena-grid,
  .cards-grid,
  .stats-grid,
  .match-grid,
  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }

  .leaderboard,
  .standings-table,
  .table-wrap {
    overflow: auto;
    border-radius: var(--pb-desk-radius);
    border: 1px solid var(--pb-desk-line);
    background: var(--pb-desk-surface);
    box-shadow: var(--pb-desk-shadow);
  }

  :focus-visible {
    outline: 3px solid rgba(112, 74, 173, .38);
    outline-offset: 3px;
  }
}

@media (min-width: 1500px) {
  .arena-grid,
  .cards-grid,
  .match-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
