/* RedForge theme for litebans-php. Replaces litebans-php's inc/css/custom.css.
   Same design tokens as Stats and Wiki (from ItemForge/resources/css/app.css).
   Solid colours only: no glows, fades or soft shadows. Emphasis is a flat fill, a solid border or a colour stripe.
   Loaded after Bootstrap 4, so everything here overrides it. */
:root {
  --bg: #09090b;
  --nav: #0f0f12;
  --panel: #141417;
  --panel-2: #1a1a1e;
  --field: #0c0c0e;
  --line: #26262b;
  --line-2: #34343b;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #ef4444;
  --accent-2: #dc2626;
  --accent-3: #f87171;
  --accent-soft: #2a1416;
  --accent-line: #7a2626;
  --ok: #22c55e;
  --ok-soft: #10261a;
  --warn: #f59e0b;
  --gold: #fbbf24;
  --info: #60a5fa;
  --edge: #991b1b;               /* the darker red under solid red buttons */
  --bad: #f87171;
  --radius: 14px;
  --sans: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --mc: 'Pixelify Sans', 'Courier New', monospace;
  color-scheme: dark;

  /* Small labels above each page title (CSS can't read the language file, so they live here). */
  --eyebrow-list: 'Punishments';
  --eyebrow-info: 'Punishment record';
  --eyebrow-history: 'Player history';
}

