/* TaigaUHC — panel staff (staff.taigauhc.fr). Reprend les styles du site (assets/style.css). */

.pn-body { min-height: 100vh; }
.pn-boot { min-height: 100vh; display: grid; place-items: center; }

.pn { display: flex; min-height: 100vh; }

/* ---------------------------------------------------------------- Barre latérale */
.pn__side {
  position: sticky; top: 0; height: 100vh; width: 264px; flex: none; display: flex; flex-direction: column; gap: 24px;
  padding: 24px 16px; background: linear-gradient(rgba(var(--a-rgb), .08), transparent 40%), #0c0f0d; box-shadow: 1px 0 0 var(--line);
}
.pn__brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.pn__brand img { width: 36px; height: 36px; image-rendering: pixelated; }
.pn__brand b { display: block; font-size: 17px; line-height: 20px; }
.pn__brand span { color: var(--a300); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.pn__nav { display: grid; gap: 4px; }
.pn__nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--g300); font-weight: 600;
  transition: color .15s, background .15s;
}
.pn__nav a:hover { color: var(--g50); background: rgba(255, 255, 255, .04); }
.pn__nav a[aria-current="page"] { color: var(--g50); background: linear-gradient(rgba(37, 43, 39, .5), var(--card-2)); outline: 2px solid var(--line); outline-offset: -2px; }
.pn__nav a[aria-current="page"] .ico { color: var(--a300); }
.pn__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  background: #ef5350; color: #fff; font-size: 12px; font-weight: 700; }
.pn__me { margin-top: auto; display: grid; gap: 10px; padding: 14px; }
.pn__me-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pn__me img { width: 36px; height: 36px; border-radius: 50%; }
.pn__me b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn__me-links { display: flex; gap: 8px; }
.pn__me-links .btn { flex: 1; }

/* ---------------------------------------------------------------- Contenu */
.pn__main { flex: 1; min-width: 0; padding: 32px 40px 64px; }
.pn__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.pn__head h1 { display: flex; align-items: center; gap: 10px; font-size: 30px; line-height: 36px; font-weight: 700; }
.pn__head h1 .ico { width: 28px; height: 28px; color: var(--a300); }
.pn__head p { color: var(--g300); font-weight: 500; margin-top: 2px; }
.pn-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; width: 280px; max-width: 100%; border-radius: var(--radius);
  background: var(--card-1); outline: 2px solid var(--line); outline-offset: -2px; color: var(--g400); }
.pn-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--g50); }
.pn-search:focus-within { outline-color: rgba(var(--a-rgb), .5); }

