/* ==========================================================================
   SMART PROCTOR — Premium Master's Level Student Portal Stylesheet
   ========================================================================== */

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

:root {
  --primary: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-dark: #172554;
  --accent: #2563eb;
  --accent-light: #60a5fa;
  --accent-dark: #1d4ed8;
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --border-glass: rgba(37, 99, 235, 0.12);
  --text-light: #0f172a;
  --text-muted: #64748b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --glow-green: rgba(37, 99, 235, 0.12);
  --glow-gold: rgba(96, 165, 250, 0.1);
  --sidebar-w: 260px;
  --topbar-h: 70px;
  --shadow: 0 15px 35px rgba(37, 99, 235, 0.05), inset 0 0 15px rgba(255, 255, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: radial-gradient(circle at 50% 30%, #f0f7ff 0%, var(--bg-dark) 100%);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background animated glow orbs */
.portal-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  pointer-events: none;
}
.orb-left {
  width: 600px;
  height: 600px;
  background: var(--glow-green);
  top: -10%;
  left: -10%;
}
.orb-right {
  width: 500px;
  height: 500px;
  background: var(--glow-gold);
  bottom: 10%;
  right: -5%;
}

/* Layout framework */
.sp-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* SIDEBAR STYLES */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(25px);
  border-right: 1px solid var(--border-glass);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  padding: 0 25px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  font-size: 1.5rem;
  text-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0f172a 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

/* User Card inside Sidebar */
.sidebar-user {
  margin: 20px 15px;
  padding: 16px;
  background: rgba(37, 99, 235, 0.03);
  border: 1px solid rgba(37, 99, 235, 0.06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.user-details {
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 15px;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(37, 99, 235, 0.5);
  padding: 10px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 4px;
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
  transform: translateX(4px);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--primary);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.1rem;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: rgba(239, 68, 68, 0.85);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--danger);
}

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

.topbar {
  height: var(--topbar-h);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 35px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-light);
}

.topbar-title span {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  margin-left: 8px;
  letter-spacing: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.roll-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* Hamburger mobile trigger */
.hamburger {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}

/* PAGE CONTENT CONTAINER */
.page-content {
  flex: 1;
  padding: 35px;
}

/* WELCOME BANNER */
.welcome-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(30, 41, 59, 0.03) 100%);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.welcome-banner::before {
  content: '🎓';
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%) rotate(15deg);
  font-size: 6rem;
  opacity: 0.08;
  pointer-events: none;
}

.welcome-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 6px;
}

.welcome-name {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0f172a 40%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.08);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-icon {
  font-size: 1.6rem;
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-light);
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* GENERAL DYNAMIC CARD */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
  margin-bottom: 20px;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 20px;
}

/* PREMIUM TABLES */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

thead th {
  padding: 12px 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  border-bottom: 1px solid rgba(37, 99, 235, 0.15);
  background: rgba(37, 99, 235, 0.02);
}

tbody td {
  padding: 16px 20px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(37, 99, 235, 0.04);
  color: var(--text-light);
  transition: all 0.25s;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: rgba(37, 99, 235, 0.02);
  color: var(--text-light);
}

/* BUTTONS */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.btn-premium.btn-sm {
  padding: 6px 14px;
  font-size: 0.74rem;
  border-radius: 8px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid rgba(37, 99, 235, 0.25);
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
  color: var(--primary);
}

/* STATUS BADGES */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #92400e;
}

.status-badge.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

/* DYNAMIC CREDIBILITY RADIAL INDICATOR */
.cring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cring svg {
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.2));
}

.cring-lbl {
  position: absolute;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 8px;
}

input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-glass);
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: var(--text-light);
  background: rgba(37, 99, 235, 0.01);
  transition: all 0.3s;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.15);
}

/* ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #065f46;
}

.alert-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

/* MOBILE RESPONSIVE OVERLAYS */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
  backdrop-filter: blur(4px);
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: 220px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 250px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0,0,0,0.8);
  }
  
  .sidebar-overlay.show {
    display: block;
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  .hamburger {
    display: block;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .welcome-banner {
    padding: 24px;
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .welcome-name {
    font-size: 1.8rem;
  }
  
  .page-content {
    padding: 20px 15px;
  }
  
  .topbar {
    padding: 0 15px;
  }
}
