:root {
  --bg: #0b0f13;
  --panel: rgba(18, 22, 27, .94);
  --panel-soft: rgba(28, 33, 39, .78);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #f7f7f5;
  --muted: #a7abb3;
  --orange: #ff7a1a;
  --orange-2: #ff9f45;
  --green: #22c55e;
  --blue: #2684ff;
}

* {
  box-sizing: border-box;
}

body.portal-page {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 2%, rgba(255, 122, 26, .16), transparent 24%),
    linear-gradient(180deg, #0e1217 0%, #0a0e12 100%);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.portal-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 17, 22, .98), rgba(10, 13, 17, .98));
  border-right: 1px solid var(--line-strong);
  z-index: 10;
}

.portal-brand {
  height: 130px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.brand-disc {
  width: 62px;
  height: 42px;
  position: relative;
  flex: 0 0 auto;
}

.brand-disc::before {
  content: "";
  position: absolute;
  inset: 6px 2px;
  border: 5px solid var(--orange);
  border-radius: 50%;
  transform: skewX(-22deg) rotate(-18deg);
  box-shadow: -18px 6px 0 -12px rgba(255, 122, 26, .75), -32px 13px 0 -14px rgba(255, 122, 26, .45);
}

.portal-brand strong,
.mobile-brand strong {
  display: block;
  font-size: 31px;
  line-height: 1;
  font-style: italic;
  letter-spacing: 0;
}

.portal-brand small {
  display: block;
  margin-top: 4px;
  color: var(--orange);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .6px;
}

.side-nav {
  display: grid;
  gap: 8px;
  padding: 26px 12px;
}

.side-nav a {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  color: #c9ccd2;
  text-decoration: none;
  border-radius: 10px;
  border-left: 3px solid transparent;
  font-size: 16px;
}

.side-nav a span {
  width: 24px;
  color: #aeb2bb;
  font-size: 22px;
  text-align: center;
}

.side-nav a.active,
.side-nav a:hover {
  color: var(--orange);
  background: linear-gradient(90deg, rgba(255, 122, 26, .17), rgba(255, 255, 255, .04));
  border-left-color: var(--orange);
}

.side-nav a.active span,
.side-nav a:hover span {
  color: var(--orange);
}

.side-user {
  margin-top: auto;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--orange);
  border-radius: 50%;
  color: var(--orange);
  font-weight: 900;
}

.side-user span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.portal-app {
  min-height: 100vh;
  margin-left: 270px;
}

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 0 34px;
  background: rgba(11, 15, 19, .72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 8;
}

.mobile-brand {
  display: none;
  margin-right: auto;
  align-items: center;
  gap: 10px;
}

.mobile-brand .brand-disc {
  width: 48px;
}

.mobile-brand strong {
  font-size: 24px;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-links a {
  color: #d6d8dd;
  text-decoration: none;
  font-weight: 700;
}

.login-link {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
}

.bell {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #d6d8dd;
  font-size: 22px;
}

.bell span {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.portal-main {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 30px 28px;
}

.hero-dashboard {
  min-height: 350px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 30px;
  position: relative;
  overflow: hidden;
  margin: 0 -30px;
  padding: 48px 72px 38px;
  background:
    linear-gradient(90deg, rgba(11, 15, 19, .88) 0%, rgba(11, 15, 19, .72) 45%, rgba(11, 15, 19, .22) 100%),
    radial-gradient(circle at 76% 44%, rgba(255, 122, 26, .32), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .07), transparent 26%),
    #11171d;
  border-bottom: 1px solid var(--line);
}

.hero-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.045) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 73% 30%, rgba(255,255,255,.22), transparent 7%),
    radial-gradient(circle at 82% 54%, rgba(255,122,26,.25), transparent 12%);
  opacity: .38;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(42px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 8px 28px rgba(0,0,0,.38);
}

.hero-content h1 span {
  color: var(--orange-2);
}

