/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* App chrome (admin / sidebar — stays neutral) */
  --bg:          #f0f2f5;
  --bg2:         #ffffff;
  --bg3:         #e8eaed;
  --border:      #c8ccd4;
  --text:        #1a1d23;
  --text2:       #4a5060;
  --text3:       #8a909e;

  /* Actions */
  --accent:      #1a56db;
  --accent2:     #0d7a4e;
  --warn:        #d97706;
  --danger:      #dc2626;

  /* Board — light, high-contrast */
  --board-bg:      #ffffff;
  --board-border:  #b0b8c8;
  --cell-empty-bg: #f7f8fa;
  --cell-picked-bg:#1e3a5f;      /* deep navy — pops on screen */
  --cell-picked-txt:#ffffff;
  --cell-current-bg:#ff00cc;     /* fluorescent pink — unmissable */
  --cell-current-border:#cc0099;
  --cell-pre-bg:   #fdf4e7;
  --th-bg:         #1e3a5f;
  --th-txt:        #ffffff;
  --col-header-bg: #0e7490;  /* teal — distinct from navy topbar */
  --col-header-txt:#ffffff;
  --th-round-bg:   #e8eaed;
  --th-round-txt:  #4a5060;

  --radius:      6px;
  --topbar-h:    58px;
}

