/* ===== Fun2Play Panel ===== */
:root {
  --bg: #161618;
  --bg-2: #1c1c1f;
  --card: #222225;
  --card-2: #2a2a2e;
  --line: #2f2f34;
  --text: #ececf1;
  --muted: #9a9aa6;
  --pink: #e040fb;
  --magenta: #c026d3;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #4ade80;
  --orange: #fb923c;
  --red: #f43f5e;
  --yellow: #facc15;
  --grad: linear-gradient(90deg, #e040fb 0%, #8b5cf6 50%, #22d3ee 100%);
  --radius: 6px;
  --side: 64px;
  --side-open: 230px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pink); color: #fff; padding: 8px 12px; z-index: 100; border-radius: var(--radius); }
.skip:focus { left: 8px; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; white-space: nowrap; }
.c-green { color: var(--green); } .c-cyan { color: var(--cyan); } .c-violet { color: var(--violet); }
.c-orange { color: var(--orange); } .c-accent { color: var(--pink); } .c-dyn { color: var(--c); }

/* ===== layout ===== */
.app { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--bg-2);
  border-right: 1px solid #000; z-index: 40; display: flex; flex-direction: column;
  transition: width .2s ease, transform .2s ease; overflow: hidden;
}
.side-logo { display: flex; align-items: center; justify-content: center; height: 64px; border-bottom: 1px solid #0006; transition: height .2s ease; }
.side-logo:hover { text-decoration: none; }
.side-logo img { width: 46px; height: 46px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 0 8px #c026d377); transition: width .2s ease, height .2s ease, transform .3s ease; }
.side-logo:hover img { transform: rotate(-8deg) scale(1.05); }
.side-open .side-logo { height: 120px; }
.side-open .side-logo img { width: 96px; height: 96px; }
.brand { font-weight: 800; letter-spacing: .08em; font-size: 15px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side nav ul { list-style: none; margin: 8px 0; padding: 0; }
.side-link {
  display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 22px; color: #8c8c96;
  white-space: nowrap; position: relative;
}
.side-link:hover { color: #fff; background: #ffffff08; text-decoration: none; }
.side-link.active { color: #fff; background: #ffffff0d; }
.side-link.active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side-link .ico { width: 19px; height: 19px; }
.side-label { opacity: 0; transition: opacity .15s; }
.side-bottom { margin-top: auto; margin-bottom: 10px; }
.side-open .side { width: var(--side-open); }
.side-open .side-label { opacity: 1; }
.side-backdrop { position: fixed; inset: 0; background: #0009; z-index: 35; }

.main-wrap { margin-left: var(--side); transition: margin .2s ease; min-height: 100vh; display: flex; flex-direction: column; }
.side-open .main-wrap { margin-left: var(--side-open); }
.top {
  position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, calc((100% - 1100px) / 2)); background: #1a1a1dee; backdrop-filter: blur(6px); border-bottom: 1px solid #000;
}
.content { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px 40px; flex: 1; }
.foot { max-width: 1100px; width: 100%; margin: 0 auto; padding: 18px 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--card-2); border: 0; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: #34343a; }

/* ===== meniu utilizator ===== */
.dropdown { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: var(--card-2); border: 0; color: var(--text); padding: 5px 10px; border-radius: var(--radius); cursor: pointer; font: inherit; font-weight: 600; }
.user-btn img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.user-btn .ico { width: 14px; height: 14px; transition: transform .15s; }
.dropdown.open .user-btn .ico { transform: rotate(180deg); }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px #0008; padding: 6px; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-head { padding: 6px 10px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown-menu a, .dropdown-menu button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; border-radius: 4px; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #ffffff0d; text-decoration: none; }
.dropdown-menu form { margin: 0; }

/* ===== butoane ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius); border: 0; font: inherit; font-weight: 600; cursor: pointer; color: #fff; background: var(--card-2); }
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: linear-gradient(90deg, #c026d3, #7c3aed); }
.btn-discord { background: #5865f2; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== titluri ===== */
.welcome { font-size: 15px; font-weight: 500; margin: 0 0 18px; color: #d8d8de; }
.brand-text { font-weight: 800; letter-spacing: .14em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.page-title { display: flex; align-items: center; gap: 10px; font-size: 22px; margin: 0 0 18px; flex-wrap: wrap; }
.page-title .ico { width: 22px; height: 22px; color: var(--pink); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 500; margin: 34px 0 16px; }
.section-title .ico { width: 24px; height: 24px; color: var(--pink); fill: var(--pink); }
.small-title { font-size: 15px; margin: 26px 0 12px; }
.back { color: var(--muted); font-size: 13px; }

/* ===== carduri statistici ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.stat-body { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 16px; flex: 1; }
.stat-num { font-size: 18px; font-weight: 700; }
.stat-num small { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-label { color: #c8c8d0; font-size: 13px; }
.stat-ico { width: 44px; height: 44px; border-radius: 12px; background: #2c2c31; display: grid; place-items: center; }
.stat-ico .ico { width: 22px; height: 22px; }
.ico-pink { color: var(--pink); } .ico-green { color: var(--green); } .ico-cyan { color: var(--cyan); } .ico-violet { color: var(--violet); }
.stat-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--card-2); color: #c8c8d0; font-size: 13px; }
a.stat-foot:hover { text-decoration: none; background: #313136; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-pink { background: var(--pink); box-shadow: 0 0 0 3px #e040fb33; }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.quick-card { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 14px 16px; color: var(--text); border: 1px solid transparent; }
.quick-card:hover { text-decoration: none; border-color: #e040fb55; }
.quick-card .ico { width: 26px; height: 26px; color: var(--cyan); }
.quick-card b { display: block; }
.quick-card span { font-size: 12px; color: var(--muted); }
.quick-play { background: linear-gradient(90deg, #c026d322, #22d3ee22); }

/* ===== evenimente ===== */
.events { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.event { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.event-img { position: relative; aspect-ratio: 16 / 7.5; background: #111; border-bottom: 4px solid; border-image: var(--grad) 1; }
.event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-badges { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.badge-dark { display: inline-flex; gap: 5px; align-items: center; background: #000c; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-dark .ico { width: 12px; height: 12px; }
.event-body { padding: 16px 18px 20px; }
.event-body h3 { margin: 0 0 6px; font-size: 19px; }
.event-body p { margin: 0; color: #c8c8d0; }

/* ===== general ===== */
.card { background: var(--card); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--card-2); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.card-head .pill { margin-left: auto; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #34343a; font-size: 12px; font-weight: 600; color: #ddd; }
.pill-accent { background: #c026d333; color: #f0abfc; }
.rank { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tag-danger { background: #f43f5e26; color: #fda4af; }
.tag-warn { background: #fb923c26; color: #fdba74; }
.tag-ok { background: #4ade8026; color: #86efac; }
.tag-info { background: #22d3ee26; color: #67e8f9; }
.status { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.status.on { color: var(--green); background: #4ade801f; }
.status.off { color: var(--muted); background: #ffffff0d; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: #22d3ee14; border: 1px solid #22d3ee44; margin-bottom: 16px; color: #d6f7fc; }
.notice .ico { margin-top: 2px; color: var(--cyan); }
.notice-warn { background: #fb923c14; border-color: #fb923c55; color: #ffe2cc; }
.notice-warn .ico { color: var(--orange); }
.empty { text-align: center; padding: 40px 16px; color: #c8c8d0; }
.empty .ico { width: 54px; height: 54px; color: #8c8c96; stroke-width: 1.6; }
.empty p { font-size: 17px; margin: 10px 0 0; }
.empty.small { padding: 16px; } .empty.small p { font-size: 13px; color: var(--muted); }
.empty.big { padding: 80px 16px; }
.err-code { font-size: 72px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.table th.num, .table td.num { text-align: right; }
.table tbody tr:hover { background: #ffffff05; }
.table tr:last-child td { border-bottom: 0; }

.search-box { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 12px; flex: 1; max-width: 520px; }
.search-box:focus-within { border-color: var(--pink); }
.search-box .ico { color: var(--muted); }
.search-box input { flex: 1; background: none; border: 0; color: var(--text); font: inherit; padding: 10px 0; outline: none; }
.search-form { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }

/* ===== factiuni / staff ===== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.faction-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 18px; color: var(--text); border-top: 3px solid var(--c); }
.faction-card:hover { text-decoration: none; background: #26262a; }
.faction-ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.faction-ico .ico { width: 26px; height: 26px; }
.faction-info h2 { margin: 0 0 4px; font-size: 18px; }
.faction-info p { margin: 8px 0 0; font-size: 13px; }
.faction-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--card-2); border-radius: var(--radius); padding: 10px; text-align: center; }
.faction-stats b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faction-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.rank-list { list-style: none; margin: 0; padding: 8px 0; }
.rank-list li { padding: 7px 16px; display: flex; gap: 10px; align-items: center; }
.grid-staff { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.staff-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 12px 14px; color: var(--text); border-left: 3px solid var(--c); }
.staff-card:hover { text-decoration: none; background: #26262a; }
.staff-card img { width: 44px; height: 44px; border-radius: 50%; }
.staff-card b { display: block; }
.staff-card .status { margin-left: auto; }

.leader { list-style: none; margin: 0; padding: 6px 0; }
.leader li { display: flex; align-items: center; gap: 10px; padding: 7px 16px; }
.leader li a { flex: 1; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #34343a; font-size: 12px; font-weight: 700; flex: none; }
.pos-1 { background: linear-gradient(135deg, #fde047, #f59e0b); color: #222; }
.pos-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #222; }
.pos-3 { background: linear-gradient(135deg, #fdba74, #c2410c); color: #222; }

/* ===== profil ===== */
.profile-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: -28px -16px 24px; padding: 26px max(16px, 6%);
  background: radial-gradient(circle at 15% 40%, #c026d355, transparent 55%), radial-gradient(circle at 90% 60%, #0891b255, transparent 55%), linear-gradient(120deg, #3b0a45, #1a1030 50%, #082f3a);
}
.hero-box { background: #00000040; border-radius: var(--radius); padding: 20px 24px; backdrop-filter: blur(2px); }
.hero-id { display: flex; align-items: center; gap: 24px; }
.hero-avatar { width: 84px; height: 84px; border-radius: 50%; border: 3px solid #ffffff30; object-fit: cover; background: #000; flex: none; }
.hero-id h1 { margin: 0; font-size: 20px; padding-bottom: 4px; border-bottom: 1px solid #ffffff22; }
.hero-sub { color: #e6d4f0; font-size: 13px; margin: 4px 0 8px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; text-align: center; align-content: center; }
.hero-stats span { display: block; font-size: 11px; font-weight: 700; color: #d9c8e3; text-transform: uppercase; letter-spacing: .04em; }
.hero-stats b { font-size: 16px; font-weight: 500; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: var(--radius); background: var(--card); color: var(--muted); }
.tab.active { background: var(--card-2); color: #fff; box-shadow: inset 0 -2px 0 var(--pink); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.money-grid { display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
.money-grid div { padding: 14px 8px; border-bottom: 1px solid var(--line); }
.money-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.money-grid span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.money-grid b { font-size: 17px; font-weight: 600; }
.kv { margin: 0; padding: 6px 0; }
.kv div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.jobs { list-style: none; margin: 0; padding: 6px 0; }
.jobs li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 16px; align-items: center; }
.timeline { list-style: none; margin: 0; padding: 8px 0; }
.timeline li { padding: 10px 16px 10px 20px; border-left: 3px solid #444; margin: 0 12px 8px; background: #ffffff05; border-radius: 0 var(--radius) var(--radius) 0; }
.timeline .tl-danger { border-color: var(--red); } .timeline .tl-warn { border-color: var(--orange); }
.timeline .tl-ok { border-color: var(--green); } .timeline .tl-info { border-color: var(--cyan); }
.tl-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-head time { margin-left: auto; }
.tl-reason { margin: 4px 0 2px; }
.vehicles { padding: 6px; }
.vehicle { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); }
.vehicle:hover { background: #ffffff06; }
.veh-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #22d3ee1a; color: var(--cyan); flex: none; }
.veh-info { flex: 1; min-width: 0; } .veh-info b { display: block; }
.veh-meta { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.plate { font-family: ui-monospace, Consolas, monospace; font-weight: 700; background: #f4f4f5; color: #1e3a8a; padding: 1px 8px; border-radius: 3px; border: 1px solid #94a3b8; font-size: 12px; letter-spacing: .05em; }

/* ===== login ===== */
.login-wrap { display: grid; place-items: center; padding: 30px 0; }
.login-card { width: 100%; max-width: 420px; padding: 28px; text-align: center; }
.login-logo { width: 120px; height: 120px; filter: drop-shadow(0 0 18px #c026d366); }
.login-card h1 { margin: 10px 0 4px; font-size: 22px; }
.login-card .notice { text-align: left; margin-top: 14px; }
.login-card .btn { margin-top: 14px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-box { margin-top: 16px; background: var(--card-2); border-radius: var(--radius); padding: 14px; }
.code-box p { margin: 0 0 8px; }
.code-cmd { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.code-cmd code { font: 700 24px/1 ui-monospace, Consolas, monospace; letter-spacing: .1em; background: #000; padding: 12px 16px; border-radius: var(--radius); color: #f0abfc; }
.login-note { margin: 18px 0 0; }

/* ===== regulament ===== */
.rules-head { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.rules-head img { width: 130px; height: 130px; flex: none; filter: drop-shadow(0 0 16px #c026d355); }
.rules-head .page-title { margin-bottom: 6px; }
.rules-head p { margin: 0 0 12px; }
.rules-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.rules-toc { position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto; }
.rules-toc ul { list-style: none; margin: 0; padding: 6px 0; }
.rules-toc a { display: block; padding: 4px 14px; color: #c8c8d0; font-size: 13px; }
.rules-toc a:hover { color: #fff; background: #ffffff08; text-decoration: none; }
.rules-toc .lvl2 a { font-weight: 700; color: #fff; margin-top: 8px; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; }
.rules { padding: 6px 26px 26px; }
.rules h2 { font-size: 22px; margin: 30px 0 10px; padding-bottom: 8px; border-bottom: 2px solid; border-image: var(--grad) 1; text-transform: uppercase; letter-spacing: .04em; }
.rules h3 { font-size: 16px; margin: 24px 0 8px; color: #f5d0fe; }
.rules h4 { font-size: 14px; margin: 16px 0 6px; }
.rules ul, .rules ol { padding-left: 22px; margin: 6px 0; }
.rules li { margin: 4px 0; }
.rules li::marker { color: var(--pink); }
.rules strong { color: #fff; }
.rules code { background: #000; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.rules hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.rules blockquote { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--violet); background: #8b5cf614; }
.rules table { width: 100%; border-collapse: collapse; margin: 10px 0; display: block; overflow-x: auto; }
.rules th, .rules td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.rules th { background: var(--card-2); }
.rules .custom-block { border-radius: var(--radius); padding: 10px 16px; margin: 12px 0; border-left: 4px solid; }
.rules .custom-block-title { font-weight: 800; margin: 0 0 4px; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.rules .info { background: #22d3ee10; border-color: var(--cyan); } .rules .info .custom-block-title { color: var(--cyan); }
.rules .tip { background: #4ade8010; border-color: var(--green); } .rules .tip .custom-block-title { color: var(--green); }
.rules .warning { background: #facc1510; border-color: var(--yellow); } .rules .warning .custom-block-title { color: var(--yellow); }
.rules .danger { background: #f43f5e12; border-color: var(--red); } .rules .danger .custom-block-title { color: var(--red); }
.rules .rule-red { color: #ff8a9b; } .rules .rule-orange { color: var(--orange); } .rules .rule-green { color: var(--green); }
.rules .rule-center { text-align: center; }
.rules .rule-pill { padding: 2px 8px; border-radius: 10px; background: linear-gradient(90deg, #c026d3, #7c3aed); color: #fff; font-weight: 600; }

/* ===== responsive ===== */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: 1fr; }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; max-height: 260px; }
}
@media (max-width: 900px) {
  .side { transform: translateX(-100%); width: var(--side-open); }
  .side .side-label { opacity: 1; }
  .side-open .side { transform: none; }
  .main-wrap, .side-open .main-wrap { margin-left: 0; }
  .profile-hero, .profile-grid, .two-col, .events { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .hero-id { flex-direction: column; text-align: center; }
  .hero-tags { justify-content: center; }
  .rules-head { flex-direction: column; text-align: center; }
  .rules { padding: 4px 14px 18px; }
  .table th, .table td { padding: 8px; }
  .table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ===== v2: fundal animat, animatii, date live ===== */
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-glow span { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(110px); opacity: .16; animation: float 22s ease-in-out infinite alternate; }
.bg-glow span:first-child { background: #c026d3; top: -160px; left: 10%; }
.bg-glow span:last-child { background: #0891b2; bottom: -200px; right: 5%; animation-duration: 28s; animation-delay: -6s; }
@keyframes float { from { transform: translate(0, 0) scale(1); } to { transform: translate(120px, 80px) scale(1.15); } }
.app { position: relative; z-index: 1; }

.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease var(--d, 0ms), transform .5s ease var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

.stat, .quick-card, .event, .faction-card, .staff-card, .ticket-row { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, opacity .5s ease var(--d, 0ms); }
.stat:hover, .event:hover, .faction-card:hover, .staff-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px #0007; }
.stat-ico { transition: transform .3s ease; }
.stat:hover .stat-ico { transform: scale(1.1) rotate(-6deg); }
.event-img img { transition: transform .6s ease; }
.event:hover .event-img img { transform: scale(1.05); }
.event-img { overflow: hidden; }
.quick-card:hover { transform: translateY(-2px); }
.btn { transition: filter .15s, transform .15s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(90deg, #c026d3, #7c3aed, #c026d3); background-size: 200% 100%; transition: background-position .4s, transform .15s; }
.btn-primary:hover { background-position: 100% 0; filter: none; }
.btn-ghost { background: #ffffff0d; border: 1px solid #ffffff1a; }
.btn-danger { background: #f43f5e26; color: #fda4af; }
.btn-finish { background: linear-gradient(90deg, #f43f5e, #fb7185); }

.pulse { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #e040fb88; } 100% { box-shadow: 0 0 0 10px #e040fb00; } }
.bump { display: inline-block; animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.35); color: var(--pink); } }
.brand-text { background-size: 200% 100%; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% 0; } }

.top-right { display: flex; align-items: center; gap: 10px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--card-2); color: var(--text); font-size: 13px; font-weight: 600; }
.live-pill:hover { text-decoration: none; background: #34343a; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.live-dot.up { background: var(--green); animation: pulseg 1.8s ease-out infinite; }
@keyframes pulseg { 0% { box-shadow: 0 0 0 0 #4ade8099; } 100% { box-shadow: 0 0 0 8px #4ade8000; } }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-badge { position: absolute; top: 6px; left: 34px; }
.side-open .nav-badge { position: static; }

.hero { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(120deg, #3b0a4599, #1a103099 50%, #082f3a99); border: 1px solid #ffffff10; }
.hero-logo { width: 110px; height: 110px; flex: none; filter: drop-shadow(0 0 18px #c026d366); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(2deg); } }
.hero .welcome { font-size: 22px; font-weight: 700; margin: 0 0 4px; color: #fff; }
.hero p { margin: 0 0 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.countdown { position: absolute; left: 10px; bottom: 12px; background: #000c; padding: 4px 10px; border-radius: 4px; font: 700 13px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .05em; color: #f0abfc; }
.countdown.live { color: #fff; background: var(--red); animation: pulse 1.6s infinite; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 240px; max-width: 360px; padding: 12px 16px; border-radius: var(--radius); background: var(--card); border-left: 4px solid var(--green); box-shadow: 0 10px 30px #0009; animation: tin .35s ease; transition: opacity .4s, transform .4s; }
.toast-info { border-color: var(--cyan); } .toast-err { border-color: var(--red); }
.toast.out { opacity: 0; transform: translateX(30px); }
@keyframes tin { from { opacity: 0; transform: translateX(30px); } }

/* ===== tickete ===== */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .page-title { margin-bottom: 2px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: #ddd; } .crumbs span { color: #c4b5fd; }
.tabs .tab { display: inline-flex; gap: 8px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { padding: 5px 12px; border-radius: 999px; background: var(--card); color: var(--muted); font-size: 13px; border: 1px solid transparent; }
.chip:hover { text-decoration: none; color: #fff; }
.chip.active { color: #fff; border-color: #e040fb77; background: #c026d322; }
.ticket-list { display: flex; flex-direction: column; gap: 8px; }
.ticket-row { display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: var(--radius); padding: 12px 16px; color: var(--text); border-left: 3px solid transparent; }
.ticket-row:hover { text-decoration: none; background: #26262a; transform: translateX(3px); }
.ticket-row.unread { border-left-color: var(--pink); }
.ticket-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #8b5cf61f; color: #c4b5fd; flex: none; }
.ticket-main { flex: 1; min-width: 0; }
.ticket-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.ticket-meta .ico { width: 13px; height: 13px; }
.new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); vertical-align: middle; animation: pulse 1.8s infinite; }
.tag-lg { font-size: 13px; padding: 4px 12px; }

.wizard { padding: 0; }
.steps { list-style: none; display: flex; gap: 22px; margin: 0; padding: 16px 20px 12px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; font-size: 13px; transition: color .2s; }
.steps li span { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: #34343a; color: #fff; transition: background .3s, transform .3s; }
.steps li.active { color: #fff; }
.steps li.active span { background: linear-gradient(135deg, #c026d3, #7c3aed); transform: scale(1.08); }
.steps li.done span { background: #4ade8033; color: var(--green); }
.steps-bar { height: 3px; background: var(--line); }
.steps-bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s ease; }
.step { padding: 20px 24px; }
.step-in { animation: stepin .35s ease; }
@keyframes stepin { from { opacity: 0; transform: translateX(18px); } }
.step h2 { font-size: 17px; margin: 6px 0 8px; }
.step ul { margin: 0 0 18px; padding-left: 20px; color: #d4d4dc; }
.step li { margin: 3px 0; }
.step li::marker { color: var(--pink); }
.wiz-error { margin: 14px 24px 0; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.type-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--card-2); border: 1px solid transparent; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; height: 100%; }
.type-card .ico { color: #c4b5fd; width: 22px; height: 22px; }
.type-card:hover { border-color: #ffffff22; transform: translateY(-2px); }
.type-opt input:checked + .type-card { border-color: var(--pink); background: #c026d322; }
.type-opt input:focus-visible + .type-card { outline: 2px solid var(--cyan); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span:first-child { font-size: 13px; color: #f9a8d4; font-weight: 600; }
.field select { background: #2b2b33; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit; padding: 10px 12px; }
.field select:focus { outline: none; border-color: var(--violet); }
.field input, .field textarea, .reply textarea { background: #2b2b33; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit; padding: 10px 12px; resize: vertical; transition: border-color .2s; }
.field input:focus, .field textarea:focus, .reply textarea:focus { outline: none; border-color: var(--violet); }
.counter { align-self: flex-end; }
.field-err { color: #fda4af; margin: 6px 0 0; }
.wiz-nav { display: flex; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); }
.wiz-nav .btn:disabled { opacity: .4; cursor: not-allowed; }

.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.chat { height: min(60vh, 560px); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 80%; align-self: flex-start; background: var(--card-2); border-radius: 12px 12px 12px 4px; padding: 9px 13px; }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, #7e22ce55, #4c1d9555); border-radius: 12px 12px 4px 12px; }
.msg-staff:not(.mine) { border-left: 3px solid var(--cyan); }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 3px; flex-wrap: wrap; }
.msg-head time { color: var(--muted); margin-left: auto; }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-system { align-self: center; font-size: 12px; color: var(--muted); background: #ffffff08; padding: 3px 12px; border-radius: 999px; }
.msg-system time { opacity: .7; }
.new { animation: msgin .35s ease; }
@keyframes msgin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.reply { display: flex; gap: 10px; padding: 12px 16px 4px; border-top: 1px solid var(--line); align-items: flex-end; }
.reply textarea { flex: 1; resize: none; min-height: 44px; }
.reply-hint { margin: 0; padding: 0 16px 12px; }
.closed-note { padding: 14px 16px; border-top: 1px solid var(--line); color: var(--green); display: flex; gap: 8px; align-items: center; }
.actions { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.actions form { margin: 0; }
.ticket-side .btn-ghost.btn-block { margin: 0 16px 14px; width: calc(100% - 32px); }

@media (max-width: 900px) {
  .ticket-layout { grid-template-columns: 1fr; }
  .hero { flex-direction: column; text-align: center; }
  .hero-actions { justify-content: center; }
  .live-pill .muted { display: none; }
}
@media (max-width: 560px) {
  .ticket-row { flex-wrap: wrap; }
  .ticket-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .msg { max-width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .bg-glow span, .hero-logo, .brand-text, .pulse, .live-dot.up { animation: none !important; }
}

/* ===== v3: editorul de documente (regulament) ===== */
.rules-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.doc-toolbar { position: sticky; top: 64px; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: 14px;
  background: #26262bf2; backdrop-filter: blur(6px); border: 1px solid #ffffff14; border-radius: var(--radius); box-shadow: 0 8px 24px #0006; animation: tin .25s ease; }
.tb-group { display: flex; align-items: center; gap: 2px; padding-right: 6px; margin-right: 2px; border-right: 1px solid #ffffff14; }
.tb-group:last-child { border-right: 0; padding-right: 0; }
.doc-toolbar button { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 4px; background: none; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.doc-toolbar button:hover { background: #ffffff14; }
.doc-toolbar button.on { background: #c026d340; color: #f5d0fe; }
.doc-toolbar select { height: 32px; background: #1c1c20; color: var(--text); border: 1px solid #ffffff1a; border-radius: 4px; font: inherit; font-size: 13px; padding: 0 8px; }
.tb-text { font-weight: 600; font-size: 13px !important; }
.tb-save { background: linear-gradient(90deg, #c026d3, #7c3aed) !important; color: #fff; }
.tb-save:hover { filter: brightness(1.1); }
.tb-spacer { flex: 1; }
.tb-status { font-size: 12px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.tb-status.warn { color: #fdba74; } .tb-status.ok { color: #86efac; } .tb-status.err { color: #fda4af; }
.sw { width: 16px; height: 16px; border-radius: 50%; display: inline-block; border: 2px solid #ffffff33; }
.sw-none { background: var(--text); } .sw-red { background: #ff8a9b; } .sw-orange { background: var(--orange); } .sw-green { background: var(--green); }
.sw-pill { width: 22px; border-radius: 8px; background: linear-gradient(90deg, #c026d3, #7c3aed); }

.rules.editing { outline: 2px dashed #c026d388; outline-offset: -2px; cursor: text; caret-color: var(--pink); background: #1f1f23; }
.rules.editing:focus { outline-color: var(--pink); }
.rules.editing a { cursor: text; }
.doc-editing .rules-toc { opacity: .75; }
.rules[contenteditable="true"] .custom-block { outline: 1px dotted #ffffff22; }

.doc-dialog { width: min(1000px, 94vw); max-height: 86vh; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: 0 20px 60px #000c; }
.doc-dialog::backdrop { background: #000a; backdrop-filter: blur(2px); }
.doc-dialog .card-head { justify-content: space-between; }
.dialog-body { display: grid; grid-template-columns: 260px 1fr; height: min(62vh, 560px); }
.versions { list-style: none; margin: 0; padding: 6px; overflow-y: auto; border-right: 1px solid var(--line); }
.versions button { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; border-radius: 4px; cursor: pointer; font: inherit; display: flex; flex-direction: column; }
.versions button span { font-size: 12px; color: var(--muted); }
.versions button:hover { background: #ffffff0d; }
.versions button.active { background: #c026d330; }
.version-preview { overflow-y: auto; padding: 6px 20px 20px; font-size: 13px; }
.dialog-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 700px) {
  .dialog-body { grid-template-columns: 1fr; grid-template-rows: 160px 1fr; }
  .versions { border-right: 0; border-bottom: 1px solid var(--line); }
  .tb-spacer { display: none; }
}
