:root {
  --bg: #0a0c10;
  --panel: #11141b;
  --panel-2: #161a22;
  --line: #242a35;
  --text: #f3f5f7;
  --muted: #8d96a6;
  --accent: #7c5cff;
  --accent-2: #9a82ff;
  --green: #31d0aa;
  --yellow: #f5b942;
  --red: #f16464;
  --blue: #62a7ff;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 260px; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; background: #0d1015; border-right: 1px solid var(--line); z-index: 20; }
.brand { height: 72px; padding: 0 22px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-weight: 900; background: linear-gradient(145deg, var(--accent-2), #5535e8); box-shadow: 0 0 25px #7152ff40; }
.brand-copy { min-width: 0; flex: 1; }
.brand-logo { width: 52px; height: 52px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 3px 8px #0008); }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 15px; letter-spacing: .2px; }
.brand span { color: var(--muted); font-size: 11px; margin-top: 2px; }
.nav { padding: 18px 12px; flex: 1; overflow-y: auto; }
.nav-label { margin: 22px 12px 8px; color: #616a7b; font-size: 10px; letter-spacing: 1.3px; font-weight: 800; }
.nav-item { width: 100%; border: 0; background: transparent; color: #9da5b3; padding: 11px 12px; border-radius: 9px; display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; font-size: 13px; transition: .18s ease; }
.nav-item:hover { background: #171b23; color: #fff; }
.nav-item.active { color: #fff; background: linear-gradient(90deg, #7657ff2b, #7657ff0d); box-shadow: inset 3px 0 var(--accent); }
.nav-item > span { width: 18px; text-align: center; color: currentColor; font-size: 17px; }
.nav-item b { margin-left: auto; padding: 2px 7px; border-radius: 20px; background: #262b35; font-size: 10px; }
.sidebar-footer { border-top: 1px solid var(--line); padding: 14px; }
.server-status, .profile { display: flex; align-items: center; gap: 10px; }
.server-status { padding: 0 6px 14px; }
.server-status i, .local-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.server-status strong, .server-status span, .profile strong, .profile span { display: block; }
.server-status strong { font-size: 11px; }
.server-status span, .profile span { font-size: 10px; color: var(--muted); margin-top: 2px; }
.profile { background: #151920; border: 1px solid var(--line); padding: 10px; border-radius: 11px; }
.profile .avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #313745; color: #fff; font-weight: 800; font-size: 11px; }
.profile .avatar.discord-avatar { background-position: center; background-size: cover; }
.profile strong { font-size: 11px; }
.profile button { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; }

.main { margin-left: 260px; width: calc(100% - 260px); min-height: 100vh; }
.topbar { height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #0a0c10d9; backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.breadcrumb span, .breadcrumb b { color: #5f6877; }
.breadcrumb b { font-weight: 400; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.local-pill { display: flex; align-items: center; gap: 8px; color: #abb2be; border: 1px solid var(--line); background: #11141a; border-radius: 8px; padding: 8px 11px; font-size: 11px; }
.mobile-menu { border: 1px solid var(--line); background: #11141a; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.mobile-menu { display: none; }
.content { max-width: 1450px; padding: 32px; margin: 0 auto; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--accent-2); font-size: 10px; letter-spacing: 1.5px; font-weight: 800; text-transform: uppercase; margin: 0 0 8px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.6px; }
.page-heading p:not(.eyebrow) { color: var(--muted); margin: 7px 0 0; font-size: 12px; }
.button { border: 1px solid var(--line); background: #191d25; padding: 10px 14px; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .18s; }
.button:hover { transform: translateY(-1px); border-color: #41495a; }
.button.primary { border-color: #8065ff; background: var(--accent); box-shadow: 0 8px 25px #7456ff28; }
.button.danger { color: #ff9b9b; border-color: #5b3034; background: #2b171b; }
.button.small { padding: 7px 10px; font-size: 11px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: linear-gradient(145deg, #151820, #101319); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; right: -30px; top: -35px; background: var(--card-color, var(--accent)); filter: blur(25px); opacity: .22; }
.stat-card .stat-icon { width: 32px; height: 32px; display: grid; place-items: center; background: color-mix(in srgb, var(--card-color, var(--accent)) 15%, transparent); color: var(--card-color, var(--accent)); border-radius: 8px; margin-bottom: 22px; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; font-size: 25px; margin: 5px 0; }
.stat-card small { font-size: 10px; color: #687181; }
.stat-card small.good { color: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .85fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.card-header h2 { margin: 0; font-size: 13px; }
.card-header p { color: var(--muted); font-size: 10px; margin: 4px 0 0; }
.card-body { padding: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: #70798a; font-size: 9px; letter-spacing: 1px; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
td { padding: 13px 14px; border-bottom: 1px solid #1e232d; font-size: 11px; white-space: nowrap; }
tbody tr { transition: .15s; }
tbody tr:hover { background: #171b22; }
tbody tr:last-child td { border-bottom: 0; }
.player-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; font-size: 9px; font-weight: 800; background: #282e3a; color: #c5cad3; }
.player-cell strong, .player-cell span { display: block; }
.player-cell span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 800; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.open { color: #ffbb57; background: #f0a82d14; }
.status.progress { color: #79afff; background: #5594ef15; }
.status.closed { color: #49d6b3; background: #26b79514; }
.status.banned { color: #ff7b7b; background: #f05a5a14; }
.activity-list { display: grid; gap: 0; }
.activity { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #20252f; }
.activity:last-child { border: 0; }
.activity-icon { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #252b37; font-size: 11px; }
.activity p { margin: 1px 0 4px; font-size: 10px; line-height: 1.4; }
.activity-report-button { display: block; margin: 1px 0 4px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 10px; font-weight: 700; line-height: 1.4; text-align: left; cursor: pointer; }
.activity-report-button:hover { color: var(--accent-2); text-decoration: underline; }
.activity time { color: var(--muted); font-size: 9px; }
.activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; color: var(--muted); font-size: 9px; }
.activity-meta span { padding-left: 10px; border-left: 1px solid #303746; }
.activity-meta strong { color: #b8a9ff; font-weight: 700; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search input { width: 100%; padding-left: 36px; }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 9px; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line); color: var(--text); background: #0e1117; padding: 10px 12px; border-radius: 8px; outline: none; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #7c5cff16; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.toolbar select { width: 170px; }
.empty { text-align: center; color: var(--muted); padding: 50px 20px; font-size: 12px; }
.empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 7px; }
.row-actions { display: flex; gap: 5px; }
.action-link { border: 0; background: transparent; color: var(--accent-2); cursor: pointer; font-size: 11px; }

.form-card { max-width: 950px; }
.form-section { padding: 22px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section h3 { margin: 0 0 4px; font-size: 13px; }
.form-section > p { color: var(--muted); margin: 0 0 18px; font-size: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; color: #c5cad3; font-size: 10px; font-weight: 700; margin-bottom: 7px; }
.field label em { color: var(--red); font-style: normal; }
.form-actions { padding: 18px 22px; display: flex; justify-content: flex-end; gap: 9px; background: #0f1218; }
.upload-zone { display: flex; width: 100%; min-height: 150px; border: 1px dashed #40495a; background: #0d1016; border-radius: 10px; padding: 25px; text-align: center; color: var(--muted); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; transition: .18s ease; }
.upload-zone:hover { border-color: var(--accent); background: #12121d; }
.upload-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 10px; background: #7c5cff1c; color: var(--accent-2); font-size: 20px; }
.upload-zone strong { display: block; color: #d8dce3; font-size: 11px; margin-bottom: 5px; }
.upload-zone small { font-size: 9px; }
.upload-notice { margin: 10px 0 0 !important; color: #687181 !important; font-size: 9px !important; }
.selected-files { display: grid; gap: 7px; margin-top: 10px; }
.selected-files[hidden] { display: none; }
.selected-files span { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 11px; border: 1px solid var(--line); background: #10141a; border-radius: 8px; }
.selected-files b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.selected-files small { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.proof-empty { margin: 10px 0; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; }
.proof-list { display: grid; gap: 7px; margin: 10px 0 14px; }
.proof-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 11px; border: 1px solid var(--line); background: #10141a; border-radius: 8px; }
.proof-item > div:first-child { min-width: 0; display: grid; gap: 3px; }
.proof-item strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.proof-item small { color: var(--muted); font-size: 9px; }
.proof-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; }
.danger-link { color: #ff7b7b; }
.modal-proofs { margin-top: 18px; }
.modal-proofs h3 { margin: 0; font-size: 12px; }

.player-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.player-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 17px; }
.player-card-head { display: flex; gap: 11px; align-items: center; margin-bottom: 16px; }
.player-card-head .mini-avatar { width: 38px; height: 38px; }
.player-card h3 { margin: 0 0 4px; font-size: 13px; }
.player-card p { color: var(--muted); margin: 0; font-size: 9px; }
.player-meta { display: grid; grid-template-columns: 1fr 1fr; padding-top: 13px; border-top: 1px solid var(--line); gap: 10px; }
.player-meta span { color: var(--muted); display: block; font-size: 9px; }
.player-meta strong { font-size: 12px; }

.chart { min-height: 240px; display: flex; align-items: end; gap: 10px; padding-top: 25px; }
.bar-group { flex: 1; height: 200px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.bar { width: min(45px, 70%); min-height: 4px; background: linear-gradient(var(--accent-2), var(--accent)); border-radius: 5px 5px 2px 2px; position: relative; }
.bar b { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 9px; }
.bar-group span { color: var(--muted); font-size: 9px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #05070ac9; backdrop-filter: blur(5px); display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow-y: auto; position: relative; background: #13171e; border: 1px solid #303747; border-radius: 15px; box-shadow: 0 30px 90px #000a; }
.modal-close { position: absolute; right: 14px; top: 12px; border: 0; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; z-index: 2; }
.modal-inner { padding: 25px; }
.modal-inner h2 { margin: 0 0 5px; font-size: 18px; }
.modal-inner > p { color: var(--muted); margin: 0 0 20px; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.detail { border: 1px solid var(--line); background: #0e1117; border-radius: 8px; padding: 11px; }
.detail span { color: var(--muted); display: block; font-size: 9px; margin-bottom: 4px; }
.detail strong { font-size: 11px; }
.description { color: #b9c0ca; line-height: 1.65; white-space: pre-wrap; font-size: 11px; background: #0e1117; border: 1px solid var(--line); border-radius: 9px; padding: 14px; }
.toast { position: fixed; bottom: 25px; right: 25px; z-index: 200; background: #e9ecf2; color: #11141a; border-radius: 9px; padding: 11px 15px; font-size: 11px; font-weight: 700; transform: translateY(80px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }
.page-loading { min-height: calc(100vh - 150px); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.page-loading span { width: 30px; height: 30px; margin-bottom: 15px; border: 3px solid #292f3b; border-top-color: var(--accent); border-radius: 50%; animation: la-taniere-spin .8s linear infinite; }
.page-loading strong { color: #dfe3ea; font-size: 12px; }
.page-loading small { margin-top: 5px; font-size: 9px; }
@keyframes la-taniere-spin { to { transform: rotate(360deg); } }
.staff-layout { grid-template-columns: minmax(280px, .65fr) minmax(620px, 1.35fr); align-items: start; }
.staff-role-field { margin-top: 16px; }
.staff-submit { width: 100%; margin-top: 18px; }
.staff-role { display: inline-flex; padding: 5px 8px; border-radius: 20px; font-size: 9px; font-weight: 800; }
.staff-role.admin { color: #baabff; background: #7c5cff1d; }
.staff-role.moderator { color: #6be0c3; background: #31d0aa17; }
.you-label { color: var(--muted); font-size: 9px; }
code { color: #b9c0ca; font-size: 10px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 50% 15%, #261e4e 0, #0a0c10 38%); }
.login-card { width: min(450px, 100%); padding: 42px; text-align: center; background: #11141be8; border: 1px solid #2c3340; border-radius: 18px; box-shadow: 0 30px 90px #0009; }
.login-logo { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 14px; background: linear-gradient(145deg, var(--accent-2), #5535e8); font-size: 21px; font-weight: 900; box-shadow: 0 0 35px #7152ff55; }
.login-card h1 { margin-bottom: 12px; }
.login-subtitle { color: var(--muted); margin: 0 auto 25px; max-width: 340px; font-size: 12px; line-height: 1.65; }
.discord-button { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; padding: 13px 18px; color: white; background: #5865f2; border-radius: 9px; text-decoration: none; font-size: 13px; font-weight: 800; transition: .18s; }
.discord-button:hover { background: #6873f5; transform: translateY(-1px); box-shadow: 0 10px 30px #5865f22f; }
.discord-logo { font-size: 17px; letter-spacing: -3px; }
.login-error { padding: 11px 13px; margin-bottom: 16px; color: #ffaaaa; background: #431c22; border: 1px solid #6a2932; border-radius: 8px; font-size: 10px; line-height: 1.5; }
.login-error[hidden] { display: none; }
.login-security { display: flex; align-items: flex-start; gap: 11px; text-align: left; padding-top: 22px; margin-top: 24px; border-top: 1px solid var(--line); color: var(--accent-2); }
.login-security p { color: var(--muted); margin: 0; font-size: 10px; line-height: 1.5; }
.login-security strong { display: block; color: #d9dde5; margin-bottom: 3px; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .player-grid { grid-template-columns: repeat(2, 1fr); }
  .staff-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: .25s; box-shadow: 20px 0 50px #0008; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; }
  .mobile-menu { display: block; }
  .breadcrumb span, .breadcrumb b { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 22px 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
}
@media (max-width: 520px) {
  .stats-grid, .player-grid { grid-template-columns: 1fr; }
  .local-pill { display: none; }
  h1 { font-size: 22px; }
  .toolbar select { width: 100%; }
  .login-card { padding: 30px 22px; }
}
