/* styles.css - Custom Styling for Utkal University Performance Portal */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --univ-maroon-dark: #1A365D;
  /* Navy Blue */
  --univ-maroon: #2B6CB0;
  /* Royal Blue */
  --univ-maroon-light: #3182CE;
  /* Active Blue */
  --univ-maroon-rgb: 43, 108, 176;
  --univ-gold: #4299E1;
  /* Sky Blue Accent */
  --univ-gold-dark: #2B6CB0;
  /* Royal Blue */
  --univ-gold-light: #EBF8FF;
  /* Light Sky Blue */
  --text-dark: #2D3748;
  --text-light: #718096;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --bg-tinted: #F7F5F0;
  --border-color: #E6E2DC;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);

  --univ-maroon-dark: #1A365D;
  /* Navy Blue */
  --univ-maroon: #2B6CB0;
  /* Royal Blue */
  --univ-maroon-light: #3182CE;
  /* Active Blue */
  --univ-maroon-rgb: 43,
    108,
    176;
  --univ-gold: #4299E1;
  /* Sky Blue Accent */
  --univ-gold-dark: #2B6CB0;
  /* Royal Blue */
  --univ-gold-light: #EBF8FF;
  /* Light Sky Blue */
  --text-dark: #2D3748;
  --text-light: #718096;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --bg-tinted: #F7F5F0;
  --border-color: #E6E2DC;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
  --transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--univ-maroon-dark);
}

.font-serif {
  font-family: 'Playfair Display', serif;
}

/* Base Layout */
#app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Styling - Light Theme Overhaul */
#sidebar {
  width: 280px;
  background-color: var(--bg-white);
  color: var(--text-dark);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  display: none;
}

.sidebar-brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  color: var(--univ-maroon-dark);
}

.sidebar-brand-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  display: block;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  overflow-y: auto;
  flex-grow: 1;
}

.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  font-weight: 500;
  border-left: 4px solid transparent;
}

.menu-item a:hover {
  background: var(--bg-tinted);
  color: var(--univ-maroon);
  border-left-color: var(--univ-maroon);


  background: var(--bg-tinted);
  color: var(--univ-maroon);
  border-left-color: var(--univ-maroon);
}

.menu-item.active a {
  background: rgba(66, 153, 225, 0.1);
  color: var(--univ-maroon-dark);
  border-left-color: var(--univ-maroon);
  font-weight: 600;

  background: rgba(66, 153, 225, 0.1);
  color: var(--univ-maroon-dark);
  border-left-color: var(--univ-maroon);
  font-weight: 600;
}

.menu-category-title {
  padding: 0.75rem 1.5rem 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--univ-gold-dark);
  font-weight: 700;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  background-color: var(--bg-tinted);
}

/* Main Content Area */
#main-content {
  margin-left: 280px;
  flex-grow: 1;
  min-width: 0;
  transition: var(--transition);
}

