@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  overflow: hidden;
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  font-size: 18px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
  color: #e2e8f0;
}

.navbar .logo:hover {
  color: #60a5fa;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #60a5fa;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: rgba(96, 165, 250, 0.2);
}

/* Profile Dropdown */
.profile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: #e2e8f0;
}

.dropbtn {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.dropbtn:hover {
  background: rgba(96, 165, 250, 0.2);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(71, 85, 105, 0.3);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 101;
}

.profile:hover .dropdown-content {
  display: flex;
  flex-direction: column;
}

.dropdown-content a {
  text-decoration: none;
  color: #cbd5e1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 400;
  transition: all 0.3s ease;
}

.dropdown-content a:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

/* Layout */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  padding: 32px 24px;
  color: #e2e8f0;
  border-right: 1px solid rgba(71, 85, 105, 0.3);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  height: calc(100vh - 81px);
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 81px;
}

/* Dropdowns */
.dropdown-toggle {
  background: linear-gradient(135deg, #334155, #1e293b);
  color: #e2e8f0;
  border: 1px solid rgba(100, 116, 139, 0.6);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dropdown-toggle:hover {
  background: linear-gradient(135deg, #475569, #334155);
  border-color: #60a5fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.dropdown-menu {
  display: none;
  flex-direction: column;
  margin-top: 12px;
  padding-left: 16px;
  gap: 4px;
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  text-decoration: none;
  padding: 12px 16px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-radius: 8px;
  margin: 2px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 400;
  border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border-left-color: #60a5fa;
  transform: translateX(4px);
}

.dropdown-menu a.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  border-left-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Main Content */
.main-content {
  flex: 1;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 48px;
  overflow-y: auto;
}

/* Cards */
.card-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  padding: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(71, 85, 105, 0.3);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: 20px 20px 0 0;
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card.student {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 197, 253, 0.2));
}

.card.student::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.card.category {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.2));
}

.card.category::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.card.book {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.2));
}

.card.book::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.card h2 {
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 15px;
  color: #94a3b8;
  font-weight: 400;
}

/* Table */
table {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-collapse: collapse;
  border: 1px solid rgba(71, 85, 105, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  overflow: hidden;
}

th, td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

th {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: #cbd5e1;
  font-weight: 400;
}

tr:hover {
  background: rgba(96, 165, 250, 0.1);
}

/* Tabs */
.tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  background: rgba(15, 23, 42, 0.8);
  padding: 6px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(71, 85, 105, 0.4);
}

.tab-buttons button {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 14px;
}

.tab-buttons button:hover {
  background: rgba(96, 165, 250, 0.2);
  color: #60a5fa;
}

.tab-buttons button.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .main-content {
    padding: 32px;
  }
  
  .sidebar {
    width: 260px;
  }
}

@media screen and (max-width: 992px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: fixed;
    width: 100%;
    top: 81px;
    left: -100%;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: calc(100vh - 81px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  }

  .sidebar.active {
    left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .main-content {
    padding: 24px;
  }

  .navbar {
    padding: 16px 24px;
  }

  .card-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile {
    font-size: 14px;
  }

  .dropdown-content {
    min-width: 100px;
  }
}

@media screen and (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  
  .navbar .logo {
    font-size: 1.5rem;
  }

  .main-content {
    padding: 16px;
  }

  .card {
    padding: 20px;
  }

  .tab-buttons {
    flex-wrap: wrap;
  }

  th, td {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .card-section {
    margin-bottom: 24px;
  }

  .card h2 {
    font-size: 18px;
  }

  .card p {
    font-size: 14px;
  }

  .tab-buttons button {
    padding: 10px 16px;
    font-size: 13px;
  }

  .profile {
    font-size: 13px;
  }

  .dropbtn {
    font-size: 12px;
    padding: 4px;
  }

  .dropdown-content a {
    font-size: 13px;
    padding: 8px 12px;
  }
}