:root {
  --primary-color: #6b21a8;
  /* Deep Purple */
  --primary-hover: #7e22ce;
  --secondary-color: #2dd4bf;
  /* Cyber Teal */
  --accent-color: #f43f5e;
  /* Rose accent */
  --success-color: #107c10;
  --danger-color: #d13438;
  --warning-color: #ffb900;
  --dark-bg: #0f172a;
  /* Deep Slate */
  --light-bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.05);
  /* Glass base */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-hover: 0 8px 32px 0 rgba(107, 33, 168, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top right, #1e1b4b, #0f172a, #020617);
  min-height: 100vh;
  color: var(--text-primary);
  background-attachment: fixed;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  padding: 0.75rem 0;
}

.navbar-brand {
  font-weight: 700;
  color: var(--secondary-color) !important;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
  color: #cbd5e1;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.3s;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color);
}

/* Login Page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 3.5rem;
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo h1 {
  color: var(--secondary-color);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.login-logo p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  font-size: 1rem;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.1);
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, #4c1d95 100%);
  border: none;
  border-radius: 10px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s;
  width: 100%;
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(107, 33, 168, 0.3);
}

.btn-outline-secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  border-radius: 10px;
  padding: 0.85rem;
  transition: all 0.3s;
}

.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #a4262c;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-color);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s;
}

.btn-success:hover {
  background: #0b5a0b;
  transform: translateY(-2px);
}

/* Dashboard */
.dashboard-container {
  background: transparent;
  min-height: 100vh;
  padding-top: 100px;
}

.dashboard-header {
  background: transparent;
  padding: 3rem 0;
  margin-bottom: 1rem;
}

.dashboard-header h1 {
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-header p {
  color: var(--text-secondary);
  margin: 0;
}

/* Report Cards */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 1rem 2rem;
}

.report-card {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.report-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 0 15px rgba(45, 212, 191, 0.2);
  border-color: rgba(45, 212, 191, 0.3);
  text-decoration: none;
}

.report-card-thumbnail {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, rgba(107, 33, 168, 0.2) 0%, rgba(45, 212, 191, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--secondary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.report-card-thumbnail i {
  opacity: 0.8;
}

.report-card-body {
  padding: 1.5rem;
}

.report-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.report-card-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-category {
  display: inline-block;
  background: rgba(45, 212, 191, 0.1);
  color: var(--secondary-color);
  padding: 0.25rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Report Viewer */
.report-viewer {
  background: var(--dark-bg);
  min-height: 100vh;
  padding-top: 60px;
}

.report-controls {
  background: var(--card-bg);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-embed-container {
  width: 100%;
  height: calc(100vh - 120px);
  background: white;
}

#reportContainer {
  width: 100%;
  height: 100%;
  border: none;
}

/* Admin Tables */
.admin-container {
  background: var(--light-bg);
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 2rem;
}

.admin-header {
  background: var(--card-bg);
  padding: 2rem 0;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.table-container {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  border-bottom: 2px solid var(--primary-color);
  color: var(--text-primary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: background-color 0.2s;
}

.table tbody tr:hover {
  background-color: var(--light-bg);
}

.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-success {
  background-color: var(--success-color);
}

.badge-danger {
  background-color: var(--danger-color);
}

.badge-primary {
  background-color: var(--primary-color);
}

/* Modal */
.modal-content {
  border-radius: 12px;
  border: none;
}

.modal-header {
  background: var(--primary-color);
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.5s ease;
}

/* Alert */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-danger {
  background-color: #fde7e9;
  color: var(--danger-color);
}

.alert-success {
  background-color: #dff6dd;
  color: var(--success-color);
}

/* Responsive */
@media (max-width: 768px) {
  .reports-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 2rem;
  }

  .dashboard-header h1 {
    font-size: 1.75rem;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.empty-state p {
  margin-bottom: 1.5rem;
}