.pn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.pn-stat { padding: 20px; display: flex; align-items: center; gap: 14px; }
.pn-stat b { display: block; font-size: 28px; line-height: 32px; font-weight: 700; }
.pn-stat span { color: var(--g300); font-weight: 500; font-size: 14px; }
.pn-stat--alert .tile { color: #ef8a88; }
a.pn-stat:hover { outline-color: rgba(var(--a-rgb), .35); }

.pn-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.pn-box { padding: 20px; }
.pn-box__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pn-box__head h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pn-box__head h2 .ico { color: var(--g300); }

/* Lignes (reports, sanctions, journal) */
.pn-list { display: grid; gap: 8px; }
.pn-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(15, 19, 17, .45);
  outline: 1px solid var(--line); outline-offset: -1px;
}
.pn-row__main { flex: 1; min-width: 0; }
.pn-row__title { font-weight: 600; color: var(--g50); overflow-wrap: anywhere; }
.pn-row__title a:hover { color: var(--a200); }
.pn-row__sub { color: var(--g400); font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.pn-row__reason { margin-top: 4px; color: var(--g200); overflow-wrap: anywhere; }
.pn-row__side { display: flex; align-items: center; gap: 8px; flex: none; }
/* Colonnes étroites : les boutons passent sous le texte */
.pn-row { flex-wrap: wrap; }
.pn-row__main { min-width: 220px; }
.pn-row__side { margin-left: auto; }
.pn-head { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; background: var(--card-2); flex: none; }
.pn-empty { padding: 28px 12px; text-align: center; color: var(--g400); font-weight: 500; }

.pn-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: rgba(255, 255, 255, .06); color: var(--g200); white-space: nowrap; }
.pn-tag--warn { background: rgba(255, 202, 40, .14); color: #ffd866; }
.pn-tag--mute { background: rgba(255, 152, 0, .14); color: #ffb74d; }
.pn-tag--kick { background: rgba(186, 104, 200, .16); color: #d59ce0; }
.pn-tag--ban { background: rgba(239, 83, 80, .16); color: #ff8a87; }
.pn-tag--ok { background: rgba(var(--a-rgb), .18); color: var(--a200); }
.pn-tag--site { background: rgba(88, 101, 242, .18); color: #a5adff; }

.btn--sm .ico { width: 16px; height: 16px; }
.btn--ok { color: var(--a200); }
.btn--bad { color: #ff9b98; }
.pn-more { display: flex; justify-content: center; margin-top: 14px; }

/* Fiche joueur */
.pn-player { display: flex; gap: 24px; padding: 24px; align-items: center; overflow: hidden; }
.pn-player__skin { width: 120px; height: 120px; flex: none; image-rendering: pixelated; }
.pn-player__info { flex: 1; min-width: 0; display: grid; gap: 8px; }
.pn-player__info h2 { font-size: 28px; line-height: 32px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pn-player__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--g300); font-size: 14px; font-weight: 500; }
.pn-player__meta code { font-size: 12px; color: var(--g400); }
.pn-player__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pn-alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.pn-alert--ban { background: rgba(239, 83, 80, .12); outline: 1px solid rgba(239, 83, 80, .3); color: #ffb3b1; }
.pn-alert--mute { background: rgba(255, 152, 0, .1); outline: 1px solid rgba(255, 152, 0, .3); color: #ffcc80; }
.pn-alert .btn { margin-left: auto; }

/* Fenêtre de sanction */
.pn-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 6, .7); backdrop-filter: blur(4px);
  animation: fadeIn .15s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pn-modal__card { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; display: grid; gap: 18px;
  animation: pop .25s ease-out; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.pn-modal__card h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.pn-field { display: grid; gap: 8px; }
.pn-field > label, .pn-field > span { color: var(--g200); font-weight: 600; font-size: 14px; }
.pn-input, .pn-textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 0; background: rgba(15, 19, 17, .6); color: var(--g50);
  outline: 2px solid var(--line); outline-offset: -2px; font: inherit;
}
.pn-input:focus, .pn-textarea:focus { outline-color: rgba(var(--a-rgb), .55); }
.pn-textarea { min-height: 84px; resize: vertical; }
.pn-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pn-pill { height: 32px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, .05); color: var(--g300); font-weight: 600; font-size: 14px;
  outline: 1px solid var(--line); outline-offset: -1px; transition: color .15s, background .15s; }
.pn-pill:hover { color: var(--g50); }
.pn-pill[aria-pressed="true"] { color: var(--a900); background: linear-gradient(var(--a300), var(--a500)); outline-color: transparent; }
.pn-pill:disabled { opacity: .35; cursor: not-allowed; }
.pn-modal__foot { display: flex; justify-content: flex-end; gap: 8px; }
.pn-err { color: #ff9b98; font-weight: 600; }
.pn-hint { color: var(--g400); font-size: 13px; font-weight: 500; }

/* Écran de connexion / accès refusé */
.pn-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }

@media (max-width: 1100px) {
  .pn-stats { grid-template-columns: repeat(2, 1fr); }
  .pn-cols { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pn { flex-direction: column; }
  .pn__side { position: static; height: auto; width: auto; padding: 14px 16px; gap: 12px; }
  .pn__nav { display: flex; overflow-x: auto; }
  .pn__nav a { flex: none; }
  .pn__me { display: none; }
  .pn__main { padding: 24px 16px 48px; }
  .pn-player { flex-direction: column; text-align: center; }
  .pn-player__info h2, .pn-player__meta, .pn-player__actions { justify-content: center; }
  .pn-row { flex-wrap: wrap; }
  .pn-row__side { width: 100%; justify-content: flex-end; }
}
@media (max-width: 520px) { .pn-stats { grid-template-columns: 1fr; } }

/* Tickets */
.pn-ticket { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.pn-ticket__side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.pn-ticket .tk-thread { margin-top: 0; }
.pn-row .tile { width: 36px; height: 36px; flex: none; }
@media (max-width: 1100px) { .pn-ticket { grid-template-columns: 1fr; } .pn-ticket__side { position: static; } }

/* Administration */
.pn__section { margin: 14px 12px 4px; color: var(--g500); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pn-code { padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .35); color: var(--a200); font: 500 13px/1.6 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.pn-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.pn-filters__form { display: flex; flex-wrap: wrap; gap: 8px; }
.pn-filters__form .pn-search { width: 200px; }
.pn-state { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); font-size: 14px; }
.pn-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--g400); }
.pn-state--ok { color: var(--a200); } .pn-state--ok i { background: var(--a300); animation: ping 1.6s ease-out infinite; }
.pn-state--bad { color: #ef8a88; } .pn-state--bad i { background: #ef5350; }
.pn-state--wait { color: #ffd866; } .pn-state--wait i { background: #ffca28; }
.pn-console { padding: 0; overflow: hidden; }
.pn-console__out { height: min(62vh, 640px); overflow-y: auto; padding: 16px 18px; background: #070908; font: 13px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #c9d1cb; white-space: pre-wrap; overflow-wrap: anywhere; }
.pn-console__out .is-warn { color: #ffd866; }
.pn-console__out .is-err { color: #ff8a80; }
.pn-console__out .is-cmd { color: var(--a300); font-weight: 600; }
.pn-console__out .is-daemon { color: #82b1ff; }
.pn-console__in { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-top: 1px solid var(--line); background: #0c0f0d; }
.pn-console__in span { color: var(--a300); font: 700 15px ui-monospace, Consolas, monospace; }
.pn-console__in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--g50); font: 14px ui-monospace, Consolas, monospace; }
.pn-console__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px 18px; background: #0c0f0d; }
.pn-console__quick .pn-pill { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
@media (max-width: 900px) { .pn-stats--server { grid-template-columns: 1fr 1fr; } }