html, body { height: 100%; font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
#app { display: flex; flex-direction: column; height: 100vh; }

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg3); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border: none; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; font-weight: 600; transition: opacity .15s, background .15s;
}
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn:not(:disabled):hover { opacity: .82; }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-success  { background: var(--accent2); color: #fff; }
.btn-warning  { background: var(--warn); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger-outline { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.input-sm {
  background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 5px 10px; border-radius: var(--radius); font-size: 13px;
}
.input-num { width: 60px; }
.input-sm:focus { outline: none; border-color: var(--accent); }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-setup     { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }
.badge-active    { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-paused    { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.badge-completed { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.empty-state { color: var(--text3); padding: 24px; text-align: center; font-style: italic; }
.help-text { color: var(--text2); font-size: 12px; margin-bottom: 6px; }
.help-text code { background: var(--bg3); padding: 1px 5px; border-radius: 3px; color: var(--text); }

/* ── Top Bar ──────────────────────────────────────────────────────────────── */
#topbar {
  height: var(--topbar-h); background: var(--th-bg); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-right  { display: flex; align-items: center; gap: 10px; }
.logo { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .5px; }

/* ── Timer ────────────────────────────────────────────────────────────────── */
.timer-display {
  display: flex; align-items: center; gap: 10px;
}
.timer-countdown {
  font-size: 26px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: 2px;
  line-height: 1;
}
.timer-countdown.warn   { color: #fde047; }
.timer-countdown.urgent { color: #f87171; animation: pulse 1s ease-in-out infinite; }

#timer-bar-wrap {
  width: 100px; height: 6px; background: rgba(255,255,255,.2); border-radius: 3px;
}
#timer-bar {
  height: 100%; background: #4ade80; border-radius: 3px;
  transition: width .5s linear, background .5s;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Admin Panel ──────────────────────────────────────────────────────────── */
.admin-panel {
  background: var(--bg2); border-bottom: 2px solid var(--border);
  padding: 10px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.admin-sections { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.admin-section  { min-width: 220px; }
.admin-section-wide { min-width: 320px; }
.admin-section h3 {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text3); margin-bottom: 9px; font-weight: 700;
}
.admin-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.label-check, .filter-check { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12px; color: var(--text2); }
.label-check input, .filter-check input { cursor: pointer; }

/* Import tabs */
.import-tabs { display: flex; margin-bottom: 8px; border-bottom: 2px solid var(--border); }
.import-tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text2); padding: 5px 14px; cursor: pointer; font-size: 12px; font-weight: 600;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.import-tab:hover  { color: var(--text); }
.import-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.import-tab-panel  { padding-top: 4px; }

.paste-textarea {
  width: 100%; min-height: 110px; resize: vertical;
  background: #fff; border: 1px solid var(--border); color: var(--text);
  padding: 8px 10px; border-radius: var(--radius); font-size: 13px;
  font-family: inherit; line-height: 1.5; display: block;
}
.paste-textarea:focus { outline: none; border-color: var(--accent); }

/* Teams list */
.team-list { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; margin-bottom: 6px; }
.team-item {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 5px 8px;
}
.team-item .team-order { color: var(--text3); font-size: 11px; width: 18px; }
.team-item .team-name  { flex: 1; font-size: 13px; }
.team-item .btn-delete { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; padding: 0 2px; }
.team-item .btn-delete:hover { color: var(--danger); }

/* Import result */
.import-result       { font-size: 12px; margin-top: 7px; color: var(--accent2); font-weight: 600; }
.import-result.error { color: var(--danger); }

/* ── Player Reorder sidebar view ─────────────────────────────────────────── */
#reorder-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.reorder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row !important;
  gap: 8px;
}
.reorder-title { font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }

.player-reorder-list-sidebar {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}
.reorder-empty { padding: 10px 12px; font-size: 12px; color: var(--text3); font-style: italic; }

.reorder-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
  transition: background .1s;
}
.reorder-item:last-child        { border-bottom: none; }
.reorder-item:hover             { background: #f0f4ff; }
.reorder-item.reorder-dragging  { opacity: .35; background: #e8f0fe; }
.reorder-item.reorder-over      { background: #dbeafe; border-top: 2px solid var(--accent); }

.reorder-handle { color: var(--text3); font-size: 14px; cursor: grab; flex-shrink: 0; line-height: 1; }
.reorder-rank   { min-width: 24px; font-size: 11px; font-weight: 700; color: var(--text3); text-align: right; flex-shrink: 0; }
.reorder-name   { flex: 1; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.reorder-status       { font-size: 11px; color: var(--accent2); font-weight: 700; }
.reorder-status.error { color: var(--danger); }

/* ── Main Content ─────────────────────────────────────────────────────────── */
#main-content {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Rankings Panel ───────────────────────────────────────────────────────── */
#rankings-panel {
  width: 260px; min-width: 200px; max-width: 300px;
  display: flex; flex-direction: column;
  min-height: 0;
  border-right: 2px solid var(--border);
  background: var(--bg2);
}
#rankings-view {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
}
.rankings-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.search-input {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 13px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.rankings-header-row { display: flex; gap: 6px; align-items: center; }
.rankings-header-row .search-input { flex: 1; }

.rankings-list { flex: 1; overflow-y: auto; padding: 2px 0; }

.player-card {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; cursor: grab; border-bottom: 1px solid var(--border);
  transition: background .1s; user-select: none; background: #fff;
}
.player-card:hover   { background: #eef2ff; }
.player-card.is-drafted {
  opacity: .4; cursor: default;
  text-decoration: line-through; color: var(--text3); background: var(--bg3);
}
.player-card.dragging   { opacity: .35; }

.player-rank { min-width: 28px; font-size: 12px; font-weight: 700; color: var(--text3); text-align: right; }
.player-name { flex: 1; font-size: 13px; font-weight: 500; }
.player-meta { display: flex; gap: 4px; align-items: center; }
.player-pos  { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--bg3); color: var(--text2); }
.player-ck   { font-size: 10px; color: var(--warn); font-weight: 700; }
.player-age  { font-size: 10px; color: var(--text3); }

/* ── Board Panel ──────────────────────────────────────────────────────────── */
#board-panel {
  flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--board-bg);
}
/* ── Draft Bar (unified selector + title + controls) ──────────────────────── */
#draft-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 16px; min-height: 46px;
  background: var(--bg2); border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}
.draft-bar-left  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.draft-bar-center {
  flex: 1; display: flex; align-items: center; gap: 10px;
  justify-content: center; min-width: 0; overflow: hidden;
}
.draft-bar-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; flex-wrap: wrap; }
.draft-bar-name {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.current-pick-label { font-size: 13px; color: var(--accent); font-weight: 700; white-space: nowrap; }

.draft-complete-banner {
  display: inline-flex; align-items: center;
  background: linear-gradient(135deg, #065f46 0%, #0e7490 100%);
  color: #fff;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
  animation: complete-pulse 2s ease-in-out infinite;
}
@keyframes complete-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13,148,136,.5); }
  50%       { box-shadow: 0 0 10px 3px rgba(13,148,136,.6); }
}

.board-wrap { flex: 1; overflow: auto; padding: 16px; background: var(--board-bg); }

/* ── Board Table ──────────────────────────────────────────────────────────── */
.board-table {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
  table-layout: fixed;
}

/* Team header cells */
.board-table th {
  background: var(--col-header-bg);
  color: var(--col-header-txt);
  padding: 8px 6px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-radius: var(--radius);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: sticky; top: 0; z-index: 5;
  transition: background .2s, color .2s;
}
/* On-the-clock team header flashes */
.board-table th.is-on-clock {
  animation: header-flash 1.1s ease-in-out infinite;
}
@keyframes header-flash {
  0%, 100% { background: #cc0099; color: #fff; box-shadow: 0 0 0 0 rgba(255,0,204,0); }
  50%       { background: #ff00cc; color: #fff; box-shadow: 0 4px 20px rgba(255,0,204,.7); }
}

.board-table th.round-header {
  background: var(--th-round-bg);
  color: var(--th-round-txt);
  font-size: 11px;
  font-weight: 700;
  width: 32px;
  min-width: 32px;
  padding: 8px 2px;
  animation: none;
}

/* ── Board Cells ──────────────────────────────────────────────────────────── */
.board-cell {
  border-radius: var(--radius);
  vertical-align: middle;
  text-align: center;
  position: relative;
  padding: 0;
  border: 2px solid transparent;
  overflow: hidden;
}

/* Empty slot */
.board-cell.is-pick-slot {
  background: var(--cell-empty-bg);
  border: 2px dashed #c8d0de;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.board-cell.is-pick-slot:hover {
  background: #e8f0fe;
  border-color: var(--accent);
}

/* Current pick — bright yellow, impossible to miss */
.board-cell.is-current {
  background: var(--cell-current-bg) !important;
  border: 3px solid var(--cell-current-border) !important;
  cursor: pointer;
  animation: cell-flash 1.1s ease-in-out infinite;
}
@keyframes cell-flash {
  0%, 100% { background: #ff00cc; box-shadow: 0 0 0 3px rgba(255,0,204,.5); }
  50%       { background: #ff66dd; box-shadow: 0 0 0 6px rgba(255,0,204,.25), 0 2px 20px rgba(255,0,204,.6); }
}

/* Filled (picked) slot — bold navy */
.board-cell.is-filled {
  background: var(--cell-picked-bg);
  border: 2px solid #162d4a;
}

/* Pre-assigned */
.board-cell.is-preassigned {
  background: #fefce8;
  border: 2px dashed #ca8a04;
}

/* Drag-over */
.board-cell.drop-target {
  background: #dbeafe !important;
  border: 2px solid var(--accent) !important;
}

/* Round column */
.board-cell.round-cell {
  background: var(--th-round-bg);
  border: 2px solid var(--board-border);
  font-size: 12px;
  font-weight: 800;
  color: var(--text2);
  width: 32px;
  min-width: 32px;
  padding: 0;
}

/* ── Cell Content ─────────────────────────────────────────────────────────── */

/* Pick number — tiny absolute corner label */
.cell-pick-num {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,.45);
  letter-spacing: .3px;
}
.board-cell.is-pick-slot   .cell-pick-num { color: rgba(0,0,0,.3); }
.board-cell.is-current     .cell-pick-num { color: rgba(255,255,255,.6); }
.board-cell.is-preassigned .cell-pick-num { color: rgba(0,0,0,.3); }

/* Player name — fills the cell, vertically centered */
.cell-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2px 6px;
  font-size: 15px;
  font-weight: 900;
  color: var(--cell-picked-txt);
  line-height: 1.1;
  letter-spacing: .1px;
}

/* Clear pick button — top-right corner, admin only */
.cell-clear-btn {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: rgba(255,255,255,.15);
  border: none; border-radius: 3px;
  color: rgba(255,255,255,.55);
  font-size: 10px; font-weight: 700;
  cursor: pointer; line-height: 1;
  padding: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 2;
  transition: background .12s, color .12s;
}
.board-cell:hover .cell-clear-btn { display: flex; }
.cell-clear-btn:hover { background: var(--danger); color: #fff; }

/* Pre-assigned clear button is darker */
.board-cell.is-preassigned .cell-clear-btn {
  color: rgba(0,0,0,.35);
  background: rgba(0,0,0,.06);
}
.board-cell.is-preassigned .cell-clear-btn:hover { background: var(--danger); color: #fff; }

/* Auto-pick badge — bottom of cell */
.cell-auto {
  position: absolute;
  bottom: 2px;
  right: 5px;
  font-size: 9px;
  color: rgba(255,255,255,.4);
  font-style: italic;
}

/* Pre-assign player name */
.board-cell.is-preassigned .cell-player {
  color: #92400e;
  font-size: 13px;
}

/* "ON THE CLOCK" label inside flashing cell */
.cell-clock-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 900;
  color: #1a0010;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: rgba(255,255,255,.75);
  border-radius: 3px;
  padding: 2px 4px;
  margin: 4px;
  width: auto;
  height: auto;
}

/* ── Pick Announcement ────────────────────────────────────────────────────── */
.announcement {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 18, 40, .93);
  animation: ann-fadein .3s ease forwards;
}
.announcement.fadeout { animation: ann-fadeout .5s ease forwards; }
.announcement-inner {
  text-align: center;
  animation: ann-pop .4s cubic-bezier(.175,.885,.32,1.275) forwards;
}
.announcement-pick    { font-size: 16px; color: rgba(255,255,255,.55); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 10px; }
.announcement-team    { font-size: 32px; color: #93c5fd; font-weight: 800; margin-bottom: 4px; }
.announcement-selects { font-size: 13px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: 4px; margin-bottom: 14px; }
.announcement-player  {
  font-size: 108px; font-weight: 900; color: #ffffff;
  text-shadow: 0 0 80px rgba(147,197,253,.8);
  letter-spacing: -2px; line-height: 1.05;
}
@media (max-width: 767px) {
  .announcement-player { font-size: 64px; letter-spacing: -1px; }
}
.announcement-position { font-size: 20px; color: #4ade80; margin-top: 10px; font-weight: 600; }

@keyframes ann-fadein  { from { opacity: 0; } to { opacity: 1; } }
@keyframes ann-fadeout { from { opacity: 1; } to { opacity: 0; } }
@keyframes ann-pop {
  from { transform: scale(.55); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Login Overlay ────────────────────────────────────────────────────────── */
.login-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: #0f1a2e;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-overlay.hidden { display: none !important; }

.login-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  padding: 44px 48px; width: 100%; max-width: 420px;
  text-align: center;
}
.login-logo   { font-size: 32px; font-weight: 900; color: var(--th-bg); margin-bottom: 6px; }
.login-league { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 28px; min-height: 24px; }
.login-label  { display: block; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text2); margin: 14px 0 4px; }
.login-input  {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px; color: var(--text);
  background: var(--bg3);
}
.login-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.login-btn {
  width: 100%; margin-top: 24px; padding: 13px;
  background: var(--th-bg); color: #fff; border: none; border-radius: var(--radius);
  font-size: 16px; font-weight: 800; cursor: pointer; letter-spacing: .3px;
  transition: background .15s;
}
.login-btn:hover { background: #162d4a; }
.login-error {
  background: #fee2e2; color: #991b1b; border-radius: var(--radius);
  padding: 9px 14px; font-size: 13px; margin-top: 12px; text-align: left;
}

/* Topbar role label */
.topbar-role { font-size: 12px; color: rgba(255,255,255,.6); font-style: italic; }

/* Coach view: board fills full width */
body.role-coach #rankings-panel { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  #rankings-panel { width: 200px; }
  .cell-player { font-size: 13px; }
  .board-table th { font-size: 12px; }
}
@media (max-width: 600px) {
  .admin-sections { flex-direction: column; }
}

/* ── Mobile Board (coach, < 768px) ───────────────────────────────────────── */
@media (max-width: 767px) {
  /* Let the board-wrap scroll naturally as a list */
  #board-panel  { overflow-y: auto; }
  #board-wrap   { padding: 10px; overflow: visible; }
}

.mobile-board {
  display: flex; flex-direction: column; gap: 10px;
}

/* On the clock banner */
.mobile-on-clock {
  background: var(--cell-current-bg);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: cell-flash 1.1s ease-in-out infinite;
}
.mobile-clock-label {
  font-size: 10px; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,.85);
}
.mobile-clock-team {
  font-size: 26px; font-weight: 900; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.mobile-clock-pick { font-size: 12px; color: rgba(255,255,255,.7); }

/* Toolbar */
.mobile-toolbar { display: flex; gap: 8px; justify-content: flex-end; }

/* Player list panel */
.mobile-player-panel {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg2);
  max-height: 40vh; display: flex; flex-direction: column;
}
.mobile-player-scroll {
  flex: 1; overflow-y: auto;
}
.mobile-player-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.mobile-player-panel-title { font-size: 13px; font-weight: 700; }
.mobile-avail-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text2); cursor: pointer;
}

.mobile-player-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-bottom: 1px solid var(--border);
}
.mobile-player-row:last-child { border-bottom: none; }
.mobile-player-row.is-drafted { opacity: .4; }
.mobile-player-rank  { font-size: 11px; font-weight: 700; color: var(--text3); min-width: 28px; text-align: right; }
.mobile-player-name  { flex: 1; font-size: 14px; font-weight: 500; }
.mobile-player-drafted { font-size: 10px; color: var(--text3); font-style: italic; }

/* Round cards */
.mobile-round-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--bg2);
}
.mobile-round-card.is-current-round {
  border: 2px solid var(--cell-current-bg);
  box-shadow: 0 0 0 2px rgba(255,0,204,.15);
}
.mobile-round-header {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--bg3);
  cursor: pointer; user-select: none;
}
.mobile-round-card.is-current-round .mobile-round-header {
  background: #fdf0fc;
}
.mobile-round-num      { font-size: 14px; font-weight: 700; flex: 1; }
.mobile-round-progress { font-size: 12px; color: var(--text3); }
.mobile-round-chevron  { font-size: 11px; color: var(--text3); }

