/* ============================================================
   ADMIN DASHBOARD — Cozy Premium Academic Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* TCU Inspired Palette */
  --primary-red: #800000;
  --secondary-red: #5b0000;
  --bg-light: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
  --sidebar-width: 280px;
  --header-height: 70px;
  --accent-color: #f8fafc;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --tcu-gold: #c5b358;
}

body {
  background-color: var(--bg-light) !important;
  color: var(--text-dark) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  margin: 0;
  overflow-x: hidden;
}

/* ============================================================
   ADMIN PAGE LAYOUT (base.html modifications)
   ============================================================ */
body.admin-page {
  overflow: hidden;
}

body.admin-page .main-content {
  margin-top: var(--header-height) !important;
  padding: 0 !important;
  height: calc(100vh - var(--header-height)) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body.admin-page .main-footer,
body.admin-page footer {
  display: none !important;
}

.admin-layout {
  display: flex !important;
  height: 100% !important;
  background: var(--bg-light) !important;
  position: relative;
  flex: 1;
  overflow: hidden;
}

.dashboard-header {
  position: relative !important;
  z-index: 1002 !important;
}

/* ============================================================
   ADMIN SIDEBAR
   ============================================================ */
.admin-sidebar {
  width: var(--sidebar-width) !important;
  background: #ffffff !important;
  border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  top: var(--header-height) !important;
  left: 0 !important;
  bottom: 0 !important;
  height: calc(100vh - var(--header-height)) !important;
  padding: 1.5rem 0 0 !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02) !important;
  z-index: 900 !important;
  overflow-y: auto !important;
}

.admin-sidebar::-webkit-scrollbar {
  width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 4px;
}

.sidebar-header {
  padding: 0 1.5rem 1.5rem !important;
  margin-bottom: 0.5rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.sidebar-header h2 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: var(--primary-red) !important;
  letter-spacing: -0.5px !important;
  margin: 0 !important;
  text-transform: uppercase;
}

.section-title {
  padding: 1.2rem 1.5rem 0.4rem !important;
  font-size: 0.68rem !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
}

.sidebar-nav ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sidebar-nav a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  color: #475569 !important;
  text-decoration: none !important;
  padding: 0.75rem 1.25rem !important;
  margin: 0.15rem 0.75rem !important;
  border-radius: 12px !important;
  transition: var(--transition) !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
}

.sidebar-nav a i {
  font-size: 1rem !important;
  width: 20px !important;
  text-align: center !important;
  opacity: 0.8;
}

.sidebar-nav a:hover {
  background: rgba(128, 0, 0, 0.05) !important;
  color: var(--primary-red) !important;
  transform: translateX(4px) !important;
}

.sidebar-nav a:hover i {
  opacity: 1;
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, #a31d23 0%, #7b0d11 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(163, 29, 35, 0.18) !important;
}

.sidebar-nav a.active i {
  opacity: 1;
}

/* ============================================================
   MAIN CONTENT AREA (Cozy Layout Overlay)
   ============================================================ */
.admin-main {
  margin-left: var(--sidebar-width) !important;
  flex: 1 !important;
  padding: 2.5rem !important;
  height: calc(100vh - var(--header-height));
  overflow-y: auto !important;
  max-width: calc(100vw - var(--sidebar-width)) !important;
  box-sizing: border-box !important;
  background: var(--bg-light) !important;
  position: relative;
}