/* Header & Hero Section - Dark Theme */
.hero-section {
  background: linear-gradient(135deg, var(--univ-maroon-dark) 0%, var(--univ-maroon) 100%);
  color: var(--bg-white);
  padding: 3rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--univ-gold);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(197, 160, 89, 0.08) 0%, transparent 50%);
  pointer-events: none;
  /* background: var(--bg-white); */
  color: var(--text-dark);
  padding: 3rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--univ-gold);
  box-shadow: var(--shadow-sm);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(197, 160, 89, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.university-emblem {
  display: none;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 1px;
}

/* Filter Bar Styling */
.filter-bar {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.filter-select {
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  background-color: var(--bg-tinted);
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--univ-maroon);
  box-shadow: 0 0 0 3px rgba(122, 28, 28, 0.15);
  outline: none;
}

.search-input-group {
  position: relative;
}

.search-input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.search-field {
  padding-left: 2.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  height: 45px;
  font-size: 0.95rem;
  transition: var(--transition);
  background-color: var(--bg-tinted);
}

.search-field:focus {
  border-color: var(--univ-maroon);
  box-shadow: 0 0 0 3px rgba(122, 28, 28, 0.15);
  background-color: var(--bg-white);
  outline: none;
}

/* Cards & Layout Items */
.dashboard-container {
  padding: 2rem;
}

.kpi-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--univ-maroon);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-50px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--univ-maroon-rgb), 0.1);
  color: var(--univ-maroon);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--univ-maroon-dark);
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Charts Card */
.chart-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.chart-card:hover {
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.chart-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.chart-container {
  position: relative;
  height: 280px;
  width: 100%;
}

/* Accordion Customization */
.custom-accordion .accordion-item {
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background-color: var(--bg-white);
}

.custom-accordion .accordion-button {
  font-weight: 600;
  color: var(--univ-maroon-dark);
  background-color: var(--bg-white);
  padding: 1.25rem 1.5rem;
  box-shadow: none;
  font-size: 1.1rem;
}

.custom-accordion .accordion-button:not(.collapsed) {
  background-color: var(--bg-tinted);
  border-bottom: 1px solid var(--border-color);
  color: var(--univ-maroon);
}

.custom-accordion .accordion-button::after {
  filter: sepia(50%) hue-rotate(-50deg) saturate(300%);
}

.custom-accordion .accordion-body {
  padding: 1.75rem;
  background-color: var(--bg-white);
}

/* Modern Data Table */
.custom-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.custom-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  background-color: var(--bg-tinted);
  color: var(--univ-maroon-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem;
  border-bottom: 2px solid var(--univ-gold);
}

.custom-table td {
  padding: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: rgba(197, 160, 89, 0.05);
}

.badge-status {
  padding: 0.35rem 0.65rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active {
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.badge-revised {
  background-color: rgba(0, 123, 255, 0.1);
  color: #007bff;
}

.badge-ongoing {
  background-color: rgba(255, 193, 7, 0.15);
  color: #b8860b;
}

.badge-completed {
  background-color: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

.badge-granted {
  background-color: rgba(102, 16, 242, 0.1);
  color: #6610f2;
}

.badge-published {
  background-color: rgba(var(--univ-maroon-rgb), 0.1);
  color: var(--univ-maroon);
}

/* Document Item & Evidence Library */
.doc-card {
  background-color: var(--bg-tinted);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.doc-card:hover {
  border-color: var(--univ-gold);
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
}

.doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-icon {
  font-size: 1.5rem;
  color: #dc3545;
  /* PDF Red */
}

.doc-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 0.1rem;
}

.doc-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

.btn-utkal {
  background-color: var(--univ-maroon);
  color: var(--bg-white);
  border: 1px solid var(--univ-maroon);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-utkal:hover {
  background-color: var(--univ-maroon-dark);
  border-color: var(--univ-maroon-dark);
  color: var(--bg-white);
}

.btn-utkal-outline {
  background-color: transparent;
  color: var(--univ-maroon);
  border: 1.5px solid var(--univ-maroon);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-utkal-outline:hover {
  background-color: var(--univ-maroon);
  color: var(--bg-white);
}

.btn-gold {
  background-color: var(--univ-gold);
  color: var(--univ-maroon-dark);
  border: 1px solid var(--univ-gold);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-gold:hover {
  background-color: var(--univ-gold-dark);
  border-color: var(--univ-gold-dark);
  color: var(--bg-white);
}

/* Image & Video Gallery */
.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  border: 1px solid var(--border-color);
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--univ-maroon-dark) 0%, var(--univ-maroon-light) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--bg-white);
  padding: 1.5rem;
  text-align: center;
}

.gallery-placeholder-gold {
  background: linear-gradient(135deg, var(--univ-gold-dark) 0%, var(--univ-gold) 100%);
  color: var(--univ-maroon-dark);
}

.gallery-placeholder i {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.gallery-placeholder-caption {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Evidence Upload Container */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  background-color: var(--bg-tinted);
  transition: var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--univ-gold);
  background-color: var(--bg-white);
}

.upload-zone i {
  font-size: 2rem;
  color: var(--univ-maroon);
  margin-bottom: 0.5rem;
}

/* Timeline View */
.timeline-trail {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-color);
  margin-left: 1rem;
}

.timeline-event {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-event::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--univ-gold);
  border: 3px solid var(--bg-white);
  box-shadow: 0 0 0 3px var(--univ-maroon);
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--univ-gold-dark);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.timeline-content-card {
  background-color: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

/* Hamburger menu button for small screens */
.menu-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--univ-maroon);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Global Alert/Notification System */
.notification-banner {
  background-color: rgba(197, 160, 89, 0.12);
  color: var(--univ-maroon-dark);
  border: 1px solid var(--univ-gold-light);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Hide dynamic views by default */
.portal-section {
  display: none;
}

.portal-section.active-section {
  display: block;
}

/* Footer Credits - Light Theme Overhaul */
.portal-footer {
  background-color: var(--bg-white);
  color: var(--text-light);
  padding: 2.5rem 2rem;
  border-top: 4px solid var(--univ-gold);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.portal-footer .text-white {
  color: var(--univ-maroon-dark) !important;
}

.portal-footer .text-white-50 {
  color: var(--text-light) !important;
}

.portal-footer a {
  color: var(--univ-maroon);
  text-decoration: none;
}

.portal-footer a:hover {
  color: var(--univ-maroon-dark);
  text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  #sidebar {
    left: -280px;
  }

  #sidebar.show-sidebar {
    left: 0;
  }

  #main-content {
    margin-left: 0;
  }

  .menu-toggle-btn {
    display: block;
  }

  .hero-section {
    padding: 2.5rem 1.5rem 4.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .filter-bar .row>div {
    margin-bottom: 0.75rem;
  }

  .filter-bar .row>div:last-child {
    margin-bottom: 0;
  }

  .kpi-card {
    margin-bottom: 1rem;
  }
}

/* Printable/PDF Stylesheet overrides */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }

  #sidebar,
  .filter-bar,
  .menu-toggle-btn,
  .upload-zone,
  .btn-utkal,
  .btn-utkal-outline,
  .btn-gold,
  .portal-footer,
  .nav-actions,
  .no-print {
    display: none !important;
  }

  #main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .hero-section {
    background: none !important;
    color: #000000 !important;
    padding: 1rem 0 !important;
    border-bottom: 2px solid #000000 !important;
  }

  .hero-subtitle,
  .hero-title {
    color: #000000 !important;
    text-shadow: none !important;
  }

  .dashboard-container {
    padding: 0 !important;
  }

  .portal-section {
    display: block !important;
    /* Print all active content */
    page-break-after: always;
  }

  .kpi-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .chart-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  .accordion-collapse {
    display: block !important;
    /* Force open all accordion contents for printing */
    height: auto !important;
  }

  .accordion-button {
    font-weight: bold !important;
    background-color: #f0f0f0 !important;
    color: #000000 !important;
  }

  .accordion-button::after {
    display: none !important;
  }

  .custom-table th {
    background-color: #333333 !important;
    color: #ffffff !important;
  }

  .custom-table td {
    border-bottom: 1px solid #cccccc !important;
  }
}

