/* سين Admin Panel - Baghdad-Inspired Modern Theme */
/* Updated: February 2026 - Matches Android App Design */
/* Warm sunset palette: Baghdad gold + deep navy blue */
/* Colors synchronized with mobile app for brand consistency */

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

:root {
  /* Baghdad-inspired palette - matching Android app */
  --bg: #1A2332;              /* Deep navy - matches Android */
  --bg-card: #2C3E50;         /* Dark blue-gray - matches Android */
  --bg-hover: #34495E;        /* Slightly lighter blue-gray */
  --bg-secondary: #1A2332;    /* Same as bg */
  --border: #3d4a5c;          /* Blue-tinted border */
  --border-gold: #D4A57444;   /* Baghdad gold with alpha */
  --text: #FFFFFF;            /* Pure white for clarity */
  --text-secondary: #BDC3C7;  /* Light gray - matches Android */
  --text-muted: #7F8C8D;      /* Muted gray */
  --primary: #D4A574;         /* Baghdad gold - exact match */
  --accent: #E67E22;          /* Deep orange - exact match */
  --accent-teal: #27AE60;     /* Teal/green accent */
  --success: #27AE60;         /* Success green */
  --warning: #F39C12;         /* Warning orange */
  --error: #E74C3C;           /* Error red */
  --gold: #D4A574;            /* Baghdad gold */
  --gold-dark: #C8925A;       /* Darker gold */
  --gold-glow: rgba(212, 165, 116, 0.15);
  --orange: #E67E22;          /* Deep orange */
  --orange-dark: #D35400;     /* Darker orange */
  --radius: 12px;             /* Slightly more rounded */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 4px 20px rgba(212, 165, 116, 0.2);
}

html { direction: rtl; }

body {
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  background: #1A2332;
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  position: relative;
  min-height: 100vh;
}

/* Baghdad skyline background image */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    /* Dark overlay for better readability */
    linear-gradient(
      to bottom,
      rgba(26, 35, 50, 0.3) 0%,
      rgba(26, 35, 50, 0.2) 50%,
      rgba(26, 35, 50, 0.4) 100%
    ),
    /* Baghdad skyline image */
    url('/static/images/bkg2.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

/* Subtle geometric pattern overlay on body - Baghdad theme */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(212, 165, 116, 0.03) 40px,
      rgba(212, 165, 116, 0.03) 41px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(212, 165, 116, 0.03) 40px,
      rgba(212, 165, 116, 0.03) 41px
    );
  pointer-events: none;
  z-index: 1;
}

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

/* Layout */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* Header */
.header {
  height: 70px;
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 2px solid rgba(212, 165, 116, 0.2);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 32px rgba(212, 165, 116, 0.1);
}

/* Gold accent line under header */
.header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 165, 116, 0.6),
    rgba(230, 126, 34, 0.6),
    rgba(212, 165, 116, 0.6),
    transparent
  );
  opacity: 0.8;
}

.header-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #D4A574, #E67E22, #D4A574);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(212, 165, 116, 0.4);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(212, 165, 116, 0.3));
  letter-spacing: 2px;
  position: relative;
}

.logo::after {
  content: 'سين';
  position: absolute;
  left: 0;
  top: 0;
  background: linear-gradient(135deg, #D4A574, #E67E22);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: blur(12px);
  opacity: 0.5;
  z-index: -1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-link:hover {
  background: rgba(212, 165, 116, 0.1);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.25), rgba(230, 126, 34, 0.2));
  color: var(--gold);
  border: 1px solid rgba(212, 165, 116, 0.4);
  box-shadow:
    0 4px 16px rgba(212, 165, 116, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: all 0.3s;
}

.nav-link:hover svg {
  opacity: 1;
  transform: scale(1.1);
}

.nav-link.active svg {
  opacity: 1;
  color: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(212, 165, 116, 0.4));
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-logout:hover {
  background: rgba(199, 92, 74, 0.15);
  border-color: rgba(199, 92, 74, 0.3);
  color: var(--error);
}

/* Main */
.main {
  flex: 1;
  padding: 32px 24px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.page-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #FFFFFF, rgba(212, 165, 116, 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  letter-spacing: 0.5px;
}

/* Decorative gold underline on page title */
.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.4);
}

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

.stat-card {
  background: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(212, 165, 116, 0.25);
  border-radius: 20px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(212, 165, 116, 0.1);
}

/* Inner glow effect */
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(212, 165, 116, 0.08) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

/* Decorative corner accent */
.stat-card::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), transparent);
  border-radius: 0 20px 0 100%;
  opacity: 0;
  transition: opacity 0.35s;
}

