/* Orases brand tokens */
:root {
  --orange:      #E8551E;
  --orange-dark: #C44417;
  --navy:        #0B1F3A;
  --navy-light:  #132A4E;
  --light:       #F4F6F8;
  --white:       #FFFFFF;
  --text:        #1A2433;
  --muted:       #6B7A90;
  --border:      #DDE3EC;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(11,31,58,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Logo ── */
.orases-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.orases-logo img { display: block; }

/* ── Top nav bar ── */
.topbar {
  background: var(--navy);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-right {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.topbar-right strong { color: rgba(255,255,255,.9); }

/* ── Forms ── */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.field input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,85,30,.12);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--orange);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: var(--orange-dark); }
.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--light); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
}
.alert-error { background: #FEF0EC; color: #C44417; border: 1px solid #F9C5B2; }

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
thead th {
  background: var(--navy);
  color: rgba(255,255,255,.75);
  text-align: left;
  padding: 11px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #F8F9FC; }
tbody td { padding: 12px 16px; color: var(--text); vertical-align: middle; }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-orange { background: #FEF0EC; color: var(--orange-dark); }
.badge-green  { background: #E8F5E9; color: #2E7D32; }
.badge-blue   { background: #E3F2FD; color: #1565C0; }

/* ── Stat cards ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.stat-card .stat-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Gate page ── */
.gate-page {
  min-height: 100vh;
  background: linear-gradient(145deg, var(--navy) 0%, #1a3a5c 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.gate-card {
  width: 100%;
  max-width: 420px;
}
.gate-header {
  text-align: center;
  margin-bottom: 32px;
}
.gate-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-top: 20px;
  margin-bottom: 8px;
}
.gate-header p {
  font-size: 14px;
  color: rgba(255,255,255,.6);
}
.gate-body {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.gate-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,.35);
}
.gate-footer a { color: rgba(255,255,255,.5); }

/* ── Player page ── */
.player-page { min-height: 100vh; background: #0A0F18; display: flex; flex-direction: column; }
.player-main { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 24px 16px; }
.player-container {
  width: 100%;
  max-width: 1100px;
}
.player-title {
  color: rgba(255,255,255,.9);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}
.video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
.video-wrap video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
}
.viewer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 13px;
  color: rgba(255,255,255,.7);
  margin-top: 16px;
}
.viewer-badge .dot {
  width: 8px; height: 8px;
  background: #4CAF50;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Admin page ── */
.admin-page { min-height: 100vh; background: var(--light); }
.admin-content { max-width: 1280px; margin: 0 auto; padding: 32px 24px; }
.admin-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.admin-content .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}

/* ── Expand row ── */
.events-row td { padding: 0 !important; background: #F8F9FC !important; }
.events-inner {
  padding: 16px 24px;
  font-size: 13px;
  color: var(--muted);
}
.event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.event-pill {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  display: flex;
  gap: 6px;
}
.event-pill .etype { color: var(--orange); font-weight: 600; }
