.page { max-width: none; }
.title { font-size: 22px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 20px; }

.filters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.searchGroup { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.searchInput {
  padding: 8px 12px; background: var(--color-bg-card); border: 1px solid var(--color-border-card);
  border-radius: 8px; color: var(--color-text-primary); font-size: 13px; width: 240px; outline: none;
}
.searchInput:focus { border-color: var(--color-primary); }
.refreshBtn {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.15s;
  background: transparent; border: 1px solid var(--color-border-card); color: var(--color-text-secondary);
}
.refreshBtn:hover { background: var(--color-sidebar-hover); }
.createBtn { padding: 8px 16px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.15s; background: var(--color-success); border: none; color: var(--color-on-primary); font-weight: 500; }
.createBtn:hover { opacity: 0.9; }

.tableWrapper {
  background: var(--color-bg-card); border: 1px solid var(--color-border-card);
  border-radius: var(--radius-card); overflow-x: auto;
  box-shadow: var(--shadow-card-light);
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { padding: 12px 16px; text-align: left; color: var(--color-text-secondary); font-weight: 500; border-bottom: 1px solid var(--color-border-card); white-space: nowrap; }
.table td { padding: 12px 16px; color: var(--color-text-primary); border-bottom: 1px solid var(--color-border-row); white-space: nowrap; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--color-bg-row-hover); }

.teamNameLink { background: none; border: none; color: var(--color-primary); cursor: pointer; font-size: 13px; text-decoration: underline; }
.statusBadge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.active { background: var(--color-success-bg); color: var(--color-success); }
.disabled { background: var(--color-danger-bg); color: var(--color-danger); }

.actions { display: flex; gap: 6px; }
.editBtn, .toggleBtn, .topupBtn, .adminBtn { padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.topupBtn { background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.topupBtn:hover { background: var(--color-info-bg-hover); }
.adminBtn { background: transparent; border: 1px solid var(--color-purple-accent); color: var(--color-purple-accent); }
.adminBtn:hover { background: var(--color-purple-bg-hover); }
.disableBtn { background: transparent; border: 1px solid var(--color-danger); color: var(--color-danger); }
.disableBtn:hover { background: var(--color-danger-bg-hover); }
.enableBtn { background: transparent; border: 1px solid var(--color-success); color: var(--color-success); }
.enableBtn:hover { background: var(--color-success-bg-hover); }

.empty { text-align: center; color: var(--color-text-secondary); padding: 40px; }
.skeletonCell { height: 16px; background: var(--color-border-card); border-radius: 4px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.secondsMain { color: var(--color-text-primary); font-weight: 500; }
.secondsSub { color: var(--color-text-secondary); font-size: 11px; margin-left: 4px; }

/* Modal */
.modalOverlay { position: fixed; inset: 0; background: var(--color-modal-overlay); display: flex; align-items: center; justify-content: center; z-index: 300; }
.modal { background: var(--color-bg-modal-elevated); border: 1px solid var(--color-border-card); border-radius: var(--radius-card); padding: 24px; width: 400px; max-width: 90vw; }
.modalTitle { font-size: 16px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 20px; }
.formGroup { margin-bottom: 16px; }
.formGroup label { display: block; color: var(--color-text-secondary); font-size: 13px; margin-bottom: 6px; }
.formGroup input { width: 100%; padding: 8px 12px; background: var(--color-bg-page); border: 1px solid var(--color-border-card); border-radius: 8px; color: var(--color-text-primary); font-size: 14px; outline: none; box-sizing: border-box; }
.formGroup input:focus { border-color: var(--color-primary); }
.modalActions { display: flex; justify-content: flex-end; gap: 8px; }
.cancelBtn { padding: 8px 16px; background: transparent; border: 1px solid var(--color-border-card); border-radius: 8px; color: var(--color-text-secondary); font-size: 13px; cursor: pointer; }
.saveBtn { padding: 8px 16px; background: var(--color-primary); border: none; border-radius: 8px; color: var(--color-on-primary); font-size: 13px; cursor: pointer; }
.formRow { display: flex; gap: 12px; }
.formRow .formGroup { flex: 1; }
.formError { color: var(--color-danger); font-size: 13px; margin-bottom: 12px; }
.formHint { color: var(--color-text-secondary); font-size: 12px; margin-top: 4px; }

/* ══════════════════════════════════════
   Team Detail Modal (follows VideoDetailModal spec)
   ══════════════════════════════════════ */
.detailOverlay {
  position: fixed;
  inset: 0;
  background: var(--color-modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: overlayIn 0.2s ease-out;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detailModal {
  background: var(--color-bg-modal-glass);
  backdrop-filter: var(--bf-glass-lg);
  -webkit-backdrop-filter: var(--bf-glass-lg);
  border: 1px solid var(--color-border-modal-soft);
  border-radius: 16px;
  width: 1280px;
  max-width: 96vw;
  min-height: 70vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px var(--color-shadow-modal), var(--shadow-glass-light);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Header ── */
.detailHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-border-soft);
  flex-shrink: 0;
}

.detailHeader h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.detailClose {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-bg-card);
  border: none;
  color: var(--color-text-on-glass-soft);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.detailClose:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-glass-hover);
}

/* ── Body ── */
.detailBody {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ── Stats grid ── */
.detailGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.detailItem {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-bg-upload);
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  padding: 16px 18px;
  transition: background 0.15s;
}

.detailItem:hover {
  background: var(--color-bg-card);
}

.detailLabel {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.detailValue {
  color: var(--color-text-primary);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.editPoolBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--color-bg-card);
  border: none;
  color: var(--color-text-on-glass-faint);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.editPoolBtn:hover {
  color: var(--color-primary);
  background: var(--color-info-bg-soft);
}

/* ── Members section ── */
.membersTitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-top: 20px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-soft);
}

.memberTableWrapper {
  background: var(--color-bg-upload);
  border: 1px solid var(--color-border-soft);
  border-radius: 10px;
  overflow: hidden;
}

.memberTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.memberTable th {
  padding: 12px 18px;
  text-align: left;
  color: var(--color-text-secondary);
  font-weight: 500;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-soft);
  background: var(--color-bg-row-hover);
  white-space: nowrap;
}

.memberTable td {
  padding: 14px 18px;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-row);
}

.memberTable tr:last-child td { border-bottom: none; }

.memberTable tr:hover td {
  background: var(--color-bg-upload);
}

.ownerBadge {
  background: var(--color-info-bg);
  color: var(--color-primary, #00b8e6);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.adminBadge {
  background: var(--color-purple-bg);
  color: var(--color-purple-accent);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
