/* ============================================
   Putrakop Liga - Admin Panel Stylesheet
   Professional Admin Dashboard
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================
   1. CSS Variables
   ============================================ */
:root {
  --primary: #06265C;
  --primary-dark: #031735;
  --primary-light: #0a3a8a;
  --white: #FFFFFF;
  --light-grey: #F4F6F8;
  --grey-100: #F9FAFB;
  --grey-200: #E5E7EB;
  --grey-300: #D1D5DB;
  --grey-400: #9CA3AF;
  --grey-500: #6B7280;
  --grey-600: #4B5563;
  --grey-700: #374151;
  --grey-800: #1F2937;
  --success: #10B981;
  --success-light: #D1FAE5;
  --success-dark: #059669;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --danger-dark: #DC2626;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --warning-dark: #D97706;
  --gold: #F59E0B;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
  --sidebar-width: 260px;
  --topbar-height: 64px;
}

/* ============================================
   2. Admin Reset & Body
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body.admin-body {
  font-family: var(--font-family);
  font-weight: 400;
  line-height: 1.6;
  color: var(--grey-800);
  background-color: var(--light-grey);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}

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

.admin-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.admin-content {
  flex: 1;
  padding: 32px;
}

/* ============================================
   4. Admin Sidebar
   ============================================ */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--primary-dark);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--warning-dark));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  padding: 16px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
  white-space: nowrap;
}

.sidebar-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.sidebar-link .link-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-link .link-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 12px;
}

.sidebar-link-danger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: rgba(239, 68, 68, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--transition);
}

.sidebar-link-danger:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   5. Admin Topbar
   ============================================ */
.admin-topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  color: var(--grey-600);
  transition: var(--transition);
}

.sidebar-toggle:hover {
  background: var(--grey-100);
  color: var(--primary);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
}

.admin-user-info {
  display: flex;
  flex-direction: column;
}

.admin-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-800);
  line-height: 1.2;
}

.admin-user-role {
  font-size: 0.7rem;
  color: var(--grey-500);
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  transition: var(--transition);
}

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

/* ============================================
   6. Page Header
   ============================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.page-header-sub {
  font-size: 0.9rem;
  color: var(--grey-500);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================
   7. Dashboard Grid & Cards
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-200);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.dashboard-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dashboard-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.dashboard-card .card-icon.navy {
  background: rgba(6, 38, 92, 0.1);
  color: var(--primary);
}

.dashboard-card .card-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.dashboard-card .card-icon.red {
  background: var(--danger-light);
  color: var(--danger);
}

.dashboard-card .card-icon.gold {
  background: var(--warning-light);
  color: var(--warning);
}

.dashboard-card .card-info {
  display: flex;
  flex-direction: column;
}

.dashboard-card .card-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
  margin-bottom: 2px;
}

.dashboard-card .card-label {
  font-size: 0.8rem;
  color: var(--grey-500);
  font-weight: 500;
}

.dashboard-card .card-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

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

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

/* ============================================
   8. Admin Tables
   ============================================ */
.admin-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--grey-200);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey-200);
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.admin-card-body {
  padding: 24px;
}

.admin-card-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--grey-200);
  background: var(--grey-100);
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--grey-200);
  background: var(--grey-100);
  flex-wrap: wrap;
  gap: 12px;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  min-width: 260px;
}

.table-search input {
  border: none;
  outline: none;
  background: none;
  font-size: 0.85rem;
  width: 100%;
}

.table-search .search-icon {
  color: var(--grey-400);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.table-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.admin-table th {
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--grey-500);
  text-align: left;
  border-bottom: 1px solid var(--grey-200);
  background: var(--grey-100);
  white-space: nowrap;
}

.admin-table td {
  padding: 14px 24px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--grey-200);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: var(--transition);
}

.admin-table tbody tr:hover {
  background: var(--grey-100);
}

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

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-action-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: var(--transition);
  color: var(--grey-500);
}

.table-action-btn:hover {
  background: var(--grey-100);
  color: var(--primary);
}

.table-action-btn.danger:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.table-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-status.active {
  background: var(--success-light);
  color: var(--success-dark);
}

.table-status.inactive {
  background: var(--grey-200);
  color: var(--grey-600);
}