/* ==========================================
   Action Buttons (View / Edit / Delete)
   ========================================== */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 0.85rem;
  margin: 0 2px;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.action-btn.btn-view {
  color: #2B6CB0;
  border-color: rgba(43, 108, 176, 0.3);
}

.action-btn.btn-view:hover {
  background-color: rgba(43, 108, 176, 0.1);
  border-color: #2B6CB0;
}

.action-btn.btn-edit {
  color: #38A169;
  border-color: rgba(56, 161, 105, 0.3);
}

.action-btn.btn-edit:hover {
  background-color: rgba(56, 161, 105, 0.1);
  border-color: #38A169;
}

.action-btn.btn-delete {
  color: #E53E3E;
  border-color: rgba(229, 62, 62, 0.3);
}

.action-btn.btn-delete:hover {
  background-color: rgba(229, 62, 62, 0.1);
  border-color: #E53E3E;
}

/* ==========================================
   View Record Modal Styling
   ========================================== */
.view-record-details {
  display: grid;
  gap: 0;
}

.view-record-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

.view-record-row:last-child {
  border-bottom: none;
}

.view-record-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--univ-maroon-dark);
  text-transform: capitalize;
}

.view-record-value {
  font-size: 0.9rem;
  color: var(--text-dark);
  word-break: break-word;
}

/* ==========================================
   Database Pagination Controls
   ========================================== */
.db-prev-btn,
.db-next-btn,
.db-page-info {
  font-size: 0.85rem;
  font-weight: 500;
}

.db-prev-btn:not(:disabled):hover,
.db-next-btn:not(:disabled):hover {
  background-color: var(--univ-maroon);
  border-color: var(--univ-maroon);
  color: var(--bg-white);
}

.db-record-info {
  font-size: 0.85rem;
  color: var(--text-light);
}