/* =============================================
   Football Dashboard - Arabic Admin CSS
   Using Bootstrap 5 RTL + Tailwind CSS
   ============================================= */

:root {
  --sidebar-width: 270px;
  --sidebar-bg: #0f172a;
  --sidebar-light: #1e293b;
  --sidebar-border: #1e293b;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #22c55e;
  --navbar-height: 64px;
  --text-sidebar: #94a3b8;
  --text-sidebar-hover: #fff;
  --transition: 0.25s ease;
}

* { box-sizing: border-box; }

body.admin-body {
  font-family: 'Cairo', 'Segoe UI', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ SIDEBAR ============ */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
  box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

.sidebar-header {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: white;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}

.sidebar-title { font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-subtitle { font-size: 0.72rem; color: rgba(255,255,255,0.7); }

.btn-close-sidebar {
  background: none; border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: all var(--transition);
}
.btn-close-sidebar:hover { background: rgba(255,255,255,0.1); color: #fff; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; }

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #475569;
  padding: 0.5rem 0.75rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(22,163,74,0.25);
  color: var(--primary-light);
  font-size: 0.6rem;
  font-weight: 900;
  flex-shrink: 0;
  letter-spacing: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  color: var(--text-sidebar);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-link i { width: 18px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: var(--text-sidebar-hover); }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(22,163,74,0.2), rgba(22,163,74,0.1));
  color: var(--primary-light);
  border-right: 3px solid var(--primary-light);
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}

.sidebar-user { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.9rem;
}
.user-info .user-name { font-size: 0.85rem; font-weight: 600; color: #e2e8f0; }
.user-info .user-role { font-size: 0.72rem; color: #64748b; }

/* ============ OVERLAY ============ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1039;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ============ MAIN WRAPPER ============ */
.main-wrapper {
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--transition);
}

/* ============ TOP NAVBAR ============ */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--navbar-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.btn-toggle-sidebar {
  background: none; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 6px 10px;
  font-size: 1rem; cursor: pointer; color: #64748b;
  transition: all var(--transition);
}
.btn-toggle-sidebar:hover { background: #f8fafc; color: var(--primary); border-color: var(--primary); }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(239,68,68,0.1);
  color: #dc2626;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(239,68,68,0.2);
}
.live-dot {
  width: 8px; height: 8px;
  background: #dc2626;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.navbar-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

/* ============ NAVBAR NOTIFICATIONS ============ */
.nav-notif-bell {
  background: none;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1rem;
  transition: all .2s;
  position: relative;
}
.nav-notif-bell:hover {
  background: #f1f5f9;
  color: #f59e0b;
  border-color: #f59e0b;
}
.nav-notif-bell.has-new {
  color: #f59e0b;
  border-color: #f59e0b;
  animation: bellRing .6s ease;
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(12deg); }
  30% { transform: rotate(-10deg); }
  45% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  75% { transform: rotate(3deg); }
}
.nav-notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}
.nav-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: .85rem;
  color: #1e293b;
  background: #f8fafc;
  border-radius: 6px 6px 0 0;
}
.nav-notif-list {
  padding: 0;
}
.nav-notif-empty {
  padding: 30px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nav-notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .15s;
  animation: notifSlideIn .3s ease;
}
.nav-notif-item:hover {
  background: #f8fafc;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.nav-notif-icon.success { background: #dcfce7; color: #16a34a; }
.nav-notif-icon.error   { background: #fee2e2; color: #dc2626; }
.nav-notif-icon.sending { background: #dbeafe; color: #2563eb; }
.nav-notif-body {
  flex: 1;
  min-width: 0;
}
.nav-notif-title {
  font-size: .78rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-notif-desc {
  font-size: .7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-notif-time {
  font-size: .65rem;
  color: #94a3b8;
  white-space: nowrap;
  margin-top: 2px;
}

/* ============ PAGE CONTENT ============ */
.page-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1600px;
  width: 100%;
}

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.25rem;
}
.page-subtitle { font-size: 0.875rem; color: #64748b; margin: 0; }

/* ============ STAT CARDS ============ */
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 50%;
  opacity: 0.05;
  transform: translate(20px, -20px);
}

.stat-card-primary { border-top: 3px solid var(--primary); }
.stat-card-primary .stat-icon { background: rgba(22,163,74,0.1); color: var(--primary); }
.stat-card-primary::before { background: var(--primary); }

.stat-card-danger { border-top: 3px solid #dc2626; }
.stat-card-danger .stat-icon { background: rgba(220,38,38,0.1); color: #dc2626; }

.stat-card-info { border-top: 3px solid #0ea5e9; }
.stat-card-info .stat-icon { background: rgba(14,165,233,0.1); color: #0ea5e9; }

.stat-card-success { border-top: 3px solid #059669; }
.stat-card-success .stat-icon { background: rgba(5,150,105,0.1); color: #059669; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-number { font-size: 1.8rem; font-weight: 900; color: #0f172a; line-height: 1; }
.stat-label { font-size: 0.8rem; color: #64748b; margin-top: 2px; font-weight: 500; }

.stat-live-dot {
  position: absolute;
  top: 12px; left: 12px;
  width: 10px; height: 10px;
  background: #dc2626;
  border-radius: 50%;
  animation: blink 1.2s infinite;
}

/* ============ LIVE MATCHES BANNER ============ */
.live-matches-banner {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: 20px;
  border: 1px solid rgba(220,38,38,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
.live-indicator {
  width: 12px; height: 12px;
  background: #dc2626;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1s infinite;
  box-shadow: 0 0 8px rgba(220,38,38,0.6);
}
.live-match-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 0.85rem;
}
.score-live {
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  letter-spacing: 2px;
}
.team-name { color: rgba(255,255,255,0.9); font-size: 0.82rem; font-weight: 600; max-width: 80px; }

/* ============ CONTENT CARDS ============ */
.content-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
  overflow: hidden;
}
.content-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafafa;
}
.content-card-body { padding: 1.25rem; }

/* ============ MATCH LIST ============ */
.match-list { }
.match-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f8fafc;
  transition: background var(--transition);
}
.match-list-item:last-child { border-bottom: none; }
.match-list-item:hover { background: #f8fafc; }

.match-list-date {
  text-align: center;
  min-width: 40px;
  flex-shrink: 0;
}
.date-day { font-size: 1.1rem; font-weight: 800; color: var(--primary); line-height: 1; }
.date-month { font-size: 0.68rem; color: #94a3b8; text-transform: uppercase; }

.match-list-body { flex: 1; min-width: 0; }
.match-score { font-size: 0.95rem; font-weight: 800; color: #dc2626; background: #fef2f2; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.match-vs { font-size: 0.75rem; font-weight: 700; color: #94a3b8; background: #f8fafc; padding: 2px 6px; border-radius: 6px; }

.match-list-action {
  color: #94a3b8;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all var(--transition);
  flex-shrink: 0;
}
.match-list-action:hover { background: #f1f5f9; color: var(--primary); }

.upcoming-time { text-align: center; min-width: 70px; flex-shrink: 0; }

/* ============ COMPETITION ITEMS ============ */
.competition-item { margin-bottom: 1rem; }

/* ============ MATCHES TABLE ============ */
.matches-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.matches-table td { padding: 0.75rem 1rem; vertical-align: middle; }
.matches-table tbody tr { transition: background var(--transition); }
.matches-table tbody tr:hover { background: #f8fafc; }

.match-teams-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 220px;
}
.team-side { display: flex; align-items: center; gap: 4px; flex: 1; }
.team-side.away { justify-content: flex-end; }
.team-badge { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.home-badge { background: #3b82f6; }
.away-badge { background: #dc2626; }
.score-cell { flex-shrink: 0; }
.score-badge { font-size: 0.9rem; font-weight: 800; color: #dc2626; background: #fef2f2; padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.vs-badge { font-size: 0.72rem; color: #94a3b8; background: #f8fafc; padding: 3px 8px; border-radius: 6px; }

.badge-status { font-size: 0.75rem; font-weight: 600; border: none; cursor: pointer; }

/* ============ TEAMS GRID ============ */
.team-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
}
.team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.team-card-live {
  border-color: rgba(220,38,38,0.3);
  box-shadow: 0 0 0 2px rgba(220,38,38,0.1);
}

.team-live-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: #dc2626;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  animation: blink 1s infinite;
  z-index: 1;
}

.team-card-logo {
  padding: 1.25rem;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.team-card-logo img { max-width: 80px; max-height: 80px; object-fit: contain; }
.team-logo-placeholder {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: white;
}

.team-card-body { padding: 0.85rem 1rem; }
.team-card-name { font-size: 0.9rem; font-weight: 700; color: #0f172a; margin-bottom: 2px; }

.team-card-info { display: flex; flex-direction: column; gap: 2px; }
.team-info-item { font-size: 0.75rem; color: #64748b; }
.team-info-item i { width: 14px; color: var(--primary); }

.team-card-actions {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 0.5rem;
  background: #fafafa;
}
.team-card-actions .btn { flex: 1; font-size: 0.78rem; }

/* ============ MATCH FORM ============ */
.teams-picker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
}
.team-picker-side { }

.vs-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1.8rem;
  gap: 0.5rem;
}
.vs-circle {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}

.team-preview {
  padding: 0.6rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}
.team-preview-icon {
  width: 28px; height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.75rem;
}

.score-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-input {
  width: 52px;
  text-align: center;
  font-weight: 900;
  font-size: 1.1rem;
  padding: 4px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
}
.score-input:focus { border-color: #dc2626; }
.score-sep { font-weight: 900; font-size: 1.2rem; color: #dc2626; }

.status-radio {
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
}
.status-radio:hover { background: #f8fafc; }
.status-radio.active {
  background: rgba(22,163,74,0.05);
  border-color: rgba(22,163,74,0.3);
}
.status-radio .form-check-label { cursor: pointer; }

.score-field { border-width: 2px; }
.score-field:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(22,163,74,0.15) !important; }

/* Logo Preview */
.logo-preview-box {
  width: 100px; height: 100px;
  border: 2px dashed #e2e8f0;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  background: #f8fafc;
}
.logo-preview-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-placeholder-icon {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #cbd5e1;
  width: 100%; height: 100%;
}

/* ============ FORM CONTROLS ============ */
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(22,163,74,0.2);
}
.btn-success {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border: none;
}
.btn-success:hover {
  background: linear-gradient(135deg, #166534, var(--primary-dark));
  transform: translateY(-1px);
}

/* ============ ALERTS ============ */
.alert {
  border: none;
  border-radius: 12px;
  font-weight: 500;
}
.alert-success { background: #f0fdf4; color: #166534; border-right: 4px solid #22c55e; }
.alert-danger { background: #fff1f2; color: #991b1b; border-right: 4px solid #f87171; }
.alert-info { background: #eff6ff; color: #1e40af; border-right: 4px solid #60a5fa; }
.alert-warning { background: #fffbeb; color: #92400e; border-right: 4px solid #fbbf24; }

/* ============ RESPONSIVE ============ */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: -8px 0 30px rgba(0,0,0,0.4);
  }
  .main-wrapper { margin-right: 0; }
  .page-content { padding: 1rem; }
}

@media (max-width: 767.98px) {
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header .btn { width: 100%; text-align: center; }
  .page-title { font-size: 1.2rem; }
  .teams-picker {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .vs-divider {
    flex-direction: row;
    padding-top: 0;
    justify-content: center;
  }
  .stat-card { padding: 1rem; }
  .stat-number { font-size: 1.4rem; }
  .match-teams-cell { min-width: unset; }
}

@media (max-width: 575.98px) {
  .top-navbar { padding: 0 0.75rem; }
  .stat-icon { width: 42px; height: 42px; font-size: 1rem; }
  .content-card-body { padding: 0.85rem; }
}

/* ============ WORKFLOW GUIDE ============ */
.workflow-guide {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 14px;
  padding: 0.9rem 1.25rem;
  flex-wrap: wrap;
  border: 1px solid rgba(22,163,74,0.2);
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.workflow-step.active { opacity: 1; }
.workflow-step.done   { opacity: 0.75; }

.wf-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #94a3b8;
  flex-shrink: 0;
}
.workflow-step.active .wf-num {
  background: var(--primary);
  border-color: var(--primary-light);
  color: white;
  box-shadow: 0 0 12px rgba(22,163,74,0.5);
}
.workflow-step.done .wf-num {
  background: rgba(22,163,74,0.2);
  border-color: rgba(22,163,74,0.4);
  color: var(--primary-light);
}

.wf-info { }
.wf-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
}
.wf-desc {
  font-size: 0.68rem;
  color: #64748b;
}
.workflow-step.active .wf-title { color: #fff; }
.workflow-step.active .wf-desc  { color: var(--primary-light); }

.workflow-arrow {
  color: #334155;
  font-size: 0.7rem;
  flex-shrink: 0;
  padding: 0 0.15rem;
}

@media (max-width: 575px) {
  .workflow-guide { padding: 0.75rem 1rem; gap: 0.4rem; }
  .wf-title { font-size: 0.72rem; }
  .wf-desc  { display: none; }
  .wf-num   { width: 26px; height: 26px; font-size: 0.7rem; }
}

/* ============ LEAGUES CARDS ============ */
.league-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.league-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.1); }
.league-card-suspended { border-left: 4px solid #f59e0b; opacity: 0.9; }
.league-card-finished  { border-left: 4px solid #94a3b8; opacity: 0.8; }

.league-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 0;
}
.league-logo-wrap {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
}
.league-logo-img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.league-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #f59e0b;
  width: 100%; height: 100%;
}
.league-name { font-size: 0.95rem; font-weight: 700; color: #0f172a; }
.league-actions { flex-shrink: 0; }
.league-header-info { min-width: 0; }

.league-card-body { padding: 0.85rem 1.1rem; }

.league-stat-num { font-size: 1.2rem; font-weight: 800; color: #0f172a; }
.league-stat-lbl { font-size: 0.72rem; color: #94a3b8; font-weight: 500; }

.league-card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.league-card-footer .btn { font-size: 0.76rem; }

/* ============ TEAM CHECKBOX (league-form) ============ */
.team-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.team-checkbox-label input[type="checkbox"] { display: none; }
.team-checkbox-label:hover { border-color: var(--primary); background: #f0fdf4; }
.team-checkbox-label.checked {
  border-color: var(--primary);
  background: rgba(22,163,74,0.08);
}
.team-cb-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: #64748b;
  flex-shrink: 0;
  transition: all 0.18s;
}
.team-checkbox-label.checked .team-cb-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}
.team-cb-info { flex: 1; min-width: 0; }
.team-cb-name { font-size: 0.82rem; font-weight: 600; color: #0f172a; }
.team-cb-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: transparent;
  flex-shrink: 0;
  transition: all 0.18s;
}
.team-checkbox-label.checked .team-cb-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.teams-search-wrap { }

/* ============ LEAGUE CHECKBOX (team-form) ============ */
.league-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fafafa;
  width: 100%;
}
.league-checkbox-label input[type="checkbox"] { display: none; }
.league-checkbox-label:hover { border-color: var(--primary); background: #f0fdf4; }
.league-checkbox-label.checked {
  border-color: var(--primary);
  background: rgba(22,163,74,0.07);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.08);
}

.league-cb-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1px solid #fde68a;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.league-cb-logo img { max-width: 36px; max-height: 36px; object-fit: contain; }
.league-cb-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #f59e0b;
  width: 100%; height: 100%;
}
.league-checkbox-label.checked .league-cb-logo {
  background: linear-gradient(135deg, rgba(22,163,74,0.15), rgba(22,163,74,0.05));
  border-color: rgba(22,163,74,0.3);
}

.league-cb-info { flex: 1; min-width: 0; }
.league-cb-name { font-size: 0.84rem; font-weight: 700; color: #0f172a; }

.league-cb-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; color: transparent;
  flex-shrink: 0;
  transition: all 0.18s;
}
.league-checkbox-label.checked .league-cb-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.badge-sm { font-size: 0.65rem !important; padding: 2px 6px !important; }

/* ============ VIDEO TYPE SWITCH ============ */
.video-type-switch {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}
.vt-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: .4rem .6rem;
  font-size: .8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all .2s;
}
.vt-btn.active {
  background: #fff;
  color: #6366f1;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.vt-btn:not(.active):hover { background: rgba(255,255,255,0.6); }

/* ============ MATCH LIST CARDS ============ */
.match-list-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: box-shadow .2s, transform .2s;
}
.match-list-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.match-card-live {
  border-color: #fca5a5;
  border-right: 3px solid #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #fff 60%);
  box-shadow: 0 0 12px rgba(220, 53, 69, .12);
}
.match-card-finished {
  border-right: 3px solid #64748b;
  opacity: .85;
}
.match-card-scheduled {
  border-right: 3px solid #2563eb;
}
.match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}
.match-card-comp {
  font-size: .75rem;
  font-weight: 600;
  color: #475569;
}
.match-card-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem .6rem;
  gap: .5rem;
}
.match-card-logo {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.match-card-team-name {
  font-size: .78rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}
.match-card-score {
  flex-shrink: 0;
  text-align: center;
  padding: 0 .5rem;
}
.match-card-scoreline {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e293b;
  letter-spacing: 2px;
  line-height: 1;
}
.match-card-vs {
  font-size: 1rem;
  font-weight: 700;
  color: #94a3b8;
}
.match-card-time {
  font-size: .68rem;
  color: #94a3b8;
  margin-top: 4px;
}

/* Live card timer on match cards */
.live-card-minute {
  font-size: 1.6rem;
  font-weight: 900;
  font-family: 'Courier New', monospace;
  line-height: 1;
  margin: 2px 0;
  color: #16a34a;
  animation: minute-blink 1s infinite;
}
@keyframes minute-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
.live-card-period {
  font-size: .65rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.live-extra-btn:hover,
.rt-extra-btn:hover {
  background: #7c3aed !important;
  color: #fff !important;
}
.rt-penalty-btn:hover {
  background: #d97706 !important;
  color: #fff !important;
}
.rt-penalty-kicks {
  animation: stoppage-fade-in .3s ease;
}
.rt-penalty-actions .btn {
  transition: all .15s ease;
}
.rt-penalty-actions .btn:hover {
  transform: scale(1.05);
}
.rt-penalty-score {
  animation: live-pulse 2s infinite;
}
.rt-stoppage-form {
  animation: stoppage-fade-in .3s ease;
}
.rt-stoppage-form input[type="number"] {
  border: 2px solid #dc3545;
  border-radius: 6px;
  font-weight: 700;
}
.rt-stoppage-form input[type="number"]:focus {
  box-shadow: 0 0 0 3px rgba(220,53,69,.25);
}
@keyframes stoppage-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Match status badges on cards */
.match-live-badge {
  display: inline-flex;
  align-items: center;
  background: #dc3545;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 4px;
  animation: live-pulse 1.5s infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
.match-finished-badge {
  display: inline-flex;
  align-items: center;
  background: #64748b;
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 4px;
}
.match-postponed-badge {
  display: inline-flex;
  align-items: center;
  background: #f59e0b;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}
.match-cancelled-badge {
  display: inline-flex;
  align-items: center;
  background: #1e293b;
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}
.match-scheduled-date {
  text-align: center;
}
.match-scheduled-time {
  font-size: 1.4rem;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: 1px;
  line-height: 1;
}
.match-card-info {
  padding: .4rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  font-size: .72rem;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
  min-height: 28px;
}
.match-card-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}
.live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: blink 1s infinite;
}

/* ============ CHANNEL CHECKBOX (match-form) ============ */
.channel-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s;
  background: #fafafa;
  width: 100%;
}
.channel-checkbox-label input[type="checkbox"] { display: none; }
.channel-checkbox-label:hover { border-color: #6366f1; background: #f0f0ff; }
.channel-checkbox-label.checked {
  border-color: #6366f1;
  background: rgba(99,102,241,0.07);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}
.ch-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.ch-logo img { max-width: 34px; max-height: 34px; object-fit: contain; }
.channel-checkbox-label.checked .ch-logo {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.3);
}
.ch-info { flex: 1; min-width: 0; }
.ch-name { font-size: 0.82rem; font-weight: 700; color: #0f172a; }
.ch-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; color: transparent;
  flex-shrink: 0;
  transition: all 0.18s;
}
.channel-checkbox-label.checked .ch-check {
  background: #6366f1;
  border-color: #6366f1;
  color: white;
}

/* ============ UTILITIES ============ */
.badge { font-weight: 600; font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; }
.table > :not(caption) > * > * { padding: 0.75rem 1rem; }

/* Tailwind overrides for RTL fix */
[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 0.75rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Selection color */
::selection { background: rgba(22,163,74,0.2); }

/* ============ CHANNEL CARDS ============ */
.channel-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  padding: 0 !important;
}
.channel-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}
.channel-card-inactive {
  opacity: .65;
}
.channel-card-logo {
  position: relative;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  padding: 12px;
}
.channel-card-logo img {
  max-width: 90px;
  max-height: 86px;
  object-fit: contain;
}
.channel-logo-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  font-size: 1.4rem;
}
.channel-inactive-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .65rem;
  padding: 2px 7px;
  border-radius: 20px;
}
.channel-card-body {
  flex: 1;
  padding: 12px 12px 8px;
  text-align: center;
}
.channel-name {
  font-weight: 700;
  font-size: .95rem;
  color: #1e293b;
  line-height: 1.3;
  margin-bottom: 2px;
}
.channel-name-en {
  font-size: .75rem;
  color: #64748b;
  margin-bottom: 6px;
}
.channel-cat-badge {
  font-size: .72rem;
  border-radius: 20px;
  padding: 3px 9px;
}
.channel-card-actions {
  display: flex;
  gap: 6px;
  padding: 8px 10px 10px;
  border-top: 1px solid #f1f5f9;
}

/* ============ CATEGORY PARENT-CHILD CARDS ============ */
.cat-parent-card {
  border-radius: 14px;
  overflow: hidden;
  padding: 0 !important;
}
.cat-editing {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,.15);
}
.cat-parent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 8px;
}
.cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg,#f59e0b,#d97706);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}
.cat-channels-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}
.cat-channel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  width: 72px;
  transition: transform .15s;
}
.cat-channel-item:hover {
  transform: translateY(-2px);
}
.cat-channel-logo {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cat-channel-logo img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}
.cat-channel-logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: .9rem;
}
.cat-ch-inactive-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  border: 1px solid #fff;
}
.cat-channel-name {
  font-size: .7rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: #374151;
  max-width: 70px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.cat-empty-channels {
  padding: 12px 16px;
  font-size: .82rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
}

/* ============ SETTINGS PAGE ============ */
.settings-card {
  border-radius: 16px;
  overflow: hidden;
  padding: 0 !important;
}
.settings-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.settings-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.settings-form {
  padding: 20px;
}
.settings-form-footer {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  margin-top: 16px;
}
.settings-img-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.settings-img-preview img { max-width: 60px; max-height: 60px; object-fit: contain; }
.settings-img-preview-new { max-width: 80px; max-height: 80px; border-radius: 12px; border: 1px solid #e2e8f0; object-fit: contain; }
.settings-splash-preview { width: 44px !important; height: 80px !important; }
.settings-splash-preview img { max-width: 40px; max-height: 76px; }

/* Player toggle */
.player-toggle-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.player-option {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
  text-align: center;
}
.player-option:hover { border-color: #a5b4fc; }
.player-option.active {
  border-color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.player-option-icon {
  font-size: 1.8rem;
  color: #94a3b8;
  margin-bottom: 8px;
  transition: color .2s;
}
.player-option.active .player-option-icon { color: #6366f1; }
.player-option-label { font-weight: 700; font-size: .95rem; color: #1e293b; }
.player-option-desc { font-size: .75rem; color: #64748b; margin-top: 4px; }
.player-option-check {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #6366f1;
  font-size: 1rem;
  display: none;
}
.player-option.active .player-option-check { display: block; }

/* Notification provider block */
.notif-provider-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}
.notif-provider-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: .9rem;
}
.font-mono { font-family: 'Courier New', monospace; font-size: .82rem !important; }

/* Color picker */
.color-picker-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.color-picker-wrap input[type="color"] { display: none; }
.color-swatch {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: transform .15s;
}
.color-swatch:hover { transform: scale(1.04); }
.color-hex-input { font-family: monospace; font-size: .8rem !important; text-align: center; }
.color-preview-bar {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  height: 40px;
  gap: 2px;
  margin-top: 4px;
}
.cpb-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
}

/* Language grid */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.lang-option {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 10px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.lang-option:hover { border-color: #93c5fd; }
.lang-option.active {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.lang-flag { font-size: 2rem; margin-bottom: 6px; }
.lang-label { font-weight: 700; font-size: .9rem; color: #1e293b; }
.lang-name { font-size: .68rem; color: #64748b; margin-top: 2px; }
.lang-check {
  position: absolute;
  top: 8px;
  left: 8px;
  display: none;
  font-size: .9rem;
}
.lang-option.active .lang-check { display: block; }

/* Settings nav sidebar */
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.settings-nav-item:hover { background: #f1f5f9; color: inherit; }
.settings-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

/* ============ FEATURED MATCH BANNER ============ */
.live-matches-banner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,.82) 0%, rgba(30,41,59,.75) 100%);
  z-index: 0;
}
.banner-content {
  position: relative;
  z-index: 1;
  padding: 24px 20px 20px;
}
.btn-opacity {
  opacity: .75;
  font-size: .75rem;
}
.btn-opacity:hover { opacity: 1; }
.live-dot-sm {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  margin-inline-end: 4px;
  animation: pulse 1.2s infinite;
}

/* ══════════════════════════════════════════
   Featured match card — full redesign
   ══════════════════════════════════════════ */
.featured-match-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .22s, box-shadow .22s;
}
.featured-match-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* Header */
.fmc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fmc-league {
  font-size: .7rem;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 3px;
}
.fmc-status-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.fmc-status-live    { background: rgba(239,68,68,.3); color: #fca5a5; border: 1px solid rgba(239,68,68,.5); }
.fmc-status-scheduled { background: rgba(59,130,246,.25); color: #93c5fd; border: 1px solid rgba(59,130,246,.4); }
.fmc-status-finished  { background: rgba(100,116,139,.25); color: #cbd5e1; border: 1px solid rgba(100,116,139,.4); }
.fmc-status-postponed { background: rgba(234,179,8,.2); color: #fde68a; border: 1px solid rgba(234,179,8,.4); }
.fmc-status-cancelled { background: rgba(15,23,42,.4); color: #94a3b8; border: 1px solid rgba(148,163,184,.3); }

/* Teams */
.fmc-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.fmc-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fmc-logo-wrap {
  width: 62px; height: 62px;
  border-radius: 15px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.fmc-logo-wrap img {
  max-width: 50px; max-height: 50px;
  object-fit: contain;
}
.fmc-logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.35);
  font-size: 1.3rem;
}
.fmc-team-name {
  font-size: .77rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

/* Score block */
.fmc-score-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 68px;
}
.fmc-score {
  display: flex;
  align-items: center;
  gap: 2px;
}
.fmc-score-num {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
}
.fmc-score-sep {
  font-size: 1.3rem;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  margin: 0 3px;
}
.fmc-vs {
  font-size: 1.1rem;
  font-weight: 900;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1px;
}
.fmc-time {
  font-size: .75rem;
  font-weight: 700;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  gap: 3px;
}
.fmc-round-pill {
  font-size: .58rem;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Single info line: venue · date · channels ── */
.fmc-info-line {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.09);
}
.fmc-info-item {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .63rem;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
}
.fmc-info-item i { font-size: .55rem; flex-shrink: 0; }
.fmc-info-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fmc-ch-inline img {
  width: 13px; height: 13px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}
.fmc-ch-more {
  background: rgba(22,163,74,0.2);
  border-color: rgba(22,163,74,0.35);
  color: #86efac;
  font-weight: 700;
}

/* Settings: featured matches picker */
.banner-bg-preview {
  height: 100px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: #1e293b;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}
.featured-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 2px;
}
.featured-match-item {
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.featured-match-item:hover { border-color: #fca5a5; background: #fff5f5; }
.featured-match-item.selected {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.fm-check {
  position: absolute; top: 8px; left: 8px;
  color: #ef4444; font-size: .85rem;
  display: none;
}
.featured-match-item.selected .fm-check { display: block; }
.fm-status { position: absolute; top: 8px; right: 8px; font-size: .62rem; }
.fm-teams {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.fm-team {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  color: #374151;
}
.fm-team-away { /* same */ }
.fm-logo {
  width: 30px; height: 30px;
  object-fit: contain;
  border-radius: 6px;
}
.fm-logo-placeholder {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: .8rem;
}
.fm-score {
  font-size: .85rem;
  font-weight: 900;
  color: #1e293b;
  white-space: nowrap;
}
.fm-meta {
  font-size: .65rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Per-match banner image on dashboard cards ── */
.featured-match-card.has-bg {
  background-size: cover;
  background-position: center;
  position: relative;
}
.featured-match-card.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,.82) 0%, rgba(30,41,59,.72) 100%);
  border-radius: 16px;
  z-index: 0;
}
.featured-match-card.has-bg > * {
  position: relative;
  z-index: 1;
}

/* ── Banner thumbnail in settings picker ── */
.fm-banner-thumb {
  width: 100%;
  height: 36px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  margin-bottom: 6px;
  opacity: .85;
}

/* ── Shake animation when trying to select a 4th match ── */
@keyframes fm-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.fm-shake {
  animation: fm-shake .45s ease;
  border-color: #ef4444 !important;
}

/* ── Per-match background upload rows (settings) ── */
.match-bg-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
}
.mbr-info {
  flex: 1;
  min-width: 0;
}
.mbr-teams {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mbr-current {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  display: flex;
  align-items: flex-end;
  padding: 4px 6px;
  margin-bottom: 6px;
  position: relative;
}
.mbr-remove-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .65rem;
  font-weight: 600;
  color: #fff;
  background: rgba(239,68,68,.75);
  border-radius: 20px;
  padding: 2px 8px;
  cursor: pointer;
}
.mbr-upload {
  width: 180px;
  flex-shrink: 0;
}
.mbr-preview {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  margin-top: 6px;
}

/* ── Send Notification card ── */
.notif-img-preview {
  width: 100%;
  height: 90px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.notif-logo-preview {
  width: 64px;
  height: 64px;
  border-radius: 12px;
}
.notif-preview-wrap {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.notif-preview-label {
  font-size: .7rem;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.notif-preview-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.notif-prev-logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg,#16a34a,#15803d);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}
.notif-prev-body { flex: 1; min-width: 0; }
.notif-prev-title {
  font-size: .82rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-prev-desc {
  font-size: .72rem;
  color: #64748b;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-prev-bigimg {
  width: 100%;
  height: 110px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: #e2e8f0;
  margin-top: 8px;
}

/* ── Match notification modal ── */
.notif-match-preview {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 12px;
  padding: 14px;
}
.notif-team-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
  color: #94a3b8;
  font-size: 1.1rem;
}
.notif-team-logo img {
  width: 40px; height: 40px;
  object-fit: contain;
}

/* Match Timer Box */
.match-timer-box {
  border: 2px solid #e2e8f0;
  transition: border-color .3s;
}
.match-timer-box:has(#timer-period-badge.bg-success),
.match-timer-box:has(#timer-period-badge.bg-primary) {
  border-color: #16a34a;
}
.match-timer-box:has(#timer-period-badge.bg-danger) {
  border-color: #ef4444;
  animation: timer-pulse 1s infinite;
}
@keyframes timer-pulse {
  0%, 100% { border-color: #ef4444; }
  50% { border-color: #fca5a5; }
}

#timer-display {
  text-shadow: 0 2px 4px rgba(0,0,0,.1);
  min-width: 120px;
  text-align: center;
}

/* Quick notification buttons */
#nm-quick-btns .btn {
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 20px;
}
#nm-quick-btns .btn:hover {
  transform: scale(1.05);
}

/* =============================================
   Rooms Management
   ============================================= */
.room-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.room-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 4px; height: 100%;
}
.room-card-active::before { background: #22c55e; }
.room-card-disabled::before { background: #f59e0b; }
.room-card-closed::before { background: #94a3b8; }

.room-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }

.room-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.room-key-badge {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 2px;
  font-family: monospace;
}
.room-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: #1e293b;
}
.room-match-info {
  background: #f8fafc;
  border-radius: 10px;
  padding: .75rem;
}
.room-match-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  font-weight: 600;
  font-size: .85rem;
}
.room-team {
  display: flex;
  align-items: center;
  gap: 5px;
}
.room-team-logo {
  width: 22px; height: 22px;
  object-fit: contain;
  border-radius: 3px;
}
.room-vs {
  font-weight: 700;
  color: #6366f1;
  font-size: .8rem;
}
.room-match-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .4rem;
  font-size: .72rem;
  color: #64748b;
}
.room-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}
.room-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: #475569;
}
.room-stat i { font-size: .7rem; width: 14px; text-align: center; }

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-top: .5rem;
  border-top: 1px solid #f1f5f9;
}
.room-actions .btn { font-size: .72rem; padding: 3px 8px; }

.room-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
}
