* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f6fb;
  color: #0f172a;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 18px; }
.topbar {
  position: sticky;
  top: 0;
  background:
    radial-gradient(900px 420px at 12% 25%, rgba(34,197,94,0.16), transparent 60%),
    radial-gradient(900px 420px at 86% 15%, rgba(37,99,235,0.12), transparent 55%),
    rgba(244, 246, 251, 0.90);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15,23,42,0.08);
  z-index: 10;
}
.topbar .row { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.brand { font-weight: 700; letter-spacing: 0.3px; }
.brand a { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo-small { max-height: 48px; width: auto; height: auto; object-fit: contain; display: block; }
.brand-name { display: none; }
@media (min-width: 701px) {
  .brand { padding-left: 34px; }
  .brand-logo-small { max-height: 62px; }
}
.nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav a {
  opacity: 0.95;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15,23,42,0.10);
  font-weight: 600;
}
.nav a:hover { background: rgba(255,255,255,0.95); opacity: 1; }
.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 16px;
  padding: 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
@media (max-width: 900px) {
  .col-6, .col-4, .col-3 { grid-column: span 12; }
  .nav { gap: 6px; }
  .is-admin-area { padding-bottom: 76px; }
  .is-admin-area .nav { display: none; }
  .admin-mobile-top { display: flex; width: 100%; justify-content: flex-end; position: relative; }
  .is-admin-area .admin-mobile-top { width: auto; margin-left: auto; }
  .admin-bottom-nav { display: grid; }
}
@media (max-width: 700px) {
  .topbar .row { flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
  .brand { width: 100%; display: flex; justify-content: center; }
  .brand a { justify-content: center; gap: 0; }
  .brand-name { display: none; }
  .brand-logo-small { max-height: 96px; }
  .nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 10px 8px;
    border-radius: 16px;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(15,23,42,0.08);
  }
  .nav a { white-space: normal; font-size: 16px; padding: 11px 14px; }

  .admin-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 999px;
    background: #16a34a;
    border: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.6px;
    cursor: pointer;
  }
  .admin-menu[hidden] { display: none !important; }
  .admin-menu {
    position: absolute;
    right: 0;
    top: 46px;
    min-width: 220px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 12px 30px rgba(15,23,42,0.12);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
  }
  .admin-menu a {
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(15,23,42,0.02);
    font-weight: 700;
  }

  .admin-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: rgba(244,246,251,0.96);
    border-top: 1px solid rgba(15,23,42,0.10);
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 8px 10px;
    z-index: 30;
  }
  .admin-bottom-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 8px;
    border-radius: 14px;
    border: none;
    background: transparent;
    flex-direction: column;
    gap: 4px;
  }
  .admin-bottom-nav a::before {
    content: attr(data-icon);
    font-size: 18px;
    line-height: 1;
  }
  .admin-bottom-nav a.active {
    background: rgba(37,99,235,0.10);
    color: #1d4ed8;
  }

  .is-admin-area .topbar .row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .is-admin-area .brand { width: auto; justify-content: flex-start; }
  .is-admin-area .brand a { justify-content: flex-start; }
  .is-admin-area .brand-logo-small { max-height: 76px; }
  .is-admin-area .topbar .container { padding-top: 6px; padding-bottom: 6px; }
}

@media (min-width: 901px) {
  .admin-mobile-top, .admin-bottom-nav { display: none; }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  cursor: pointer;
  font-weight: 600;
}
.btn:hover { background: rgba(255,255,255,1); }
.btn.primary { background: #2563eb; border-color: rgba(37,99,235,0.7); color: #fff; }
.btn.primary:hover { background: #1d4ed8; }
.btn.danger { background: #dc2626; border-color: rgba(220,38,38,0.7); color: #fff; }
.btn.danger:hover { background: #b91c1c; }
.btn.small { padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.input, select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.14);
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  outline: none;
}
label { display: block; font-size: 14px; opacity: 0.85; margin: 8px 0 6px; }
.muted { opacity: 0.75; color: rgba(15,23,42,0.85); }
.flash {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.35);
  margin: 12px 0;
}
.flash.error {
  background: rgba(239,68,68,0.13);
  border-color: rgba(239,68,68,0.35);
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid rgba(15,23,42,0.10); text-align: left; vertical-align: top; }
.table.zebra tbody tr:nth-child(even) { background: rgba(15,23,42,0.03); }
.table.zebra tbody tr:nth-child(odd) { background: rgba(255,255,255,0.00); }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .is-admin-area .table { min-width: 860px; }
}
@media (max-width: 700px) {
  .is-admin-area .table { min-width: 900px; }
  .is-admin-area .table th, .is-admin-area .table td { white-space: nowrap; }
}
.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,0.06);
  border: 1px solid rgba(15,23,42,0.10);
  font-size: 12px;
  opacity: 0.9;
}
.replay-card { display: flex; gap: 12px; align-items: center; }
.replay-list { display: flex; flex-direction: column; gap: 10px; }
.replay-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.02);
}
.replay-item-title { font-weight: 900; }
.replay-item-sub { margin-top: 4px; }
.replay-item-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.replay-item-main { min-width: 0; }
.thumb {
  width: 140px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.10);
  flex: 0 0 auto;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.replay-meta { flex: 1 1 auto; min-width: 0; }
