/* Hockey CMS - Main Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #fbbf24;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-light: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #475569;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  overflow-y: auto;
}

.admin-sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}

.admin-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.admin-nav-section {
  margin-bottom: 20px;
}

.admin-nav-label {
  padding: 0 20px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.admin-nav-item:hover {
  background: var(--surface-light);
  color: var(--text);
}

.admin-nav-item.active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-left-color: var(--primary);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: 24px;
  background: var(--bg);
  min-height: 100vh;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-title {
  font-size: 24px;
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
}

.stat-card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card-value {
  font-size: 32px;
  font-weight: 700;
}

.stat-card-change {
  font-size: 12px;
  margin-top: 8px;
}

.stat-card-change.positive {
  color: var(--success);
}

.stat-card-change.negative {
  color: var(--danger);
}

/* Data Table */
.data-table-wrapper {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-light);
  font-weight: 500;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

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

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-team {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-team-logo {
  width: 32px;
  height: 32px;
  background: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.status-badge.draft {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.status-badge.live {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary);
}

.action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  background: var(--surface-light);
  color: var(--text);
  margin-right: 4px;
}

.action-btn:hover {
  background: var(--border);
}

.action-btn.primary {
  background: var(--primary);
  color: white;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Search */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-select {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  min-width: 150px;
}

/* Tabs */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.modal-tab {
  padding: 12px 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Player Card */
.player-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}

.player-card:hover {
  background: var(--surface-light);
}

.player-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.player-info {
  flex: 1;
}

.player-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.player-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.player-team-badge {
  padding: 4px 10px;
  background: var(--surface-light);
  border-radius: 12px;
  font-size: 12px;
  margin-right: 8px;
}

.player-position {
  width: 36px;
  height: 36px;
  background: var(--surface-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

/* Team Card */
.team-admin-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.team-admin-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.team-admin-info {
  flex: 1;
}

.team-admin-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.team-admin-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.team-admin-record {
  text-align: right;
  margin-right: 16px;
}

.team-admin-record .wins {
  font-size: 20px;
  font-weight: 700;
  color: var(--success);
}

.team-admin-record .losses {
  font-size: 20px;
  font-weight: 700;
  color: var(--danger);
}

.team-admin-record-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* Season Card */
.season-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.season-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.season-title {
  font-size: 18px;
  font-weight: 600;
}

.season-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.season-badge.active {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.season-badge.draft {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.season-badge.completed {
  background: rgba(37, 99, 235, 0.2);
  color: var(--primary);
}

.season-dates {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.season-stats {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.season-stat {
  text-align: center;
}

.season-stat-value {
  font-size: 20px;
  font-weight: 700;
}

.season-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Venue Card */
.venue-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.venue-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.venue-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.venue-address {
  font-size: 13px;
  color: var(--text-muted);
}

.venue-sheets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.venue-sheet {
  padding: 6px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
}

.venue-sheet-number {
  font-weight: 600;
  color: var(--primary);
}

/* Score Card */
.score-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  cursor: pointer;
}

.score-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.score-card .teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.team:last-child {
  flex-direction: row-reverse;
  text-align: right;
}

.team-logo {
  width: 36px;
  height: 36px;
  background: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.team-name {
  font-weight: 500;
  font-size: 14px;
}

.score {
  font-size: 28px;
  font-weight: 700;
  padding: 0 16px;
}

.score.live {
  color: var(--success);
  animation: pulse 2s infinite;
}

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

/* Toggle */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-wrapper:last-child {
  border-bottom: none;
}

.toggle-label {
  font-size: 14px;
}

.toggle-label small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

.toggle {
  width: 48px;
  height: 26px;
  background: var(--surface-light);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.toggle.active::after {
  transform: translateX(22px);
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.quick-action {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.quick-action:hover {
  border-color: var(--primary);
  background: var(--surface-light);
}

.quick-action-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.quick-action-label {
  font-size: 14px;
  font-weight: 500;
}

/* Hidden */
.hidden {
  display: none;
}

/* Section Title */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Activity */
.activity-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 36px;
  height: 36px;
  background: var(--surface-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.activity-content {
  flex: 1;
}

.activity-text {
  font-size: 14px;
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* League Switcher */
.league-switcher {
  padding: 12px 16px;
  margin-bottom: 8px;
}

.league-switcher-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.league-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.league-select:focus {
  outline: none;
  border-color: var(--primary);
}

.league-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}

.league-badge.starter {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.league-badge.pro {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.league-badge.enterprise {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

/* Compliance */
.compliance-status {
  display: flex;
  gap: 6px;
}

.compliance-badge {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.compliance-badge.complete {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.compliance-badge.missing {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}