/* Pick rows */
.mobile-pick-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border);
}
.mobile-pick-row.is-filled   { background: var(--cell-picked-bg); }
.mobile-pick-row.is-on-clock { background: var(--cell-current-bg); animation: cell-flash 1.1s ease-in-out infinite; }

.mobile-pick-num {
  font-size: 11px; font-weight: 700; min-width: 32px;
  color: var(--text3);
}
.mobile-pick-row.is-filled   .mobile-pick-num,
.mobile-pick-row.is-on-clock .mobile-pick-num { color: rgba(255,255,255,.6); }

.mobile-pick-team {
  font-size: 14px; font-weight: 600; flex: 1;
  color: var(--text);
}
.mobile-pick-row.is-filled   .mobile-pick-team,
.mobile-pick-row.is-on-clock .mobile-pick-team { color: #fff; }

.mobile-pick-player {
  font-size: 14px; font-weight: 700; text-align: right;
  color: var(--cell-picked-txt);
}
.mobile-pick-player.is-hidden { color: rgba(255,255,255,.4); letter-spacing: 3px; }
.mobile-pick-player.is-clock  { color: rgba(255,255,255,.8); font-style: italic; font-weight: 400; }
.mobile-pick-player.is-empty  { color: var(--text3); font-weight: 400; }

/* ── Draft Management ─────────────────────────────────────────────────────── */
.admin-section-drafts { min-width: 420px; }

.draft-mgmt-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 200px; overflow-y: auto; margin-bottom: 8px;
}

