/* File: public/assets/css/main.css - COMPLETELY NEW MODERN DESIGN */
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* Modern IBTSM Color System */
:root {
  --ibtsm-primary: #031A61;
  --ibtsm-primary-light: #1a307a;
  --ibtsm-primary-dark: #021141;
  --ibtsm-secondary: #007BFF;
  --ibtsm-accent: #00D4AA;
  --ibtsm-success: #10B981;
  --ibtsm-warning: #F59E0B;
  --ibtsm-error: #EF4444;
  --ibtsm-gray-50: #F8FAFC;
  --ibtsm-gray-100: #F1F5F9;
  --ibtsm-gray-200: #E2E8F0;
  --ibtsm-gray-500: #64748B;
  --ibtsm-gray-700: #334155;
  --ibtsm-gray-900: #0F172A;
}

/* Base Styles - Modern Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: var(--ibtsm-gray-900);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] {
  font-family: 'Tajawal', 'Inter', sans-serif;
}

/* Modern Sidebar Design */
.modern-sidebar {
  background: linear-gradient(180deg, var(--ibtsm-primary) 0%, var(--ibtsm-primary-dark) 100%);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
  padding: 1rem 0.75rem;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
  padding: 0 0.75rem;
}

.nav-item {
  position: relative;
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(-2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(0, 212, 170, 0.2);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--ibtsm-accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* Modern Header */
.modern-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ibtsm-gray-200);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.search-container {
  position: relative;
  max-width: 28rem;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--ibtsm-gray-200);
  border-radius: 0.75rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  border-color: var(--ibtsm-primary);
  box-shadow: 0 0 0 3px rgba(3, 26, 97, 0.1);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--ibtsm-gray-500);
}

/* Modern Cards */
.modern-card {
  background: white;
  border-radius: 1rem;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--ibtsm-gray-100);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modern-card:hover {
  box-shadow:
    0 10px 25px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

/* Stat Cards */
.stat-card {
  position: relative;
  padding: 1.5rem;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
}

.stat-card.primary {
  --gradient-from: #031A61;
  --gradient-to: #1a307a;
}

.stat-card.success {
  --gradient-from: #10B981;
  --gradient-to: #059669;
}

.stat-card.warning {
  --gradient-from: #F59E0B;
  --gradient-to: #D97706;
}

.stat-card.accent {
  --gradient-from: #00D4AA;
  --gradient-to: #00B894;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ibtsm-gray-900);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ibtsm-gray-700);
  margin-bottom: 0.5rem;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}

.stat-change.positive {
  color: var(--ibtsm-success);
}

.stat-change.negative {
  color: var(--ibtsm-error);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  color: white;
  margin-bottom: 1rem;
}

/* Tables */
.modern-table {
  width: 100%;
  border-collapse: collapse;
}

.modern-table th {
  padding: 1rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ibtsm-gray-700);
  background: var(--ibtsm-gray-50);
  border-bottom: 1px solid var(--ibtsm-gray-200);
}

.modern-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--ibtsm-gray-100);
  vertical-align: middle;
}

.modern-table tr:hover {
  background: var(--ibtsm-gray-50);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}

.status-badge.completed {
  background: #DCFCE7;
  color: #166534;
}

.status-badge.pending {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge.in-progress {
  background: #DBEAFE;
  color: #1E40AF;
}

.status-badge.rejected {
  background: #FEE2E2;
  color: #991B1B;
}

/* Quick Actions */
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--ibtsm-gray-200);
  background: white;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: var(--ibtsm-gray-700);
}

.quick-action:hover {
  border-color: var(--ibtsm-primary);
  box-shadow: 0 4px 12px rgba(3, 26, 97, 0.1);
  transform: translateY(-2px);
  color: var(--ibtsm-primary);
}

.quick-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--ibtsm-primary), var(--ibtsm-primary-light));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Notifications */
.notification-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  background: var(--ibtsm-error);
  border: 2px solid white;
  border-radius: 50%;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .stat-value {
    font-size: 1.5rem;
  }

  .modern-card {
    border-radius: 0.75rem;
  }

  .sidebar-nav {
    padding: 0.75rem 0.5rem;
  }

  .nav-link {
    padding: 0.625rem;
  }
}

/* Utilities */
.gradient-primary {
  background: linear-gradient(135deg, var(--ibtsm-primary), var(--ibtsm-primary-light));
}

.gradient-accent {
  background: linear-gradient(135deg, var(--ibtsm-accent), #00B894);
}

.text-gradient {
  background: linear-gradient(135deg, var(--ibtsm-primary), var(--ibtsm-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}