/* Cozy dot grid in admin workspace */
.admin-main::after {
  content: '';
  position: fixed;
  inset: 0;
  margin-left: var(--sidebar-width);
  background-image: radial-gradient(rgba(197, 179, 88, 0.06) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

/* Cozy ambient glows on admin panel */
.admin-main::before {
  content: '';
  position: fixed;
  inset: 0;
  margin-left: var(--sidebar-width);
  background: 
    radial-gradient(circle at 10% 20%, rgba(128, 0, 0, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(197, 179, 88, 0.04) 0%, transparent 48%);
  pointer-events: none;
  z-index: 0;
}

/* Force inner layouts to stack above the glows */
.admin-main > * {
  position: relative;
  z-index: 1;
}

.dashboard-header {
  margin-bottom: 2rem !important;
  text-align: left !important;
}

.dashboard-header h1 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: var(--text-dark) !important;
  margin: 0 0 0.4rem 0 !important;
  letter-spacing: -0.5px !important;
}

.dashboard-header p {
  color: var(--text-muted) !important;
  font-size: 1rem !important;
  margin: 0;
}

/* ============================================================
   BENTO STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 1.25rem !important;
  margin-bottom: 2rem !important;
}

.stat-card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 18px !important;
  padding: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  text-align: left !important;
  transition: var(--transition) !important;
  box-shadow: var(--card-shadow) !important;
}

.stat-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(163, 29, 35, 0.15) !important;
}

.stat-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: 1.4rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: rgba(163, 29, 35, 0.08) !important;
  color: #a31d23 !important;
  margin-bottom: 0 !important;
}

/* Stagger icon colors for modern look */
.stats-grid .stat-card:nth-child(2) .stat-icon {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #3b82f6 !important;
}
.stats-grid .stat-card:nth-child(3) .stat-icon {
  background: rgba(245, 158, 11, 0.08) !important;
  color: #f59e0b !important;
}
.stats-grid .stat-card:nth-child(4) .stat-icon {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #10b981 !important;
}
.stats-grid .stat-card:nth-child(5) .stat-icon {
  background: rgba(139, 92, 246, 0.08) !important;
  color: #8b5cf6 !important;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-info h2 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.8rem !important;
  font-weight: 800 !important;
  color: var(--text-dark) !important;
  margin: 0 !important;
  letter-spacing: -0.5px !important;
  line-height: 1.1;
}

.stat-info p {
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
}

/* ============================================================
   BENTO SECTIONS & CHARTS
   ============================================================ */
.dashboard-section {
  background: #ffffff !important;
  border-radius: 18px !important;
  padding: 2rem !important;
  box-shadow: var(--card-shadow) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 2rem !important;
}

.dashboard-section h2 {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin: 0 0 0.25rem 0 !important;
}

.dashboard-section p {
  margin-bottom: 1.5rem !important;
  color: var(--text-muted) !important;
}

canvas {
  margin-top: 0.5rem !important;
}

/* ============================================================
   RECENT ACTIVITY LIST
   ============================================================ */
#recent-activity {
  background: transparent !important;
  border: none !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

#recent-activity::-webkit-scrollbar {
  width: 4px;
}

#recent-activity::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
}

.activity-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 0.9rem 1.1rem !important;
  margin-bottom: 0.75rem !important;
  background: #f8fafc !important;
  border-radius: 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.03) !important;
  transition: var(--transition) !important;
}

.activity-item:hover {
  background: #ffffff !important;
  border-color: rgba(163, 29, 35, 0.15) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02) !important;
  transform: translateX(4px) !important;
}

.status-badge {
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px;
}

.status-approved {
  background: rgba(16, 185, 129, 0.08) !important;
  color: #059669 !important;
}

.status-pending {
  background: rgba(245, 158, 11, 0.08) !important;
  color: #d97706 !important;
}

.status-rejected {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #dc2626 !important;
}

/* ============================================================
   ADMIN TABLES (Minimalist Bento Style)
   ============================================================ */
.admin-table-container {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: var(--card-shadow) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
  margin-top: 1.5rem !important;
  position: relative;
  z-index: 1;
}

.admin-table {
  width: 100% !important;
  border-collapse: collapse !important;
  text-align: left !important;
  font-size: 0.85rem !important;
}

.admin-table th {
  background: #f8fafc !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.5px !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.admin-table td {
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
  color: var(--text-dark) !important;
  vertical-align: middle !important;
}

.admin-table tr:last-child td {
  border-bottom: none !important;
}

.admin-table tbody tr {
  transition: background 0.2s ease !important;
}

.admin-table tbody tr:hover {
  background: rgba(163, 29, 35, 0.015) !important;
}

/* ============================================================
   FORMS, SEARCH & INPUTS
   ============================================================ */
.search-box-container {
  margin-bottom: 1.5rem !important;
  position: relative !important;
}

input[type="text"].admin-search-input {
  width: 100% !important;
  max-width: 380px !important;
  padding: 10px 14px 10px 38px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  font-size: 0.85rem !important;
  outline: none !important;
  transition: var(--transition) !important;
}