/* ── Base ── */
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 500 14px/1.5 var(--sans);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent-3); text-underline-offset: 3px; text-decoration: none; }
a:hover, a:focus { color: var(--accent-3); text-decoration: underline; }
b, strong { font-weight: 700; }
h1, h2, h3, h4, h5, h6 { color: var(--text); font-family: var(--sans); }
p { margin-top: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
::selection { background: var(--accent); color: #fff; }
.ico { width: 16px; height: 16px; flex: none; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1280px; padding-left: 28px; padding-right: 28px; }

/* ── Nav ── */
.site-nav { position: sticky; top: 0; z-index: 30; background: var(--nav); border-bottom: 1px solid var(--line); }
.site-nav .navbar { position: static; padding: 0; background: none; font-weight: 600; border: 0; border-radius: 0; text-shadow: none; }
.nav-inner { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; min-height: 64px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
/* The network logo, as in Stats and Wiki. */
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand-logo { display: block; height: 44px; width: auto; }
.brand:hover .brand-logo { opacity: .85; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.dot.on { background: var(--ok); }

.site-nav .navbar-collapse { justify-content: flex-end; gap: 4px; }
.site-nav .navbar-nav { gap: 4px; align-items: center; }
.site-nav .navbar-nav .nav-link { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 600 14px var(--sans); padding: 8px 12px; border-radius: 8px; text-decoration: none;
  border: 0 !important; background: none !important; filter: none; text-shadow: none; }
.site-nav .navbar-nav .nav-link:hover, .site-nav .navbar-nav .nav-link:focus { color: var(--text); text-decoration: none; }
.site-nav .navbar-nav .nav-item.active .nav-link { color: var(--accent-3); }
.site-nav .count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2);
  color: var(--muted); font: 700 11.5px var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.site-nav .nav-item.active .count { background: var(--accent); border-color: var(--accent); color: #fff; }
.site-nav .navbar-toggler { display: none; margin-left: auto; padding: 8px; color: var(--text); border-radius: 9px; }
.site-nav .navbar-toggler svg { width: 18px; height: 18px; }

/* ── Page ── */
.page { width: 100%; flex: 1; padding: 44px 0 72px; }
.page::after { content: ''; display: block; clear: both; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-3); }
.title { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin: 10px 0 8px; word-break: break-word; }
.lead { color: var(--muted); font-size: 15.5px; margin: 0; max-width: 720px; }

/* The h1 litebans prints on every list, info and history page. */
h1.litebans-header, h1.litebans-header.modal-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 0; margin: 0 0 26px; border: 0; border-radius: 0; justify-content: flex-start;
  font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; text-align: left; word-break: break-word;
}
h1.litebans-header::before { content: var(--eyebrow-list); flex-basis: 100%; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-3); line-height: 1.5; }
.lb-page-info h1.litebans-header::before { content: var(--eyebrow-info); }
.lb-page-history h1.litebans-header::before { content: var(--eyebrow-history); }
.col-lg-12 { text-align: left; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px 24px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.empty { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 30px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty p { margin: 0; color: var(--text-2); font-weight: 700; }

/* ── Forms and buttons ── */
input, .form-control {
  width: 100%; height: auto; background: var(--field); color: var(--text); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; font: 500 14px var(--sans); outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, .form-control::placeholder { color: #52525b; }
input:focus, .form-control:focus { background: var(--field); color: var(--text); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); outline: none; }
input[type=search]::-webkit-search-cancel-button { filter: invert(.6); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px;
  font: 700 14px var(--sans); cursor: pointer; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  transition: background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #52525b; background: #222227; color: var(--text); text-decoration: none; }
.btn:focus, .btn.focus { box-shadow: none; outline: none; }
.btn:focus-visible { box-shadow: 0 0 0 2px var(--accent-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary, .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--edge); }
.btn.primary:hover:not(:disabled), .btn-primary:hover:not(:disabled),
.btn-primary:not(:disabled):not(.disabled):active, .btn-primary:focus { background: var(--accent-2); border-color: var(--accent-2); color: #fff; box-shadow: 0 3px 0 var(--edge); }
.btn.primary:active:not(:disabled), .btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge) !important; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--panel-2); border-color: var(--line-2); }
.btn svg { width: 15px; height: 15px; }

/* The "check a player" form above each list. */
.row.litebans-check { margin: 0 0 14px; }
.litebans-check-form { width: min(460px, 100%); margin: 0; }
.litebans-check-form form, .lookup-box { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; padding: 6px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; }
.litebans-check-form form:focus-within, .lookup-box:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.litebans-check-form .form-group { flex: 1; margin: 0; }
.litebans-check-form .form-control, .lookup-box input {
  border: 0; background: transparent no-repeat 12px 50% / 15px; box-shadow: none !important; padding: 8px 8px 8px 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2371717a' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.8'/%3E%3Cpath d='M10.5 10.5L14 14'/%3E%3C/svg%3E");
}
.litebans-check-form .form-control:focus, .lookup-box input:focus { background-color: transparent; }
.litebans-check-btn { margin: 0; padding: 8px 16px; border-radius: 10px; }
.litebans-check-output { margin: 0; font-size: 13px; color: var(--text-2); }
.litebans-check-output br { display: none; }
.litebans-check-output.show:not(:empty) { margin: 0 0 14px; padding: 10px 14px; width: min(460px, 100%); border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: inset 3px 0 0 var(--accent); }
.litebans-check-output + p.noselect { margin: 0; }

/* ── Tables (lists, info, history) ── */
.table {
  width: 100%; margin: 0 0 18px; color: var(--text-2); background: var(--panel); font-size: 14px;
  border: 1px solid var(--line) !important; border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden;
}
.table th, .table td { border: 0 !important; padding: 12px 16px; vertical-align: middle !important; text-align: left; }
.table thead th { background: var(--panel); color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap; border-bottom: 1px solid var(--line) !important; padding-top: 14px; padding-bottom: 12px; }
.table tbody tr + tr td { border-top: 1px solid var(--line) !important; }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }
.table td a { color: inherit; text-decoration: none; }
.table td a:hover { text-decoration: none; }
tr.hover { cursor: pointer; }
.table tbody tr.hover td { background: var(--panel-2); }
.table tbody tr.hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table td:has(.avatar) { color: var(--text); font-weight: 700; white-space: nowrap; }
.lb-page-bans td:nth-child(n+4), .lb-page-mutes td:nth-child(n+4), .lb-page-warnings td:nth-child(n+4), .lb-page-kicks td:nth-child(n+4),
.lb-page-history td:nth-child(n+5) { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.table td a.glyphicon-ok { color: var(--ok); }
.table td a.glyphicon-remove { color: var(--faint); }

/* info.php: a key/value table. */
.lb-page-info .table td:first-child { width: 220px; color: var(--faint); font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.lb-page-info .table td:last-child { color: var(--text); }
.lb-page-info .table td:last-child a { color: var(--accent-3); }
.lb-page-info .table td:last-child a:hover { text-decoration: underline; }
.lb-page-info .table { max-width: 880px; }

/* ── Player heads (avatar_source in settings.php; the theme sizes them, whatever size the URL asks for) ── */
.avatar { width: 28px; height: 28px; margin: 0; border-radius: 7px; image-rendering: pixelated; background: var(--field); object-fit: cover; vertical-align: middle; flex: none; }
.avatar-name, .avatar-name-left { display: flex; align-items: center; gap: 10px; text-align: left !important; min-width: 0; }
.avatar-name br { display: none; }
.lb-page-info .avatar { width: 32px; height: 32px; border-radius: 8px; margin-right: 10px; }
.lb-page-info .avatar-name .avatar, .lb-page-info .avatar-name-left .avatar { margin-right: 0; }

/* ── Badges ── */
.badge { font-family: var(--sans); }
.litebans-label-container { display: inline-flex; flex-wrap: wrap; gap: 8px; width: auto !important; }
.litebans-label-info, .litebans-label-history {
  --c: var(--accent); --ct: #fff;
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--c);
  background: var(--c) !important; color: var(--ct) !important; font: 800 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.litebans-label-info { font-size: 12px; padding: 5px 12px; letter-spacing: .08em; }
.litebans-label-active { --c: var(--accent); }
.litebans-label-permanent { --c: var(--edge); --ct: #fee2e2; }
.litebans-label-ipban, .litebans-label-ipmute { --c: var(--gold); --ct: #422006; }
.litebans-label-expired { --c: var(--panel-2); --ct: var(--muted); border-color: var(--line-2); }
.litebans-label-inactive { --c: var(--ok); --ct: #052e16; }
.litebans-label-ban { --c: var(--accent); }
.litebans-label-mute { --c: var(--info); --ct: #0b1b33; }
.litebans-label-warn { --c: var(--warn); --ct: #451a03; }
.litebans-label-kick { --c: var(--panel-2); --ct: var(--text-2); border-color: var(--line-2); }

/* ── Pager ── */
.litebans-pager { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font: 700 20px/1 var(--sans); text-decoration: none; transition: background .15s, border-color .15s; }
.litebans-pager:hover, .litebans-pager:focus { color: var(--text); border-color: #52525b; background: #222227; text-decoration: none; }
.litebans-pager-left { float: left; }
.litebans-pager-right { float: right; }
.litebans-pager-active { color: var(--text); }
.litebans-pager-inactive { visibility: hidden; pointer-events: none; cursor: default; }
.litebans-pager-number { margin: 0; line-height: 40px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Home ── */
.hero { padding: 10px 0 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero .title { font-size: clamp(30px, 4vw, 44px); }
.hero .lead { margin: 0 auto; }
.lookup { position: relative; width: min(640px, 100%); margin: 28px auto 14px; }
.lookup-box { padding: 8px; border-radius: 16px; }
.lookup-box > .ico { display: none; }
.lookup-box input { font-size: 16px; padding: 10px 6px 10px 42px; background-position: 14px 50%; background-size: 18px; }
.lookup-box .btn { padding: 11px 20px; }
.lookup-output { width: min(640px, 100%); text-align: left; }
.lookup-output.show:not(:empty) { width: min(640px, 100%); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px 0 24px; }
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat { position: relative; padding: 22px 24px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); display: flex; flex-direction: column; gap: 14px;
  justify-content: space-between; min-height: 132px; overflow: hidden; transition: border-color .15s; min-width: 0; color: var(--text); text-decoration: none; }
.stat:hover, .stat:focus { border-color: var(--accent); color: var(--text); text-decoration: none; }
.stat-label { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.stat-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); border: 1px solid var(--accent); color: #fff; flex: none; }
.stat-ico svg { width: 15px; height: 15px; }
.stat-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; min-width: 0; }
.stat-value { font-size: 36px; font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-unit { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-align: right; flex: none; transition: color .15s; }
.stat-arrow { width: 13px; height: 13px; transition: transform .15s; }
.stat:hover .stat-unit { color: var(--accent-3); }
.stat:hover .stat-arrow { transform: translateX(2px); }

.recent { display: flex; flex-direction: column; }
.recent-row { display: grid; grid-template-columns: 92px minmax(130px, 200px) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 11px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.recent-row + .recent-row { border-top: 1px solid var(--line); border-radius: 0; }
.recent-row:hover, .recent-row:focus { background: var(--panel-2); border-radius: 10px; box-shadow: inset 3px 0 0 var(--accent); color: var(--text); text-decoration: none; }
.recent-row:hover + .recent-row { border-top-color: transparent; }
.recent-row .litebans-label-history { justify-self: start; }
.recent-player { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-reason { min-width: 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-reason small { display: block; color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.recent-date { text-align: right; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent-date small { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 12px; color: var(--ok); font-weight: 700; }
.recent-date .dot { width: 7px; height: 7px; }

/* The stock index.php, if it's kept instead of the theme's. */
.jumbotron { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 32px; text-align: center; }
.litebans-index-main h2 { font-weight: 800; letter-spacing: -.03em; }
.litebans-index-sub { color: var(--muted); }

/* ── Notices and footer ── */
.theme-notice { position: relative; margin: 0 0 24px; padding: 12px 44px 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--warn) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--panel)); box-shadow: inset 4px 0 0 var(--warn); color: var(--text-2); }
.theme-notice b { color: var(--warn); }
.theme-notice .close { position: absolute; top: 8px; right: 12px; padding: 0; color: var(--muted); text-shadow: none; opacity: 1; font-weight: 400; }
.alert-dismissible .close { padding: 2px 8px; }

.footer { border-top: 1px solid var(--line); margin-top: auto; background: var(--bg); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
/* The same legal lines as Stats and Wiki. */
.footer-legal p { margin: 0; color: var(--muted); font-size: 14px; }
.footer-legal b { color: var(--text); font-weight: 700; }
.footer-legal .footer-note { margin-top: 4px; color: var(--faint); font-size: 12.5px; }

/* ── Helpers litebans relies on ── */
.noselect { -webkit-touch-callout: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.noalign-w { width: 0; }
.noalign-h { height: 0; }

/* ── Responsive ── */
@media (max-width: 1200px) and (min-width: 992px) {
  .site-nav .navbar-nav .nav-link { padding: 8px 9px; }
}
@media (max-width: 1100px) {
  .stats.four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991.98px) {
  .site-nav .navbar-toggler { display: inline-flex; }
  .nav-inner { padding-top: 0; gap: 12px; }
  .site-nav .navbar-collapse { flex-basis: 100%; }
  .site-nav .navbar-collapse.show, .site-nav .navbar-collapse.collapsing { border-top: 1px solid var(--line); }
  .site-nav .navbar-nav { align-items: stretch; padding: 8px 0; }
  .site-nav .navbar-nav .nav-link { display: flex; justify-content: space-between; padding: 10px 4px; }
  /* Wide tables scroll sideways instead of squashing. */
  .table { display: block; overflow-x: auto; }
  .table td { white-space: nowrap; }
  .lb-page-info .table { display: table; }
  .lb-page-info .table td { white-space: normal; }
  .recent-row { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .recent-reason { grid-column: 2 / -1; grid-row: 2; }
}
@media (max-width: 620px) {
  .brand-logo { height: 36px; }
  .page { padding: 28px 0 56px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .nav-inner { padding: 0 16px; }
  .footer-inner { padding: 18px 16px; }
  .panel { padding: 18px 16px 20px; }
  .stats, .stats.four { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat { min-height: 0; padding: 18px; }
  .lookup-box .btn span { display: none; }
  .litebans-check-btn { padding: 8px 12px; }
  .lb-page-info .table td:first-child { width: auto; white-space: normal; }
  .recent-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 8px; }
  .recent-row .litebans-label-history { grid-column: 1; grid-row: 1; }
  .recent-date { grid-column: 2; grid-row: 1; }
  .recent-player { grid-column: 1 / -1; grid-row: 2; }
  .recent-reason { grid-column: 1 / -1; grid-row: 3; }
  .recent-date small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .stat, .stat-arrow, .btn { transition: none; } }
