/* Punishments page: tabs and search on one row, then a striped table. Colors and components come from style.css. */
.wrap.pn { width: min(1180px, 100% - 32px); padding-bottom: 72px; }

.pn-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 22px 0 8px; }
.pn-tabs { display: inline-flex; gap: 2px; padding: 4px; background: var(--panel); border: 2px solid var(--panel-hi); border-radius: 999px; }
.pn-tabs button { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; line-height: 1; background: transparent; color: var(--muted); border: 0; border-radius: 999px; font: 700 0.95rem var(--font-body); cursor: pointer; transition: background 0.1s, color 0.1s; }
.pn-tabs button b { font-size: 0.78rem; font-weight: 700; opacity: 0.7; }
.pn-tabs button:hover { color: #fff; }
.pn-tabs button[aria-selected="true"] { background: var(--lime); color: #0b1204; }
.pn-tabs button[aria-selected="true"] b { opacity: 0.75; }

.pn-search { display: flex; flex: 1 1 300px; gap: 8px; min-width: 0; max-width: 460px; margin-left: auto; }
.pn-search input { flex: 1; min-width: 0; min-height: 44px; padding: 0 18px; background: var(--slot); color: #fff; border: 2px solid #2c3445; border-radius: 999px; font: 600 1rem var(--font-body); }
.pn-search input::placeholder { color: #9aa6b8; opacity: 1; }
.pn-search input:focus { border-color: var(--lime); outline: none; }
.pn-search input:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
.pn-go { min-height: 44px; padding: 0 18px; background: var(--lime); color: #0b1204; border: 0; border-radius: 999px; font: 700 0.95rem var(--font-body); cursor: pointer; transition: filter 0.1s, transform 0.08s; }
.pn-go:hover { filter: brightness(1.1); transform: translateY(-2px); }
.pn-go[type="button"] { background: var(--panel-hi); color: #fff; }
.pn-q-err { margin: 4px 0 0 20px; }

.pn-body { margin-top: 14px; padding: 16px; background: var(--panel); border: 2px solid var(--panel-hi); border-radius: 12px; }
.pn-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pn-summary { margin: 0; color: var(--muted); }
.pn-status { display: inline-flex; gap: 4px; padding: 4px; background: var(--slot); border-radius: 999px; }
.pn-status button { min-height: 36px; padding: 0 14px; background: transparent; color: var(--muted); border: 0; border-radius: 999px; font: 600 0.92rem var(--font-body); cursor: pointer; }
.pn-status button:hover { color: #fff; }
.pn-status button[aria-pressed="true"] { background: var(--lime); color: #0b1204; }

.pn-list { overflow-x: auto; }
.pn-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
.pn-table th { padding: 12px 14px; background: var(--panel-hi); color: var(--lime); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.pn-table th:first-child { border-top-left-radius: 8px; }
.pn-table th:last-child { border-top-right-radius: 8px; }
.pn-table td { padding: 12px 14px; vertical-align: top; color: #e6ebf2; overflow-wrap: anywhere; }
.pn-table tbody tr:nth-child(odd) td { background: #1b2230; }
.pn-table tbody tr:nth-child(even) td { background: #151a24; }
.pn-table tbody tr:hover td { background: #232c3d; }
.pn-user { white-space: nowrap; }
.pn-user button { padding: 0; background: none; border: 0; color: var(--lime); font: 700 0.95rem var(--font-body); cursor: pointer; text-align: left; }
.pn-user button:hover { color: #fff; text-decoration: underline; }
.pn-tag { display: inline-block; margin-left: 6px; padding: 0 6px; background: #2b8fc7; color: #fff; border-radius: 4px; font-size: 0.7rem; font-weight: 700; line-height: 1.5; vertical-align: 2px; }
.pn-staff { white-space: nowrap; font-weight: 700; text-transform: uppercase; font-size: 0.88rem; letter-spacing: 0.02em; }
.pn-when, .pn-ends { white-space: nowrap; }
.pn-when { color: var(--muted); font-size: 0.9rem; }
.pn-note { display: block; margin-top: 4px; color: var(--muted); font-size: 0.85rem; }
.pn-ends.perm { color: #ff8a8a; font-weight: 700; }
.pn-ends.removed { color: #f2b544; font-weight: 700; }
.pn-ends small { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 400; }

.pn-empty, .pn-error { margin: 0; padding: 20px; background: var(--slot); border-radius: 10px; color: var(--muted); }
.pn-error { background: #3f1010; color: #fff; border: 2px solid var(--red); }

.pn-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 22px; }
.pn-pager .btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }

@media (max-width: 900px) {
  .pn-bar { gap: 12px; }
  .pn-tabs { display: flex; width: 100%; }
  .pn-tabs button { flex: 1 1 25%; justify-content: center; flex-direction: column; align-items: center; gap: 0; padding: 6px 4px; min-height: 52px; font-size: 0.92rem; }
  .pn-search { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .pn-body { padding: 12px; }
  .pn-list { overflow: visible; }
  .pn-table, .pn-table tbody { display: block; }
  .pn-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .pn-table tr { display: block; margin-bottom: 10px; border-radius: 10px; overflow: hidden; }
  .pn-table td { display: flex; gap: 12px; padding: 8px 14px; }
  .pn-table td::before { content: attr(data-label); flex: 0 0 4.6rem; color: var(--lime); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding-top: 2px; }
  .pn-user { white-space: normal; }
}
