/* ===== APP SHELL ===== */
.app-shell{display:flex;min-height:100vh}

/* ===== SIDEBAR ===== */
.sidebar{width:var(--sidebar-width);background:var(--bg-sidebar);border-right:1px solid var(--border);display:flex;flex-direction:column;position:fixed;top:0;left:0;height:100vh;z-index:40;transition:var(--transition-slow);overflow:hidden}
.sidebar-logo{padding:1.25rem 1.25rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--border)}
.sidebar-logo-icon{width:38px;height:38px;background:linear-gradient(135deg,var(--primary-600),var(--cyan));border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:1rem;color:#fff;flex-shrink:0}
.sidebar-logo-text{font-size:1.1rem;font-weight:800;letter-spacing:-.3px;color:var(--text-primary)}
.sidebar-logo-text span{color:var(--primary-600)}
.sidebar-user{padding:1rem 1.25rem;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:.75rem}
.sidebar-avatar{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--primary-500),var(--primary-700));display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.9rem;color:#fff;flex-shrink:0}
.sidebar-user-info{flex:1;min-width:0}
.sidebar-user-name{font-size:.875rem;font-weight:700;truncate:overflow;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-role{font-size:.7rem;color:var(--text-muted);margin-top:.1rem}
.sidebar-nav{flex:1;overflow-y:auto;padding:.75rem .75rem}
.sidebar-section-label{font-size:.65rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--text-muted);padding:.5rem .5rem .25rem;margin-top:.5rem}
.sidebar-nav-item{display:flex;align-items:center;gap:.75rem;padding:.625rem .75rem;border-radius:var(--radius);cursor:pointer;transition:var(--transition);color:var(--text-secondary);font-size:.875rem;font-weight:500;position:relative;margin-bottom:.15rem}
.sidebar-nav-item:hover{background:var(--bg-hover);color:var(--text-primary)}
.sidebar-nav-item.active{background:linear-gradient(135deg,var(--primary-50),rgba(37,99,235,.08));color:var(--primary-700);font-weight:700}
[data-theme="dark"] .sidebar-nav-item.active{background:rgba(37,99,235,.15);color:var(--primary-300)}
.sidebar-nav-item.active::before{content:'';position:absolute;left:0;top:20%;bottom:20%;width:3px;background:var(--primary-600);border-radius:2px}
.sidebar-nav-icon{width:20px;text-align:center;font-size:.9rem;flex-shrink:0}
.sidebar-nav-badge{margin-left:auto;background:var(--danger);color:#fff;font-size:.65rem;font-weight:700;padding:.1rem .45rem;border-radius:var(--radius-full)}
.sidebar-footer{padding:.75rem;border-top:1px solid var(--border)}

/* ===== MAIN CONTENT ===== */
.main-content{flex:1;margin-left:var(--sidebar-width);display:flex;flex-direction:column;min-height:100vh;transition:var(--transition-slow)}

/* ===== TOPBAR ===== */
.topbar{height:var(--header-height);background:var(--bg-header);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 1.5rem;gap:1rem;position:sticky;top:0;z-index:30;box-shadow:var(--shadow-sm)}
.topbar-left{display:flex;align-items:center;gap:1rem;flex:1}
.topbar-title{font-size:1rem;font-weight:700;color:var(--text-primary)}
.topbar-subtitle{font-size:.8rem;color:var(--text-muted)}
.topbar-right{display:flex;align-items:center;gap:.75rem}
.topbar-icon-btn{width:38px;height:38px;border-radius:var(--radius);border:1px solid var(--border);background:var(--bg-card);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:var(--transition);color:var(--text-secondary);position:relative}
.topbar-icon-btn:hover{background:var(--bg-hover);color:var(--text-primary)}
.notif-dot{position:absolute;top:6px;right:6px;width:8px;height:8px;border-radius:50%;background:var(--danger);border:2px solid var(--bg-header)}
.theme-toggle{width:38px;height:38px}
.hamburger{display:none;width:38px;height:38px;border-radius:var(--radius);border:1px solid var(--border);background:var(--bg-card);align-items:center;justify-content:center;cursor:pointer;color:var(--text-secondary)}

/* ===== PAGE CONTENT ===== */
.page-content{flex:1;padding:1.5rem}
.page-header{margin-bottom:1.5rem;display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.page-header-left{}
.page-title{font-size:1.4rem;font-weight:800;color:var(--text-primary)}
.page-subtitle{font-size:.875rem;color:var(--text-muted);margin-top:.25rem}
.page-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}

/* ===== STATS GRID ===== */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;margin-bottom:1.5rem}

