/* =============================================
   NAAC SSR - style.css
   Brand color: #2e5077 (deep navy blue)
   Accent: #f6c794 (warm gold)
   ============================================= */

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

:root {
  --brand: #2e5077;
  --brand-dark: #1e3a56;
  --brand-light: #e8eef5;
  --brand-mid: #4a729e;
  --accent: #f6c794;
  --accent-dark: #e8a85a;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --sidebar-width: 280px;
  --header-height: 56px;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 0.2s ease;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

html, body {
  height: 100%;
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--gray-800);
  background-color: var(--gray-100);
  overflow: hidden;
}

/* --- Mobile Header --- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--brand);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  z-index: 200;
  box-shadow: var(--shadow-md);
}

.mobile-title {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.12);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px 7px;
  flex-shrink: 0;
  transition: background var(--transition);
}

.hamburger:hover {
  background: rgba(255,255,255,0.22);
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Sidebar Overlay --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
}

/* --- Layout --- */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--brand);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 160;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background: var(--brand-dark);
  flex-shrink: 0;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 3px;
  flex-shrink: 0;
}

.sidebar-college-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-college-name {
  color: var(--white);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-college-sub {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* --- Sidebar Search --- */
.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-search i {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  flex-shrink: 0;
}

.sidebar-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 13px;
  font-family: var(--font-main);
}

.sidebar-search input::placeholder {
  color: rgba(255,255,255,0.4);
}

/* --- Navigation --- */
.naac-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.naac-nav::-webkit-scrollbar { width: 4px; }
.naac-nav::-webkit-scrollbar-track { background: transparent; }
.naac-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Criteria level */
.nav-criteria { border-bottom: 1px solid rgba(255,255,255,0.06); }

.nav-criteria-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px 10px 16px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.88);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  transition: background var(--transition), color var(--transition);
  gap: 8px;
}

.nav-criteria-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.nav-criteria-btn[aria-expanded="true"] {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.nav-criteria-btn[aria-expanded="true"] .nav-chevron {
  transform: rotate(90deg);
}

.nav-criteria-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.criteria-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: var(--brand-dark);
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0px;
}

.nav-chevron {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Indicator level */
.nav-indicators {
  list-style: none;
  background: rgba(0,0,0,0.2);
}

.nav-indicator-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px 8px 24px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  transition: background var(--transition), color var(--transition);
  gap: 8px;
}

.nav-indicator-btn:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}

.nav-indicator-btn[aria-expanded="true"] {
  color: var(--accent);
}

.nav-indicator-btn[aria-expanded="true"] .nav-chevron-sm {
  transform: rotate(90deg);
  color: var(--accent);
}

.nav-chevron-sm {
  font-size: 9px;
  color: rgba(255,255,255,0.3);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* Metric level */
.nav-metrics {
  list-style: none;
  background: rgba(0,0,0,0.15);
}

.nav-metric-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 14px 7px 32px;
  color: rgba(255,255,255,0.60);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
  transition: background var(--transition), color var(--transition);
  border-left: 2px solid transparent;
}

.nav-metric-link i {
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 2px;
  color: rgba(255,255,255,0.3);
}

.nav-metric-link:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  border-left-color: rgba(255,255,255,0.2);
}

.nav-metric-link.active {
  background: rgba(246,199,148,0.12);
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-metric-link.active i {
  color: var(--accent);
}

/* Hidden nav items (for search filtering) */
.nav-criteria.hidden,
.nav-indicator.hidden,
.nav-metrics li.hidden {
  display: none;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* --- Page Header --- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.page-header-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.35;
  margin-bottom: 5px;
}

.page-header-text p {
  font-size: 12.5px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aishe-badge {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  border: 1px solid rgba(46,80,119,0.2);
}

.naac-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-500);
  flex-shrink: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  min-height: 36px;
}

.breadcrumb::-webkit-scrollbar { display: none; }

.breadcrumb span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray-500);
}

.breadcrumb span i {
  font-size: 12px;
}

.breadcrumb .sep {
  color: var(--gray-400);
  font-size: 10px;
}

.breadcrumb .crumb-active {
  color: var(--brand);
  font-weight: 500;
}

/* --- Metric Area --- */
.metric-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--gray-100);
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 32px;
  color: var(--gray-500);
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--gray-200);
}

.empty-state-icon i {
  font-size: 28px;
  color: var(--gray-400);
}

.empty-state h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13.5px;
  max-width: 320px;
  line-height: 1.6;
}

/* Metric HTML Content */
.metric-html-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  padding: 28px 32px;
  min-height: 200px;
  box-shadow: var(--shadow-sm);
  line-height: 1.7;
}

.metric-html-content h1,
.metric-html-content h2,
.metric-html-content h3 {
  color: var(--brand);
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.metric-html-content h1:first-child,
.metric-html-content h2:first-child,
.metric-html-content h3:first-child {
  margin-top: 0;
}

.metric-html-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.metric-html-content table th {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--gray-200);
  font-size: 13px;
}

.metric-html-content table td {
  padding: 9px 12px;
  border: 1px solid var(--gray-200);
  vertical-align: top;
}

.metric-html-content table tr:nth-child(even) td {
  background: var(--gray-50);
}

.metric-html-content a {
  color: var(--brand-mid);
  text-decoration: underline;
}

/* --- Responsive: Tablet --- */
@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
    z-index: 170;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: block;
  }

  .mobile-header {
    display: flex;
  }

  .layout {
    padding-top: var(--header-height);
    height: 100vh;
  }

  .main-content {
    flex: 1;
    width: 100%;
  }

  .page-header {
    padding: 14px 16px;
  }

  .page-header-text h1 {
    font-size: 14px;
  }

  .breadcrumb {
    padding: 8px 16px;
  }

  .metric-area {
    padding: 16px;
  }

  .metric-html-content {
    padding: 20px 18px;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 560px) {
  .page-header {
    padding: 12px 14px;
  }

  .page-header-actions {
    display: none;
  }

  .metric-html-content {
    padding: 16px 14px;
  }

  .metric-area {
    padding: 12px;
  }
}

/* --- Utility: highlight match for search --- */
.nav-highlight {
  background: rgba(246,199,148,0.35);
  border-radius: 2px;
  color: var(--white);
}

/* --- Print --- */
@media print {
  .sidebar, .mobile-header, .page-header-actions, .breadcrumb {
    display: none;
  }

  .layout {
    height: auto;
    overflow: visible;
  }

  .main-content {
    overflow: visible;
  }

  .metric-area {
    overflow: visible;
    padding: 0;
  }

  .metric-html-content {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}
