@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Design System - Premium Dark Mode & Modern CSS
   ========================================================================== */

:root {
  /* Color Palette - Professional Dark/Slate tones */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-primary: #3b82f6;
  --accent-hover: #2563eb;
  --accent-danger: #ef4444;
  --accent-danger-hover: #dc2626;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 12px;

  /* Typography */
  --font-family: 'Prompt', sans-serif;
  
  /* Layout */
  --container-max: 1280px;
  --nav-height: 70px;
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  
  /* Shadows & Transitions */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --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-glow: 0 0 20px rgba(59, 130, 246, 0.15);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.main-wrapper {
  flex: 1;
  background: radial-gradient(circle at top right, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
  padding: 2rem 1rem;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 1rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 300;
}

/* ==========================================================================
   Navigation Bar (Glassmorphism)
   ========================================================================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  padding: 0 2rem;
  height: var(--nav-height);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.logo img {
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.5rem;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Menu */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  animation: fadeIn 0.2s ease;
  z-index: 1001;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-primary);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

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

/* ==========================================================================
   Cards & Grid Display
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(59, 130, 246, 0.3);
}

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

.card-header {
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.8rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-content {
  flex-grow: 1;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px; /* for scrollbar spacing */
}

/* Custom Scrollbar for Card Content */
.card-content::-webkit-scrollbar {
  width: 6px;
}
.card-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
}
.card-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
}
.card-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.card-content img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius-md);
  transition: transform var(--transition-normal);
}

.card-content:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--accent-primary);
  color: #fff !important;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  gap: 8px;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn-danger-custom {
  background: var(--accent-danger);
}

.btn-danger-custom:hover {
  background: var(--accent-danger-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary) !important;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: #475569;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 1rem;
    height: auto;
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  
  .header h1 {
    font-size: 2rem;
  }

  .dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 5px;
    background: rgba(255,255,255,0.02);
    box-shadow: none;
    border: none;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius-sm);
  margin-top: 1rem;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.modern-table th,
.modern-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.modern-table thead th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.modern-table tbody tr {
  transition: background var(--transition-fast);
}

.modern-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.modern-table tbody td {
  color: var(--text-secondary);
}

/* Custom Pagination styling */
.pagination-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.page-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.page-btn.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
  cursor: default;
}