/* ===== DASHBOARD SECTIONS ===== */
.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem}
.dashboard-grid.cols-3{grid-template-columns:2fr 1fr}
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}
.section-header h3{font-size:1rem;font-weight:700}

/* ===== STATUS CARD (Student) ===== */
.status-card{background:linear-gradient(135deg,var(--navy),var(--navy-light));color:#fff;border-radius:var(--radius-xl);padding:2rem;position:relative;overflow:hidden;margin-bottom:1.5rem}
.status-card::before{content:'';position:absolute;top:-30px;right:-30px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.06)}
.status-card::after{content:'';position:absolute;bottom:-50px;right:40px;width:120px;height:120px;border-radius:50%;background:rgba(255,255,255,.04)}
.status-card-label{font-size:.8rem;font-weight:600;opacity:.7;text-transform:uppercase;letter-spacing:.08em;margin-bottom:.5rem}
.status-card-title{font-size:1.75rem;font-weight:800;margin-bottom:1.5rem}
.status-progress{background:rgba(255,255,255,.15);border-radius:var(--radius-full);height:8px;margin-bottom:.5rem;overflow:hidden}
.status-progress-bar{height:100%;border-radius:var(--radius-full);background:linear-gradient(90deg,#60a5fa,#06b6d4);transition:width .8s ease}
.status-steps-label{display:flex;justify-content:space-between;font-size:.75rem;opacity:.7}

/* ===== ANNOUNCEMENT CARD ===== */
.announcement-card{border-left:3px solid var(--primary-500);padding:.875rem 1.25rem;background:var(--bg-card);border-radius:0 var(--radius) var(--radius) 0;margin-bottom:.75rem;border:1px solid var(--border);border-left-width:3px;border-left-color:var(--primary-500)}
.announcement-title{font-size:.9rem;font-weight:700;margin-bottom:.25rem}
.announcement-body{font-size:.825rem;color:var(--text-secondary)}
.announcement-date{font-size:.75rem;color:var(--text-muted);margin-top:.5rem}

/* ===== VERIFICATION DETAIL ===== */
.doc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem;margin-top:1rem}
.doc-card{background:var(--bg-muted);border:1px solid var(--border);border-radius:var(--radius);padding:1rem;text-align:center;cursor:pointer;transition:var(--transition)}
.doc-card:hover{border-color:var(--primary-400);box-shadow:var(--shadow-md)}
.doc-card-icon{font-size:2rem;margin-bottom:.5rem}
.doc-card-name{font-size:.8rem;font-weight:600;color:var(--text-primary)}
.doc-card-status{font-size:.7rem;color:var(--text-muted);margin-top:.25rem}
.doc-card.missing .doc-card-icon{opacity:.3}
.doc-card.missing{cursor:default}

/* ===== SCHEDULE CALENDAR ===== */
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:.35rem}
.calendar-header{display:grid;grid-template-columns:repeat(7,1fr);gap:.35rem;margin-bottom:.5rem}
.calendar-day-name{text-align:center;font-size:.7rem;font-weight:700;color:var(--text-muted);padding:.25rem}
.calendar-day{aspect-ratio:1;border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:600;cursor:pointer;transition:var(--transition);border:1px solid transparent;flex-direction:column;gap:.1rem}
.calendar-day:empty{cursor:default}
.calendar-day.other-month{color:var(--text-muted);opacity:.4;cursor:default}
.calendar-day.today{border-color:var(--primary-400);color:var(--primary-600)}
.calendar-day.has-schedule{background:var(--success-light);color:var(--success-dark)}
[data-theme="dark"] .calendar-day.has-schedule{background:rgba(16,185,129,.15);color:var(--success)}
.calendar-day.has-schedule:hover{background:var(--success);color:#fff}
.calendar-day.full{background:var(--danger-light);color:var(--danger-dark);cursor:not-allowed}
.calendar-day.selected{background:var(--primary-600);color:#fff;border-color:var(--primary-600)}
.calendar-dot{width:4px;height:4px;border-radius:50%;background:currentColor;opacity:.7}

/* ===== MOBILE SIDEBAR OVERLAY ===== */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:35;backdrop-filter:blur(2px)}

/* ===== RESPONSIVE ===== */
@media(max-width:1024px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .sidebar-overlay.open{display:block}
  .main-content{margin-left:0}
  .hamburger{display:flex}
  .dashboard-grid{grid-template-columns:1fr}
  .dashboard-grid.cols-3{grid-template-columns:1fr}
}
@media(max-width:640px){
  .page-content{padding:1rem}
  .stats-grid{grid-template-columns:1fr 1fr}
  .topbar{padding:0 1rem}
}
@media(max-width:400px){
  .stats-grid{grid-template-columns:1fr}
}