.hero-content p {
  max-width: 520px;
  margin: 20px 0 0;
  color: #e0e2e6;
  font-size: 18px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.primary-action {
  background: linear-gradient(180deg, #ff8a24, #f06d12);
  color: #fff;
  box-shadow: 0 14px 28px rgba(255, 122, 26, .22);
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, .32);
  color: #f5f5f5;
  background: rgba(12, 16, 21, .44);
}

.hero-visual {
  min-height: 250px;
}

.trap-disc {
  position: absolute;
  border-radius: 50%;
  transform: skewX(-24deg) rotate(-12deg);
  background:
    radial-gradient(circle at 42% 34%, #ffb25f 0 12%, #ff7a1a 13% 52%, #d94d08 54% 100%);
  box-shadow: 0 22px 60px rgba(255, 122, 26, .34);
}

.disc-main {
  width: 270px;
  height: 92px;
  right: 108px;
  top: 62px;
}

.disc-main::before,
.disc-main::after {
  content: "";
  position: absolute;
  inset: 18px 38px;
  border: 8px solid rgba(111, 32, 2, .36);
  border-radius: 50%;
}

.disc-main::after {
  inset: 31px 70px;
  border-width: 5px;
}

.disc-small {
  width: 58px;
  height: 24px;
  right: 32px;
  top: 26px;
}

.spark {
  position: absolute;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 22px rgba(255, 122, 26, .8);
}

.s1 { width: 9px; height: 9px; right: 84px; top: 48px; }
.s2 { width: 7px; height: 7px; right: 56px; top: 142px; }
.s3 { width: 12px; height: 4px; right: 236px; top: 28px; transform: rotate(22deg); }

.thrower {
  position: absolute;
  width: 220px;
  height: 132px;
  right: -18px;
  bottom: -18px;
  background: linear-gradient(145deg, #30343a, #0f1318);
  clip-path: polygon(28% 0, 100% 32%, 78% 100%, 0 72%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: -20px -10px 40px rgba(0,0,0,.45);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr);
  gap: 14px;
  margin-top: 8px;
}

.left-column,
.right-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .26);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head a,
.panel-link {
  color: var(--orange);
  text-decoration: none;
  font-weight: 800;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stat-card {
  min-height: 96px;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(35, 41, 49, .86), rgba(24, 29, 35, .86));
}

.stat-icon {
  grid-row: span 2;
  color: var(--orange);
  font-size: 34px;
}

.stat-card strong {
  font-size: 28px;
}

.stat-card span:last-child {
  color: #c2c5cb;
  font-size: 12px;
}

.tournament-list,
.message-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tournament-row {
  min-height: 80px;
  display: grid;
  grid-template-columns: 64px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.tournament-row:last-child,
.message-row:last-child {
  border-bottom: 0;
}

.date-box {
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 6px;
  background: rgba(255, 122, 26, .08);
  color: var(--orange);
}

.date-box strong {
  font-size: 24px;
  line-height: 1;
}

.date-box span {
  font-size: 13px;
  font-weight: 900;
}

.tournament-main h3,
.message-row h3,
.club-card h3 {
  margin: 0 0 5px;
  font-size: 15px;
}

.tournament-main p,
.message-row p,
.club-card p,
.release-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.row-meta {
  color: #cfd2d7;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
}

.row-meta span {
  color: #b7bac1;
}

.row-status.planned {
  color: #ff9f45;
}

.row-status.live {
  color: #4ade80;
}

.row-status.closed {
  color: #aeb4bf;
}

.row-status span {
  color: currentColor;
}

.row-arrow {
  color: #d7d9dd;
  text-decoration: none;
  font-size: 30px;
}

.row-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 122, 26, .36);
  border-radius: 7px;
  color: #fff;
  background: rgba(255, 122, 26, .12);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.row-detail:hover {
  background: rgba(255, 122, 26, .22);
  border-color: rgba(255, 122, 26, .6);
}

.message-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--line);
}

.message-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.message-icon.live { background: var(--orange); }
.message-icon.open { background: var(--blue); }
.message-icon.finished { background: var(--green); }

.message-row time {
  color: var(--muted);
  font-size: 12px;
}

