/* ══════════════════════════════════════════════════════════
   FootySocial v5 — Admin Panel styles
   Extends: css/styles.css
   ══════════════════════════════════════════════════════════ */

/* Admin: fixed layout, sidebar + main */
body.fixed-layout .app { height: calc(100vh - var(--topbar-h)); }

/* Sidebar nav items */
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ui-text2);
  cursor: pointer;
  transition: all .12s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  text-decoration: none;
  margin-bottom: 2px;
}
.admin-nav-item:hover { background: var(--ui-surface2); color: var(--ui-text); }
.admin-nav-item.active { background: var(--b1); color: #fff; }
.admin-nav-item .nav-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.admin-nav-item .nav-count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  padding: 1px 6px;
  border-radius: 10px;
}
.admin-nav-item:not(.active) .nav-count {
  background: var(--ui-surface2);
  color: var(--ui-text3);
}

/* Admin pages */
.admin-page { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.admin-page.active { display: flex; }

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-surface);
  flex-shrink: 0;
}
.admin-page-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; }

.admin-page-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Inline editable table */
.inline-table { width: 100%; border-collapse: collapse; }
.inline-table th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--ui-text3);
  border-bottom: 2px solid var(--ui-border);
  background: var(--ui-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}
.inline-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--ui-border);
  vertical-align: middle;
  font-size: 13px;
}
.inline-table tbody tr:last-child td { border-bottom: none; }
.inline-table tbody tr:hover { background: var(--ui-surface2); }

/* Actions column */
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-action {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--ui-surface2);
  color: var(--ui-text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all .12s;
}
.row-action:hover { background: var(--ui-border); color: var(--ui-text); }
.row-action.danger:hover { background: #FEE2E2; color: var(--red); }

/* Data health indicators */
.health-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  margin-bottom: 6px;
}
.health-check.ok { background: #D1FAE5; color: #065F46; }
.health-check.warn { background: #FEF3C7; color: #92400E; }
.health-check.err { background: #FEE2E2; color: #991B1B; }
.health-check-icon { font-size: 16px; flex-shrink: 0; }
.health-check-msg { flex: 1; }

/* Export panel */
.export-output {
  background: var(--ui-surface2);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ui-text2);
  white-space: pre;
  overflow: auto;
  max-height: 340px;
  margin-top: 12px;
}

/* Settings form */
.settings-section {
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.settings-section-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ui-text);
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ui-border);
}
.setting-row:last-child { border-bottom: none; }
.setting-row-label { flex: 1; font-size: 13px; font-weight: 500; }
.setting-row-desc { font-size: 11px; color: var(--ui-text2); margin-top: 2px; }
.setting-row-ctrl { flex-shrink: 0; }

.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.brand-logo-card {
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-md);
  background: var(--ui-surface2);
  padding: 12px;
}
.brand-logo-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ui-text);
}
.brand-logo-desc {
  min-height: 28px;
  margin-top: 2px;
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--ui-text2);
}
.brand-logo-zone {
  min-height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 12px;
  background: var(--ui-surface);
}
.brand-logo-preview {
  object-fit: contain;
  background: transparent;
}
.brand-logo-clear {
  width: 100%;
  height: 28px;
  margin-top: 8px;
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-sm);
  background: var(--ui-surface);
  color: var(--ui-text2);
  font-size: 10px;
  font-weight: 800;
}
.brand-logo-clear:hover {
  border-color: var(--b1);
  color: var(--ui-text);
}

/* Color input */
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid var(--ui-border);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}
.color-swatch-btn input[type=color] {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: none;
}
.color-hex-input {
  width: 88px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--radius-sm);
  background: var(--ui-surface2);
  color: var(--ui-text);
}

/* Position filter (players page) */
.pos-filter { display: flex; gap: 4px; flex-wrap: wrap; }
.pos-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text2);
  cursor: pointer;
  transition: all .12s;
}
.pos-chip:hover { border-color: var(--b1); color: var(--b1); }
.pos-chip.active { background: var(--b1); color: #fff; border-color: var(--b1); }