.replay-meta .title { font-weight: 700; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.video-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.06);
}
video { width: 100%; height: auto; display: block; background: #000; }

.page-hero {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  background:
    radial-gradient(800px 320px at 12% 20%, rgba(34,197,94,0.18), transparent 60%),
    radial-gradient(800px 320px at 88% 20%, rgba(37,99,235,0.12), transparent 55%),
    rgba(255,255,255,0.92);
}
.page-hero h2 { margin: 0; font-size: 22px; font-weight: 900; }
.page-hero .sub { margin-top: 6px; }

@media (max-width: 700px) {
  .topbar .row { align-items: flex-start; }
  .nav a { padding: 10px 10px; }
  .replay-card { flex-direction: column; align-items: stretch; }
  .thumb { width: 100%; height: 180px; }
  .replay-item { flex-direction: column; align-items: stretch; }
  .replay-item-actions { justify-content: flex-end; }
}

.auth-page {
  min-height: calc(100vh - 86px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
}
.auth-card {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 18px;
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-logo {
  max-height: 68px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.auth-title { font-size: 22px; font-weight: 900; margin: 0; }
.auth-subtitle { margin: 0; }
.auth-app-download { margin-top: 4px; }
.auth-app-links { display: flex; gap: 14px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.auth-app-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 72px; }
.auth-app-badge {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.16);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}
.auth-app-badge img { width: 34px; height: 34px; display: block; object-fit: contain; }
.auth-app-badge.disabled { opacity: 0.35; pointer-events: none; }
.auth-app-note { font-size: 12px; font-weight: 700; color: #64748b; line-height: 1; }
.auth-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.auth-links { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; justify-content:center; }
.auth-card .btn.primary {
  background: #22c55e;
  border-color: rgba(34,197,94,0.8);
  color: #fff;
}
.auth-card .btn.primary:hover,
.auth-card .btn.primary:focus-visible {
  background: #16a34a;
  border-color: rgba(22,163,74,0.85);
}

@media (max-width: 520px) {
  .auth-actions {
    flex-wrap: nowrap;
  }
  .auth-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: 15px;
    padding: 11px 10px;
    white-space: nowrap;
  }
}

.landing {
  padding: 26px 0 10px;
}
.hero {
  position: relative;
  border-radius: 22px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.10);
  background:
    radial-gradient(900px 420px at 15% 20%, rgba(34,197,94,0.28), transparent 60%),
    radial-gradient(900px 420px at 85% 15%, rgba(37,99,235,0.22), transparent 55%),
    rgba(255,255,255,0.92);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(15,23,42,0.10);
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-weight: 800; letter-spacing: 0.3px; font-size: 18px; }
.hero-title {
  font-size: 46px;
  line-height: 1.05;
  font-weight: 900;
  margin: 10px 0 10px;
}
@media (max-width: 900px) {
  .hero-title { font-size: 36px; }
}
.hero-subtitle {
  font-size: 16px;
  line-height: 1.5;
  opacity: 0.86;
  margin: 0 0 16px;
}
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.accent { background: #22c55e; border-color: rgba(34,197,94,0.75); }
.btn.accent:hover { background: #16a34a; }
.hero-side {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(15,23,42,0.10);
}
.hero-side h3 { margin: 0 0 8px; font-size: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15,23,42,0.10);
}
.kpi .label { font-size: 12px; opacity: 0.75; }
.kpi .value { font-size: 18px; font-weight: 800; margin-top: 6px; }
.section-title { font-size: 22px; font-weight: 900; margin: 20px 0 10px; }
.feature-card h4 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; opacity: 0.82; line-height: 1.5; }

.brand-logo-wide {
  max-height: 56px;
  max-width: min(260px, 70vw);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.mockshot {
  margin: 12px 0 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.2);
}
.mockshot svg { width: 100%; height: auto; display: block; }

.landing-light {
  background: #f4f6fb;
  color: #0f172a;
}
.landing-light .topbar {
  background: rgba(244, 246, 251, 0.8);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
.landing-light .nav a:hover { background: rgba(15,23,42,0.06); }
.landing-light .card {
  background: rgba(255,255,255,0.9);
  border-color: rgba(15, 23, 42, 0.10);
}
.landing-light .muted { opacity: 0.75; color: rgba(15,23,42,0.85); }
.landing-light .hero {
  background:
    radial-gradient(900px 420px at 12% 25%, rgba(34,197,94,0.20), transparent 60%),
    radial-gradient(900px 420px at 86% 15%, rgba(37,99,235,0.14), transparent 55%),
    rgba(255,255,255,0.9);
  border-color: rgba(15, 23, 42, 0.10);
}
.landing-light .brand-logo {
  background: rgba(255,255,255,0.9);
  border-color: rgba(15, 23, 42, 0.10);
}
.landing-light .hero-side {
  background: rgba(255,255,255,0.85);
  border-color: rgba(15, 23, 42, 0.10);
}
.landing-light .kpi {
  background: rgba(255,255,255,0.9);
  border-color: rgba(15, 23, 42, 0.10);
}
.landing-light .btn {
  color: #0f172a;
  background: rgba(255,255,255,0.95);
  border-color: rgba(15, 23, 42, 0.12);
}
.landing-light .btn:hover { background: rgba(255,255,255,1); }
.landing-light .btn.primary { color: #fff; }
.landing-light .btn.accent { color: #052e16; }
.landing-light .mockshot {
  border-color: rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
}
