    :root{
      /* Softer dark palette (less techno) */
      --bg: #0b0f17;
      --bg2: #0a0d14;
      --panel: #121826;
      --panel2: #0f1522;

      --border: rgba(255,255,255,0.08);
      --border2: rgba(255,255,255,0.06);

      --text: rgba(245, 247, 255, 0.92);
      --muted: rgba(245, 247, 255, 0.64);

      /* Muted accent */
      --accent: #4f7cff;

      --good: #34d399;
      --warn: #fbbf24;
      --bad: #fb7185;

      --shadow: 0 8px 22px rgba(0,0,0,0.38);
      --radius: 14px;
      --radius2: 10px;

      --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    }

    *{ box-sizing: border-box; }
    html, body{ height: 100%; }
    body{
      margin: 0;
      font-family: var(--sans);
      color: var(--text);
      background: linear-gradient(180deg, var(--bg), var(--bg2));
      overflow-x: hidden;
    }

    /* ===== Layout ===== */
    .app{
      min-height: 100vh;
      display: grid;
      grid-template-columns: 280px 1fr;
    }

    .sidebar{
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 18px 16px;
      background: rgba(18,24,38,0.92);
      border-right: 1px solid var(--border2);
      backdrop-filter: blur(8px);
    }

    .brand{
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 12px;
      border: 1px solid var(--border2);
      border-radius: var(--radius);
      background: rgba(15,21,34,0.75);
      box-shadow: var(--shadow);
    }
    .logo{
      width: 40px; height: 40px;
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(79,124,255,0.9), rgba(122,162,255,0.35));
      border: 1px solid rgba(255,255,255,0.10);
    }
    .brand h1{
      margin: 0;
      font-size: 16px;
      letter-spacing: 0.3px;
      font-weight: 650;
    }
    .brand .sub{
      margin: 2px 0 0;
      font-size: 12px;
      color: var(--muted);
    }

    .nav{
      margin-top: 14px;
      padding: 8px;
      border-radius: var(--radius);
      border: 1px solid var(--border2);
      background: rgba(15,21,34,0.45);
    }
    .nav a{
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 10px;
      margin: 4px 0;
      color: var(--muted);
      text-decoration: none;
      border-radius: 12px;
      border: 1px solid transparent;
      transition: 0.15s ease;
      user-select: none;
    }
    .nav a:hover{
      color: var(--text);
      background: rgba(79,124,255,0.10);
      border-color: rgba(79,124,255,0.18);
    }
    .nav a.active{
      color: var(--text);
      background: rgba(79,124,255,0.16);
      border-color: rgba(79,124,255,0.22);
    }
    .nav .dot{
      width: 8px; height: 8px;
      border-radius: 50%;
      background: rgba(245,247,255,0.35);
      flex: 0 0 8px;
    }
    .nav a.active .dot{ background: var(--accent); }

    /* ===== Main ===== */
    .main{ padding: 20px 20px 28px; }

    .topbar{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 14px 16px;
      border-radius: var(--radius);
      border: 1px solid var(--border2);
      background: rgba(18,24,38,0.70);
      box-shadow: var(--shadow);
      backdrop-filter: blur(8px);
    }

    .topbar .left{
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 260px;
      flex-wrap: wrap;
    }

    .pill{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(15,21,34,0.55);
      color: var(--text);
      font-size: 12px;
      white-space: nowrap;
    }
    .pill .count{
      font-family: var(--mono);
      font-size: 12px;
      color: rgba(245,247,255,0.9);
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.55);
    }

    .search{
      flex: 1 1 auto;
      display: flex;
      justify-content: center;
      gap: 10px;
      align-items: center;
    }
    .search input{
      width: min(460px, 100%);
      padding: 11px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.55);
      color: var(--text);
      outline: none;
    }
    .search input:focus{ border-color: rgba(79,124,255,0.35); }
    .search input::placeholder{ color: rgba(245,247,255,0.40); }

    .topbar .right{
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .btn{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(15,21,34,0.55);
      color: var(--text);
      cursor: pointer;
      transition: 0.15s ease;
      user-select: none;
      text-decoration: none;
    }
    .btn:hover{
      border-color: rgba(79,124,255,0.30);
      background: rgba(79,124,255,0.10);
    }

    /* ===== Grid ===== */
    .grid{
      margin-top: 16px;
      display: grid;
      grid-template-columns: 1fr 360px;
      gap: 16px;
      align-items: start;
    }

    .card{
      border-radius: var(--radius);
      border: 1px solid var(--border2);
      background: rgba(18,24,38,0.60);
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    .card-header{
      padding: 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      flex-wrap: wrap;
    }
    .card-title{
      margin: 0;
      font-size: 13px;
      letter-spacing: 0.4px;
      color: rgba(245,247,255,0.82);
      text-transform: uppercase;
    }
    .card-body{ padding: 14px 16px 16px; }

    .badge{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 999px;
      font-size: 12px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.55);
      color: rgba(245,247,255,0.86);
      white-space: nowrap;
      font-family: var(--mono);
    }

    /* ===== Calendar filter ===== */
    .filters{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      margin-left: auto;
    }
    .date{
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.55);
      color: var(--text);
      border-radius: 12px;
      padding: 8px 10px;
      font-weight: 650;
      font-size: 12px;
      outline: none;
      font-family: var(--mono);
    }
    .date:focus{ border-color: rgba(79,124,255,0.35); }

    /* ===== Matchups ===== */
    .matchups{
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px; /* tighter */
    }
    .match{
      border-radius: var(--radius);
      border: 1px solid rgba(255,255,255,0.08);
      background: rgba(15,21,34,0.45);
      padding: 10px 10px; /* tighter */
      transition: 0.15s ease;
      cursor: pointer;
      outline: none;
    }
    .match:hover{
      border-color: rgba(79,124,255,0.25);
      background: rgba(79,124,255,0.08);
      transform: translateY(-1px);
    }
    .match:focus{
      box-shadow: inset 0 0 0 2px rgba(79,124,255,0.35);
    }

    .row{
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px; /* tighter */
    }

    .meta{
      margin-top: 6px; /* tighter */
      display: flex;
      gap: 6px; /* tighter */
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
    }

    .chip{
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 4px 8px; /* tighter */
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.45);
      color: rgba(245,247,255,0.76);
      font-size: 11px; /* smaller */
      white-space: normal;
    }

    .tiny-dot{
      width: 8px; height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex: 0 0 8px;
      margin-top: 3px;
    }
    .dot-good{ background: var(--good); }
    .dot-warn{ background: var(--warn); }
    .dot-bad{  background: var(--bad);  }

    .mono{ font-family: var(--mono); }
    .muted{ color: var(--muted); }

    /* ===== Right column lists ===== */
    .status-row{
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .status-row:last-child{ border-bottom: none; }

    .alert{
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .alert:last-child{ border-bottom: none; }
    .alert .left{
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }
    .alert .title{
      font-size: 13px;
      color: rgba(245,247,255,0.88);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      font-family: var(--mono);
    }

    .empty{
      border: 1px dashed rgba(255,255,255,0.18);
      border-radius: var(--radius2);
      padding: 14px;
      background: rgba(10,13,20,0.35);
      color: var(--muted);
      display: none;
      font-family: var(--mono);
    }

    /* ===== Completed games block ===== */
    .quickBlock{
      display:flex;
      align-items:center;
      justify-content: space-between;
      gap: 12px;
      padding: 12px;
      border-radius: var(--radius);
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.35);
      margin-top: 12px;
    }
    .quickBlock .t{
      display:flex;
      flex-direction:column;
      gap: 4px;
      min-width: 0;
    }
    .quickBlock .t .h{
      font-family: var(--mono);
      font-weight: 800;
      letter-spacing: 0.2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .quickBlock .t .d{
      font-size: 12px;
      color: var(--muted);
      line-height: 1.35;
    }

    /* ===== Modal ===== */
    .modalOverlay{
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.62);
      backdrop-filter: blur(10px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
      z-index: 999;
    }
    .modal{
      width: min(980px, 96vw);
      max-height: 86vh;
      overflow: auto;
      border-radius: 18px;
      border: 1px solid rgba(255,255,255,0.14);
      background: linear-gradient(180deg, rgba(18,24,38,0.98), rgba(10,13,20,0.92));
      box-shadow: 0 28px 90px rgba(0,0,0,0.60);
      position: relative;
    }
    .modalHeader{
      position: sticky;
      top: 0;
      z-index: 2;
      padding: 16px 16px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.10);
      background: linear-gradient(180deg, rgba(18,24,38,0.98), rgba(18,24,38,0.86));
      backdrop-filter: blur(10px);
      display:flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }
    .modalTitle{
      margin: 0;
      font-size: 18px;
      letter-spacing: -0.01em;
      font-family: var(--mono);
    }
    .modalSubtitle{
      margin: 6px 0 0;
      color: var(--muted);
      font-family: var(--mono);
      font-size: 12px;
      line-height: 1.5;
    }
    .closeBtn{
      border: 1px solid rgba(255,255,255,0.14);
      background: rgba(255,255,255,0.06);
      color: var(--text);
      padding: 10px 12px;
      border-radius: 12px;
      font-weight: 800;
      cursor: pointer;
      transition: 140ms ease;
      user-select: none;
    }
    .closeBtn:hover{ background: rgba(255,255,255,0.08); transform: translateY(-1px); }
    .closeBtn:active{ transform: translateY(0); }

    .modalBody{
      padding: 16px;
      display: grid;
      gap: 14px;
    }
    .grid2{
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .panel{
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10,13,20,0.45);
      border-radius: 14px;
      padding: 14px;
    }
    .panel h3{
      margin: 0 0 10px;
      font-size: 13px;
      letter-spacing: 0.2px;
      color: rgba(245,247,255,0.86);
      text-transform: uppercase;
      font-family: var(--mono);
    }
    .kv{
      display:grid;
      grid-template-columns: 150px 1fr;
      gap: 8px 10px;
      font-size: 13px;
      align-items: start;
    }
    .k{
      color: rgba(245,247,255,0.62);
      font-family: var(--mono);
      font-size: 12px;
      padding-top: 2px;
    }
    .v{
      color: rgba(245,247,255,0.92);
      line-height: 1.45;
    }
    .list{
      display:grid;
      gap: 8px;
      margin: 0;
      padding-left: 18px;
      color: rgba(245,247,255,0.86);
    }
    .note{
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
    }
.sidebar-footer {
  margin-top: auto; /* pushes footer to bottom */
  padding-top: 5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer img {
  max-width: 300px;
  width: 100%;
  opacity: 0.9;
}
/* If you have badges/chips that are nowrap */
.badge, .pill, .chip {
  white-space: normal;
}
/* Prevent any chip from forcing horizontal scroll */
.meta { min-width: 0; }
.meta .chip { max-width: 100%; min-width: 0; }

/* Keep chip style, but truncate if it would overflow */
.chip{
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip .mono{
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
}
    @media (max-width: 1020px){
      .app{ grid-template-columns: 1fr; }
      .sidebar{
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border2);
      }
      .sidebar .footer{ position: relative; left: 0; right: 0; bottom: 0; margin-top: 12px; }
      .grid{ grid-template-columns: 1fr; }
      .topbar{ flex-wrap: wrap; }
      .topbar .left{ min-width: unset; }
      .search{ order: 3; width: 60%; }
      .grid2{ grid-template-columns: 1fr; }
      .kv{ grid-template-columns: 120px 1fr; }
      .chip{white-space: normal;}
    }