/* Paleta i typografia dopasowane do głównej strony mystoryrp.com (public/css/style.css) —
   ten sam fiolet marki (--accent: #573cfa), to samo tło i krój Rubik, żeby drive.mystoryrp.com
   nie wyglądał jak osobny, obcy serwis. */
:root {
  --accent: #573cfa;
  --accent-rgb: 87, 60, 250;
  --bg: #050508;
  --bg-card: #0d0d16;
  --text: #cbd5e1;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: 'Rubik', system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: 16px;
  line-height: 1.6;
}
::selection { background: rgba(var(--accent-rgb), 0.35); color: #fff; }

.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
}
h1 { margin-top: 0; font-size: 1.4rem; color: #fff; }
.hint { color: var(--text); font-size: 0.92rem; line-height: 1.5; }
a { color: var(--accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

input[type="file"] {
  width: 100%;
  margin: 16px 0;
  color: var(--text);
}
.progressBar {
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 12px;
}
.progressFill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.5);
  transition: width 0.2s ease;
}
.status { font-size: 0.9rem; color: var(--text); margin-top: 8px; }
.details { font-size: 0.78rem; color: #94a3b8; margin-top: 2px; }
.error { color: #f04747; font-size: 0.9rem; }

.footer {
  max-width: 480px;
  width: 100%;
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.78rem;
  color: #334155;
}
.footer a { color: var(--accent); font-weight: 600; }
.footer .sep { margin: 0 0.4em; color: #334155; }

/* ── Panel admina ── */
.admin-wrap { max-width: 1100px; width: 100%; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { margin: 0; }
.admin-user { font-size: 0.85rem; color: var(--text); }
.admin-user a { margin-left: 0.75rem; }
.role-badge {
  display: inline-block; margin-left: .6rem; padding: .15rem .55rem; border-radius: 999px;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  background: rgba(var(--accent-rgb), .15); color: var(--accent);
}

.admin-nav { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.admin-nav a {
  color: #94a3b8; font-weight: 600; font-size: .85rem; text-decoration: none;
  padding: .5rem .9rem; border-radius: 8px; border: 1px solid transparent;
}
.admin-nav a:hover { color: #fff; text-decoration: none; }
.admin-nav a.active { color: #fff; background: rgba(var(--accent-rgb), .15); border-color: rgba(var(--accent-rgb), .35); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-tile { background: var(--bg-card); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 1.25rem; }
.stat-tile .label { font-size: 0.78rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
.stat-tile .value { font-size: 1.6rem; font-weight: 700; color: #fff; margin-top: .25rem; }

.admin-section { background: var(--bg-card); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; overflow-x: auto; }
.admin-section h2 { margin-top: 0; font-size: 1.05rem; color: #fff; }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; }
th { color: #94a3b8; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }

.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.badge-complete { background: rgba(74, 222, 128, .15); color: #4ade80; }
.badge-uploading { background: rgba(var(--accent-rgb), .15); color: var(--accent); }
.badge-failed { background: rgba(240, 71, 71, .15); color: #f04747; }

.badge-scan-clean { background: rgba(74, 222, 128, .15); color: #4ade80; }
.badge-scan-flagged { background: rgba(240, 71, 71, .15); color: #f04747; }
.badge-scan-pending { background: rgba(var(--accent-rgb), .15); color: var(--accent); }
.badge-scan-not_scanned, .badge-scan-not_checked, .badge-scan-error, .badge-scan-skipped_too_large { background: rgba(255,255,255,.08); color: #94a3b8; }

.badge-reported { background: rgba(250, 204, 21, .15); color: #facc15; }

.btn-danger {
  background: none; border: 1px solid rgba(240, 71, 71, .4); color: #f04747;
  border-radius: 8px; padding: 0.3rem 0.7rem; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-danger:hover { background: rgba(240, 71, 71, .12); }

.btn-primary {
  display: block; width: 100%; margin-top: 0.75rem;
  background: var(--accent); color: #fff; border: none;
  border-radius: 10px; padding: 0.7rem 1rem; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .6; cursor: default; }

/* ── Galeria graffiti (panel admina) ── */
.graffiti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.graffiti-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.graffiti-thumb {
  position: relative; aspect-ratio: 1; width: 100%;
  /* Szachownica pod podglądem — PNG z przezroczystością (kanwa NUI) inaczej zlewałby się z ciemnym
     tłem panelu, przez co nie dałoby się ocenić, co faktycznie jest w warstwie alfa. */
  background-image: linear-gradient(45deg, #1a1a24 25%, transparent 25%), linear-gradient(-45deg, #1a1a24 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1a1a24 75%), linear-gradient(-45deg, transparent 75%, #1a1a24 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-color: #0d0d16;
}
.graffiti-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.graffiti-thumb .graffiti-select { position: absolute; top: .5rem; left: .5rem; z-index: 1; }
.graffiti-thumb .badge { position: absolute; top: .5rem; right: .5rem; }
.graffiti-meta { padding: .7rem .8rem; font-size: .78rem; color: #94a3b8; display: flex; flex-direction: column; gap: .25rem; }
.graffiti-meta .graffiti-author { color: #cbd5e1; font-weight: 600; word-break: break-all; }
.graffiti-meta .graffiti-actions { margin-top: .4rem; display: flex; gap: .5rem; align-items: center; }
.graffiti-meta .graffiti-actions a { font-size: .78rem; }

.graffiti-discord { display: flex; align-items: center; gap: .4rem; }
.graffiti-discord a { font-size: .78rem; color: #5865F2; font-weight: 600; }
.copyBtn {
  background: none; border: 1px solid rgba(255,255,255,.12); color: #94a3b8;
  border-radius: 6px; padding: .1rem .45rem; font-size: .68rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.copyBtn:hover { color: #fff; border-color: rgba(255,255,255,.3); }
.copyBtn.copied { color: #4ade80; border-color: rgba(74,222,128,.4); }

.login-btn {
  display: inline-block; background: #5865F2; color: #fff; padding: 0.7rem 1.4rem;
  border-radius: 10px; font-weight: 700; margin-top: 1rem;
}
.login-btn:hover { background: #4752c4; text-decoration: none; }
