/* Admin dashboard */
body.admin { background: var(--bg-alt); }
.wrap-wide { width: min(1400px, 100% - 32px); margin-inline: auto; }
.admin-main { padding: 24px 0 64px; }
.admin-tabs { display: flex; gap: 4px; margin-left: auto; }
.admin-tabs button {
  font: inherit; font-weight: 500; color: #fff; background: none; border: 0;
  padding: 8px 14px; border-radius: 8px; cursor: pointer; opacity: .85;
}
.admin-tabs button:hover { background: rgba(255,255,255,.12); opacity: 1; }
.admin-tabs button.active { background: rgba(255,255,255,.18); opacity: 1; }
#logoutBtn { margin-left: 8px; }

.login-card { max-width: 400px; margin: 48px auto; background: #fff; padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.login-card h1 { color: var(--navy); font-size: 2rem; }

.btn-small { font: inherit; font-size: .9rem; padding: 7px 14px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; border-radius: 999px; }
.btn-small.btn-primary { border-color: transparent; background: var(--saffron); color: #fff; }
.btn-small:disabled { opacity: .6; }
button.btn { font-family: inherit; cursor: pointer; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border-left: 5px solid var(--navy-2); }
.stat span { display: block; color: var(--muted); font-size: .9rem; }
.stat strong { font-family: var(--head); font-size: 2rem; color: var(--navy); line-height: 1.2; }
.stat small { display: block; color: var(--muted); }
.stat-pending { border-left-color: var(--saffron); }
.stat-verified { border-left-color: var(--green); }
.stat-rejected { border-left-color: #c62828; }
.stat-money { border-left-color: var(--gold); }

.division-bars { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.division-bars:empty { display: none; }
.division-bars h3 { font-size: 1.1rem; color: var(--navy); }
.bar-row { display: grid; grid-template-columns: 200px 1fr 40px; gap: 10px; align-items: center; padding: 3px 0; font-size: .95rem; }
.bar { background: var(--bg-alt); border-radius: 4px; height: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy-2); border-radius: 4px; }
.bar-val { text-align: right; font-weight: 700; }

/* Toolbar & table */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.toolbar input, .toolbar select { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.toolbar input[type=search] { flex: 1 1 260px; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
.data-table th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; font-weight: 500; white-space: nowrap; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table tbody tr[data-id] { cursor: pointer; }
.data-table tbody tr[data-id]:hover { background: #f7f9fd; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.badge-pending { background: #fff1db; color: #8a4b00; }
.badge-verified { background: #e2f4e8; color: #145c2c; }
.badge-rejected { background: #fde3e3; color: #8a1010; }

/* Detail dialog */
.detail { border: 0; border-radius: var(--radius); padding: 0; width: min(720px, 100% - 24px); max-height: 92vh; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.detail::backdrop { background: rgba(7,21,56,.55); }
.detail-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--navy); color: #fff; position: sticky; top: 0; }
.detail-head h2 { color: #fff; font-size: 1.4rem; margin: 0; }
.close-btn { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }
#detailBody, .detail-actions { padding: 16px 20px; }
.detail-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.detail-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 5px 12px 5px 0; width: 40%; vertical-align: top; }
.detail-table td { padding: 5px 0; border-bottom: 1px solid var(--line); word-break: break-word; }
.detail-links { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.shot { margin-top: 12px; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.detail-actions { border-top: 1px solid var(--line); background: var(--bg-alt); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-verify { background: var(--green); color: #fff; border: 0; }
.btn-reject { background: #c62828; color: #fff; border: 0; }

/* Settings */
.panel { background: #fff; border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel h2 { font-size: 1.5rem; }
.panel.narrow { max-width: 480px; }
.field.check { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field.check input { width: 20px; height: 20px; }
.field.check .hint { flex-basis: 100%; }
.list-editor { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.list-editor th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 500; padding: 4px; white-space: nowrap; }
.list-editor td { padding: 3px; }
.list-editor td input:not([type=checkbox]) { width: 100%; min-width: 120px; font: inherit; font-size: .95rem; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; }
.list-editor td.wide input { min-width: 240px; }
.list-editor td.cb { text-align: center; }
.list-editor td.cb input { width: 18px; height: 18px; }
.row-btns { white-space: nowrap; }
.row-btns button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; }
.row-btns button[data-act=del]:hover { background: #fde3e3; }
.save-bar {
  position: sticky; bottom: 0; display: flex; gap: 16px; justify-content: flex-end; align-items: center;
  background: rgba(243,246,252,.95); padding: 12px 0; border-top: 1px solid var(--line);
}

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 0; }
  .admin-tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
  .bar-row { grid-template-columns: 120px 1fr 32px; }
}

.forgot { text-align: center; margin: 14px 0 0; font-size: .95rem; }
.forgot a { color: var(--navy-2); }
#resetBox h2 { font-size: 1.5rem; color: var(--navy); }
#resetBox .btn-block { margin-bottom: 14px; }

.site-link { margin-left: auto; white-space: nowrap; font-weight: 700; }
.admin-tabs { margin-left: 16px; }
@media (max-width: 1000px) {
  .site-link { margin-left: auto; }
  .admin-tabs { margin-left: 0; }
}

/* Player message box */
.msg-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.msg-title { font-weight: 700; color: var(--navy); }
.msg-head select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
#playerMsg { width: 100%; font: inherit; font-size: .95rem; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; line-height: 1.5; }
.check-line { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: .95rem; }
.check-line input { margin-top: 4px; }
.note-field { margin-top: 14px; }
.flash { background: #e7f6ec; color: #145c2c; border-radius: 10px; padding: 10px 14px; font-weight: 500; margin: 0 0 12px; }
.flash.bad { background: #fff1db; color: #8a4b00; }

.utr-warn { color: #b45309; font-weight: 700; cursor: help; }
.rec { width: min(980px, 100% - 24px); }
.rec-body { padding: 16px 20px 22px; }
.rec-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 10px; }
.rec-summary span { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.rec-ok { background: #e2f4e8; color: #145c2c; } .rec-warn { background: #fff1db; color: #8a4b00; } .rec-bad { background: #fde3e3; color: #8a1010; }
.rec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rec-table th { text-align: left; background: var(--navy); color: #fff; padding: 8px 10px; font-weight: 500; }
.rec-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.rec-table tr[data-id] { cursor: pointer; } .rec-table tr[data-id]:hover { background: #f7f9fd; }
.rec-table tr.is-bad td { background: #fff5f5; }
.rec-actions { margin: 14px 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