input[type="text"].admin-search-input:focus {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 0 3px rgba(163, 29, 35, 0.08) !important;
}

.search-box-container i {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--text-muted) !important;
  font-size: 0.88rem !important;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 10px 12px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  font-size: 0.85rem !important;
  color: var(--text-dark) !important;
  outline: none !important;
  box-sizing: border-box;
  transition: var(--transition) !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 0 3px rgba(163, 29, 35, 0.08) !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-admin-primary {
  background: linear-gradient(135deg, #a31d23 0%, #7b0d11 100%) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 10px 20px !important;
  border-radius: 10px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 12px rgba(163, 29, 35, 0.15) !important;
  transition: var(--transition) !important;
  text-decoration: none !important;
}

.btn-admin-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(163, 29, 35, 0.25) !important;
}

.btn-admin-secondary {
  background: #ffffff !important;
  color: var(--text-dark) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  padding: 9px 18px !important;
  border-radius: 10px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: var(--transition) !important;
  text-decoration: none !important;
}

.btn-admin-secondary:hover {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 80px;
  }

  .sidebar-header,
  .section-title,
  .sidebar-nav span,
  .user-name-text {
    display: none !important;
  }

  .sidebar-nav a {
    justify-content: center !important;
    padding: 0.8rem !important;
    margin: 0.2rem 0.5rem !important;
  }

  .sidebar-nav a i {
    width: auto !important;
  }

  .admin-main::after,
  .admin-main::before {
    margin-left: var(--sidebar-width);
  }
}

@media (max-width: 768px) {
  body.admin-page {
    overflow: auto !important;
  }

  body.admin-page .main-content {
    height: auto !important;
    overflow: visible !important;
  }

  .admin-layout {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }

  .admin-sidebar {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    border-right: none !important;
    border-bottom: 2px solid #f0f0f0 !important;
  }

  .admin-main {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    height: auto !important;
    overflow-y: visible !important;
  }

  .admin-main::after,
  .admin-main::before {
    margin-left: 0 !important;
  }
}

.highlight {
  background-color: #fef08a !important; /* Soft yellow highlight */
  color: #854d0e !important;
  border-radius: 4px !important;
  padding: 0 4px !important;
}

/* --- ROLE NAVIGATION TABS --- */
.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 0px;
  position: relative;
}

.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-muted);
  border: 1px solid transparent;
  border-bottom: none;
  transition: var(--transition);
  position: relative;
  top: 1px;
}

.role-tab:hover {
  background: rgba(163, 29, 35, 0.03);
  color: var(--primary-red);
}

.role-tab.active {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.05) rgba(0, 0, 0, 0.05) transparent;
  color: var(--primary-red);
}

.role-tab .tab-count {
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.role-tab.active .tab-count {
  background: rgba(163, 29, 35, 0.08);
  color: var(--primary-red);
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-admin { background: #ef4444; }
.dot-librarian { background: #3b82f6; }
.dot-professor { background: #8b5cf6; }
.dot-student { background: #10b981; }

.tab-panel {
  display: none !important;
}

.tab-panel.active {
  display: block !important;
}

/* --- ADMIN DROPDOWNS --- */
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px !important;
  z-index: 1001;
  min-width: 220px;
  padding: 8px 0 !important;
  margin-top: 5px;
}

.dropdown-content a {
  display: block;
  padding: 10px 20px !important;
  text-decoration: none !important;
  color: var(--text-dark) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: var(--transition) !important;
}

.dropdown-content a:hover {
  background: rgba(163, 29, 35, 0.05) !important;
  color: var(--primary-red) !important;
}

/* --- TABLE ROW AVATARS & DETAILS --- */
.td-username {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
}

.user-avatar {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 0.8rem !important;
  color: #ffffff !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.avatar-admin { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important; }
.avatar-librarian { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important; }
.avatar-professor { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important; }
.avatar-student { background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important; }

/* --- TABLE ACTIONS --- */
.btn-edit {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #3b82f6 !important;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: var(--transition) !important;
}

.btn-edit:hover {
  background: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25) !important;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.08) !important;
  color: #dc2626 !important;
  border: 1px solid rgba(239, 68, 68, 0.15) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: var(--transition) !important;
}

.btn-delete:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25) !important;
}

/* ============================================================
   BENTO GRID & LIBRARY CARDS OVERRIDES (Categories.css consistency)
   ============================================================ */
.cat-thesis-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 1.5rem;
  padding: 0 !important;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.cat-thesis-item {
  display: flex !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.015);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  min-height: 220px !important;
}

.cat-thesis-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.05) !important;
}

