/* ════════════════════════════════════════════════════════════════════
   FutureIL Panel V2.0 — stylesheet
   ════════════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Heebo:wght@400;500;600;700;800&display=swap');

:root {
  --accent: #2F44FF;
  --accent-rgb: 47, 68, 255;
  --bg: #0a0a0f;
  --bg-2: #101019;
  --bar: #15151f;
  --line: #2c2c3a;
  --line-2: #3a3a4a;
  --text: #f4f5f8;
  --text-dim: #aeb0bd;
  --display: 'Russo One', 'Heebo', sans-serif;
  --body: 'Heebo', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Top bar / nav ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #000;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.topnav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
}

.nav-link {
  font-family: var(--display);
  font-size: 20px;
  color: var(--text-dim);
  letter-spacing: .5px;
  transition: color .15s, transform .15s;
}
.nav-link:hover { color: var(--text); transform: translateY(-1px); }
.nav-link.active { color: #fff; }

.logout-btn {
  font-family: var(--display);
  font-size: 14px;
  background: #16161f;
  border: 1px solid var(--line-2);
  color: var(--text-dim);
  padding: 8px 16px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.logout-btn:hover { background: #20202c; color: #fff; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(180deg, #1a1a26, #14141d);
  border: 1px solid var(--line-2);
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
}
.user-chip { cursor: pointer; transition: border-color .15s, background .15s; }
.user-chip:hover { border-color: var(--accent); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.user-name { font-weight: 700; font-size: 14px; color: #fff; }

/* ── Page container ────────────────────────────────────────────────── */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 60px;
}

.page-title {
  font-family: var(--display);
  text-align: center;
  font-size: 40px;
  margin: 14px 0 22px;
  letter-spacing: 1px;
}

