@font-face {
  font-family: 'Ubuntu';
  src: url('/fonts/Ubuntu-R.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ubuntu';
  src: url('/fonts/Ubuntu-L.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ubuntu';
  src: url('/fonts/Ubuntu-B.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bebas Neue';
  src: url('/fonts/BebasNeueRegular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --rise-white: 255, 255, 255;
  --rise-grey1: 26, 27, 31;
  --rise-grey2: 35, 39, 42;
  --rise-grey3: 51, 53, 61;
  --rise-midgrey: 84, 86, 93;
  --rise-lightgrey: 186, 190, 196;
  --rise-green: 60, 184, 130;
  --rise-green-second: 60, 184, 170;
  --rise-red: 243, 90, 90;
  --rise-blue: 49, 154, 215;
  --rise-orange: 255, 149, 20;
  --rise-yellow: 243, 214, 90;
  --rise-purple: 148, 60, 184;

  --background: transparent;
  --foreground: rgb(var(--rise-white));
  --muted-foreground: rgb(var(--rise-lightgrey));
  --primary: rgb(var(--rise-green));
  --primary-foreground: rgb(var(--rise-grey1));
  --accent: rgb(var(--rise-green));
  --font-bebas: 'Bebas Neue', ui-sans-serif, system-ui, sans-serif;
  --font-ubuntu: 'Ubuntu', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans: var(--font-ubuntu);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html.dark body,
body {
  font-family: var(--font-ubuntu);
  background-color: transparent !important;
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}

/* Live UCP exact backdrop (from ucp.rise-game.hu CSS) */
html.dark body:before,
body:before {
  content: '';
  z-index: -1;
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(55% 45% at 78% 18%, #3cb88214, #0000 62%),
    linear-gradient(100deg, #1a1b1ff7 0%, #1a1b1feb 28%, #1a1b1f6b 58%, #1a1b1fb8 100%),
    url(/bg1.png) 100% / cover no-repeat;
}
html.dark body:after,
body:after {
  content: '';
  z-index: -1;
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: rgb(var(--rise-green)); text-decoration: none; }
a:hover { color: rgb(var(--rise-green-second)); }
button, input, textarea, select { font: inherit; }

#app { min-height: 100vh; position: relative; }

.ucp-eyebrow {
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgb(var(--rise-green));
  font-size: .68rem;
  font-weight: 600;
  margin: 0;
}
.ucp-hero-title {
  font-family: var(--font-bebas);
  letter-spacing: .06em;
  color: rgb(var(--rise-white));
  margin: .35rem 0 0;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: .95;
}
.ucp-section {
  border: 1px solid rgba(var(--rise-lightgrey), .11);
  backdrop-filter: blur(16px);
  background: #1a1b1fc7;
  border-radius: 6px;
  overflow: hidden;
}
.ucp-section-head {
  border-bottom: 1px solid rgba(var(--rise-lightgrey), .09);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .95rem 1.2rem .85rem;
}
.ucp-section-body { padding: 1.05rem 1.2rem 1.1rem; }
.ucp-section-kicker {
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(var(--rise-green), .9);
  margin: 0 0 .28rem;
  font-size: .62rem;
  font-weight: 600;
}
.ucp-panel-title {
  font-family: var(--font-bebas);
  letter-spacing: .04em;
  font-size: 1.35rem;
  line-height: 1;
  margin: 0;
}
.ucp-mark-icon {
  border: 1px solid rgba(var(--rise-lightgrey), .14);
  background: rgba(var(--rise-grey2), .55);
  width: 1.7rem;
  height: 1.7rem;
  color: rgba(var(--rise-lightgrey), .92);
  border-radius: 5px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.ucp-mark-icon svg { width: 14px; height: 14px; }
.ucp-field-label {
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(var(--rise-lightgrey), .72);
  margin-bottom: .4rem;
  font-size: .72rem;
  font-weight: 600;
  display: block;
}

.ucp-login-wrap {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 2.5rem 1rem;
}
.ucp-login-enter {
  position: relative;
  width: 100%;
  max-width: 28rem;
  animation: ucpLoginEnter .5s ease-out both;
}
@keyframes ucpLoginEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-brand-logo {
  margin: 0 auto .75rem;
  display: flex;
  height: 4.5rem;
  width: 4.5rem;
  align-items: center;
  justify-content: center;
}
.login-brand-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, .45));
}

.field { margin-bottom: 1rem; }
.field-input-wrap { position: relative; }
.field-input-wrap svg {
  pointer-events: none;
  position: absolute;
  left: .75rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  color: rgba(var(--rise-lightgrey), .7);
}
.ucp-input {
  width: 100%;
  height: 2.35rem;
  border-radius: 6px;
  border: 1px solid rgba(var(--rise-lightgrey), .18);
  background: rgba(26, 27, 31, .72);
  color: #fff;
  padding: .25rem .75rem .25rem 2.5rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.ucp-input::placeholder { color: rgba(var(--rise-lightgrey), .55); }
.ucp-input:focus {
  border-color: rgba(var(--rise-green), .45);
  background: rgba(26, 27, 31, .88);
  box-shadow: 0 0 0 3px rgba(var(--rise-green), .12);
}
.ucp-input.no-icon { padding-left: .75rem; }
textarea.ucp-input {
  height: auto;
  min-height: 6rem;
  padding-top: .65rem;
  resize: vertical;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .15rem 0 1rem;
  color: rgba(var(--rise-lightgrey), .88);
  font-size: .875rem;
  cursor: pointer;
  user-select: none;
}
.remember-row input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 1px solid rgba(var(--rise-lightgrey), .35);
  background: rgba(26, 27, 31, .55);
  display: grid;
  place-items: center;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.remember-row input[type='checkbox']:checked {
  background: rgb(var(--rise-green));
  border-color: rgb(var(--rise-green));
}
.remember-row input[type='checkbox']:checked::after {
  content: '';
  width: .35rem;
  height: .55rem;
  border: solid rgb(var(--rise-grey1));
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .12s, background .15s, opacity .15s, box-shadow .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  width: 100%;
  height: 2.5rem;
  background: rgb(var(--rise-green));
  color: rgb(var(--rise-grey1));
}
.btn-primary svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.25;
}
.btn-primary:hover:not(:disabled) {
  background: rgb(var(--rise-green-second));
}
.btn-ghost {
  background: rgba(var(--rise-grey3), .55);
  color: #fff;
  height: 2.1rem;
  padding: 0 .9rem;
  border: 1px solid rgba(var(--rise-lightgrey), .12);
}
.btn-ghost:hover { background: rgba(var(--rise-grey3), .85); }
.btn-danger { background: rgba(var(--rise-red), .9); color: #fff; height: 2.1rem; padding: 0 .9rem; }
.btn-sm { height: 1.85rem; padding: 0 .7rem; font-size: .8rem; }

.alert {
  border-radius: 6px;
  padding: .7rem .85rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  border: 1px solid transparent;
}
.alert-error {
  background: rgba(var(--rise-red), .12);
  border-color: rgba(var(--rise-red), .35);
  color: #ffb4b4;
}
.alert-ok {
  background: rgba(var(--rise-green), .12);
  border-color: rgba(var(--rise-green), .35);
  color: #9ef0d0;
}

.login-footer {
  margin-top: 1.25rem;
  text-align: center;
  color: rgba(var(--rise-lightgrey), .55);
  font-size: .75rem;
}
.login-footer a {
  color: rgba(var(--rise-lightgrey), .7);
}
.login-footer a:hover {
  color: rgba(var(--rise-lightgrey), .95);
}

/* Shell / dashboard */
.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; }
}
.sidebar {
  border-right: 1px solid rgba(var(--rise-lightgrey), .1);
  background: rgba(18, 19, 22, .94);
  backdrop-filter: blur(12px);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .25rem .35rem .75rem;
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-text .ucp-eyebrow { font-size: .58rem; }
.brand-text strong {
  display: block;
  font-family: var(--font-bebas);
  letter-spacing: .08em;
  font-size: 1.15rem;
  font-weight: 400;
}
.nav { display: flex; flex-direction: column; gap: .25rem; }
.nav a, .nav button.nav-link {
  appearance: none;
  background: transparent;
  border: 0;
  text-align: left;
  color: rgba(var(--rise-lightgrey), .88);
  padding: .65rem .75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
}
.nav a:hover, .nav button.nav-link:hover,
.nav a.active, .nav button.nav-link.active {
  background: rgba(var(--rise-green), .12);
  color: #fff;
}
.nav .nav-label {
  margin: .85rem .75rem .35rem;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(var(--rise-midgrey), 1);
}
.sidebar-foot {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(var(--rise-lightgrey), .08);
  font-size: .8rem;
  color: rgba(var(--rise-lightgrey), .7);
}
.main { padding: 1.5rem 1.5rem 2.5rem; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-bebas);
  letter-spacing: .05em;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin: .2rem 0 0;
  font-weight: 400;
}
.grid {
  display: grid;
  gap: 1rem;
}
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .main { padding: 1rem; }
}

.stat-card .value {
  font-family: var(--font-bebas);
  font-size: 2rem;
  letter-spacing: .03em;
  margin-top: .35rem;
}
.stat-card .hint {
  color: rgba(var(--rise-lightgrey), .55);
  font-size: .78rem;
  margin-top: .25rem;
}

.table-wrap { overflow: auto; }
table.ucp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
table.ucp-table th, table.ucp-table td {
  text-align: left;
  padding: .7rem .55rem;
  border-bottom: 1px solid rgba(var(--rise-lightgrey), .08);
}
table.ucp-table th {
  color: rgba(var(--rise-lightgrey), .55);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .15rem .55rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.badge-green { background: rgba(var(--rise-green), .15); color: #7fe0b8; }
.badge-red { background: rgba(var(--rise-red), .15); color: #ffb0b0; }
.badge-blue { background: rgba(var(--rise-blue), .15); color: #8fd0f5; }
.badge-yellow { background: rgba(var(--rise-orange), .15); color: #ffd08a; }

.muted { color: rgba(var(--rise-lightgrey), .65); }
.mono { font-family: var(--font-mono); font-size: .85em; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }
.news-item + .news-item {
  border-top: 1px solid rgba(var(--rise-lightgrey), .08);
  margin-top: .85rem;
  padding-top: .85rem;
}
.news-item h3 {
  margin: 0 0 .35rem;
  font-size: 1rem;
}
.news-item p {
  margin: 0;
  color: rgba(var(--rise-lightgrey), .8);
  line-height: 1.5;
  font-size: .9rem;
  white-space: pre-wrap;
}
