/* ============================================================
   HORIZON — app shell (attendee portal + organizer console)
   Depends on style.css variables. Same dark, gradient brand.
   ============================================================ */

.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* Sidebar */
.side { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 22px 16px; }
.side .logo { padding: 4px 8px 22px; font-size: 20px; }
.side-badge { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); padding: 0 8px 14px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; color: var(--muted); font-size: 14.5px; font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255,255,255,.04); color: #fff; }
.side-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 22px -10px rgba(236,72,153,.5); }
.side-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.side-foot { margin-top: auto; padding-top: 16px; }
.side-back { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; color: var(--muted); font-size: 13.5px; }
.side-back:hover { color: #fff; background: rgba(255,255,255,.04); }
.side-user { display: flex; align-items: center; gap: 11px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-family: var(--h); font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-user .nm { font-size: 14px; font-weight: 600; }
.side-user .sub { font-size: 12px; color: var(--muted); }

/* Main + topbar */
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 30px; background: rgba(8,8,11,.78); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 21px; }
.topbar .tb-right { display: flex; align-items: center; gap: 14px; }
.tb-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; }
.icon-btn { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); color: var(--muted); display: grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn:hover { color: #fff; border-color: var(--line-2); }
.icon-btn .dotn { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.content { padding: 30px; max-width: 1200px; }

/* Pages */
.page { display: none; }
.page.active { display: block; animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-intro { margin-bottom: 26px; }
.page-intro h2 { font-size: 28px; }
.page-intro p { color: var(--muted); margin-top: 6px; }

/* Cards / KPIs */
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--card); padding: 22px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-h h3 { font-size: 16px; }
.card-h a, .link { color: var(--accent); font-size: 13px; font-weight: 600; cursor: pointer; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 20px; }
.kpi .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(236,72,153,.12); color: var(--pink); margin-bottom: 14px; }
.kpi .n { font-family: var(--h); font-weight: 800; font-size: 30px; letter-spacing: -.02em; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.kpi .delta { font-size: 12px; margin-top: 8px; color: #5fe39a; display: inline-flex; align-items: center; gap: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.b-green { background: rgba(95,227,154,.14); color: #5fe39a; }
.b-amber { background: rgba(245,158,11,.16); color: #fbcb6b; }
.b-pink { background: rgba(236,72,153,.14); color: #f9a8d0; }
.b-violet { background: rgba(139,92,246,.16); color: #b79dff; }
.b-mute { background: rgba(255,255,255,.06); color: var(--muted); }

/* Table */
.tbl-wrap { border: 1px solid var(--line); border-radius: 18px; background: var(--card); overflow: hidden; }
.tbl-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tbl-top h3 { font-size: 16px; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 600; padding: 13px 22px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.tbl td { padding: 15px 22px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; color: #d7d7de; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.02); }
.tbl .u { display: flex; align-items: center; gap: 11px; }
.tbl .u .nm { font-weight: 600; color: #fff; }
.tbl .u .em { font-size: 12px; color: var(--muted); }
.search { display: flex; align-items: center; gap: 9px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 11px; padding: 9px 13px; min-width: 220px; }
.search input { background: none; border: 0; outline: none; color: #fff; font-family: var(--b); font-size: 14px; width: 100%; }

/* Chart bars */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bars .bar i { width: 100%; max-width: 34px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, var(--violet), var(--pink)); display: block; }
.bars .bar span { font-size: 11px; color: var(--muted-2); }
.tier-bar { margin-bottom: 16px; }
.tier-bar .r { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; }
.tier-bar .track { height: 8px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.tier-bar .track i { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

/* Feed */
.feed { display: flex; flex-direction: column; gap: 2px; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.feed-row:last-child { border-bottom: none; }
.feed-row .fic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.feed-row .ft { font-size: 14px; }
.feed-row .fs { font-size: 12px; color: var(--muted); }
.feed-row .fm { margin-left: auto; font-size: 12px; color: var(--muted-2); }

/* Attendee pass card */
.pass { border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(236,72,153,.18), rgba(245,158,11,.14)), var(--bg-2); }
.pass-top { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px; }
.pass-top .ev { font-family: var(--h); font-weight: 800; font-size: 22px; }
.pass-top .dt { font-size: 13px; color: #d7d7de; margin-top: 3px; }
.pass-body { display: flex; align-items: center; gap: 22px; padding: 0 26px 26px; }
.pass-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; flex: 1; }
.pass-meta .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.55); }
.pass-meta .v { font-weight: 600; margin-top: 2px; }
.pass .qr { width: 116px; height: 116px; border-radius: 14px; background: #fff; padding: 9px; flex-shrink: 0; }

/* Schedule builder */
.sch-row { display: grid; grid-template-columns: 116px 1fr auto auto; gap: 18px; align-items: center; padding: 16px 6px; border-bottom: 1px solid var(--line); }
.sch-row .tm { font-family: var(--h); font-weight: 700; font-size: 15px; }
.sch-row .tm span { display: block; font-family: var(--b); font-weight: 400; font-size: 11.5px; color: var(--muted-2); }
.sch-row .ti { font-weight: 600; font-size: 15.5px; }
.sch-row .sp { font-size: 13px; color: var(--muted); margin-top: 2px; }
.add-btn { display: inline-flex; align-items: center; gap: 7px; font-family: var(--b); font-weight: 600; font-size: 13px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: #fff; cursor: pointer; transition: .18s; white-space: nowrap; }
.add-btn:hover { border-color: var(--pink); }
.add-btn.added { background: var(--grad); border-color: transparent; }

/* Networking */
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.att { border: 1px solid var(--line); border-radius: 16px; background: var(--card); padding: 20px; text-align: center; }
.att .avatar { width: 62px; height: 62px; margin: 0 auto 12px; font-size: 22px; }
.att .nm { font-weight: 700; }
.att .rl { font-size: 13px; color: var(--muted); margin: 2px 0 14px; }
.att .rl b { color: var(--accent); font-weight: 600; }

/* Toggle switch */
.switch { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--line); }
.switch:last-child { border-bottom: none; }
.switch .st { font-weight: 500; }
.switch .ss { font-size: 13px; color: var(--muted); }
.sw { width: 46px; height: 26px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: .2s; flex-shrink: 0; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.sw.on { background: var(--grad); border-color: transparent; }
.sw.on::after { left: 22px; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; transform: translateX(-110%); transition: transform .25s; width: 264px; }
  .side.open { transform: none; }
  .kpis, .grid-2, .grid-3, .att-grid, .pass-meta { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .sch-row { grid-template-columns: 1fr; gap: 8px; }
  .content, .topbar { padding-left: 18px; padding-right: 18px; }
  .menu-btn { display: grid !important; }
  .pass-body { flex-direction: column; align-items: flex-start; }
}
.menu-btn { display: none; }
