/* Ope We Pulled — site styles. Glass look from docs/mockups: Inter, accent gold,
   translucent panel on a dark gradient. Mobile first; no framework. */
:root {
  --accent: #e8c268;
  --accent-hover: #f5d586;
  --text: #f2efe8;
  --text-82: rgba(242, 239, 232, 0.82);
  --text-76: rgba(242, 239, 232, 0.76);
  --text-60: rgba(242, 239, 232, 0.6);
  --good: #7fd6a3;
  --warn: #f0b454;
  --bad: #f06a5a;
  --blue: #6fb7ff;
  --panel: rgba(13, 15, 20, 0.84);
  --card: rgba(255, 255, 255, 0.07);
  --card-border: rgba(255, 255, 255, 0.14);
  --ink: #15171c;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: #0e1116
    radial-gradient(circle at 18% 22%, rgba(52, 120, 140, 0.55) 0, rgba(52, 120, 140, 0) 38%),
    radial-gradient(circle at 82% 78%, rgba(190, 88, 40, 0.45) 0, rgba(190, 88, 40, 0) 40%),
    radial-gradient(circle at 60% 10%, rgba(120, 90, 160, 0.35) 0, rgba(120, 90, 160, 0) 32%);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }
.panel {
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

/* Header + nav */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand img { width: 38px; height: 38px; border-radius: 19px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.brand .name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--accent); }
.brand .sub { color: var(--text-82); font-size: 12px; line-height: 1.2; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: rgba(0, 0, 0, 0.28); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); }
.nav a { padding: 7px 14px; border-radius: 9px; color: rgba(242, 239, 232, 0.88); font-weight: 500; font-size: 13px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a.active { background: rgba(255, 255, 255, 0.12); color: var(--text); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14); }
.nav a.accent { color: var(--accent); }
.viewer { color: var(--text-76); font-size: 12px; padding: 0 18px 6px; text-align: right; }

main.body { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 10px; }

/* Buttons and pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--card-border); border-radius: 15px;
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.btn.accent { background: var(--accent); color: var(--ink); border-color: transparent; font-weight: 600; }
.btn.accent:hover { background: var(--accent-hover); color: var(--ink); }
.btn.big { height: 44px; padding: 0 24px; font-size: 15px; border-radius: 22px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 9px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, 0.1); color: var(--text-82); }
.pill.good { background: rgba(127, 214, 163, 0.18); color: var(--good); }
.pill.warn { background: rgba(240, 180, 84, 0.18); color: var(--warn); }
.pill.bad { background: rgba(240, 106, 90, 0.18); color: var(--bad); }
.pill.blue { background: rgba(111, 183, 255, 0.18); color: var(--blue); }

/* Control row */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px; }
.controls label { color: var(--text-82); font-size: 12px; }
.controls select {
  height: 28px; padding: 0 8px; background: rgba(255, 255, 255, 0.08); color: var(--text); border: 1px solid var(--card-border);
  border-radius: 8px; font: inherit; font-size: 12px;
}
.controls select option { background: #1a1d24; color: var(--text); }
.seg { display: flex; gap: 3px; padding: 3px; background: rgba(0, 0, 0, 0.28); border-radius: 9px; }
.seg button { height: 22px; padding: 0 9px; background: transparent; color: var(--text-82); border: 0; border-radius: 7px; font: inherit; font-size: 11.5px; font-weight: 500; cursor: pointer; }
.seg button.on { background: rgba(255, 255, 255, 0.12); color: var(--text); font-weight: 600; }
.status { color: var(--good); font-size: 11px; font-weight: 500; }

/* Tiles and cards */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--card-border); border-radius: 12px; }
.tile .label { color: var(--text-76); font-size: 11px; font-weight: 500; }
.tile .value { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.tile .delta { font-size: 11px; font-weight: 500; color: var(--text-76); }
.tile .delta.good { color: var(--good); }
.tile .delta.bad { color: var(--bad); }

.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 820px) { .grid.two { grid-template-columns: 1fr 300px; } .grid.half { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--card-border); border-radius: 12px; min-width: 0; }
.card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .head .title { font-weight: 600; }
.card .head .note { color: var(--text-76); font-size: 11px; text-align: right; }
.muted { color: var(--text-76); font-size: 12px; }
.empty { color: var(--text-60); font-size: 12px; padding: 6px 0; }

/* Bars */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 90px; overflow-x: auto; }
.bar { flex: 1 1 0; min-width: 18px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; height: 90px; }
.bar .v { font-size: 9.5px; color: var(--text-76); }
.bar .b { width: 100%; background: rgba(111, 183, 255, 0.75); border-radius: 4px 4px 2px 2px; min-height: 2px; }
.bar.last .b { background: var(--accent); }
.bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; color: inherit; }
.axis { display: flex; justify-content: space-between; color: rgba(242, 239, 232, 0.7); font-size: 10.5px; }

/* Slot rows */
.slot { display: grid; grid-template-columns: 74px 1fr 80px; align-items: center; gap: 8px; font-size: 12px; }
.slot .name { font-weight: 500; }
.track { height: 6px; background: rgba(255, 255, 255, 0.12); border-radius: 3px; overflow: hidden; }
.track .fill { height: 6px; border-radius: 3px; background: var(--good); }
.slot .note { text-align: right; color: var(--text-82); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { text-align: left; color: var(--text-76); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); white-space: nowrap; }
.table td { padding: 5px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr:hover td { background: rgba(255, 255, 255, 0.03); }
.table-wrap { overflow-x: auto; }
.name-cell { font-weight: 500; white-space: nowrap; }

/* Attendance marks */
.mark { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
.mark.P { background: rgba(127, 214, 163, 0.22); color: var(--good); }
.mark.L { background: rgba(240, 180, 84, 0.22); color: var(--warn); }
.mark.F { background: rgba(111, 183, 255, 0.22); color: var(--blue); }
.mark.A { background: rgba(255, 255, 255, 0.08); color: var(--text-60); }
.mark.N { background: rgba(240, 106, 90, 0.22); color: var(--bad); }
.mark.O, .mark.none { background: rgba(255, 255, 255, 0.04); color: var(--text-60); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--text-76); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }

/* Landing */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 18px 16px; }
.hero img { width: 120px; height: 120px; border-radius: 60px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 12px 40px rgba(0, 0, 0, 0.4); }
.hero h1 { margin: 6px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--accent); }
.hero .tagline { font-size: 15px; color: var(--text-82); max-width: 560px; }
.hero .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: var(--text-76); font-size: 13px; }
.hero .actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.hero .login { color: var(--text-76); font-size: 12px; }
.hero .login a { color: var(--accent); }
.teaser { margin: 0 18px 18px; }
.notice { margin: 0 18px 12px; padding: 10px 12px; border-radius: 10px; background: rgba(240, 180, 84, 0.14); border: 1px solid rgba(240, 180, 84, 0.35); color: var(--text); font-size: 13px; }
.notice.bad { background: rgba(240, 106, 90, 0.14); border-color: rgba(240, 106, 90, 0.35); }

/* Login panel (shown on 401) */
.gate { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 18px; text-align: center; }
.gate p { margin: 0; color: var(--text-82); max-width: 460px; }

/* Night page */
.night-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.night-title h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.boss-list { display: flex; flex-direction: column; gap: 4px; }
.boss { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.boss .t { color: var(--text-76); font-variant-numeric: tabular-nums; }
.footer { padding: 10px 18px 16px; color: var(--text-60); font-size: 11px; text-align: center; }
