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

:root {
  --primary-color: #4f46e5;
  /* Indigo 600 */
  --primary-light: #818cf8;
  /* Indigo 400 */
  --primary-dark: #3730a3;
  /* Indigo 800 */
  --secondary-color: #0f172a;
  /* Slate 900 */
  --accent-color: #38bdf8;
  /* Sky 400 */

  --bg-light: #f8fafc;
  /* Slate 50 */
  --bg-white: #ffffff;

  --text-dark: #1e293b;
  /* Slate 800 */
  --text-muted: #64748b;
  /* Slate 500 */

  --status-open: #f59e0b;
  /* amber */
  --status-processing: #3b82f6;
  /* blue */
  --status-completed: #10b981;
  /* green */
  --status-closed: #6b7280;
  /* gray */

  --danger: #ef4444;
  /* red 500 */
  --success: #10b981;
  /* emerald 500 */

  --font-family: 'Cairo', sans-serif;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

[data-theme="dark"] {
  --bg-light: #0f172a;
  --bg-white: #1e293b;
  --text-dark: #f8fafc;
  --text-muted: #94a3b8;
  --secondary-color: #0f172a;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-dark);
  direction: rtl;
  /* Arabic RTL */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-family);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  font-size: 0.95rem;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-light);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(79, 70, 229, 0.05);
  border-color: var(--primary-color);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
}

.badge {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
}

.badge.status-open {
  background-color: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.badge.status-processing {
  background-color: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.badge.status-completed {
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.badge.status-closed {
  background-color: rgba(107, 114, 128, 0.15);
  color: #4b5563;
}

.badge.sla-late {
  background-color: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.badge.sla-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.badge.sla-good {
  background-color: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--glass-shadow);
  border-radius: var(--border-radius-lg);
}

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

.text-danger {
  color: var(--danger);
}

.text-success {
  color: var(--success);
}

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

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.d-none {
  display: none !important;
}