.stat-card.clickable {
  cursor: pointer;
}

.stat-card.clickable:hover {
  border-color: rgba(212, 165, 116, 0.5);
  background: rgba(44, 62, 80, 0.75);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(212, 165, 116, 0.3),
    0 4px 24px rgba(212, 165, 116, 0.25);
  transform: translateY(-4px) scale(1.02);
}

.stat-card.clickable:hover::before,
.stat-card.clickable:hover::after {
  opacity: 1;
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.35s;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stat-purple .stat-icon {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.3), rgba(212, 165, 116, 0.15));
  color: var(--gold);
  border: 1px solid rgba(212, 165, 116, 0.3);
}
.stat-green .stat-icon {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.3), rgba(39, 174, 96, 0.15));
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.3);
}
.stat-amber .stat-icon {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.3), rgba(230, 126, 34, 0.15));
  color: var(--accent);
  border: 1px solid rgba(230, 126, 34, 0.3);
}
.stat-blue .stat-icon {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.15));
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.stat-card:hover .stat-icon {
  transform: scale(1.08) rotate(-2deg);
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-content { flex: 1; }

.stat-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, #FFFFFF, rgba(212, 165, 116, 0.9));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.shortcut-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: rgba(44, 62, 80, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid rgba(212, 165, 116, 0.2);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.shortcut-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.shortcut-card:hover {
  border-color: rgba(212, 165, 116, 0.4);
  background: rgba(44, 62, 80, 0.7);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 165, 116, 0.25),
    0 2px 16px rgba(212, 165, 116, 0.2);
  transform: translateY(-3px) scale(1.02);
}

.shortcut-card:hover::before {
  opacity: 1;
}

.shortcut-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s;
}

.shortcut-icon svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.shortcut-purple .shortcut-icon {
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.3), rgba(212, 165, 116, 0.15));
  color: var(--gold);
  border: 1px solid rgba(212, 165, 116, 0.3);
}
.shortcut-green .shortcut-icon {
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.3), rgba(39, 174, 96, 0.15));
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.3);
}
.shortcut-amber .shortcut-icon {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.3), rgba(230, 126, 34, 0.15));
  color: var(--accent);
  border: 1px solid rgba(230, 126, 34, 0.3);
}
.shortcut-blue .shortcut-icon {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.3), rgba(52, 152, 219, 0.15));
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.shortcut-card:hover .shortcut-icon {
  transform: scale(1.1) rotate(-3deg);
}

.shortcut-label {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.3px;
}

/* Cards */
.card {
  background: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(212, 165, 116, 0.2);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(212, 165, 116, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(26, 35, 50, 0.3);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.3px;
}

.card-body {
  padding: 24px;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
}

.category-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
}

.category-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.category-info { flex: 1; }

.category-name {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text);
}

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

.category-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tables */
.table-wrapper { overflow-x: auto; }

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

.table th,
.table td {
  padding: 12px 16px;
  text-align: right;
}