/* ── Search ────────────────────────────────────────────────────────── */
.search-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.search-box {
  width: 380px;
  max-width: 90%;
  background: #14141c;
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--body);
  font-size: 14px;
  text-align: center;
}
.search-box::placeholder { color: #6b6d7c; }
.search-box:focus { outline: none; border-color: var(--accent); }

/* ── Peds header (search + add) ────────────────────────────────────── */
.peds-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.peds-head .search-box { width: 340px; }
.peds-add { white-space: nowrap; }

/* ── Tables ────────────────────────────────────────────────────────── */
.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.grid th, .grid td {
  border: 1px solid var(--line-2);
  padding: 13px 16px;
  text-align: left;
}
.grid th {
  font-family: var(--display);
  font-weight: 400;
  font-size: 16px;
  background: #111119;
  color: #fff;
}
.grid td { background: #0c0c13; color: #f1f2f6; font-weight: 600; }
.grid tbody tr { transition: background .12s; }
.grid tbody tr:hover td { background: #15151f; }
.grid tr.row-link { cursor: pointer; }
.grid tr.row-link:hover td { background: #1a1a28; }
.grid .muted { color: var(--text-dim); font-weight: 500; }
.grid .accent { color: color-mix(in srgb, var(--accent) 70%, #fff); }
.link-name { color: color-mix(in srgb, var(--accent) 75%, #fff); cursor: pointer; font-weight: 600; }
.link-name:hover { text-decoration: underline; }
.empty-row td { text-align: center; color: var(--text-dim); font-weight: 500; padding: 26px; }

.col-time { white-space: nowrap; }

.row-del {
  float: right;
  background: transparent;
  border: 1px solid rgba(231, 76, 60, .4);
  color: #e74c3c;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 5px;
  cursor: pointer;
  transition: background .14s;
}
.row-del:hover { background: rgba(231, 76, 60, .15); }

/* time-left chips on bans */
.tl-perm { color: #ff6b6b; font-weight: 700; }
.tl-live { color: #ffd479; font-weight: 700; }

/* ── Login page ────────────────────────────────────────────────────── */
.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #000;
  border-bottom: 1px solid var(--line);
}
.login-header img { height: 34px; width: auto; }
.login-header .brand {
  font-family: var(--display);
  font-size: 19px;
  color: #fff;
}
.login-main {
  max-width: 1000px;
  margin: 70px auto 0;
  padding: 0 24px;
  text-align: center;
}
.login-title {
  font-family: var(--display);
  font-size: 72px;
  margin: 0 0 26px;
  letter-spacing: 2px;
}
.login-divider {
  width: 760px;
  max-width: 90%;
  height: 2px;
  background: #e9e9ee;
  margin: 0 auto 34px;
  border: 0;
}
.login-intro {
  direction: rtl;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.7;
  color: #f3f3f7;
  max-width: 880px;
  margin: 0 auto 30px;
}
.login-btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 26px;
  background: var(--accent);
  color: #fff;
  padding: 14px 60px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  transition: filter .15s, transform .15s;
}
.login-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.login-error {
  color: #ff6b6b;
  direction: rtl;
  font-weight: 700;
  margin-bottom: 18px;
}

/* ── Player detail ─────────────────────────────────────────────────── */
.player-head { text-align: center; margin-bottom: 8px; }
.player-name {
  font-family: var(--display);
  font-size: 38px;
  margin: 6px 0 10px;
}
.player-meta { color: var(--text); font-weight: 700; font-size: 15px; margin: 6px 0; }
.player-meta .lbl { color: var(--text-dim); }

.actions-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}
.act-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #13131c;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .14s, border-color .14s, transform .14s;
}
.act-btn:hover { background: #1d1d2a; transform: translateY(-1px); }
.act-btn .ic { font-size: 14px; }
.act-warn:hover  { border-color: #f1c40f; }
.act-kick:hover  { border-color: #e67e22; }
.act-ban:hover   { border-color: #e74c3c; }
.act-unban:hover { border-color: #2ecc71; }
.act-note:hover  { border-color: #95a5a6; }
.act-group:hover { border-color: #9b59b6; }
.act-info:hover  { border-color: var(--accent); }
.act-reset { border-color: rgba(231, 76, 60, .5); }
.act-reset:hover { border-color: #e74c3c; background: rgba(231, 76, 60, .12); }

.total-warnings {
  font-family: var(--display);
  text-align: center;
  font-size: 26px;
  margin: 14px 0 18px;
}

.section-gap { margin-top: 16px; }

/* ── Manage ────────────────────────────────────────────────────────── */
.broadcast-card {
  max-width: 760px;
  margin: 0 auto 28px;
  background: #0e0e16;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 20px;
}
.broadcast-card h2 { font-family: var(--display); font-weight: 400; margin: 0 0 14px; font-size: 22px; text-align: center; }
.broadcast-row { display: flex; gap: 10px; }
.broadcast-input {
  flex: 1;
  background: #14141c;
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 7px;
  font-family: var(--body);
  font-size: 14px;
}
.broadcast-input:focus { outline: none; border-color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-family: var(--display);
  font-size: 15px;
  padding: 11px 26px;
  border-radius: 7px;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.12); }

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #11111a;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  width: 420px;
  max-width: 92%;
  padding: 22px;
}
.modal h3 { font-family: var(--display); font-weight: 400; margin: 0 0 16px; font-size: 22px; text-align: center; }
.modal label { display: block; font-size: 13px; color: var(--text-dim); margin: 12px 0 6px; font-weight: 600; }
.modal input, .modal textarea, .modal select {
  width: 100%;
  background: #16161f;
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 7px;
  font-family: var(--body);
  font-size: 14px;
}
.modal textarea { resize: vertical; min-height: 70px; }
.modal input:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--accent); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 11px; border-radius: 7px; font-family: var(--display); font-size: 15px; cursor: pointer; border: 0; }
.btn-cancel { background: #1c1c26; color: var(--text-dim); border: 1px solid var(--line-2); }
.btn-confirm { background: var(--accent); color: #fff; }
.btn-confirm:hover { filter: brightness(1.12); }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.confirm-modal { width: 400px; }
.confirm-msg { color: var(--text-dim); font-size: 14px; line-height: 1.5; margin: 0; text-align: center; }
.confirm-modal h3 { margin-bottom: 10px; }

/* player search inside grant modal */
.search-select { position: relative; }
.search-results {
  margin-top: 4px;
  max-height: 180px;
  overflow-y: auto;
  border-radius: 7px;
}
.search-results:not(:empty) { border: 1px solid var(--line-2); background: #0e0e16; }
.search-opt { padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.search-opt:hover { background: #1a1a28; }
.search-empty { padding: 9px 12px; color: var(--text-dim); font-size: 13px; }
.selected-player {
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.12);
  font-size: 14px;
}
.modal select {
  width: 100%;
  background: #16161f;
  border: 1px solid var(--line-2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 7px;
  font-family: var(--body);
  font-size: 14px;
}
.modal select:focus { outline: none; border-color: var(--accent); }

/* unban picker */
.unban-list { max-height: 320px; overflow-y: auto; }
.unban-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  margin-bottom: 8px;
}
.unban-reason { font-weight: 700; }
.unban-meta { font-size: 12px; margin-top: 3px; }
.unban-empty { text-align: center; color: var(--text-dim); padding: 20px; font-weight: 600; }
.btn-remove {
  flex-shrink: 0;
  background: #e74c3c;
  color: #fff;
  border: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 7px;
  cursor: pointer;
}
.btn-remove:hover { filter: brightness(1.1); }
.btn-remove:disabled { opacity: .5; cursor: default; }
.ac-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #ff9f43;
  border: 1px solid rgba(255, 159, 67, .5);
  border-radius: 5px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.unban-locked { flex-shrink: 0; color: #ff9f43; font-weight: 700; font-size: 13px; }

/* info list inside modal */
.info-list { font-size: 14px; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.info-list .k { color: var(--text-dim); }
.info-list .v { font-weight: 700; word-break: break-all; text-align: right; }

/* toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #16161f;
  border: 1px solid var(--line-2);
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 300;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.ok { border-color: #2ecc71; }
.toast.err { border-color: #e74c3c; }

.loading { text-align: center; color: var(--text-dim); padding: 30px; font-weight: 600; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topnav { position: static; transform: none; width: 100%; justify-content: center; order: 3; flex-wrap: wrap; gap: 16px; }
  .nav-link { font-size: 17px; }
  .login-title { font-size: 46px; }
  .grid { font-size: 13px; }
  .grid th, .grid td { padding: 10px; }
}