.table-status.pending {
  background: var(--warning-light);
  color: var(--warning-dark);
}

.table-status.live {
  background: var(--danger-light);
  color: var(--danger);
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey-700);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--grey-800);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 38, 92, 0.1);
}

.form-input::placeholder {
  color: var(--grey-400);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-helper {
  font-size: 0.75rem;
  color: var(--grey-500);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-input.error,
.form-select.error {
  border-color: var(--danger);
}

.form-input.error:focus,
.form-select.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--grey-200);
}

/* ============================================
   10. Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-success:hover {
  background: var(--success-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
  background: var(--danger-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.btn-warning:hover {
  background: var(--warning-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--grey-200);
  color: var(--grey-700);
}

.btn-secondary:hover {
  background: var(--grey-300);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--grey-300);
}

.btn-outline:hover {
  background: var(--grey-100);
  border-color: var(--primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   11. Live Score Admin Panel
   ============================================ */
.livescore-panel {
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--white);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.livescore-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--danger), var(--gold), var(--danger));
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

.livescore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--danger);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-live 2s infinite;
}

.live-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--white);
  border-radius: 50%;
  animation: blink 1s infinite;
}

.livescore-teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 32px;
}

.livescore-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 120px;
}

.livescore-team-logo {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.livescore-team-name {
  font-size: 1.1rem;
  font-weight: 700;
}

.score-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.score-team-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-display-admin {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  min-width: 80px;
  text-align: center;
}

.score-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: var(--transition);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.score-btn:active {
  transform: scale(0.95);
}

.score-btn.goal {
  background: var(--success);
  border-color: var(--success);
}

.score-btn.goal:hover {
  background: var(--success-dark);
}

.score-btn.undo {
  background: var(--danger);
  border-color: var(--danger);
}

.score-btn.undo:hover {
  background: var(--danger-dark);
}

.score-divider {
  font-size: 2.5rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
}

.match-time-display {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.9);
}

.match-control-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.match-control-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: var(--transition);
  min-width: 100px;
}

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

.match-control-btn.start:hover {
  background: var(--success-dark);
}

.match-control-btn.pause {
  background: var(--warning);
  color: var(--white);
}

.match-control-btn.pause:hover {
  background: var(--warning-dark);
}

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

.match-control-btn.resume:hover {
  background: var(--success-dark);
}

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

.match-control-btn.end:hover {
  background: var(--danger-dark);
}

.event-log {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 200px;
  overflow-y: auto;
}

.event-log-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 12px;
}

.event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}

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

.event-time {
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  min-width: 40px;
}

.event-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
}

.event-icon.goal {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.event-icon.yellow {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.event-icon.red {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.event-text {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   12. Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: var(--transition-slow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey-200);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--grey-500);
  font-size: 1.2rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--grey-100);
  color: var(--grey-800);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--grey-200);
}

/* ============================================
   13. Alerts & Toasts
   ============================================ */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--success-light);
  color: var(--success-dark);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
  background: var(--warning-light);
  color: var(--warning-dark);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
  background: rgba(6, 38, 92, 0.05);
  color: var(--primary);
  border: 1px solid rgba(6, 38, 92, 0.15);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--grey-800);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition-slow);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

/* ============================================
   14. Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--grey-600);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--grey-500);
  margin-bottom: 20px;
}

/* ============================================
   15. Loading Spinner
   ============================================ */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--grey-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: inherit;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px;
}

.loading-container p {
  font-size: 0.85rem;
  color: var(--grey-500);
}

/* ============================================
   16. Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 20px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--grey-600);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}

.pagination-btn:hover {
  background: var(--grey-100);
  color: var(--primary);
}

.pagination-btn.active {
  background: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--grey-500);
  padding: 0 12px;
}

/* ============================================
   17. Tabs
   ============================================ */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--grey-200);
  margin-bottom: 24px;
  overflow-x: auto;
}

.admin-tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--grey-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--primary);
}

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ============================================
   18. Utility Classes
   ============================================ */
.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--grey-500); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.w-full { width: 100%; }

.font-bold { font-weight: 700; }

/* ============================================
   19. Animations
   ============================================ */
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

/* ============================================
   20. Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--grey-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--grey-400);
}