.table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.table td {
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.table tbody tr {
  transition: background 0.15s;
}

.table tbody tr:hover {
  background: rgba(212, 165, 116, 0.08);
}
.table tbody tr:last-child td { border-bottom: none; }

.table tr {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #1A2332;
  font-weight: 700;
  box-shadow:
    0 4px 16px rgba(212, 165, 116, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-primary:hover {
  box-shadow:
    0 6px 24px rgba(212, 165, 116, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px) scale(1.02);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: rgba(44, 62, 80, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(212, 165, 116, 0.25);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background: rgba(44, 62, 80, 0.8);
  border-color: rgba(212, 165, 116, 0.4);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 165, 116, 0.2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: none;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

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

.btn-danger:hover {
  background: rgba(199, 92, 74, 0.1);
}

.btn-warning {
  background: rgba(212, 168, 83, 0.15);
  color: var(--gold);
  border: 1px solid var(--border-gold);
}

.btn-warning:hover {
  background: rgba(212, 168, 83, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-icon {
  padding: 8px;
  width: 34px;
  height: 34px;
}

.btn-icon.btn-sm {
  width: 30px;
  height: 30px;
  padding: 6px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  border: 2px solid rgba(212, 165, 116, 0.2);
  border-radius: 12px;
  background: rgba(26, 35, 50, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow:
    0 0 0 4px rgba(212, 165, 116, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
  background: rgba(26, 35, 50, 0.7);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a7560' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 36px;
  cursor: pointer;
}

textarea.form-input {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

/* Code */
.code {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--gold);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-success { background: rgba(95, 168, 103, 0.12); color: #7cc486; border-color: rgba(95, 168, 103, 0.25); }
.badge-warning { background: rgba(212, 168, 83, 0.12); color: var(--gold); border-color: rgba(212, 168, 83, 0.25); }
.badge-error { background: rgba(199, 92, 74, 0.12); color: #d4776a; border-color: rgba(199, 92, 74, 0.25); }
.badge-primary { background: rgba(212, 168, 83, 0.12); color: var(--gold); border-color: rgba(212, 168, 83, 0.25); }
.badge-info { background: rgba(45, 138, 126, 0.12); color: #5bbcaf; border-color: rgba(45, 138, 126, 0.25); }
.badge-secondary { background: var(--bg-secondary); color: var(--text-muted); border-color: var(--border); }

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

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.empty-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Play Button */
.play-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #1a1714;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(212, 168, 83, 0.3);
}

.play-btn:hover {
  box-shadow: 0 4px 16px rgba(212, 168, 83, 0.4);
  transform: scale(1.08);
}

.play-btn svg {
  width: 14px;
  height: 14px;
}

/* Track Cell */
.track-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-title { font-weight: 500; color: var(--text); }

/* User Cell */
.user-cell { display: flex; flex-direction: column; }
.user-name { font-weight: 500; color: var(--text); }
.user-email { font-size: 12px; color: var(--text-muted); }

/* Actions */
.actions {
  display: flex;
  gap: 4px;
}

/* Login Page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

/* Baghdad geometric pattern on login background */
.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(212, 165, 116, 0.03) 60px,
      rgba(212, 165, 116, 0.03) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(212, 165, 116, 0.03) 60px,
      rgba(212, 165, 116, 0.03) 61px
    ),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 42px,
      rgba(212, 165, 116, 0.02) 42px,
      rgba(212, 165, 116, 0.02) 43px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 42px,
      rgba(212, 165, 116, 0.02) 42px,
      rgba(212, 165, 116, 0.02) 43px
    );
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(44, 62, 80, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 2px solid rgba(212, 165, 116, 0.3);
  border-radius: 24px;
  box-shadow:
    0 16px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(212, 165, 116, 0.2);
  padding: 48px;
  position: relative;
  z-index: 3;
}

/* Gold accent arch at top of login card */
.login-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--accent), var(--gold), transparent);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(212, 165, 116, 0.4);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #D4A574, #E67E22, #D4A574);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 30px rgba(212, 165, 116, 0.4));
  letter-spacing: 2px;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}

.login-form .btn {
  width: 100%;
  height: 44px;
  margin-top: 20px;
}

.login-error {
  background: rgba(199, 92, 74, 0.12);
  border: 1px solid rgba(199, 92, 74, 0.3);
  color: #d4776a;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.alert-info { background: rgba(45, 138, 126, 0.1); color: #5bbcaf; border-color: rgba(45, 138, 126, 0.2); }
.alert-success { background: rgba(95, 168, 103, 0.1); color: #7cc486; border-color: rgba(95, 168, 103, 0.2); }
.alert-warning { background: rgba(212, 168, 83, 0.1); color: var(--gold); border-color: rgba(212, 168, 83, 0.2); }
.alert-error { background: rgba(199, 92, 74, 0.1); color: #d4776a; border-color: rgba(199, 92, 74, 0.2); }

.alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

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

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.modal-body { padding: 20px; }

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.filter-input { width: 240px; }
.filter-select { width: 160px; }

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-success { color: #7cc486; }
.text-warning { color: var(--gold); }
.text-error { color: #d4776a; }
.text-primary { color: var(--gold); }
.font-mono { font-family: 'IBM Plex Mono', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Hide menu toggle on desktop */
.menu-toggle { display: none; }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid,
  .shortcuts-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid,
  .shortcuts-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .header { padding: 0 16px; }

  .nav {
    position: fixed;
    top: 60px;
    right: 0;
    left: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }

  .nav.open { display: flex; }

  .nav-link {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    border-radius: 8px;
  }

  .menu-toggle:hover { background: var(--bg-hover); }

  .menu-toggle svg {
    width: 24px;
    height: 24px;
  }

  .btn-logout span { display: none; }

  .filters { flex-direction: column; }
  .filter-input,
  .filter-select { width: 100%; }

  .main { padding: 24px 16px; }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
}

/* Spin animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 1s linear infinite;
}

/* Additional badge styles */
.badge-danger { background: rgba(199, 92, 74, 0.12); color: #d4776a; border-color: rgba(199, 92, 74, 0.25); }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: rgba(212, 168, 83, 0.3);
  color: var(--text);
}
