/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: #EFF6FF;
  color: #1e293b;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== CSS VARIABLES ===== */
:root {
  --blue-50: #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  --blue-900: #1E3A8A;
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(37,99,235,0.08), 0 2px 4px rgba(0,0,0,0.04);
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--blue-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--blue-600);
  color: #fff;
  font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { display: block; color: #fff; font-weight: 700; font-size: 15px; line-height: 1.2; }
.brand-sub { display: block; color: rgba(255,255,255,0.45); font-size: 11px; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,0.35);
}

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-mini { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-600);
  color: #fff; font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.user-roll { display: block; color: rgba(255,255,255,0.45); font-size: 11px; }

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--blue-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.menu-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); padding: 6px;
  border-radius: var(--radius-sm);
}
.menu-btn svg { width: 20px; height: 20px; }
.breadcrumb { font-size: 15px; font-weight: 600; color: var(--gray-800); }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.notif-btn {
  position: relative; cursor: pointer;
  color: var(--gray-500); padding: 6px;
  border-radius: var(--radius-sm);
}
.notif-btn svg { width: 20px; height: 20px; }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: #EF4444; border-radius: 50%;
  border: 2px solid var(--white);
}
.top-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-600); color: #fff;
  font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  flex: 1;
  padding: 28px 28px 40px;
}

.page { animation: fadeIn 0.25s ease; }
.page.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.page-header p  { font-size: 13.5px; color: var(--gray-500); margin-top: 4px; }

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 16px;
  border: 1px solid var(--blue-100);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::before { background: var(--blue-600); }