.draft-mgmt-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg3);
  transition: background .1s;
}
.draft-mgmt-item.is-selected {
  background: #eff6ff; border-color: var(--accent);
}

.draft-item-info  { flex: 1; min-width: 0; }
.draft-item-name  { font-size: 13px; font-weight: 700; color: var(--text); }
.draft-item-meta  { display: flex; align-items: center; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.draft-item-dates { font-size: 11px; color: var(--text3); }
.draft-item-actions { display: flex; gap: 5px; flex-shrink: 0; }

.section-draft-label {
  font-size: 10px; font-weight: 600; color: var(--accent);
  text-transform: none; letter-spacing: 0;
  background: #eff6ff; border-radius: 4px; padding: 1px 6px;
}

/* ── Draft Selector (inside draft-bar) ───────────────────────────────────── */
.draft-selector-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text3); white-space: nowrap; }

.draft-selector-select {
  height: 34px; padding: 0 10px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; color: var(--text);
  min-width: 220px; max-width: 340px; cursor: pointer;
}
.draft-selector-select:focus { outline: none; border-color: var(--accent); }

.new-draft-inline { display: flex; align-items: center; gap: 6px; }


/* ── Draft Content ────────────────────────────────────────────────────────── */
.draft-content { }
.draft-content.hidden { display: none; }