.panel-link {
  display: block;
  text-align: right;
  margin-top: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-grid a {
  min-height: 126px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 10px;
  text-align: center;
  color: #e5e7eb;
  text-decoration: none;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(35, 41, 49, .78), rgba(24, 29, 35, .9));
}

.quick-grid span {
  color: var(--orange);
  font-size: 30px;
}

.release-panel {
  border-color: rgba(255, 122, 26, .18);
}

.release-panel span {
  display: inline-flex;
  margin-top: 14px;
  color: #ffd2aa;
  background: rgba(255, 122, 26, .10);
  border: 1px solid rgba(255, 122, 26, .20);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.club-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.club-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(35, 41, 49, .66), rgba(24, 29, 35, .82));
}

.club-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--orange);
  border: 2px solid var(--orange);
  font-weight: 900;
}

.club-card strong {
  display: inline-block;
  margin-top: 8px;
  color: #f2f3f5;
  font-size: 13px;
}

.partner-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.partner-strip span {
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
}

.partner-strip a {
  color: #d6d8dd;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.detail-main {
  padding-top: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--orange-2);
  text-decoration: none;
  font-weight: 800;
}

.detail-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: .98;
  letter-spacing: 0;
  text-transform: uppercase;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: #e7e9ed;
  background: rgba(255,255,255,.04);
  font-size: 13px;
  font-weight: 800;
}

.registration-box {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid rgba(255, 122, 26, .24);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 122, 26, .13), rgba(255,255,255,.035));
}

.registration-box span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.registration-box strong {
  font-size: 28px;
  text-transform: uppercase;
}

.registration-box p,
.detail-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.registration-box button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.12);
  font-weight: 900;
  cursor: not-allowed;
}

.register-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ff9f45);
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.register-panel {
  max-width: 980px;
}

.public-form {
  display: grid;
  gap: 20px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-form label {
  display: grid;
  gap: 7px;
  color: #e7e9ed;
  font-weight: 800;
}

.public-form input,
.public-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: rgba(6, 10, 16, .72);
  padding: 10px 12px;
  font: inherit;
}

.public-form textarea {
  resize: vertical;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.success-box,
.error-box {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.success-box {
  border: 1px solid rgba(34, 197, 94, .28);
  background: rgba(34, 197, 94, .10);
}

.error-box {
  border: 1px solid rgba(248, 113, 113, .28);
  background: rgba(248, 113, 113, .10);
}

.success-box strong {
  display: block;
  margin-bottom: 6px;
  color: #86efac;
}

.success-box p,
.error-box p {
  margin: 0;
  color: #f0f2f5;
  line-height: 1.5;
}

.error-box p + p {
  margin-top: 6px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-card h2 {
  margin: 0 0 18px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(150px, .8fr) 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  color: #f2f3f5;
  font-weight: 800;
}

.capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.capacity-grid div {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
}

.capacity-grid strong {
  color: var(--orange-2);
  font-size: 34px;
  line-height: 1;
}

.capacity-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1120px) {
  .portal-sidebar {
    display: none;
  }

  .portal-app {
    margin-left: 0;
  }

  .topbar {
    justify-content: space-between;
  }

  .mobile-brand {
    display: flex;
  }

  .content-grid,
  .hero-dashboard,
  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 190px;
  }

  .disc-main {
    right: 36%;
    top: 28px;
  }
}

@media (max-width: 780px) {
  .top-links a:not(.login-link) {
    display: none;
  }

  .portal-main {
    padding: 0 14px 20px;
  }

  .hero-dashboard {
    margin: 0 -14px;
    padding: 34px 22px 26px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .stat-grid,
  .quick-grid,
  .club-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tournament-row {
    grid-template-columns: 58px 1fr;
  }

  .row-meta {
    display: none;
  }

  .row-detail {
    grid-column: 2;
    justify-self: start;
  }

  .capacity-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .stat-grid,
  .quick-grid,
  .club-grid {
    grid-template-columns: 1fr;
  }

  .message-row {
    grid-template-columns: 40px 1fr;
  }

  .message-row time {
    grid-column: 2;
  }

  .disc-main {
    width: 210px;
    height: 72px;
    right: 18%;
  }

  .detail-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
