/* ClubOS Executive Sports Club CMS Styles */
:root {
  --primary: #E00712;
  --primary-dark: #B5050E;
  --secondary: #0C0D11;
  --secondary-light: #181A22;
  --accent: #CFA36E;
  --accent-light: #DFBA88;
  --bg-light: #F7F8FA;
  --text-dark: #111827;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Refined scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
}

/* Badges */
.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-red { background-color: #FEE2E2; color: #991B1B; }
.badge-green { background-color: #DCFCE7; color: #166534; }
.badge-blue { background-color: #DBEAFE; color: #1E40AF; }
.badge-amber { background-color: #FEF3C7; color: #92400E; }
.badge-gray { background-color: #F3F4F6; color: #374151; }

/* Modal animations */
.modal-overlay {
  background-color: rgba(12, 13, 17, 0.55);
  backdrop-filter: blur(4px);
  transition: opacity 0.18s ease-out;
}
.modal-container {
  transition: transform 0.18s ease-out;
}

/* Executive Sidebar Active Indicator */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #FFFFFF !important;
  font-weight: 600;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background-color: #E00712;
}
.nav-link.active .nav-icon,
.nav-link.active svg {
  color: #F87171 !important;
}

/* Executive Data Table */
.data-table th {
  background-color: #FAFAFB;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #6B7280;
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid #E5E7EB;
}
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.84rem;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background-color: #F9FAFB;
}

/* Refined Focus Rings */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #E00712 !important;
  box-shadow: 0 0 0 3px rgba(224, 7, 18, 0.12) !important;
}

/* Live Editorial Preview Typography */
.editorial-preview h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.editorial-preview h3 {
  font-size: 0.96rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}
.editorial-preview ul, .editorial-preview ol {
  padding-left: 1.25rem;
  list-style: disc;
}
.editorial-preview a {
  color: #E00712;
  text-decoration: underline;
}
.editorial-preview img {
  max-height: 220px;
  border-radius: 0.5rem;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1.05rem;
  border-radius: 0.625rem;
  color: white;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.28);
  animation: slideIn 0.22s ease-out;
}
.toast-success { background-color: #059669; }
.toast-error { background-color: #DC2626; }
.toast-info { background-color: #1D4ED8; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ================= EXECUTIVE DARK MODE ================= */
html.dark,
html[data-theme="dark"] {
  color-scheme: dark;
}

html.dark body {
  background-color: #0A0B0F;
  color: #E5E7EB;
}

html.dark .bg-gray-50,
html.dark .bg-gray-50\/70,
html.dark .bg-gray-50\/50 {
  background-color: #0E1016 !important;
}

html.dark .bg-white {
  background-color: #13161F !important;
}

html.dark .bg-gray-100 {
  background-color: #1B1F2B !important;
}

html.dark .bg-gray-200 {
  background-color: #252A3A !important;
}

html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-200\/70,
html.dark .border-gray-200\/80,
html.dark .border-gray-200\/90,
html.dark .border-gray-300 {
  border-color: #232836 !important;
}

html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #1E2330 !important;
}

html.dark .text-gray-900,
html.dark .text-gray-800 {
  color: #F3F4F6 !important;
}

html.dark .text-gray-700 {
  color: #D1D5DB !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
  color: #9CA3AF !important;
}

html.dark .text-gray-400 {
  color: #6B7280 !important;
}

html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-50\/80:hover,
html.dark .hover\:bg-gray-100:hover {
  background-color: #1A1E2A !important;
}

html.dark .hover\:bg-gray-200:hover {
  background-color: #252B3B !important;
}

html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html.dark select,
html.dark textarea {
  background-color: #0D0F15 !important;
  color: #F3F4F6 !important;
  border-color: #282F40 !important;
}

html.dark .data-table th {
  background-color: #10131B !important;
  color: #9CA3AF !important;
  border-bottom-color: #232836 !important;
}

html.dark .data-table td {
  border-bottom-color: #1C212E !important;
}

html.dark .data-table tbody tr:hover td {
  background-color: #181C27 !important;
}

html.dark .bg-red-50,
html.dark .bg-red-50\/70,
html.dark .bg-red-50\/20 {
  background-color: rgba(224, 7, 18, 0.14) !important;
}

html.dark .border-red-200 {
  border-color: rgba(224, 7, 18, 0.35) !important;
}

html.dark .text-red-900 {
  color: #FCA5A5 !important;
}

html.dark .bg-amber-50,
html.dark .bg-amber-100 {
  background-color: rgba(217, 119, 6, 0.16) !important;
  color: #FCD34D !important;
}

html.dark .bg-blue-50,
html.dark .bg-blue-100 {
  background-color: rgba(37, 99, 235, 0.16) !important;
  color: #93C5FD !important;
}

html.dark .bg-green-100,
html.dark .bg-emerald-50,
html.dark .bg-emerald-100 {
  background-color: rgba(16, 185, 129, 0.16) !important;
  color: #6EE7B7 !important;
}

html.dark .bg-purple-50,
html.dark .bg-indigo-50 {
  background-color: rgba(124, 58, 237, 0.16) !important;
  color: #C4B5FD !important;
}