/* ── Settings Rows ────────────────────────────────────────────────────────── */
.settings-rows { display: flex; flex-direction: column; gap: 6px; }
.settings-label { font-size: 12px; color: var(--text2); min-width: 100px; }
.settings-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* .coach-draft-bar is now .draft-bar-left inside #draft-bar */
.coach-draft-label { font-size: 12px; font-weight: 700; color: var(--text2); }
.coach-draft-selector {
  height: 28px; padding: 0 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text); min-width: 200px; cursor: pointer;
}
.coach-draft-selector:focus { outline: none; border-color: var(--accent); }

/* ── Teams setup-required state ──────────────────────────────────────────── */
.setup-picks-warning {
  background: #fff3cd; border: 1px solid #f59e0b; border-radius: var(--radius);
  color: #92400e; font-size: 12px; font-weight: 600;
  padding: 7px 12px; margin-bottom: 8px;
}
.setup-picks-warning.shake {
  animation: warning-shake .4s ease;
}
@keyframes warning-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes btn-pulse-urgent {
  0%, 100% { background: #d97706; box-shadow: 0 0 0 0 rgba(217,119,6,.5); }
  50%       { background: #f59e0b; box-shadow: 0 0 0 7px rgba(217,119,6,0); }
}
.btn-needs-action {
  background: #d97706 !important; color: #fff !important;
  animation: btn-pulse-urgent .8s ease-in-out infinite;
}

.admin-tab.tab-locked {
  opacity: .35; cursor: not-allowed;
}
.admin-tab.tab-locked:hover { color: var(--text2); }

/* ── Admin Tabs ───────────────────────────────────────────────────────────── */
.admin-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
}
.admin-tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 8px 18px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text2);
  margin-bottom: -2px; transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.admin-tab:hover  { color: var(--text); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-tab-panel { padding: 4px 0 8px; }
.admin-tab-panel.hidden { display: none; }

/* ── Tab field layout ─────────────────────────────────────────────────────── */
.tab-field-row {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end;
}
.tab-field-group {
  display: flex; flex-direction: column; gap: 4px;
}
.tab-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text3);
}
.tab-divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ── Controls groups ──────────────────────────────────────────────────────── */
.controls-group { padding: 4px 0; }
.controls-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text3); margin-bottom: 8px;
}