.stat-card.purple::before { background: #7C3AED; }
.stat-card.green::before { background: #059669; }
.stat-card.red::before { background: #DC2626; }
.stat-card.amber::before { background: #D97706; }

.stat-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-card.blue .stat-icon { background: var(--blue-50); color: var(--blue-700); }
.stat-card.purple .stat-icon { background: #F5F3FF; color: #7C3AED; }
.stat-card.green .stat-icon { background: #ECFDF5; color: #059669; }
.stat-card.red .stat-icon { background: #FEF2F2; color: #DC2626; }
.stat-card.amber .stat-icon { background: #FFFBEB; color: #D97706; }

.stat-num { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-card.blue .stat-num { color: var(--blue-700); }
.stat-card.purple .stat-num { color: #7C3AED; }
.stat-card.green .stat-num { color: #059669; }
.stat-card.red .stat-num { color: #DC2626; }
.stat-card.amber .stat-num { color: #D97706; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; margin-top: 2px; }
.stat-data { display: flex; flex-direction: column; }
.stat-trend { font-size: 11px; color: var(--gray-400); }
.stat-trend.up { color: #059669; }

/* ===== DASHBOARD GRID ===== */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.dash-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.dash-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.dash-card-header h3 { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--blue-600); font-size: 12px; font-weight: 600;
  font-family: inherit;
  padding: 4px 8px; border-radius: 6px;
}
.link-btn:hover { background: var(--blue-50); }

.recent-list { display: flex; flex-direction: column; gap: 8px; }
.recent-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--blue-100);
}
.recent-company { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.recent-role { font-size: 12px; color: var(--gray-500); margin-top: 1px; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge.green, .badge-green { background: #D1FAE5; color: #065F46; }
.badge.blue, .badge-blue   { background: var(--blue-100); color: var(--blue-800); }
.badge.amber, .badge-amber { background: #FEF3C7; color: #78350F; }
.badge.red, .badge-red     { background: #FEE2E2; color: #7F1D1D; }
.badge.gray, .badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge.purple              { background: #EDE9FE; color: #5B21B6; }

/* ===== PROFILE PAGE ===== */
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}
.profile-card {
  background: var(--blue-900);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: sticky; top: 80px;
}
.profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--blue-600); color: #fff;
  font-weight: 700; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,0.2);
}
.profile-status-badge {
  position: absolute; bottom: -4px; right: -4px;
  background: #10B981; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  border: 2px solid var(--blue-900);
}
.profile-name { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.profile-dept { color: rgba(255,255,255,0.55); font-size: 12px; margin-bottom: 10px; line-height: 1.4; }
.profile-cgpa { color: rgba(255,255,255,0.8); font-size: 13px; margin-bottom: 14px; }
.profile-cgpa strong { color: #fff; }
.profile-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tag {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75);
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
}

.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.detail-section h3 {
  font-size: 12px; font-weight: 700;
  color: var(--blue-700);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--blue-100);
}
.detail-rows { display: flex; flex-direction: column; gap: 9px; }
.detail-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dk { font-size: 12px; color: var(--gray-400); white-space: nowrap; flex-shrink: 0; min-width: 110px; }
.dv { font-size: 13px; color: var(--gray-800); font-weight: 500; text-align: right; }

.skills-list { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-pill {
  background: var(--blue-50); color: var(--blue-800);
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--blue-200);
}
.cert-list { display: flex; flex-direction: column; gap: 7px; }
.cert-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--gray-700); font-weight: 500;
}
.cert-item svg { width: 14px; height: 14px; color: #D97706; flex-shrink: 0; }

/* ===== CARDS GRID (Internships / Placement) ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.opp-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opp-card:hover {
  border-color: var(--blue-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.opp-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.opp-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--blue-50); border: 1px solid var(--blue-200);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: var(--blue-700);
  flex-shrink: 0;
}
.opp-title-wrap { flex: 1; }
.opp-company { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.opp-role { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--gray-500);
  background: var(--gray-50); padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--gray-200);
}
.meta-pill svg { width: 12px; height: 12px; }
.opp-footer { display: flex; align-items: center; justify-content: space-between; }
.opp-ctc { font-size: 14px; font-weight: 700; color: var(--blue-700); }
.view-btn {
  font-size: 12px; font-weight: 600; color: var(--blue-600);
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-radius: 6px; padding: 5px 12px; cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.view-btn:hover { background: var(--blue-100); }

/* ===== DETAIL PANEL ===== */
.detail-panel { animation: fadeIn 0.2s ease; }
.detail-panel.hidden { display: none; }
.detail-panel-header { margin-bottom: 20px; }
.back-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-size: 13px; font-weight: 600; color: var(--blue-700);
  cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { background: var(--blue-50); }

.job-detail-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.jdc-banner {
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600));
  padding: 28px 28px 24px;
  display: flex; align-items: flex-start; gap: 18px;
}
.jdc-logo {
  width: 60px; height: 60px; border-radius: 14px;
  background: rgba(255,255,255,0.15);
  color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 2px solid rgba(255,255,255,0.25);
}
.jdc-title-wrap { flex: 1; }
.jdc-company { color: #fff; font-size: 20px; font-weight: 700; }
.jdc-role { color: rgba(255,255,255,0.7); font-size: 14px; margin-top: 4px; }
.jdc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.jdc-badge {
  background: rgba(255,255,255,0.15); color: #fff;
  font-size: 11.5px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; border: 1px solid rgba(255,255,255,0.25);
}

.jdc-body { padding: 28px; }
.jdc-section { margin-bottom: 24px; }
.jdc-section-title {
  font-size: 12px; font-weight: 700; color: var(--blue-600);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--blue-100);
}
.jdc-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.jdc-field { display: flex; flex-direction: column; gap: 3px; }
.jdc-key { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.jdc-val { font-size: 14px; font-weight: 600; color: var(--gray-800); }

.timeline {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}
.tl-item {
  display: flex; gap: 14px;
  padding-bottom: 18px;
  position: relative;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1;
}
.tl-dot svg { width: 14px; height: 14px; }
.tl-dot.done { background: #D1FAE5; color: #059669; }
.tl-dot.current { background: var(--blue-100); color: var(--blue-600); }
.tl-dot.upcoming { background: var(--gray-100); color: var(--gray-400); }
.tl-line {
  position: absolute;
  left: 14px; top: 28px; bottom: 0;
  width: 1px; background: var(--gray-200);
}
.tl-item:last-child .tl-line { display: none; }
.tl-content { flex: 1; padding-top: 4px; }
.tl-label { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.tl-date { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }

.remark-box {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px; color: var(--blue-900);
  font-weight: 500;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--blue-200);
  background: var(--white);
  color: var(--blue-700); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all 0.15s;
}
.filter-btn:hover { background: var(--blue-50); }
.filter-btn.active { background: var(--blue-700); color: #fff; border-color: var(--blue-700); }

/* ===== APPLICATION CARDS GRID ===== */
.app-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.app-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--blue-100);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column; gap: 12px;
}
.app-card:hover { border-color: var(--blue-400); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-card-header { display: flex; align-items: center; justify-content: space-between; }
.app-company { font-size: 15px; font-weight: 700; color: var(--gray-800); }
.app-role { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.app-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.app-date-item { display: flex; flex-direction: column; gap: 1px; }
.app-date-key { font-size: 10.5px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.app-date-val { font-size: 12.5px; font-weight: 600; color: var(--gray-700); }
.app-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; border-top: 1px solid var(--blue-50); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-card { position: static; }
  .profile-details-grid { grid-template-columns: 1fr; }
  .jdc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .menu-btn { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-content { padding: 20px 16px 32px; }
  .jdc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card.amber { grid-column: 1 / -1; }
}
