:root {
  --bg: #fff7fb;
  --bg2: #f7fbff;
  --panel: rgba(255,255,255,.78);
  --panel-strong: rgba(255,255,255,.92);
  --text: #20122f;
  --muted: #745f84;
  --line: rgba(111,72,143,.12);
  --shadow: 0 20px 48px rgba(137,67,255,.10);
  --pink: #ff4fd8;
  --purple: #8b5cf6;
  --blue: #1b7cff;
  --cyan: #2dd4ff;
  --green: #22c55e;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --red: #ff4d6d;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(255,79,216,.18), transparent 22%),
    radial-gradient(circle at 100% 0%, rgba(45,212,255,.20), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(255,214,10,.16), transparent 26%),
    radial-gradient(circle at 0% 100%, rgba(34,197,94,.14), transparent 24%),
    linear-gradient(135deg, #fff8fc 0%, #fff5f2 24%, #f8f5ff 50%, #f4fbff 76%, #fffef3 100%);
  color: var(--text);
  min-height: 100vh;
}
.layout { display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: 100vh; gap: 18px; padding: 18px; }
.sidebar, .topbar, .panel { background: var(--panel); backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); }
.sidebar { border-radius: 30px; padding: 20px 16px; position: sticky; top: 18px; height: calc(100vh - 36px); display: flex; flex-direction: column; gap: 18px; }
.brand { padding: 6px 10px 12px; border-bottom: 1px solid var(--line); }
.brand h1 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.05em; background: linear-gradient(135deg,var(--pink),var(--purple),var(--blue),var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.nav-group { display: grid; gap: 8px; }
.nav-title { font-size: 12px; color: var(--muted); font-weight: 700; padding: 0 10px; text-transform: uppercase; letter-spacing: .08em; }
.nav-link { display: block; text-decoration: none; border-radius: 18px; padding: 12px 14px; color: var(--text); font-size: 14px; font-weight: 700; transition: .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.72); transform: translateX(2px); }
.nav-link.active { background: linear-gradient(135deg, rgba(255,79,216,.18), rgba(27,124,255,.12)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.9); }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.5; }
.main { display: grid; grid-template-rows: auto 1fr; gap: 16px; min-width: 0; }
.topbar { border-radius: 26px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar h2 { margin: 0; font-size: 26px; font-weight: 900; letter-spacing: -.04em; }
.topbar p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions button, .mobile-nav-btn { border: 0; border-radius: 999px; padding: 10px 16px; font-size: 14px; font-weight: 800; cursor: pointer; color: white; background: linear-gradient(135deg,var(--pink),var(--purple),var(--blue)); box-shadow: 0 12px 24px rgba(255,79,216,.16); }
.actions .secondary { background: rgba(255,255,255,.94); color: var(--text); box-shadow: 0 10px 20px rgba(139,92,246,.08); border: 1px solid var(--line); }
.mobile-nav-btn { display: none; }
.mobile-overlay { display: none; }
.page { display: grid; gap: 16px; min-width: 0; }
.panel { border-radius: 28px; padding: 18px; min-width: 0; }
.panel h3 { margin: 0 0 14px; font-size: 20px; font-weight: 900; letter-spacing: -.04em; }
.hero { background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,247,252,.78), rgba(244,251,255,.78)); border: 1px solid rgba(255,255,255,.95); border-radius: 30px; padding: 22px; box-shadow: var(--shadow); }
.hero h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.05em; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 12px; font-weight: 700; color: #654f73; border: 1px solid rgba(255,255,255,.92); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 14px; }
.metric { padding: 18px; border-radius: 24px; background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(255,255,255,.58)); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); }
.metric:nth-child(6n+1){background:linear-gradient(135deg, rgba(255,79,216,.16), rgba(255,255,255,.76));}
.metric:nth-child(6n+2){background:linear-gradient(135deg, rgba(27,124,255,.14), rgba(255,255,255,.76));}
.metric:nth-child(6n+3){background:linear-gradient(135deg, rgba(255,214,10,.18), rgba(255,255,255,.76));}
.metric:nth-child(6n+4){background:linear-gradient(135deg, rgba(34,197,94,.16), rgba(255,255,255,.76));}
.metric:nth-child(6n+5){background:linear-gradient(135deg, rgba(45,212,255,.16), rgba(255,255,255,.76));}
.metric:nth-child(6n+6){background:linear-gradient(135deg, rgba(139,92,246,.16), rgba(255,255,255,.76));}
.metric-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric-value { margin-top: 8px; font-size: 30px; font-weight: 900; letter-spacing: -.05em; }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.tickets-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 16px; }
.ticket-card { border-radius: 28px; padding: 18px; color: white; box-shadow: 0 20px 42px rgba(137,67,255,.14); }
.ticket-card:nth-child(3n+1){background:linear-gradient(135deg,#ff4fd8 0%,#8b5cf6 48%,#1b7cff 100%);}
.ticket-card:nth-child(3n+2){background:linear-gradient(135deg,#22c55e 0%,#2dd4ff 54%,#1b7cff 100%);}
.ticket-card:nth-child(3n+3){background:linear-gradient(135deg,#ffd60a 0%,#ff9f0a 38%,#ff4d6d 100%);}
.ticket-head { display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:10px; }
.ticket-name { font-size: 19px; font-weight: 900; }
.ticket-money { font-size: 30px; font-weight: 900; }
.ticket-meta { font-size: 13px; opacity: .92; margin-top: 4px; }
.ticket-selection { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: 12px; line-height: 1.55; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.15); margin-bottom: 12px; }
.ticket-rows { display:grid; grid-template-columns: repeat(auto-fit,minmax(84px,1fr)); gap: 8px; }
.ticket-row { border-radius: 16px; background: rgba(255,255,255,.16); padding: 8px; }
.ticket-row-no { font-size: 11px; opacity: .88; }
.ticket-row-pick { font-size: 22px; font-weight: 900; margin-top: 4px; }
.ticket-row-team { font-size: 11px; opacity: .94; margin-top: 3px; }
.feed { display: grid; gap: 10px; }
.feed-item { padding: 12px 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,247,252,.74)); border: 1px solid rgba(255,255,255,.9); }
.feed-title { font-size: 14px; font-weight: 800; }
.feed-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.feed-body { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.table-wrap, .mini-table-wrap { overflow: auto; border-radius: 20px; border: 1px solid rgba(255,255,255,.92); background: rgba(255,255,255,.56); }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.mini-table-wrap table { min-width: 620px; }
th, td { padding: 11px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(95,46,130,.08); }
th { position: sticky; top: 0; z-index: 1; font-size: 12px; color: var(--muted); font-weight: 800; background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,247,252,.88)); }
tr:last-child td { border-bottom: 0; }
.clickable tbody tr, .clickable tr[data-href] { cursor: pointer; }
.clickable tbody tr:hover, .clickable tr[data-href]:hover { background: rgba(255,255,255,.46); }
.pick-tag { font-size: 18px; font-weight: 900; color: #5c2df0; }
.role-tag { color: #d946ef; font-weight: 800; }
.small { font-size: 12px; color: var(--muted); }
.mono { font-family: ui-monospace,SFMono-Regular,Menlo,monospace; }
.empty { padding: 28px; border-radius: 20px; border: 1px dashed rgba(139,92,246,.24); color: var(--muted); text-align: center; background: rgba(255,255,255,.46); }
.kv { display:grid; grid-template-columns: 96px minmax(0,1fr); gap:10px; font-size:13px; padding:8px 0; border-bottom:1px solid rgba(95,46,130,.08); }
.kv:last-child { border-bottom: 0; }
.k { color: var(--muted); font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: 16px; }
.status-good { color: var(--green); font-weight: 800; }
.status-warn { color: var(--orange); font-weight: 800; }
.status-bad { color: var(--red); font-weight: 800; }
@media (max-width: 1280px) { .detail-grid, .two-col, .three-col { grid-template-columns: 1fr; } }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .sidebar {
    position: fixed; left: 12px; top: 12px; bottom: 12px; width: min(82vw, 320px); height: auto; z-index: 50;
    transform: translateX(-120%); transition: transform .22s ease;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .mobile-overlay {
    display: block; position: fixed; inset: 0; background: rgba(20,12,30,.35); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 40;
  }
  body.sidebar-open .mobile-overlay { opacity: 1; pointer-events: auto; }
  .topbar { position: sticky; top: 12px; z-index: 30; }
  .mobile-nav-btn { display: inline-flex; align-items: center; justify-content: center; }
  .actions { width: 100%; justify-content: flex-start; }
  .actions button { flex: 1 1 auto; }
  .hero h1 { font-size: 26px; }
  .metric-value { font-size: 26px; }
  table { min-width: 760px; }
}