/* Department Cover Gradients for Thesis Cards */
.cat-thesis-item-cover.dept-graduate { background: linear-gradient(160deg, #0ea5e9 0%, #0c4a6e 100%) !important; } /* Light Blue */
.cat-thesis-item-cover.dept-ce       { background: linear-gradient(160deg, #2563eb 0%, #1e3a8a 100%) !important; } /* Blue */
.cat-thesis-item-cover.dept-cict     { background: linear-gradient(160deg, #7c3aed 0%, #2e1065 100%) !important; } /* Violet */
.cat-thesis-item-cover.dept-cas      { background: linear-gradient(160deg, #9ca3af 0%, #4b5563 100%) !important; } /* White/Silver */
.cat-thesis-item-cover.dept-cbm      { background: linear-gradient(160deg, #fbbf24 0%, #92400e 100%) !important; } /* Light Yellow */
.cat-thesis-item-cover.dept-ccj      { background: linear-gradient(160deg, #800000 0%, #3b0000 100%) !important; } /* Maroon */
.cat-thesis-item-cover.dept-chtm     { background: linear-gradient(160deg, #16a34a 0%, #052e16 100%) !important; } /* Green */
.cat-thesis-item-cover.dept-cet      { background: linear-gradient(160deg, #ea580c 0%, #7c2d12 100%) !important; } /* Orange */
.cat-thesis-item-cover.dept-ippg     { background: linear-gradient(160deg, #dc2626 0%, #7f1d1d 100%) !important; } /* Red */
.cat-thesis-item-cover.dept-coll     { background: linear-gradient(160deg, #800000 0%, #450a0a 100%) !important; }

/* Status Badges */
.bento-status-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bento-status-pending {
  background: #fff3e0;
  color: #e65100;
}

.bento-status-approved {
  background: #e8f5e9;
  color: #1b5e20;
}

.bento-status-rejected {
  background: #ffebee;
  color: #c62828;
}

/* Call Label Spine Sticker style */
.library-call-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: #333;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  text-align: center;
  min-width: 85px;
}

.library-call-label .call-prefix {
  font-size: 0.55rem;
  color: #888;
  border-bottom: 1px solid #eee;
  width: 100%;
  margin-bottom: 2px;
  padding-bottom: 2px;
}

/* Rejection Bubble */
.bento-rejection-bubble {
  background: #fdf2f2;
  border: 1px solid #fde2e2;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 0.74rem;
  color: #9b1c1c;
}

.bento-rejection-bubble strong {
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}

.bento-rejection-bubble p {
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Button Actions Override */
.bento-card-actions {
  display: flex;
  gap: 6px;
}

.bento-btn-approve,
.bento-btn-reject,
.bento-btn-view {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bento-btn-approve {
  background: #2e7d32;
  color: white;
}

.bento-btn-approve:hover {
  background: #1b5e20;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
}

.bento-btn-reject {
  background: #c62828;
  color: white;
}

.bento-btn-reject:hover {
  background: #b71c1c;
  box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
}

.bento-btn-view {
  background: rgba(25, 118, 210, 0.08);
  color: #1976d2;
}

.bento-btn-view:hover {
  background: #1976d2;
  color: white;
}

/* ============================================================
   ORGANIZATION BENTO SECTIONS (Categories, Depts, Courses)
   ============================================================ */
.org-layout-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 992px) {
  .org-layout-container {
    grid-template-columns: 1fr;
  }
}

/* Form Card */
.org-form-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.org-form-card::-webkit-scrollbar {
  width: 4px;
}

.org-form-card::-webkit-scrollbar-track {
  background: transparent;
}

.org-form-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.org-form-card::-webkit-scrollbar-thumb:hover {
  background: rgba(163, 29, 35, 0.2);
}

.org-form-card h3 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d3436;
  margin-top: 0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-form-group {
  margin-bottom: 1.25rem;
}

.org-form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #636e72;
  margin-bottom: 6px;
}

.org-form-input,
.org-form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #2d3436;
  background: #ffffff;
  transition: all 0.2s ease;
}

.org-form-input:focus,
.org-form-select:focus {
  outline: none;
  border-color: #a31d23;
  box-shadow: 0 0 0 3px rgba(163, 29, 35, 0.1);
}

.org-form-btn {
  width: 100%;
  background: linear-gradient(135deg, #a31d23, #7b0d11);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.org-form-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(163, 29, 35, 0.25);
}

/* Bento Grid and Cards */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.org-bento-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.015);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  min-height: 155px;
  position: relative;
  overflow: hidden;
}

.org-bento-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: rgba(163, 29, 35, 0.2);
  transition: background 0.25s ease;
}

.org-bento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.04);
  border-color: rgba(163, 29, 35, 0.15);
}

.org-bento-card:hover::before {
  background: #a31d23;
}

/* Org Bento Card Top-Bar Accents */
.org-bento-card.dept-graduate::before { background-color: #0ea5e9; } /* Light Blue */
.org-bento-card.dept-cict::before     { background-color: #7c3aed; } /* Violet */
.org-bento-card.dept-cas::before      { background-color: #9ca3af; } /* White/Silver */
.org-bento-card.dept-chtm::before     { background-color: #16a34a; } /* Green */
.org-bento-card.dept-cbm::before      { background-color: #fbbf24; } /* Light Yellow */
.org-bento-card.dept-ccj::before      { background-color: #800000; } /* Maroon */
.org-bento-card.dept-cet::before      { background-color: #ea580c; } /* Orange */
.org-bento-card.dept-ce::before       { background-color: #2563eb; } /* Blue */
.org-bento-card.dept-ippg::before     { background-color: #dc2626; } /* Red */

/* Org Bento Card Icon Colors */
.org-bento-card.dept-graduate .org-card-icon { background: rgba(14, 165, 233, 0.08);  color: #0ea5e9; }
.org-bento-card.dept-cict     .org-card-icon { background: rgba(124, 58, 237, 0.08);  color: #7c3aed; }
.org-bento-card.dept-cas      .org-card-icon { background: rgba(156, 163, 175, 0.12); color: #6b7280; }
.org-bento-card.dept-chtm     .org-card-icon { background: rgba(22, 163, 74, 0.08);   color: #16a34a; }
.org-bento-card.dept-cbm      .org-card-icon { background: rgba(217, 119, 6, 0.08);   color: #d97706; }
.org-bento-card.dept-ccj      .org-card-icon { background: rgba(128, 0, 0, 0.08);     color: #800000; }
.org-bento-card.dept-cet      .org-card-icon { background: rgba(234, 88, 12, 0.08);   color: #ea580c; }
.org-bento-card.dept-ce       .org-card-icon { background: rgba(37, 99, 235, 0.08);   color: #2563eb; }
.org-bento-card.dept-ippg     .org-card-icon { background: rgba(220, 38, 38, 0.08);   color: #dc2626; }

.org-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.org-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  background: rgba(163, 29, 35, 0.06);
  color: #a31d23;
  transition: all 0.25s ease;
}

.org-card-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #e9ecef;
}

.org-card-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2d3436;
  margin: 0 0 0.5rem 0;
  line-height: 1.35;
}

.org-card-subtitle {
  font-size: 0.72rem;
  color: #a31d23;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.org-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #636e72;
  border-top: 1px solid #f1f3f5;
  padding-top: 0.75rem;
  margin-top: auto;
}

.org-card-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.org-card-stat-item i {
  color: #b2bec3;
}

/* Category Filter Bar consistently styled */
.org-search-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.005);
}

.org-search-input-wrapper {
  position: relative;
  width: 280px;
}

.org-search-input-wrapper i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a4b0be;
  font-size: 0.85rem;
}

input[type="text"].org-search-input {
  width: 100% !important;
  padding: 8px 12px 8px 32px !important;
  border: 1px solid #dfe6e9 !important;
  border-radius: 8px !important;
  font-size: 0.85rem !important;
  transition: all 0.2s ease !important;
}

input[type="text"].org-search-input:focus {
  outline: none !important;
  border-color: #a31d23 !important;
  box-shadow: 0 0 0 3px rgba(163, 29, 35, 0.08) !important;
}

/* Organization Delete Button */
.btn-delete-org {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.08);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-delete-org:hover {
  background: #ef4444 !important;
  transform: scale(1.05);
}

.btn-delete-org:hover i {
  color: #ffffff !important;
}

/* Security Confirmation Modal */
.org-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.org-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.org-modal {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.org-modal-backdrop.active .org-modal {
  transform: scale(1);
}

.org-modal h3 {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #2d3436;
  margin-top: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-modal-desc {
  font-size: 0.85rem;
  color: #636e72;
  line-height: 1.45;
  margin-bottom: 1.25rem;
}

.org-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.org-modal-btn-cancel {
  background: #f1f3f5;
  color: #495057;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.org-modal-btn-cancel:hover {
  background: #e9ecef;
}

/* Dynamic Fit for Smaller Screen Heights / Devices */
@media (max-height: 850px) {
  .org-form-card {
    top: 10px;
    max-height: calc(100vh - 170px);
    padding: 1.15rem;
  }
  .org-form-card h3 {
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
  }
  .org-form-group {
    margin-bottom: 0.85rem;
  }
  .org-form-label {
    margin-bottom: 4px;
    font-size: 0.7rem;
  }
  .org-form-input,
  .org-form-select {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
  .org-form-btn {
    padding: 9px;
    font-size: 0.82rem;
  }
}

/* Alert Custom Classes for IDE Warning Cleanses */
.alert-custom-error {
  background-color: #fdf2f2 !important;
  color: #9b1c1c !important;
  border-color: #fde2e2 !important;
}

.alert-custom-success {
  background-color: #f3faf7 !important;
  color: #03543f !important;
  border-color: #def7ec !important;
}

/* ============================================================
   BULK IMPORT PREMIUM MODAL & DROPZONE
   ============================================================ */
.admin-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-modal.active {
  display: flex;
  opacity: 1;
}

.admin-modal-content {
  background: #ffffff;
  border-radius: 20px;
  width: 90%;
  max-width: 680px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.admin-modal.active .admin-modal-content {
  transform: translateY(0);
}

.admin-modal-header {
  padding: 1.5rem 1.8rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.admin-modal-header h3 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--primary-red);
}

.admin-modal-body {
  padding: 1.8rem;
  overflow-y: auto;
  flex: 1;
}

.modal-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Template Download Card */
.template-download-card {
  background: rgba(2, 132, 199, 0.04);
  border: 1px dashed rgba(2, 132, 199, 0.25);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.template-download-card .card-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-download-card .excel-icon {
  font-size: 1.8rem;
  color: #10b981;
}

.template-download-card h4 {
  margin: 0 0 2px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
}

.template-download-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-template-download {
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #0284c7;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-template-download:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Upload Dropzone */
.upload-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  background: #fafafa;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-dropzone.dragover {
  border-color: var(--primary-red);
  background: rgba(163, 29, 35, 0.02);
}

.upload-dropzone .upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: transform 0.2s ease;
}

.upload-dropzone:hover .upload-icon {
  transform: translateY(-4px);
  color: var(--primary-red);
}

.dropzone-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 4px 0;
}

.dropzone-text .browse-link {
  color: var(--primary-red);
  text-decoration: underline;
}

.dropzone-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* Selected File & Preview */
.import-preview-area {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1.5rem;
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 1.5rem;
}

.selected-file-info .file-icon {
  font-size: 1.4rem;
  color: var(--primary-red);
}

.selected-file-info .file-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.selected-file-info .file-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

.selected-file-info .file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.btn-remove-file:hover {
  background: rgba(239, 68, 68, 0.06);
}

.preview-table-container {
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}

.preview-table-container h4 {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  background: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.preview-table th {
  background: #fafafa;
  font-weight: 700;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-dark);
}

.admin-modal-footer {
  padding: 1.2rem 1.8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #fafafa;
}

#btnConfirmImport {
  display: flex;
  align-items: center;
  gap: 8px;
}