

  :root {
    --bg-deep: #030712;
    --bg-card: #0d1117;
    --bg-card2: #111827;
    --border: rgba(6,182,212,0.18);
    --cyan: #06b6d4;
    --cyan-bright: #22d3ee;
    --cyan-glow: rgba(6,182,212,0.35);
    --purple: #8b5cf6;
    --purple-glow: rgba(139,92,246,0.3);
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --text: #e2e8f0;
    --text-dim: #64748b;
    --text-muted: #94a3b8;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
  }

  /* ── LIGHT MODE ── */
  body.light-mode {
    --bg-deep: #f0f4f8;
    --bg-card: #ffffff;
    --bg-card2: #f1f5f9;
    --border: rgba(6,182,212,0.25);
    --cyan: #0284c7;
    --cyan-bright: #0ea5e9;
    --cyan-glow: rgba(2,132,199,0.25);
    --purple: #7c3aed;
    --green: #059669;
    --yellow: #d97706;
    --red: #dc2626;
    --text: #0f172a;
    --text-dim: #64748b;
    --text-muted: #475569;
  }

  body.light-mode::before {
    background-image:
      linear-gradient(rgba(2,132,199,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(2,132,199,0.06) 1px, transparent 1px);
  }

  body.light-mode .login-glow {
    background: radial-gradient(circle, rgba(2,132,199,0.1) 0%, transparent 70%);
  }

  body.light-mode .login-card {
    box-shadow: 0 0 80px rgba(2,132,199,0.08), 0 4px 24px rgba(0,0,0,0.08);
  }

  body.light-mode .subject-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
    border-color: rgba(2,132,199,0.18);
  }

  body.light-mode .header {
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid rgba(2,132,199,0.15);
    box-shadow: 0 1px 0 rgba(2,132,199,0.12), 0 4px 20px rgba(0,0,0,0.08);
  }

  body.light-mode .sidebar {
    box-shadow: 2px 0 16px rgba(0,0,0,0.07);
    border-right-color: rgba(2,132,199,0.18);
  }

  body.light-mode .right-panel {
    box-shadow: -2px 0 16px rgba(0,0,0,0.07);
    border-left-color: rgba(2,132,199,0.18);
  }

  body.light-mode .marks-input {
    background: rgba(2,132,199,0.05);
    color: var(--text);
  }

  body.light-mode .marks-input::placeholder { color: var(--text-dim); }

  body.light-mode .form-input {
    background: rgba(2,132,199,0.04);
    color: var(--text);
  }

  body.light-mode .elective-select {
    background: rgba(2,132,199,0.04);
    color: var(--text);
  }

  body.light-mode .elective-select option {
    background: var(--bg-card);
    color: var(--text);
  }

  body.light-mode .mobile-sem-btn {
    color: var(--text-dim);
  }

  /* ── SCAN BUTTON ── */
  .hdr-scan-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid rgba(139,92,246,0.5);
    background: rgba(139,92,246,0.12);
    color: #a78bfa;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  .hdr-scan-btn:hover {
    background: rgba(139,92,246,0.22);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(139,92,246,0.25);
  }
  @media (max-width: 767px) {
    .hdr-scan-btn span { display: none; }
    .hdr-scan-btn { padding: 5px 8px; font-size: 1rem; border: none; background: none; }
  }
  @media (max-width: 479px) { .hdr-scan-btn { display: none; } }

  /* ── SCAN MODAL ── */
  #scanModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
  }
  #scanModal.open { display: flex; }

  .scan-card {
    background: var(--bg-card);
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 24px;
    padding: 2rem 2.2rem;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(139,92,246,0.15);
    position: relative;
    animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
  }

  .scan-card-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,246,0.4) transparent;
  }
  .scan-card-body::-webkit-scrollbar { width: 5px; }
  .scan-card-body::-webkit-scrollbar-track { background: transparent; }
  .scan-card-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 10px; }

  #scanResultsArea {
    /* results table gets its own scroll within card-body */
  }

  .scan-results-table-wrap {
    max-height: 280px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid rgba(6,182,212,0.12);
    scrollbar-width: thin;
    scrollbar-color: rgba(6,182,212,0.3) transparent;
  }
  .scan-results-table-wrap::-webkit-scrollbar { width: 4px; }
  .scan-results-table-wrap::-webkit-scrollbar-track { background: transparent; }
  .scan-results-table-wrap::-webkit-scrollbar-thumb { background: rgba(6,182,212,0.3); border-radius: 10px; }

  .scan-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #a78bfa;
    letter-spacing: 0.3px;
    margin-bottom: 0.3rem;
  }
  .scan-sub {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1.4rem;
  }

  .scan-drop-zone {
    border: 2px dashed rgba(139,92,246,0.4);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(139,92,246,0.04);
    margin-bottom: 1.2rem;
  }
  .scan-drop-zone:hover, .scan-drop-zone.drag-over {
    border-color: #a78bfa;
    background: rgba(139,92,246,0.1);
  }
  .scan-drop-icon { font-size: 2.4rem; margin-bottom: 0.5rem; }
  .scan-drop-text { font-size: 0.9rem; color: var(--text-muted); }
  .scan-drop-text strong { color: #a78bfa; }

  #scanFileInput { display: none; }

  .scan-preview-wrap {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    margin-bottom: 1rem;
  }
  .scan-preview-wrap.show { display: flex; }
  .scan-preview-name { font-size: 0.85rem; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scan-preview-remove { cursor: pointer; color: var(--red); font-size: 1.1rem; flex-shrink: 0; }

  .scan-sem-select-wrap {
    margin-bottom: 1.1rem;
  }
  .scan-sem-label {
    font-size: 0.78rem;
    color: var(--cyan);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.4rem;
    display: block;
  }
  .scan-sem-select {
    width: 100%;
    background: rgba(6,182,212,0.04);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
  }
  .scan-sem-select:focus { border-color: var(--cyan); }

  .scan-actions {
    display: flex;
    gap: 0.7rem;
    margin-top: 0.5rem;
  }
  .scan-btn-go {
    flex: 1;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    color: white;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .scan-btn-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,92,246,0.3); }
  .scan-btn-go:disabled { opacity: 0.5; cursor: not-allowed; }
  .scan-btn-cancel {
    background: rgba(100,116,139,0.12);
    border: 1px solid rgba(100,116,139,0.25);
    border-radius: 10px;
    padding: 0.75rem 1.2rem;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .scan-btn-cancel:hover { background: rgba(100,116,139,0.2); }

  .scan-status {
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    display: none;
  }
  .scan-status.loading {
    display: block;
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.25);
    color: #a78bfa;
    animation: pulse 1.5s ease-in-out infinite;
  }
  .scan-status.success {
    display: block;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: #10b981;
  }
  .scan-status.error {
    display: block;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
  }
  .scan-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.6rem;
    font-size: 0.8rem;
  }
  .scan-result-table th {
    text-align: left;
    color: var(--cyan);
    padding: 4px 6px;
    border-bottom: 1px solid rgba(6,182,212,0.15);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .scan-result-table td {
    padding: 5px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text);
  }
  .scan-result-table tr:last-child td { border-bottom: none; }
  .scan-fill-btn {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    border: none;
    border-radius: 10px;
    padding: 0.65rem;
    color: white;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .scan-fill-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(16,185,129,0.3); }

  body.light-mode .panel-section,
  body.light-mode .weak-card,
  body.light-mode .unit-card,
  body.light-mode .tip-row,
  body.light-mode .analyser-settings-bar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }

  /* ── TOGGLE BUTTON ── */
  .theme-toggle {
    width: 44px;
    height: 24px;
    background: var(--bg-card2);
    border: 1.5px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 3px;
  }

  .theme-toggle:hover { border-color: var(--cyan); }

  .toggle-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cyan);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    line-height: 1;
    transform: translateX(0);
    box-shadow: 0 0 8px var(--cyan-glow);
  }

  body.light-mode .toggle-thumb {
    transform: translateX(20px);
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan-glow);
  }

  body.light-mode .theme-toggle {
    background: rgba(2,132,199,0.1);
  }

  html {
    font-size: 16px;
    background: var(--bg-deep);
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
  }
  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
  }

  /* ===== GRID BACKGROUND ===== */
  body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-deep);
    background-image:
      linear-gradient(rgba(6,182,212,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(6,182,212,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
  }

  /* ===== PAGES ===== */
  .page { display: none; min-height: 100vh; position: relative; z-index: 1; width: 100%; }
  .page.active { display: flex; flex-direction: column; width: 100%; }

  /* ===== LOGIN PAGE ===== */
  #loginPage {
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    background: var(--bg-deep);
  }

  .login-glow {
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
  }

  @keyframes pulseGlow {
    0%,100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  }

  .login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2.2rem 3rem;
    width: 100%;
    max-width: 760px;
    position: relative;
    box-shadow: 0 0 80px rgba(6,182,212,0.1), 0 0 0 1px rgba(6,182,212,0.08);
    animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1);
    overflow: hidden;
  }

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

  .login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  }

  .logo-area {
    text-align: center;
    margin-bottom: 1.6rem;
  }

  .logo-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(139,92,246,0.2));
    border: 2px solid var(--cyan);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--cyan);
    margin: 0 auto 1rem;
    box-shadow: 0 0 30px rgba(6,182,212,0.2);
  }

  .logo-title {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(6,182,212,0.5);
  }

  .logo-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.2px;
    font-weight: 500;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .form-label {
    display: block;
    font-size: 0.88rem;
    color: var(--cyan);
    letter-spacing: 0.3px;
    margin-bottom: 0.4rem;
    font-weight: 600;
  }

  .form-input {
    width: 100%;
    background: rgba(6,182,212,0.04);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 12px;
    padding: 0.75rem 1.3rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s;
    outline: none;
  }

  .form-input:focus {
    border-color: var(--cyan);
    background: rgba(6,182,212,0.08);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
  }

  .form-input::placeholder { color: var(--text-dim); }

  .btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    border-radius: 12px;
    padding: 0.85rem;
    color: white;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 0.4rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }

  .btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
  }

  .btn-login:hover::after { transform: translateX(100%); }
  .btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(6,182,212,0.3); }
  .btn-login:active { transform: translateY(0); }

  .err-msg {
    color: #fff;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.5);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    margin-top: 0.7rem;
    display: none;
  }

  /* ===== MAIN APP ===== */
  #appPage {
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
  }

  /* HEADER */
  .header {
    background: rgba(13,17,23,0.97);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 1000;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
    box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.3);
  }
  body.light-mode .header {
    background: rgba(255,255,255,0.97);
    border-bottom: 1px solid rgba(0,0,0,0.09);
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
  }

  .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }

  /* ── Logo icon: transparent, no box, no border ── */
  .h-logo-icon {
    width: auto;
    height: 42px;
    background: none;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    overflow: visible;
  }

  /* ── DARK MODE: multiply blend removes white bg, cyan filter tints logo ── */
  .h-logo-icon img {
    height: 38px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 0;
    /* mix-blend-mode:screen makes the black box invisible on dark bg */
    mix-blend-mode: screen;
    filter: invert(1) sepia(1) saturate(3) hue-rotate(163deg) brightness(1.2);
    transition: filter 0.3s ease, mix-blend-mode 0.3s ease;
  }

  /* ── LIGHT MODE: normal rendering — crisp like off-toggle ── */
  body.light-mode .h-logo-icon img {
    mix-blend-mode: normal;
    filter: none;
  }

  .h-logo-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: 1px;
  }

  .header-user {
    display: flex; align-items: center; gap: 1rem;
  }

  .user-badge {
    display: flex; align-items: center; gap: 8px;
    background: rgba(6,182,212,0.08);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 6px 16px 6px 8px;
  }

  .user-avatar {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
  }

  .user-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }

  .btn-logout {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    color: var(--red);
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-logout:hover { background: rgba(239,68,68,0.2); }

  /* ── Login form enhancements ── */
  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.2rem;
  }
  .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2306b6d4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    cursor: pointer;
  }
  .form-select option { background: #0f172a; color: #e2e8f0; }
  .form-select optgroup { color: #06b6d4; font-weight: 700; font-size: 0.75rem; }
  body.light-mode .form-select option { background: #ffffff; color: #1e293b; }
  .req { color: #ef4444; font-size: 0.8rem; }
  .field-err {
    font-size: 0.72rem;
    color: #f87171;
    margin-top: 3px;
    min-height: 14px;
    font-family: var(--font-body);
  }
  @media (max-width: 600px) {
    .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  }

  /* ── HEADER NAV BUTTONS ── */
  .hdr-res-btn, .hdr-analyse-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: 1.5px solid;
    letter-spacing: 0.5px;
    white-space: nowrap;
  }
  .hdr-res-btn {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.4);
    color: #10b981;
  }
  .hdr-res-btn:hover {
    background: rgba(16,185,129,0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.2);
  }
  .hdr-analyse-btn {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.4);
    color: #f59e0b;
  }
  .hdr-analyse-btn:hover {
    background: rgba(245,158,11,0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,158,11,0.2);
  }
  @media (max-width: 767px) {
    .hdr-res-btn span, .hdr-analyse-btn span { display: none; }
    .hdr-res-btn, .hdr-analyse-btn { padding: 5px 8px; font-size: 1rem; border: none; background: none; }
  }
  @media (max-width: 479px) {
    .hdr-res-btn, .hdr-analyse-btn { display: none; }
  }

  /* HERO STATS BAR */
  .stats-bar {
    background: linear-gradient(135deg, rgba(6,182,212,0.06), rgba(139,92,246,0.06));
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
  }

  .stat-label { font-size: 0.75rem; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
  .stat-value { font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan); }

  /* MAIN LAYOUT */
  .main-layout {
    display: grid;
    grid-template-columns: 220px 1fr 320px;
    align-items: start;
    flex: 1;
    width: 100%;
    min-width: 0;
    min-height: calc(100vh - 70px);
    transition: grid-template-columns 0.3s cubic-bezier(0.16,1,0.3,1);
    box-sizing: border-box;
    overflow: hidden;
  }

  /* SIDEBAR */
  .sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    flex-shrink: 0;
    align-self: start;
  }

  .sidebar::-webkit-scrollbar { width: 4px; }
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

  .sidebar-title {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
  }

  .sem-btn {
    width: 100%;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
  }

  .sem-btn:hover { background: rgba(6,182,212,0.05); color: var(--text); }
  .sem-btn.active {
    border-left-color: var(--cyan);
    background: rgba(6,182,212,0.08);
    color: var(--cyan);
    font-weight: 700;
  }

  .sem-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: rgba(6,182,212,0.15);
    color: var(--cyan);
    border-radius: 4px;
    padding: 2px 6px;
  }

  .sem-btn.active .sem-badge { background: var(--cyan); color: var(--bg-deep); }

  /* CONTENT AREA — grid child of .main-layout */
  .content-area {
    padding: 1.5rem 2.5rem 2.5rem;
    overflow-y: auto;
    min-width: 0;
    overflow-x: hidden;
    box-sizing: border-box;
    grid-column: 2;
    grid-row: 1;
  }

  .sem-header {
    margin-bottom: 1rem;
  }

  .sem-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 1px;
  }

  .sem-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 4px;
    font-weight: 500;
  }

  .live-sgpa-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(6,182,212,0.08);
    border: 1px solid var(--cyan);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-top: 0.8rem;
  }

  .live-sgpa-label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 1px; }
  .live-sgpa-val { font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan); }

  .subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.6rem 1.4rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.4s ease forwards;
  }

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

  .subject-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transform: scaleX(0);
    transition: transform 0.3s;
  }

  .subject-card:hover { border-color: rgba(6,182,212,0.4); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(6,182,212,0.08); }
  .subject-card:hover::before { transform: scaleX(1); }

  .subject-card.filled { border-color: rgba(6,182,212,0.3); }
  .subject-card.filled::before { transform: scaleX(1); }

  .subj-code { font-family: var(--font-mono); font-size: 0.88rem; color: var(--cyan); font-weight: 500; }
  .subj-type-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  .badge-theory { background: rgba(139,92,246,0.15); color: var(--purple); }
  .badge-practical { background: rgba(16,185,129,0.15); color: var(--green); }
  .badge-elective { background: rgba(245,158,11,0.15); color: var(--yellow); }
  .badge-audit { background: rgba(100,116,139,0.15); color: var(--text-dim); }

  .subj-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; gap: 8px; }

  .subj-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
    line-height: 1.3;
  }

  .subj-credits {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
    font-family: var(--font-mono);
  }

  .marks-row { display: flex; align-items: center; gap: 8px; }

  /* ── SPLIT MARKS LAYOUT (internal + external) ── */
  .marks-split-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 0.2rem;
  }

  .marks-split-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .marks-split-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .marks-max-hint {
    color: rgba(100,116,139,0.6);
    font-size: 0.65rem;
  }

  .marks-input-split {
    width: 100%;
    text-align: center;
    padding: 0.55rem 0.4rem !important;
    font-size: 0.95rem !important;
  }

  .marks-split-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
    padding-bottom: 2px;
  }

  .marks-total-disp {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--cyan);
    white-space: nowrap;
  }

  .marks-total-empty {
    color: var(--text-dim);
    font-weight: 400;
  }

  .marks-input {
    flex: 1;
    background: rgba(6,182,212,0.04);
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
    width: 100%;
  }

  .marks-input:focus {
    border-color: var(--cyan);
    background: rgba(6,182,212,0.08);
    box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
  }

  .marks-input.audit-input { opacity: 0.5; cursor: not-allowed; }

  /* AUDIT PASS/FAIL BUTTONS */
  .audit-pf-btn {
    flex: 1;
    background: rgba(100,116,139,0.1);
    border: 1px solid rgba(100,116,139,0.25);
    border-radius: 8px;
    padding: 0.55rem 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
  }
  .audit-pf-btn:hover { border-color: var(--cyan); color: var(--text); }
  .audit-pass-active {
    background: rgba(16,185,129,0.15) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
    box-shadow: 0 0 10px rgba(16,185,129,0.2);
  }
  .audit-fail-active {
    background: rgba(239,68,68,0.15) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239,68,68,0.15);
  }
  .audit-clear-btn {
    flex: 0 0 36px !important;
    font-size: 0.75rem !important;
    padding: 0.55rem 0.3rem !important;
    color: var(--text-dim) !important;
  }

  .grade-pill {
    min-width: 52px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--bg-card2);
    color: var(--text-dim);
    transition: all 0.3s;
  }

  .grade-O { background: rgba(6,182,212,0.2); color: var(--cyan); }
  .grade-Ap { background: rgba(139,92,246,0.2); color: var(--purple); }
  .grade-A { background: rgba(99,102,241,0.2); color: #818cf8; }
  .grade-Bp { background: rgba(16,185,129,0.2); color: var(--green); }
  .grade-B { background: rgba(20,184,166,0.2); color: #2dd4bf; }
  .grade-C { background: rgba(245,158,11,0.2); color: var(--yellow); }
  .grade-F { background: rgba(239,68,68,0.2); color: var(--red); }
  /* AKTU special grades */
  .grade-E  { background: rgba(251,146,60,0.2); color: #fb923c; }   /* E  – bare pass */
  .grade-EH { background: rgba(251,146,60,0.15); color: #fb923c; border: 1px dashed rgba(251,146,60,0.6); }  /* E# – grace pass */


  /* ELECTIVE SELECTOR */
  .elective-select {
    background: rgba(6,182,212,0.04);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.88rem;
    outline: none;
    width: 100%;
    margin-bottom: 0.8rem;
    cursor: pointer;
  }
  .elective-select:focus { border-color: var(--cyan); }
  .elective-select option { background: var(--bg-card2); color: var(--text); }

  /* GRADING TABLE */
  .grading-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1.5rem;
  }

  .grading-title { font-size: 0.8rem; letter-spacing: 0.3px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 0.8rem; }

  .grade-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  .grade-row:last-child { border-bottom: none; }
  .grade-range { color: var(--text-muted); font-family: var(--font-mono); }
  .grade-letter { font-family: var(--font-mono); font-weight: 700; font-size: 0.95rem; }
  .grade-points { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.82rem; }

  /* ═══════════════════════════════════════
     RIGHT PANEL — FULL REDESIGN
  ═══════════════════════════════════════ */
  .right-panel {
    background: linear-gradient(180deg, #0a0f1a 0%, #0d1117 100%);
    border-left: 1px solid rgba(6,182,212,0.12);
    padding: 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(6,182,212,0.2) transparent;
    flex-shrink: 0;
    align-self: start;
    grid-column: 3;
    grid-row: 1;
  }
  .right-panel::-webkit-scrollbar { width: 4px; }
  .right-panel::-webkit-scrollbar-track { background: transparent; }
  .right-panel::-webkit-scrollbar-thumb { background: rgba(6,182,212,0.2); border-radius: 10px; }

  /* Panel inner wrapper — padding lives here */
  .rp-inner {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.4rem 0.85rem 1.2rem;
  }

  /* Section cards */
  .panel-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
  }
  .panel-section:hover { border-color: rgba(6,182,212,0.2); }
  .panel-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6,182,212,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .panel-section:hover::before { opacity: 1; }

  /* Panel title */
  .panel-title {
    font-size: 0.68rem;
    letter-spacing: 2.5px;
    color: rgba(100,116,139,0.9);
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    font-weight: 700;
    font-family: var(--font-body);
  }

  /* ── SGPA Section — horizontal layout ── */
  .sgpa-gauge {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .gauge-ring {
    width: 88px; height: 88px;
    position: relative;
    flex-shrink: 0;
  }
  .gauge-ring svg { transform: rotate(-90deg); }
  .gauge-bg { fill: none; stroke: rgba(6,182,212,0.08); stroke-width: 7; }
  .gauge-fill { fill: none; stroke: url(#gaugeGrad); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.9s cubic-bezier(0.34,1.56,0.64,1); }
  .gauge-value {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: -0.5px;
  }
  .sgpa-right-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
  }
  .sgpa-right-label {
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-family: var(--font-body);
  }
  .sgpa-right-val {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--cyan);
    line-height: 1;
    text-shadow: 0 0 20px rgba(6,182,212,0.5);
    letter-spacing: -1px;
  }
  .gauge-grade {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    background: rgba(6,182,212,0.08);
    border: 1px solid rgba(6,182,212,0.15);
    border-radius: 6px;
    padding: 2px 8px;
    display: inline-block;
    width: fit-content;
  }

  /* ── CGPA Section ── */
  .cgpa-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .cgpa-hero-left {}
  .cgpa-num {
    font-family: var(--font-display);
    font-size: 2.6rem;
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(6,182,212,0.45);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
  }
  .cgpa-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-top: 3px;
  }
  .cgpa-hero-badge {
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 10px;
    padding: 0.4rem 0.7rem;
    text-align: center;
  }
  .cgpa-hero-badge-val {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--purple);
  }
  .cgpa-hero-badge-lbl {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.2px;
    text-transform: uppercase;
    display: block;
  }

  /* Sem bars */
  .sem-list { display: flex; flex-direction: column; gap: 0.45rem; }
  .sem-item { display: flex; align-items: center; gap: 7px; }
  .sem-label { font-size: 0.72rem; color: var(--text-dim); width: 44px; font-family: var(--font-mono); }
  .sem-bar-wrap {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    height: 5px;
    overflow: hidden;
    position: relative;
  }
  .sem-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 6px;
    transition: width 0.7s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 0 6px rgba(6,182,212,0.4);
  }
  .sem-val { font-family: var(--font-mono); font-size: 0.72rem; color: var(--cyan); width: 36px; text-align: right; }

  /* ── TARGET CGPA PLANNER ── */
  .panel-section.planner-section {
    background: linear-gradient(135deg, rgba(139,92,246,0.08) 0%, rgba(6,182,212,0.06) 100%);
    border-color: rgba(139,92,246,0.25);
  }
  .panel-section.planner-section::before {
    background: linear-gradient(90deg, transparent, rgba(139,92,246,0.4), transparent);
    opacity: 1;
  }
  .planner-title-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 0.75rem;
  }
  .planner-title-icon {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(139,92,246,0.4);
  }
  .planner-title-text {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    color: #c4b5fd;
    letter-spacing: 0.2px;
    text-transform: uppercase;
  }
  .target-planner-input {
    width: 100%;
    background: rgba(139,92,246,0.1);
    border: 1.5px solid rgba(139,92,246,0.3);
    border-radius: 12px;
    padding: 0.65rem 1rem;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    outline: none;
    text-align: center;
    transition: all 0.25s;
    letter-spacing: 1px;
    margin-bottom: 0.7rem;
  }
  .target-planner-input:focus {
    border-color: #a78bfa;
    background: rgba(139,92,246,0.15);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15), 0 0 20px rgba(139,92,246,0.1);
  }
  .target-planner-input::placeholder { color: rgba(139,92,246,0.4); font-size: 0.85rem; letter-spacing: 0; font-weight: 400; }
  .target-planner-input-row { margin-bottom: 0; }
  .target-result-box {
    border-radius: 12px;
    padding: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
  }
  .target-result-box.show { display: flex; }
  .trb-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
  }
  .trb-left {}
  .trb-needed-label {
    font-size: 0.62rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-weight: 700;
    margin-bottom: 2px;
  }
  .trb-needed-val {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
  }
  .trb-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }
  .trb-status-icon { font-size: 1.6rem; line-height: 1; }
  .trb-sems-info {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.35);
    text-align: right;
    letter-spacing: 0.5px;
  }
  .trb-msg-bar {
    padding: 0.5rem 0.9rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.45;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .target-result-box.achievable { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(6,182,212,0.08)); border: 1px solid rgba(16,185,129,0.3); }
  .target-result-box.achievable .trb-needed-val { color: #34d399; text-shadow: 0 0 20px rgba(16,185,129,0.5); }
  .target-result-box.achievable .trb-msg-bar { color: rgba(52,211,153,0.9); }
  .target-result-box.tough { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.08)); border: 1px solid rgba(245,158,11,0.3); }
  .target-result-box.tough .trb-needed-val { color: #fbbf24; text-shadow: 0 0 20px rgba(245,158,11,0.5); }
  .target-result-box.tough .trb-msg-bar { color: rgba(251,191,36,0.9); }
  .target-result-box.impossible { background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(139,92,246,0.08)); border: 1px solid rgba(239,68,68,0.3); }
  .target-result-box.impossible .trb-needed-val { color: #f87171; text-shadow: 0 0 20px rgba(239,68,68,0.5); }
  .target-result-box.impossible .trb-msg-bar { color: rgba(248,113,113,0.9); }
  .target-result-box.already { background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.08)); border: 1px solid rgba(6,182,212,0.3); }
  .target-result-box.already .trb-needed-val { color: var(--cyan); text-shadow: 0 0 20px rgba(6,182,212,0.5); font-size: 1.3rem; padding-top: 4px; }
  .target-result-box.already .trb-msg-bar { color: rgba(34,211,238,0.9); }

  /* ── GRADING TABLE ── */
  .grading-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .grade-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
  }
  .grade-chip-letter { font-weight: 800; font-size: 0.8rem; }
  .grade-chip-range { color: var(--text-dim); font-size: 0.65rem; }
  .grade-chip-pts { color: var(--cyan); font-size: 0.65rem; }
  .grade-chip.g-o .grade-chip-letter { color: #06b6d4; }
  .grade-chip.g-a .grade-chip-letter { color: #8b5cf6; }
  .grade-chip.g-bp .grade-chip-letter { color: #6366f1; }
  .grade-chip.g-b .grade-chip-letter { color: #10b981; }
  .grade-chip.g-c .grade-chip-letter { color: #2dd4bf; }
  .grade-chip.g-d .grade-chip-letter { color: #f59e0b; }
  .grade-chip.g-f .grade-chip-letter { color: #ef4444; }
  .grade-chip.g-e .grade-chip-letter { color: #fb923c; }

  /* ── PERFORMANCE INSIGHT ── */
  .insight-list { display: flex; flex-direction: column; gap: 0.5rem; }
  .insight-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0.5rem 0.65rem;
    background: rgba(6,182,212,0.04);
    border-radius: 8px;
    border: 1px solid rgba(6,182,212,0.08);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
  }
  .insight-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

  /* ── ACTION BUTTONS ── */
  .rp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 0.85rem 1rem;
  }
  .btn-export {
    background: linear-gradient(135deg, rgba(6,182,212,0.2), rgba(139,92,246,0.2));
    border: 1px solid rgba(6,182,212,0.3);
    border-radius: 12px;
    padding: 0.7rem 0.5rem;
    color: var(--cyan);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
  }
  .btn-export:hover {
    background: linear-gradient(135deg, rgba(6,182,212,0.3), rgba(139,92,246,0.25));
    border-color: var(--cyan);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(6,182,212,0.2);
    color: white;
  }
  .btn-analyse {
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(239,68,68,0.2));
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 12px;
    padding: 0.7rem 0.5rem;
    color: #f59e0b;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    margin-top: 0;
  }
  .btn-analyse:hover {
    background: linear-gradient(135deg, rgba(245,158,11,0.3), rgba(239,68,68,0.25));
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245,158,11,0.2);
    color: white;
  }

  /* Collapsible panel toggle */
  .panel-toggle-row {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
  }
  .panel-toggle-arrow {
    font-size: 0.62rem;
    color: var(--text-dim);
    transition: transform 0.25s;
    opacity: 0.6;
  }

  /* Planner modal for mobile */
  #plannerModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
  }
  #plannerModal.open { display: flex; }
  .planner-modal-card {
    background: linear-gradient(160deg, #0f1724 0%, #0d1117 100%);
    border: 1px solid rgba(139,92,246,0.4);
    border-radius: 24px;
    padding: 1.6rem 1.6rem 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 -10px 60px rgba(139,92,246,0.2), 0 0 0 1px rgba(139,92,246,0.1);
    animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
  }
  .planner-modal-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: #c4b5fd;
    letter-spacing: 0.3px;
    margin-bottom: 0.25rem;
  }
  .planner-modal-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 1.1rem;
  }
  /* Floating planner button for mobile/tablet */
  .btn-planner-float {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 1rem;
    z-index: 500;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.1rem;
    color: white;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(139,92,246,0.45);
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    letter-spacing: 0.4px;
  }
  .btn-planner-float:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(139,92,246,0.55); }
  @media (max-width: 1279px) { .btn-planner-float { display: flex; } }

  /* light mode overrides for panel */
  body.light-mode .right-panel { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); border-left-color: rgba(2,132,199,0.15); }
  body.light-mode .panel-section { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.07); box-shadow: 0 1px 8px rgba(0,0,0,0.05); }
  body.light-mode .panel-section.planner-section { background: linear-gradient(135deg,rgba(124,58,237,0.06),rgba(2,132,199,0.04)); border-color: rgba(124,58,237,0.2); }
  body.light-mode .gauge-grade { background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.15); }
  body.light-mode .sem-bar-wrap { background: rgba(0,0,0,0.05); }
  body.light-mode .grade-chip { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }
  body.light-mode .insight-item { background: rgba(2,132,199,0.04); border-color: rgba(2,132,199,0.1); }
  body.light-mode .btn-export { background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.25); color: var(--cyan); }
  body.light-mode .btn-analyse { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.25); }
  body.light-mode .target-planner-input { background: rgba(124,58,237,0.06); border-color: rgba(124,58,237,0.25); }
  body.light-mode .cgpa-hero { border-bottom-color: rgba(0,0,0,0.06); }

  /* =============================================
     COMPLETE RESPONSIVE SYSTEM
     Breakpoints:
     - Mobile S:  < 480px
     - Mobile L:  480px - 767px
     - Tablet:    768px - 1023px
     - Laptop S:  1024px - 1279px
     - Laptop L:  1280px+
  ============================================= */

  /* ── Laptop S (1024–1279px): hide right panel ── */
  @media (max-width: 1279px) {
    .main-layout { grid-template-columns: 200px 1fr; }
    .right-panel { display: none; }
    .floating-cgpa { display: block; }
  }

  /* ── Tablet (768–1023px): narrower sidebar ── */
  @media (max-width: 1023px) {
    .main-layout { grid-template-columns: 180px 1fr; }
    .header { padding: 0 1rem; }
    .h-logo-text { font-size: 0.85rem; }
    .analyser-body { padding: 1.2rem; }
    .analyser-summary { grid-template-columns: repeat(2, 1fr); }
    .asb-inputs { flex-wrap: wrap; }
    .asb-field { min-width: 140px; }
    .wc-top { flex-wrap: wrap; }
    .wc-marks-block { flex-wrap: wrap; gap: 0.5rem; }
    .subjects-grid { grid-template-columns: 1fr 1fr; }
    .picto-cgpa-main { flex-direction: column; align-items: center; gap: 1.5rem; }
    .picto-bars-wrap { max-width: 100%; }
    .login-card { padding: 2rem; }
    .content-area { padding: 0.8rem 1.5rem 1.5rem; }
  }

  /* ── Mobile L (480–767px): collapse sidebar to bottom nav ── */
  @media (max-width: 767px) {
    /* Layout */
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    body { padding-bottom: 65px; }

    /* Hide floating CGPA on mobile — replaced by stats bar */
    .floating-cgpa { display: none !important; }

    /* Mobile stats bar */
    .mobile-stats-bar {
      display: flex;
    }

    /* Header */
    .header { padding: 0 0.8rem; height: 56px; }
    .h-logo-icon { width: auto; height: 32px; }
    .h-logo-icon img { height: 30px; mix-blend-mode: screen; }
    body.light-mode .h-logo-icon img { mix-blend-mode: normal; filter: none; }
    .h-logo-icon img { height: 30px; }
    .h-logo-text { font-size: 0.8rem; letter-spacing: 0.5px; }
    .user-badge { padding: 4px 10px 4px 6px; }
    .user-name { font-size: 0.8rem; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .btn-logout { padding: 5px 10px; font-size: 0.75rem; }

    /* Content area */
    .content-area { padding: 0.8rem 1rem 1rem; }
    .sem-title { font-size: 1.1rem; }

    /* Subject cards */
    .subjects-grid { grid-template-columns: 1fr; gap: 0.9rem; }
    .subject-card { padding: 1rem; }
    .subj-name { font-size: 0.9rem; }

    /* Floating CGPA */
    .floating-cgpa { top: 62px; right: 0.6rem; padding: 0.5rem 0.9rem; border-radius: 10px; }
    .fc-val { font-size: 1.1rem; }

    /* Login */
    .login-card { padding: 2.2rem 1.8rem; border-radius: 22px; margin: 1rem; }
    .logo-title { font-size: 1.5rem; }
    .logo-icon { width: 70px; height: 70px; font-size: 1.7rem; }
    .logo-sub { font-size: 0.95rem; }
    .form-input { font-size: 1rem; padding: 0.9rem 1.1rem; }
    .form-label { font-size: 0.82rem; }
    .btn-login { font-size: 0.9rem; padding: 1.1rem; }

    /* Analyser */
    .analyser-body { padding: 0.8rem; }
    .analyser-settings-bar { padding: 1rem; }
    .asb-title { font-size: 0.68rem; }
    .asb-inputs { gap: 0.5rem; }
    .asb-field { min-width: 120px; padding: 0.4rem 0.7rem; }
    .asb-fixed-val { font-size: 1.1rem; padding: 2px 10px; }
    .analyser-summary { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .as-num { font-size: 1.6rem; }
    .as-lbl { font-size: 0.7rem; }

    /* Weak cards */
    .wc-top { flex-direction: column; gap: 0.8rem; padding: 1rem 1rem 0.6rem; }
    .wc-marks-block { flex-wrap: wrap; gap: 0.5rem; justify-content: flex-start; }
    .wc-mark-pill { min-width: 64px; padding: 0.45rem 0.6rem; }
    .mpv { font-size: 1rem; }
    .marks-bar-wrap { padding: 0 1rem 0.8rem; }
    .wc-menu-btn { font-size: 0.72rem; padding: 0.6rem 0.3rem; min-width: 0; }
    .wc-panel-body { padding: 1rem; }
    .unit-header { padding: 0.7rem 0.8rem; }
    .unit-title-text { font-size: 0.85rem; }
    .unit-subtitle { font-size: 0.68rem; }
    .unit-body { padding: 0 0.8rem 0.8rem; }
    .topic-item { font-size: 0.8rem; padding: 0.5rem 0.6rem; }
    .unit-vid-btn { font-size: 0.75rem; padding: 6px 12px; width: 100%; text-align: center; justify-content: center; }
    .tip-row { padding: 0.7rem 0.8rem; }
    .tip-txt { font-size: 0.83rem; }
    .why-intro { font-size: 0.87rem; }
    .why-list li { font-size: 0.83rem; }
    .target-box-new { padding: 0.8rem; }
    .tbn-text { font-size: 0.82rem; }

    /* Pictograph */
    .cgpa-pictograph-section { padding: 2rem 0.8rem 3rem; }
    .picto-title { font-size: 1.1rem; letter-spacing: 0.3px; }
    .picto-cgpa-main { flex-direction: column; align-items: center; gap: 1.2rem; }
    .picto-cgpa-stats { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
    .picto-stat-card { min-width: 120px; padding: 0.7rem 1rem; }
    .ps-val { font-size: 1.2rem; }
    .picto-bars { height: 100px; }
    .picto-bars-xaxis span { font-size: 0.6rem; }
    .picto-icons-grid { gap: 0.5rem; }
    .picto-grade-block { min-width: 72px; padding: 0.7rem 0.8rem; }
    .pgb-grade { font-size: 1rem; }
    .picto-stars-row { gap: 0.4rem; }
    .journey-card { min-width: 70px; padding: 0.6rem 0.5rem; }
    .jc-sgpa { font-size: 0.75rem; }

    /* Right panel (hidden on mobile, floating badge shows instead) */
    .right-panel { display: none; }
  }

  /* ── Mobile S (< 480px): extra compact ── */
  @media (max-width: 479px) {
    .header { padding: 0 0.6rem; height: 52px; }
    .h-logo-text { display: none; }
    .user-name { display: none; }
    .btn-logout { font-size: 0.7rem; padding: 4px 8px; }
    .content-area { padding: 0.6rem 0.7rem 0.7rem; }
    .sem-title { font-size: 1rem; }
    .login-card { padding: 1.8rem 1.3rem; margin: 0.6rem; }
    .logo-title { font-size: 1.3rem; letter-spacing: 0.2px; }
    .logo-icon { width: 62px; height: 62px; font-size: 1.5rem; }
    .logo-sub { font-size: 0.88rem; }
    .form-label { font-size: 0.78rem; }
    .form-input { padding: 0.85rem 1rem; font-size: 0.95rem; }
    .btn-login { font-size: 0.82rem; letter-spacing: 0.3px; padding: 1rem; }
    .analyser-summary { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
    .as-num { font-size: 1.4rem; }
    .asb-field { min-width: 100px; }
    .wc-menu-btn { font-size: 0.68rem; padding: 0.5rem 0.2rem; }
    .wc-name { font-size: 0.95rem; }
    .analyser-section-title { font-size: 0.82rem; }
    .mobile-nav { padding: 0.6rem 0.7rem; gap: 0.3rem; }
    .mobile-sem-btn { padding: 5px 9px; font-size: 0.78rem; }
    .live-sgpa-mini { padding: 0.4rem 0.7rem; }
    .live-sgpa-val { font-size: 1rem; }
    .grade-pill { font-size: 0.75rem; min-width: 38px; }
    .subj-code { font-size: 0.72rem; }
    .subj-credits { font-size: 0.75rem; }
    .marks-input { padding: 0.5rem 0.6rem; font-size: 0.88rem; }
    .floating-cgpa { padding: 0.4rem 0.7rem; }
    .fc-val { font-size: 1rem; }
    .fc-label { font-size: 0.55rem; }
    .marks-split-row { gap: 5px; }
    .marks-split-label { font-size: 0.62rem; }
    .marks-total-disp { font-size: 0.66rem; }
    .marks-split-result { min-width: 48px; }
  }

  /* GRADING TOOLTIP */
  .tooltip-container { position: relative; }
  .tooltip-trigger { cursor: help; }

  /* ===== ANALYSER PAGE ===== */
  #analyserPage { flex-direction: column; min-height: 100vh; }

  .analyser-body {
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
  }

  /* Settings bar */
  .analyser-settings-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
  }

  .asb-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--cyan);
    letter-spacing: 0.3px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .asb-inputs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .asb-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    flex: 1;
    min-width: 130px;
  }

  .asb-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 600;
  }

  .asb-field input {
    width: 56px;
    background: rgba(6,182,212,0.08);
    border: 1px solid var(--cyan);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    outline: none;
  }

  .asb-field span { font-size: 0.75rem; color: var(--text-dim); }

  /* Fixed (non-editable) threshold display */
  .asb-fixed {
    border-color: rgba(6,182,212,0.25) !important;
    background: rgba(6,182,212,0.04) !important;
  }

  .asb-credit-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
  }

  .asb-fixed-val {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--cyan);
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.3);
    border-radius: 8px;
    padding: 3px 12px;
    letter-spacing: 1px;
  }

  .asb-marks-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
  }

  /* Summary strip */
  .analyser-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .as-card {
    border-radius: 14px;
    padding: 1.2rem;
    text-align: center;
    border: 1px solid transparent;
  }

  .as-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); }
  .as-warn   { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); }
  .as-good   { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.25); }
  .as-info   { background: rgba(6,182,212,0.08);  border-color: rgba(6,182,212,0.25); }

  .as-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
  }
  .as-danger .as-num { color: #ef4444; }
  .as-warn .as-num   { color: #f59e0b; }
  .as-good .as-num   { color: #10b981; }
  .as-info .as-num   { color: #06b6d4; }

  .as-lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

  /* Section title */
  .analyser-section-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
  }

  /* Analyser cards */
  .analyser-cards { display: flex; flex-direction: column; gap: 1.5rem; }

  .no-weak-msg {
    text-align: center;
    color: var(--green);
    font-size: 1.1rem;
    padding: 3rem;
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 16px;
    font-weight: 600;
  }

  /* Individual subject analysis card */
  .weak-card {
    background: var(--bg-card);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeIn 0.4s ease forwards;
  }

  .weak-card.borderline { border-color: rgba(245,158,11,0.3); }

  .wc-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.8rem 1rem;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .wc-left { flex: 1; }

  .wc-code { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); margin-bottom: 4px; }
  .wc-name { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
  .wc-sem  { font-size: 0.8rem; color: var(--text-muted); }

  .wc-marks-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
  }

  .wc-mark-pill {
    text-align: center;
    background: var(--bg-card2);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    min-width: 80px;
  }

  .wc-mark-pill .mpl { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; }
  .wc-mark-pill .mpv { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
  .mpv.low  { color: #ef4444; }
  .mpv.border { color: #f59e0b; }
  .mpv.need { color: #8b5cf6; }

  .wc-gap-bar {
    height: 6px;
    background: rgba(239,68,68,0.15);
    border-radius: 3px;
    margin: 0 1.8rem 0;
    overflow: hidden;
    position: relative;
  }

  .wc-gap-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    border-radius: 3px;
    transition: width 1s ease;
  }

  /* Tabs */
  .wc-tabs {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
  }

  .wc-tab {
    flex: 1;
    padding: 0.7rem;
    background: none;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    letter-spacing: 0.5px;
  }

  .wc-tab:last-child { border-right: none; }
  .wc-tab:hover { background: rgba(6,182,212,0.06); color: var(--text); }
  .wc-tab.active { background: rgba(6,182,212,0.1); color: var(--cyan); border-bottom: 2px solid var(--cyan); }

  /* Tab content */
  .wc-content { padding: 1.5rem 1.8rem; }

  .wc-panel { display: none; }
  .wc-panel.active { display: block; }

  /* Theory panel */
  .theory-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
  }

  .theory-importance {
    background: rgba(6,182,212,0.05);
    border-left: 3px solid var(--cyan);
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
  }

  .ti-title { font-size: 0.75rem; color: var(--cyan); letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 0.5rem; font-weight: 700; }
  .ti-list { list-style: none; }
  .ti-list li { font-size: 0.9rem; color: var(--text-muted); padding: 3px 0; }
  .ti-list li::before { content: "→ "; color: var(--cyan); }

  /* Topics to focus */
  .focus-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.8rem;
  }

  .focus-tag {
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    color: var(--purple);
    font-weight: 600;
  }

  /* Improvement tips */
  .improve-list { display: flex; flex-direction: column; gap: 0.7rem; }

  .improve-item {
    display: flex;
    gap: 12px;
    background: var(--bg-card2);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    align-items: flex-start;
  }

  .imp-num {
    width: 24px; height: 24px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .imp-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
  .imp-text strong { color: var(--text); }

  /* Video panel */
  .video-section-note {
    background: rgba(245,158,11,0.07);
    border: 1px solid rgba(245,158,11,0.2);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
    color: #f59e0b;
    margin-bottom: 1rem;
  }

  .video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .video-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.25s;
    display: block;
  }

  .video-card:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(6,182,212,0.12); }

  .vc-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
  }

  .vc-play {
    position: absolute;
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    backdrop-filter: blur(4px);
  }

  .vc-info { padding: 0.8rem; }
  .vc-channel { font-size: 0.7rem; color: var(--cyan); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
  .vc-title { font-size: 0.85rem; color: var(--text); font-weight: 600; line-height: 1.3; }
  .vc-desc { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; }

  /* Chapters list */
  .chapters-list { display: flex; flex-direction: column; gap: 0.7rem; }

  .chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: all 0.2s;
  }

  .chapter-item:hover { border-color: rgba(6,182,212,0.35); background: rgba(6,182,212,0.04); }

  .ch-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }

  .ch-num {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 800; color: white;
    flex-shrink: 0;
  }

  .ch-info { min-width: 0; }
  .ch-name { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
  .ch-topics { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  .ch-video-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08));
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    padding: 7px 14px;
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
    letter-spacing: 0.5px;
  }

  .ch-video-btn:hover {
    background: rgba(239,68,68,0.25);
    border-color: rgba(239,68,68,0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,68,68,0.15);
  }

  .wc-gap-bar { position: relative; }

  /* ── MENU DRIVEN SUBJECT CARD ── */
  .wc-menu-row {
    display: flex; gap: 0; flex-wrap: wrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
    overflow-x: auto;
  }

  .wc-menu-btn {
    flex: 1; min-width: 120px;
    padding: 0.75rem 0.6rem;
    background: none; border: none;
    border-right: 1px solid var(--border);
    border-bottom: 3px solid transparent;
    color: var(--text-muted); font-family: var(--font-body);
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: all 0.2s; text-align: center;
    white-space: nowrap; letter-spacing: 0.3px;
  }
  .wc-menu-btn:last-child { border-right: none; }
  .wc-menu-btn:hover { background: rgba(6,182,212,0.05); color: var(--text); }
  .wc-menu-btn.active { background: rgba(6,182,212,0.09); color: var(--cyan); border-bottom-color: var(--cyan); }

  .wc-panel-body { padding: 1.5rem 1.8rem; }
  .wc-panel { display: none; }
  .wc-panel.active { display: block; }

  /* WHY panel */
  .why-intro { font-size: 0.95rem; color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
  .why-box {
    background: rgba(6,182,212,0.05); border-left: 3px solid var(--cyan);
    border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin-bottom: 1rem;
  }
  .why-box-title { font-size: 0.7rem; color: var(--cyan); letter-spacing: 0.3px; font-weight: 700; margin-bottom: 0.6rem; text-transform: uppercase; }
  .why-list { list-style: none; }
  .why-list li { font-size: 0.9rem; color: var(--text-muted); padding: 3px 0; }
  .why-list li::before { content: "→ "; color: var(--cyan); }

  /* UNITS panel */
  .units-grid { display: flex; flex-direction: column; gap: 0.8rem; }
  .unit-card {
    background: var(--bg-card2); border: 1px solid var(--border);
    border-radius: 14px; overflow: hidden; transition: border-color 0.2s;
  }
  .unit-card:hover { border-color: rgba(6,182,212,0.3); }
  .unit-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.1rem; cursor: pointer; gap: 1rem;
    user-select: none;
  }
  .unit-header:hover { background: rgba(6,182,212,0.04); }
  .unit-left { display: flex; align-items: center; gap: 12px; }
  .unit-num {
    width: 32px; height: 32px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 0.75rem; font-weight: 900; color: white;
  }
  .unit-title-text { font-size: 0.95rem; font-weight: 700; color: var(--text); }
  .unit-subtitle { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
  .unit-arrow { color: var(--text-dim); font-size: 0.8rem; transition: transform 0.2s; flex-shrink: 0; }
  .unit-card.open .unit-arrow { transform: rotate(90deg); color: var(--cyan); }

  .unit-body {
    display: none; padding: 0 1.1rem 1rem 1.1rem;
    border-top: 1px solid var(--border);
  }
  .unit-card.open .unit-body { display: block; }

  .topic-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }
  .topic-item {
    display: flex; align-items: flex-start; gap: 10px;
    background: rgba(6,182,212,0.03); border: 1px solid rgba(6,182,212,0.08);
    border-radius: 8px; padding: 0.6rem 0.8rem;
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.4;
  }
  .topic-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; margin-top: 5px; }

  .unit-vid-btn {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 0.8rem;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.28);
    border-radius: 8px; padding: 7px 16px;
    color: #f87171; font-size: 0.8rem; font-weight: 700;
    text-decoration: none; transition: all 0.2s;
  }
  .unit-vid-btn:hover { background: rgba(239,68,68,0.2); transform: translateY(-1px); }

  /* TIPS panel */
  .tips-grid { display: flex; flex-direction: column; gap: 0.75rem; }
  .tip-row {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--bg-card2); border-radius: 10px; padding: 0.85rem 1rem;
  }
  .tip-num {
    width: 24px; height: 24px; flex-shrink: 0; margin-top: 1px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 800; color: white;
  }
  .tip-txt { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
  .tip-txt strong { color: var(--text); }

  .target-box-new {
    margin-top: 1.2rem;
    background: linear-gradient(135deg,rgba(6,182,212,0.06),rgba(139,92,246,0.06));
    border: 1px solid rgba(6,182,212,0.2); border-radius: 12px;
    padding: 1rem 1.2rem;
  }
  .tbn-title { font-size: 0.68rem; color: var(--cyan); letter-spacing: 0.3px; font-weight: 700; margin-bottom: 6px; }
  .tbn-text  { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

  /* ===== CGPA PICTOGRAPH ===== */
  .cgpa-pictograph-section {
    background: var(--bg-card);
    border-top: 2px solid rgba(6,182,212,0.2);
    padding: 3rem 2rem 4rem;
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
  }

  .cgpa-pictograph-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  }

  .picto-header {
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .picto-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--cyan);
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(6,182,212,0.4);
  }

  .picto-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
    letter-spacing: 1px;
  }

  .picto-cgpa-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
  }

  .picto-cgpa-ring-wrap {
    filter: drop-shadow(0 0 30px rgba(6,182,212,0.3));
  }

  .picto-cgpa-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .picto-stat-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.5rem;
    min-width: 180px;
    transition: border-color 0.3s;
  }

  .picto-stat-card:hover { border-color: var(--cyan); }

  .ps-label { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; margin-bottom: 4px; }
  .ps-val { font-family: var(--font-display); font-size: 1.6rem; color: var(--cyan); font-weight: 800; }
  .ps-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

  /* BAR CHART */
  .picto-bars-wrap {
    max-width: 800px;
    margin: 0 auto 2.5rem;
  }

  .picto-bars-title {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 1.2rem;
    font-weight: 700;
  }

  .picto-bars {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: flex-end;
    gap: 10px;
    height: 160px;
    padding: 0 4px;
    border-bottom: 1px solid rgba(6,182,212,0.15);
  }

  .picto-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    height: 100%;
  }

  .picto-bar-val {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--cyan);
    font-weight: 500;
  }

  .picto-bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    position: relative;
    min-height: 4px;
    transition: height 1s cubic-bezier(0.34,1.56,0.64,1);
    cursor: pointer;
  }

  .picto-bar:hover { opacity: 0.8; }

  .picto-bars-xaxis {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    padding: 6px 4px 0;
    text-align: center;
  }

  .picto-bars-xaxis span {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
  }

  /* GRADE DISTRIBUTION */
  .picto-icons-section {
    max-width: 700px;
    margin: 0 auto 2.5rem;
  }

  .picto-icons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
  }

  .picto-grade-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.4rem;
    min-width: 90px;
    transition: all 0.2s;
  }

  .picto-grade-block:hover { border-color: var(--cyan); transform: translateY(-3px); }

  .pgb-grade { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
  .pgb-count { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--text); }
  .pgb-icons { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; max-width: 60px; }
  .pgb-dot { width: 8px; height: 8px; border-radius: 50%; }
  .pgb-label { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 1px; }

  /* STARS / JOURNEY */
  .picto-stars-section {
    max-width: 700px;
    margin: 0 auto;
  }

  .picto-stars-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .journey-card {
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    text-align: center;
    min-width: 110px;
    flex: 1;
    transition: all 0.3s;
  }

  .journey-card.done { border-color: rgba(6,182,212,0.4); }
  .journey-card.active-sem { border-color: var(--cyan); box-shadow: 0 0 20px rgba(6,182,212,0.15); }

  .jc-sem { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; }
  .jc-icon { font-size: 1.6rem; margin: 4px 0; }
  .jc-sgpa { font-family: var(--font-display); font-size: 0.95rem; color: var(--cyan); font-weight: 700; }
  .jc-grade { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

  /* MOBILE BOTTOM NAV */
  .mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 0.8rem 1rem;
    z-index: 100;
    overflow-x: auto;
    gap: 0.5rem;
    grid-column: 1 / -1;
  }

  .mobile-sem-btn {
    flex-shrink: 0;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
  }

  .mobile-sem-btn.active {
    background: rgba(6,182,212,0.15);
    border-color: var(--cyan);
    color: var(--cyan);
  }

  .mobile-nav-divider {
    width: 1px;
    background: var(--border);
    flex-shrink: 0;
    align-self: stretch;
    margin: 2px 2px;
  }

  .mobile-nav-page-btn {
    font-size: 1rem;
    padding: 5px 10px;
  }

  /* FLOATING CGPA */
  .floating-cgpa {
    display: none;
    position: fixed;
    top: 80px; right: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--cyan);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    z-index: 99;
    box-shadow: 0 4px 20px rgba(6,182,212,0.2);
  }

  .fc-label { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; }
  .fc-val { font-family: var(--font-display); font-size: 1.4rem; color: var(--cyan); }

  /* MOBILE STATS BAR — hidden by default, shown on phones via media query */
  .mobile-stats-bar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.45rem 1rem;
    position: sticky;
    top: 56px;
    z-index: 990;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  }
  .msb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    flex: 1;
  }
  .msb-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-dim);
  }
  .msb-val {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--cyan);
    line-height: 1;
  }
  .msb-sgpa { color: #a78bfa; }
  .msb-sem { color: var(--text); font-size: 0.95rem; }
  .msb-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 0.5rem;
  }

  /* ════════════════════════════════
     RESOURCES PAGE
  ════════════════════════════════ */
  #resourcesPage { flex-direction: column; min-height: 100vh; }

  .res-body {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* ── Sem Tabs ── */
  .res-tabs-wrap {
    overflow-x: auto;
    margin-bottom: 1.8rem;
    padding-bottom: 10px;
    /* Custom scrollbar — wide, rounded, visible */
    scrollbar-width: auto;
    scrollbar-color: rgba(6,182,212,0.5) rgba(6,182,212,0.08);
  }
  .res-tabs-wrap::-webkit-scrollbar {
    height: 6px;
  }
  .res-tabs-wrap::-webkit-scrollbar-track {
    background: rgba(6,182,212,0.08);
    border-radius: 20px;
    margin: 0 8px;
  }
  .res-tabs-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #06b6d4, #8b5cf6);
    border-radius: 20px;
    min-width: 40px;
  }
  .res-tabs-wrap::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #22d3ee, #a78bfa);
  }
  .res-tabs {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
    padding-bottom: 2px;
  }
  .res-sem-tab {
    background: var(--bg-card2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
  }
  .res-sem-tab:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(6,182,212,0.06);
  }
  .res-sem-tab.active {
    background: rgba(6,182,212,0.12);
    border-color: var(--cyan);
    color: var(--cyan);
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(6,182,212,0.18);
  }

  /* ── Subject Card ── */
  .res-subj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.2s;
  }
  .res-subj-card:hover { border-color: rgba(6,182,212,0.35); }

  .res-subj-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    cursor: pointer;
    gap: 1rem;
  }
  .res-subj-left { display: flex; align-items: center; gap: 0.8rem; flex: 1; min-width: 0; }
  .res-subj-code {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--cyan);
    font-weight: 700;
    white-space: nowrap;
    background: rgba(6,182,212,0.1);
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
  }
  .res-subj-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .res-subj-meta { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
  .res-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(6,182,212,0.1);
    color: var(--cyan);
    white-space: nowrap;
  }
  .res-subj-arrow { color: var(--text-dim); font-size: 0.8rem; transition: transform 0.2s; margin-left: 0.3rem; }
  .res-subj-arrow.open { transform: rotate(180deg); }

  /* ── Subject Body ── */
  .res-subj-body { border-top: 1px solid var(--border); }

  /* ── Unit Accordion ── */
  .res-unit { border-bottom: 1px solid rgba(255,255,255,0.04); }
  .res-unit:last-child { border-bottom: none; }

  .res-unit-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1.4rem;
    cursor: pointer;
    transition: background 0.2s;
  }
  .res-unit-header:hover { background: rgba(6,182,212,0.04); }

  .res-unit-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--purple);
    font-weight: 700;
    background: rgba(139,92,246,0.12);
    padding: 2px 8px;
    border-radius: 5px;
    flex-shrink: 0;
  }
  .res-unit-name { font-size: 0.92rem; font-weight: 600; color: var(--text); flex: 1; }
  .res-unit-arrow { color: var(--text-dim); font-size: 0.75rem; transition: transform 0.2s; }
  .res-unit-arrow.open { transform: rotate(180deg); }

  /* ── Unit Body ── */
  .res-unit-body { padding: 0.8rem 1.4rem 1.2rem; background: var(--bg-card2); }

  /* ── Videos Row ── */
  .res-videos-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
  }

  /* ── Video Card ── */
  .res-video-card {
    border: 1.5px solid;
    border-radius: 14px;
    overflow: hidden;
    width: 220px;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  .res-video-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

  .res-thumb-wrap {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
  }
  .res-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
  }
  .res-thumb-wrap:hover .res-thumb { transform: scale(1.05); }

  .res-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .res-thumb-wrap:hover .res-play-overlay { opacity: 1; }

  .res-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
  }

  .res-video-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 0.45rem 0.7rem 0.2rem;
  }

  .res-part-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.3rem 0.7rem 0.7rem;
  }

  .res-watch-btn {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border: 1.5px solid;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    font-family: var(--font-body);
  }
  .res-watch-btn:hover { opacity: 0.8; transform: translateY(-1px); }
  .res-part-btn { font-size: 0.7rem; padding: 3px 8px; }

  .res-notes-btn {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(16,185,129,0.12);
    border: 1.5px solid rgba(16,185,129,0.4);
    border-radius: 8px;
    color: #10b981;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 0.3rem;
  }
  .res-notes-btn:hover { background: rgba(16,185,129,0.2); transform: translateY(-1px); }

  /* Responsive */
  @media (max-width: 767px) {
    .res-body { padding: 0.8rem; }
    .res-subj-name { font-size: 0.9rem; }
    .res-video-card { width: 160px; }
    .res-tabs { gap: 0.3rem; }
    .res-sem-tab { font-size: 0.78rem; padding: 0.45rem 0.8rem; }
    .res-subj-header { padding: 0.8rem 1rem; }
    .res-unit-header { padding: 0.7rem 1rem; }
    .res-unit-body { padding: 0.6rem 1rem 1rem; }
  }
  @media (max-width: 479px) {
    .res-video-card { width: 140px; }
    .res-subj-code { display: none; }
  }

  /* ── CSV video buttons in Analyser ── */
  .analyser-vid-row {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-top: 0.8rem; padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .analyser-vid-btn {
    display: inline-block; padding: 5px 12px;
    border: 1.5px solid; border-radius: 8px;
    font-size: 0.78rem; font-weight: 700;
    font-family: var(--font-body);
    text-decoration: none; transition: all 0.2s;
    white-space: nowrap; background: rgba(0,0,0,0.12);
  }
  .analyser-vid-btn:hover { opacity: 0.8; transform: translateY(-1px); }

/* ══════════════════════════════════════
   ONBOARDING STYLES
══════════════════════════════════════ */
/* ══════════════════════════════════════
   NEW FRIENDLY ONBOARDING STYLES
══════════════════════════════════════ */
.onboard-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 2;
}

/* Hero greeting card */
.hero-greet {
  text-align: center;
  margin-bottom: 2rem;
  animation: fadeSlideDown 0.7s cubic-bezier(0.16,1,0.3,1);
}
@keyframes fadeSlideDown {
  from { opacity:0; transform: translateY(-20px); }
  to   { opacity:1; transform: translateY(0); }
}
.hero-emoji {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
  margin-bottom: 0.3rem;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.hero-features {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.hero-feat-pill {
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Main onboard card */
.onboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 2.4rem;
  width: 100%;
  position: relative;
  overflow: visible;
  box-shadow: 0 0 60px rgba(6,182,212,0.08);
  animation: slideUp 0.6s cubic-bezier(0.16,1,0.3,1);
}
.onboard-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 70%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
}

/* Step indicator */
.step-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.6rem;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.4s;
  border: 2px solid var(--border);
  background: var(--bg-card2);
  color: var(--text-dim);
}
.step-dot.active {
  border-color: var(--cyan);
  background: rgba(6,182,212,0.15);
  color: var(--cyan);
  box-shadow: 0 0 14px rgba(6,182,212,0.3);
}
.step-dot.done {
  border-color: var(--green);
  background: rgba(16,185,129,0.15);
  color: var(--green);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.4s;
}
.step-line.done { background: linear-gradient(90deg, var(--green), var(--cyan)); }
.step-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.step-lbl {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  font-weight: 600;
  text-transform: uppercase;
  transition: color 0.3s;
}
.step-lbl.active { color: var(--cyan); }
.step-lbl.done { color: var(--green); }

/* Step panels */
.step-panel { display: none; }
.step-panel.active { display: block; animation: panelIn 0.4s cubic-bezier(0.16,1,0.3,1); }
@keyframes panelIn {
  from { opacity:0; transform: translateX(20px); }
  to   { opacity:1; transform: translateX(0); }
}

.step-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.step-sub {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.3rem;
  line-height: 1.4;
}

/* Compact form inputs */
.compact-group {
  margin-bottom: 0.9rem;
}
.compact-label {
  display: block;
  font-size: 0.78rem;
  color: var(--cyan);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.compact-input {
  width: 100%;
  background: rgba(6,182,212,0.04);
  border: 1.5px solid rgba(6,182,212,0.15);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.25s;
  outline: none;
}
.compact-input:focus {
  border-color: var(--cyan);
  background: rgba(6,182,212,0.07);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.1);
}
.compact-input::placeholder { color: var(--text-dim); font-size: 0.92rem; }
body.light-mode .compact-input { background: rgba(2,132,199,0.04); color: var(--text); }
body.light-mode .compact-input::placeholder { color: var(--text-dim); }

.compact-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}
@media (max-width: 500px) { .compact-row-2 { grid-template-columns: 1fr; gap: 0; } }

/* Next/Launch buttons */
.btn-next {
  width: 100%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border: none;
  border-radius: 12px;
  padding: 0.9rem;
  color: white;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  margin-top: 0.6rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-next:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(6,182,212,0.35); }
.btn-next:active { transform: translateY(0); }

/* Warm welcome note on step 2 */
.welcome-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(6,182,212,0.08));
  border: 1px solid rgba(16,185,129,0.25);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
}
.welcome-note-txt {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.welcome-note-txt strong { color: var(--green); }

/* Privacy note */
.privacy-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
  line-height: 1.4;
}
.privacy-note span { color: var(--cyan); }

/* ════════════════════════════════════════════════════════

/* ════════════════════════════════════════════════════════
   FULL RESPONSIVE SYSTEM — Large readable fonts throughout
   Base: 20px (desktop)
   All rem values scale from this root.
════════════════════════════════════════════════════════ */

/* ── Prevent horizontal scroll ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg-deep); }
body { overflow-x: hidden; max-width: 100vw; margin: 0; padding: 0; background: var(--bg-deep); }

/* ── Global input/select mobile fix ── */
input, select, textarea { max-width: 100%; box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }

/* ── Large desktop ≥ 1600px ── */
@media (min-width: 1600px) {
  html { font-size: 17px; }
  .main-layout { grid-template-columns: 270px 1fr 360px; }
  .subjects-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .analyser-body { max-width: 1300px; }
  .content-area { padding: 0.8rem 2.5rem 2.5rem; }
}

/* ── Desktop 1280–1599px ── */
@media (max-width: 1599px) {
  html { font-size: 16px; }
}

/* ── Laptop 1024–1279px ── */
@media (max-width: 1279px) {
  html { font-size: 15px; }
  .main-layout { grid-template-columns: 200px 1fr; }
  .right-panel { display: none; }
  .floating-cgpa { display: flex !important; }
  .subjects-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── Tablet landscape 768–1023px ── */
@media (max-width: 1023px) {
  html { font-size: 14.5px; }
  .main-layout { grid-template-columns: 180px 1fr; }
  .right-panel { display: none; }
  .floating-cgpa { display: flex !important; }
  .header { padding: 0 1.2rem; }
  .stats-bar { padding: 1rem 1.2rem; gap: 1rem; }
  .content-area { padding: 0.8rem 1.4rem 1.4rem; }
  .subjects-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
  .analyser-body { padding: 1.3rem; }
  .analyser-summary { grid-template-columns: repeat(2, 1fr); }
  .asb-inputs { flex-wrap: wrap; }
  .picto-cgpa-main { flex-direction: column; align-items: center; gap: 1.5rem; }
  .login-card { padding: 2rem 1.8rem; }
  .res-body { padding: 1.2rem; }
}

/* ── Tablet portrait 600–767px ── */
@media (max-width: 767px) {
  html { font-size: 14px; }

  /* Layout */
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: flex; overflow-x: auto; }
  body { padding-bottom: 72px; }

  /* Header */
  .header { padding: 0 1rem; height: 60px; gap: 0.6rem; }
  .h-logo-icon { width: auto; height: 36px; }
  .h-logo-icon img { height: 34px; mix-blend-mode: screen; }
  body.light-mode .h-logo-icon img { mix-blend-mode: multiply; }
  .h-logo-icon img { height: 34px; }
  .h-logo-text { font-size: 0.85rem; }
  .user-badge { padding: 5px 11px 5px 7px; }
  .user-name { font-size: 0.85rem; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-logout { padding: 6px 11px; font-size: 0.8rem; }
  .header-user { gap: 0.6rem; }
  .hdr-res-btn span, .hdr-analyse-btn span { display: none; }
  .hdr-res-btn, .hdr-analyse-btn { padding: 6px 9px; font-size: 1.05rem; border: none; background: none; }

  /* Stats bar */
  .stats-bar { padding: 0.8rem 1rem; gap: 0.7rem; overflow-x: auto; flex-wrap: nowrap; }
  .stats-bar::-webkit-scrollbar { height: 0; }
  .stat-pill { padding: 0.5rem 1rem; flex-shrink: 0; }
  .stat-label { font-size: 0.72rem; }
  .stat-value { font-size: 1.05rem; }

  /* Content */
  .content-area { padding: 0.8rem 1.1rem 1.1rem; }
  .sem-title { font-size: 1.15rem; }
  .sem-header { padding: 0.9rem 0; }

  /* Subject cards – 2 columns on tablet portrait */
  .subjects-grid { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .subject-card { padding: 1.1rem; }
  .subj-name { font-size: 0.9rem; }
  .subj-code { font-size: 0.78rem; }
  .marks-input { padding: 0.6rem 0.75rem; font-size: 0.95rem; }
  .grade-pill { font-size: 0.82rem; min-width: 42px; }

  /* Floating CGPA */
  .floating-cgpa { top: 65px; right: 0.8rem; padding: 0.55rem 1rem; border-radius: 12px; }
  .fc-val { font-size: 1.15rem; }
  .fc-label { font-size: 0.6rem; }

  /* Login */
  .login-card { padding: 2.1rem 1.7rem; border-radius: 20px; margin: 1rem; max-width: 100%; }
  .logo-title { font-size: 1.6rem; }
  .logo-icon { width: 72px; height: 72px; font-size: 1.7rem; }
  .logo-sub { font-size: 1rem; }
  .form-input { font-size: 1rem; padding: 0.9rem 1.1rem; }
  .form-label { font-size: 0.85rem; }
  .btn-login { font-size: 0.92rem; padding: 1.05rem; }
  .onboard-card { padding: 1.8rem 1.5rem; }

  /* Scan modal */
  .scan-card { padding: 1.6rem 1.5rem; border-radius: 20px; max-width: 100%; }
  .scan-title { font-size: 0.92rem; }
  .scan-drop-zone { padding: 1.5rem 1.1rem; }
  .scan-drop-icon { font-size: 2.2rem; }
  .scan-drop-text { font-size: 0.88rem; }
  .scan-results-table-wrap { max-height: 230px; }
  .scan-sem-select { font-size: 1rem; }

  /* Analyser */
  .analyser-body { padding: 1rem; }
  .analyser-settings-bar { padding: 1.1rem 1.2rem; }
  .asb-title { font-size: 0.72rem; }
  .asb-inputs { gap: 0.6rem; }
  .asb-field { min-width: 120px; }
  .analyser-summary { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
  .as-num { font-size: 1.6rem; }
  .as-lbl { font-size: 0.72rem; }
  .wc-top { flex-direction: column; gap: 0.8rem; padding: 1rem; }
  .wc-menu-btn { font-size: 0.75rem; }
  .unit-header { padding: 0.8rem 1rem; }
  .unit-title-text { font-size: 0.9rem; }
  .topic-item { font-size: 0.85rem; }
  .unit-vid-btn { font-size: 0.8rem; width: 100%; justify-content: center; }

  /* Pictograph */
  .cgpa-pictograph-section { padding: 1.5rem 0.9rem 4.5rem; }
  .picto-title { font-size: 1.1rem; }
  .picto-cgpa-main { flex-direction: column; align-items: center; gap: 1.2rem; }
  .picto-cgpa-stats { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
  .picto-stat-card { min-width: 115px; padding: 0.7rem 1rem; }
  .picto-bars { height: 110px; }
  .picto-bars-xaxis span { font-size: 0.62rem; }
  .journey-card { min-width: 72px; padding: 0.65rem 0.55rem; }

  /* Resources */
  .res-body { padding: 1rem; }
  .res-subj-name { font-size: 0.92rem; }
  .res-video-card { width: 160px; }
  .res-tabs-wrap { overflow-x: auto; }
  .res-tabs-wrap::-webkit-scrollbar { height: 3px; }
  .res-tabs { flex-wrap: nowrap; min-width: max-content; gap: 0.35rem; }
  .res-sem-tab { font-size: 0.8rem; padding: 0.48rem 0.85rem; }
  .res-subj-header { padding: 0.9rem 1.1rem; }

  /* Mobile nav */
  .mobile-nav { padding: 0.65rem 0.8rem; gap: 0.35rem; }
  .mobile-sem-btn { padding: 6px 11px; font-size: 0.82rem; }
}

/* ── Large mobile 480–599px ── */
@media (max-width: 599px) {
  html { font-size: 14px; }
  .subjects-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .subject-card { padding: 1rem; }
  .login-card { margin: 0.8rem; }
  .scan-card { padding: 1.4rem 1.2rem; }
  .stats-bar { gap: 0.55rem; padding: 0.75rem 0.9rem; }
  .stat-pill { padding: 0.48rem 0.8rem; }
}

/* ── Mobile < 480px ── */
@media (max-width: 479px) {
  html { font-size: 13.5px; }

  /* Header */
  .header { padding: 0 0.75rem; height: 54px; }
  .h-logo-text { font-size: 0.8rem; }
  .user-name { max-width: 72px; font-size: 0.78rem; }
  .btn-logout { font-size: 0.75rem; padding: 5px 9px; }
  .hdr-res-btn, .hdr-analyse-btn { display: none; }
  .hdr-scan-btn { padding: 6px 9px; font-size: 1rem; border: none; background: none; }

  /* Content */
  .content-area { padding: 0.6rem 0.85rem 0.85rem; }
  .sem-title { font-size: 1rem; }

  /* Single column cards */
  .subjects-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  .subject-card { padding: 1rem; }
  .subj-name { font-size: 0.92rem; }
  .subj-code { font-size: 0.76rem; }
  .marks-input { padding: 0.55rem 0.65rem; font-size: 0.92rem; }
  .grade-pill { font-size: 0.76rem; min-width: 38px; }

  /* Login */
  .login-card { padding: 1.9rem 1.3rem; margin: 0.6rem; border-radius: 18px; }
  .logo-title { font-size: 1.35rem; letter-spacing: 0.2px; }
  .logo-icon { width: 64px; height: 64px; font-size: 1.5rem; }
  .logo-sub { font-size: 0.9rem; }
  .form-label { font-size: 0.8rem; }
  .form-input { padding: 0.85rem 1rem; font-size: 0.95rem; }
  .btn-login { font-size: 0.85rem; letter-spacing: 0.2px; padding: 1rem; }

  /* Scan modal */
  .scan-card { padding: 1.3rem 1.1rem; border-radius: 16px; }
  #scanModal { padding: 0.6rem; }
  .scan-card { max-height: calc(100vh - 1.2rem); }
  .scan-results-table-wrap { max-height: 190px; }
  .scan-title { font-size: 0.86rem; letter-spacing: 1px; }

  /* Analyser */
  .analyser-body { padding: 0.8rem; }
  .analyser-summary { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .as-num { font-size: 1.4rem; }
  .as-lbl { font-size: 0.7rem; }
  .asb-field { min-width: 100px; }
  .wc-menu-btn { font-size: 0.7rem; padding: 0.55rem 0.25rem; }
  .wc-name { font-size: 0.95rem; }
  .analyser-section-title { font-size: 0.85rem; }

  /* Mobile nav */
  .mobile-nav { padding: 0.6rem 0.7rem; gap: 0.28rem; }
  .mobile-sem-btn { padding: 5px 9px; font-size: 0.78rem; }

  /* Floating CGPA */
  .floating-cgpa { padding: 0.45rem 0.8rem; top: 59px; }
  .fc-val { font-size: 1rem; }
  .fc-label { font-size: 0.55rem; }

  /* Stats bar */
  .stats-bar { flex-wrap: nowrap; overflow-x: auto; padding: 0.65rem 0.75rem; gap: 0.5rem; }
  .stats-bar::-webkit-scrollbar { height: 0; }
  .stat-pill { flex-shrink: 0; }

  /* Resources */
  .res-video-card { width: 145px; }
  .res-subj-code { display: none; }
  .res-tabs-wrap { overflow-x: auto; }

  /* Pictograph */
  .picto-cgpa-stats { gap: 0.45rem; }
  .picto-stat-card { min-width: 100px; padding: 0.6rem 0.75rem; }
  .ps-val { font-size: 1.15rem; }
}

/* ── Small mobile < 360px ── */
@media (max-width: 359px) {
  html { font-size: 13px; }
  .header { height: 50px; padding: 0 0.6rem; }
  .h-logo-icon { width: auto; height: 30px; }
  .h-logo-icon img { height: 28px; mix-blend-mode: screen; }
  body.light-mode .h-logo-icon img { mix-blend-mode: multiply; }
  .h-logo-icon img { height: 28px; }
  .h-logo-text { display: none; }
  .user-name { display: none; }
  .content-area { padding: 0.5rem 0.65rem 0.65rem; }
  .subjects-grid { gap: 0.65rem; }
  .subject-card { padding: 0.85rem; }
  .login-card { margin: 0.35rem; padding: 1.6rem 1rem; }
  .logo-title { font-size: 1.15rem; }
  .mobile-nav { padding: 0.5rem 0.55rem; gap: 0.22rem; }
  .mobile-sem-btn { padding: 5px 8px; font-size: 0.74rem; }
  .scan-card { padding: 1.1rem 0.9rem; }
  .analyser-body { padding: 0.55rem; }
}

/* ── Touch-friendly minimum tap targets ── */
@media (max-width: 767px) {
  button, .sem-btn, .mobile-sem-btn, .res-sem-tab,
  .scan-btn-go, .scan-btn-cancel, .btn-login, .btn-next,
  .btn-logout, .hdr-scan-btn, .hdr-res-btn, .hdr-analyse-btn {
    min-height: 42px;
  }
  .marks-input { min-height: 44px; }
}

/* ── Onboarding always full-width on mobile ── */
@media (max-width: 600px) {
  .onboard-wrap { padding: 0.9rem 0.6rem; min-height: 100vh; justify-content: center; }
  .onboard-card { width: 100%; max-width: 100%; margin: 0; }
  .compact-row-2 { grid-template-columns: 1fr; gap: 0; }
}

/* ── Print styles ── */
@media print {
  .header, .sidebar, .mobile-nav, .floating-cgpa,
  .right-panel, #scanModal { display: none !important; }
  .main-layout { grid-template-columns: 1fr; }
  .subjects-grid { grid-template-columns: repeat(3, 1fr); }
  body { padding-bottom: 0; background: white; color: black; }
}

/* ══════════════════════════════════════
   BACK PAPER FEATURE — v7
══════════════════════════════════════ */

/* SGPA badges row in sem header — clean flex, no overlap */
.sgpa-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

/* Override margin-top when inside badges row */
.sgpa-badges-row .live-sgpa-mini {
  margin-top: 0;
}

.sgpa-arrow-sep {
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Back paper input row inside subject card */
.back-paper-row {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.back-paper-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: var(--font-body);
  text-transform: uppercase;
}

.back-paper-icon { font-size: 0.8rem; }

.marks-input-back {
  width: 90px !important;
  padding: 0.3rem 0.6rem !important;
  font-size: 0.85rem !important;
  min-height: unset !important;
  height: 34px !important;
  border-color: rgba(16,185,129,0.35) !important;
  background: rgba(16,185,129,0.05) !important;
  color: #10b981 !important;
}
.marks-input-back:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.15) !important;
}
.marks-input-back::placeholder { color: rgba(16,185,129,0.45) !important; }

/* Back SGPA inline in sem header */
.live-sgpa-back-mini {
  background: rgba(16,185,129,0.08) !important;
  border-color: #10b981 !important;
}

/* Delta badge in header */
.back-sgpa-delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.35);
  color: #10b981;
  font-size: 0.78rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Sem bar — back paper overlay bar (second bar, green, positioned absolute) */
.sem-bar-wrap {
  position: relative;
}
.sem-bar-back {
  position: absolute !important;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, #10b981, #06b6d4) !important;
  opacity: 0.45;
  pointer-events: none;
}

/* After-back SGPA value in sem bars panel */
.sem-val-back {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #10b981;
  width: 40px;
  text-align: right;
  font-weight: 700;
}

/* Light mode overrides */
body.light-mode .back-paper-row {
  background: rgba(16,185,129,0.05);
  border-color: rgba(16,185,129,0.3);
}
body.light-mode .marks-input-back {
  background: rgba(16,185,129,0.04) !important;
}



/* ═══════════════════════════════════════════
   INTERNSHIPS PAGE STYLES — FIXED LAYOUT
═══════════════════════════════════════════ */

/* ── INTERNSHIPS PAGE: full height, flex column ── */
#internshipsPage {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}
#internshipsPage.active { display: flex; }

/* ── INTERNSHIPS HEADER ── */
#internshipsPage .intern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 1.2rem 0 1rem;
  background: rgba(13,17,23,0.97);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 300;
  backdrop-filter: blur(20px);
  flex-shrink: 0;
  gap: 1rem;
}
body.light-mode #internshipsPage .intern-header {
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

/* Header left: hamburger + logo */
#internshipsPage .intern-hdr-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
#internshipsPage .intern-hdr-left .header-logo {
  gap: 6px;
  margin-left: 0;
}

/* Header right: AI LIVE → Back → Username → Sign Out */
#internshipsPage .intern-hdr-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* AI LIVE pill */
#internshipsPage .intern-ai-live {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
#internshipsPage .intern-pulse-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulseDot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.8)} }

/* Back button */
#internshipsPage .intern-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.25);
  border-radius: 8px;
  padding: 6px 14px;
  color: var(--cyan);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
#internshipsPage .intern-back-btn:hover { background: rgba(6,182,212,0.18); }

/* User badge */
#internshipsPage .intern-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6,182,212,0.08);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 5px 14px 5px 6px;
}
#internshipsPage .intern-user-av {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white;
  flex-shrink: 0;
}
#internshipsPage .intern-user-nm {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text); white-space: nowrap;
}

/* Sign Out button */
#internshipsPage .intern-signout-btn {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: var(--red);
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
#internshipsPage .intern-signout-btn:hover { background: rgba(239,68,68,0.2); }

/* ===== PAGE WRAP: sidebar + content side by side ===== */
#internshipsPage .page-wrap {
  display: flex;        /* row — intern-sidebar left, intern-content right */
  flex: 1;              /* fills .page column space */
  width: 100%;          /* explicit full width in column-flex context */
  min-width: 0;
  min-height: calc(100vh - 70px);
  position: relative;
  z-index: 1;
  align-items: stretch;
}

/* ===== SIDEBAR: fixed left, no extra margin ===== */
#internshipsPage .intern-sidebar {
  width: 220px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  flex-shrink: 0;
}
#internshipsPage .intern-sidebar::-webkit-scrollbar { width: 4px; }
#internshipsPage .intern-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
#internshipsPage .sidebar-title {
  font-size: 0.7rem; color: var(--text-dim);
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 0 1.5rem; margin-bottom: 0.8rem;
  font-weight: 600;
}
#internshipsPage .nav-btn {
  width: 100%; background: none; border: none;
  border-left: 3px solid transparent;
  padding: 0.75rem 1.5rem;
  text-align: left; cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
}
#internshipsPage .nav-btn:hover { background: rgba(6,182,212,0.05); color: var(--text); }
#internshipsPage .nav-btn.active {
  border-left-color: var(--cyan);
  background: rgba(6,182,212,0.08);
  color: var(--cyan); font-weight: 700;
}
#internshipsPage .nav-btn .nav-icon { font-size: 1rem; }
#internshipsPage .nav-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 0.68rem;
  background: rgba(6,182,212,0.15); color: var(--cyan);
  border-radius: 4px; padding: 2px 6px;
}
#internshipsPage .nav-btn.active .nav-count { background: var(--cyan); color: var(--bg-deep); }
#internshipsPage .sidebar-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 1rem 1.5rem;
}
#internshipsPage .sidebar-section-label {
  font-size: 0.65rem; color: var(--text-dim);
  letter-spacing: 0.3px; text-transform: uppercase;
  padding: 0 1.5rem; margin: 0.5rem 0 0.3rem;
  font-weight: 600; display: block;
}

/* ===== MAIN CONTENT: starts immediately after sidebar, left-aligned ===== */
#internshipsPage .intern-content {
  flex: 1;              /* takes all width after 220px sidebar */
  padding: 2rem 2.5rem;
  overflow-y: auto;
  min-width: 0;         /* prevents flex blowout */
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ===== PAGE HEADER: INTERNSHIPS title aligned far left ===== */
#internshipsPage .page-header {
  margin-bottom: 2rem;
  /* Explicitly left-aligned, matching grades page "Semester I" */
  text-align: left;
}
#internshipsPage .page-title-line {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 0.3rem;
  justify-content: flex-start; /* left-align */
}
#internshipsPage .page-title {
  font-family: var(--font-display);
  font-size: 1.7rem; font-weight: 800;
  color: var(--cyan); letter-spacing: 1px;
}
#internshipsPage .page-sub {
  color: var(--text-muted); font-size: 1rem;
  margin-top: 4px; font-weight: 500;
}
#internshipsPage .ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 20px; padding: 3px 12px;
  font-size: 0.72rem; font-weight: 700;
  color: #a78bfa; letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== STATS ROW: left-aligned ===== */
#internshipsPage .stats-row {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: flex-start;
}
#internshipsPage .stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  display: flex; flex-direction: column; gap: 4px;
  min-width: 130px;
  transition: all 0.2s;
  animation: internCardIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
#internshipsPage .stat-card:hover { border-color: rgba(6,182,212,0.35); transform: translateY(-2px); }
#internshipsPage .stat-lbl { font-size: 0.7rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; font-weight: 600; }
#internshipsPage .stat-val { font-family: var(--font-display); font-size: 1.4rem; color: var(--cyan); }
#internshipsPage .stat-val.green { color: var(--green); }
#internshipsPage .stat-val.purple { color: var(--purple); }
#internshipsPage .stat-val.yellow { color: var(--yellow); }

/* ===== CONTROLS BAR ===== */
#internshipsPage .controls-bar {
  display: flex; gap: 0.8rem; align-items: center;
  flex-wrap: wrap; margin-bottom: 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.2rem;
}
#internshipsPage .search-box {
  flex: 1; min-width: 200px;
  background: rgba(6,182,212,0.04);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 10px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  outline: none; transition: all 0.2s;
}
#internshipsPage .search-box:focus { border-color: var(--cyan); background: rgba(6,182,212,0.08); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }
#internshipsPage .search-box::placeholder { color: var(--text-dim); }
#internshipsPage .search-wrap { position: relative; flex: 1; min-width: 200px; }
#internshipsPage .search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.9rem; pointer-events: none;
}
#internshipsPage .filter-select {
  background: rgba(6,182,212,0.04);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem;
  outline: none; cursor: pointer;
  transition: all 0.2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2306b6d4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}
#internshipsPage .filter-select:focus { border-color: var(--cyan); }
#internshipsPage .filter-select option { background: #0f172a; color: #e2e8f0; }
#internshipsPage .btn-refresh {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(6,182,212,0.2));
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 10px; padding: 0.6rem 1.1rem;
  color: #a78bfa; font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  letter-spacing: 0.5px; white-space: nowrap;
}
#internshipsPage .btn-refresh:hover { background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.3)); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(139,92,246,0.25); }
#internshipsPage .btn-refresh.spinning .refresh-icon { animation: internSpin 1s linear infinite; }
@keyframes internSpin { to { transform: rotate(360deg); } }
#internshipsPage .refresh-icon { display: inline-block; font-style: normal; }

/* ===== SOURCE TABS ===== */
#internshipsPage .source-tabs {
  display: flex; gap: 0.5rem;
  margin-bottom: 1.5rem; flex-wrap: wrap;
  justify-content: flex-start;
}
#internshipsPage .src-tab {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 0.5rem 1rem;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted);
}
#internshipsPage .src-tab:hover { border-color: rgba(6,182,212,0.4); color: var(--text); }
#internshipsPage .src-tab.active { border-color: var(--cyan); background: rgba(6,182,212,0.08); color: var(--cyan); }
#internshipsPage .src-tab.active.internshala { border-color: #f59e0b; background: rgba(245,158,11,0.08); color: #f59e0b; }

#internshipsPage .src-tab.active.linkedin { border-color: #0a66c2; background: rgba(10,102,194,0.08); color: #0a66c2; }
#internshipsPage .src-tab.active.jsearch { border-color: #8b5cf6; background: rgba(139,92,246,0.08); color: #8b5cf6; }
#internshipsPage .src-tab.active.remotive { border-color: #06b6d4; background: rgba(6,182,212,0.08); color: #06b6d4; }
#internshipsPage .src-dot { width: 8px; height: 8px; border-radius: 50%; }
#internshipsPage .src-dot.all { background: var(--cyan); }
#internshipsPage .src-dot.internshala { background: #f59e0b; }

#internshipsPage .src-dot.linkedin { background: #0a66c2; }
#internshipsPage .src-dot.jsearch  { background: #8b5cf6; }
#internshipsPage .src-dot.remotive { background: #06b6d4; }
#internshipsPage .tab-count {
  font-family: var(--font-mono); font-size: 0.65rem;
  background: rgba(255,255,255,0.08); border-radius: 4px;
  padding: 1px 5px; color: var(--text-dim);
}

/* ===== INTERNSHIP GRID: left-aligned, consistent grid ===== */
#internshipsPage .internship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
  align-items: start;
  /* No centering, no extra padding — grid starts from left edge of content */
  justify-content: start;
}

/* ===== LOADING STATE ===== */
#internshipsPage .loading-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 1.2rem;
}
#internshipsPage .ai-spinner {
  width: 60px; height: 60px;
  border: 3px solid rgba(6,182,212,0.1);
  border-top-color: var(--cyan);
  border-right-color: var(--purple);
  border-radius: 50%;
  animation: internSpin 1.2s linear infinite;
}
#internshipsPage .loading-label {
  font-family: var(--font-display); font-size: 0.8rem;
  color: var(--cyan); letter-spacing: 0.5px;
  animation: internLoadPulse 1.5s ease-in-out infinite;
}
#internshipsPage .loading-steps {
  display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 320px;
}
#internshipsPage .loading-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--text-dim);
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  transition: all 0.4s;
}
#internshipsPage .loading-step.done { color: var(--green); border-color: rgba(16,185,129,0.2); background: rgba(16,185,129,0.04); }
#internshipsPage .loading-step.active { color: var(--cyan); border-color: rgba(6,182,212,0.2); background: rgba(6,182,212,0.04); }
#internshipsPage .step-icon { font-size: 0.9rem; }

/* ===== LOADING STATE ===== */
#internshipsPage .loading-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 1.2rem;
}
#internshipsPage .ai-spinner {
  width: 60px; height: 60px;
  border: 3px solid rgba(6,182,212,0.1);
  border-top-color: var(--cyan);
  border-right-color: var(--purple);
  border-radius: 50%;
  animation: internSpin 1.2s linear infinite;
}
#internshipsPage .loading-label {
  font-family: var(--font-display); font-size: 0.8rem;
  color: var(--cyan); letter-spacing: 0.5px;
  animation: internLoadPulse 1.5s ease-in-out infinite;
}
@keyframes internLoadPulse { 0%,100%{opacity:0.5} 50%{opacity:1} }
#internshipsPage .loading-steps {
  display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 320px;
}
#internshipsPage .loading-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--text-dim);
  padding: 6px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid transparent;
  transition: all 0.4s;
}
#internshipsPage .loading-step.done { color: var(--green); border-color: rgba(16,185,129,0.2); background: rgba(16,185,129,0.04); }
#internshipsPage .loading-step.active { color: var(--cyan); border-color: rgba(6,182,212,0.2); background: rgba(6,182,212,0.04); }
#internshipsPage .step-icon { font-size: 0.9rem; }

/* ===== INTERNSHIP GRID ===== */
#internshipsPage .internship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.2rem;
}

/* ===== INTERNSHIP CARD ===== */
@keyframes internCardIn {
  from { opacity:0; transform: translateY(16px) scale(0.98); }
  to { opacity:1; transform: translateY(0) scale(1); }
}
#internshipsPage .intern-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
  transition: all 0.25s;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem;
  animation: internCardIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
#internshipsPage .intern-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--cyan)), transparent);
  opacity: 0; transition: opacity 0.3s;
}
#internshipsPage .intern-card:hover { border-color: rgba(6,182,212,0.4); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
#internshipsPage .intern-card:hover::before { opacity: 1; }
#internshipsPage .intern-card[data-source="internshala"] { --card-accent: #f59e0b; }

#internshipsPage .intern-card[data-source="linkedin"] { --card-accent: #0a66c2; }

/* card top */
#internshipsPage .card-top { display: flex; align-items: flex-start; gap: 12px; }
#internshipsPage .company-logo {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-card2);
}
#internshipsPage .card-top-info { flex: 1; min-width: 0; }
#internshipsPage .intern-title {
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  color: var(--text); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#internshipsPage .company-name { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; font-weight: 500; }
#internshipsPage .source-pill {
  flex-shrink: 0; font-size: 0.65rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  border-radius: 6px; padding: 3px 8px;
  font-family: var(--font-mono);
}
#internshipsPage .source-pill.internshala { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }

#internshipsPage .source-pill.linkedin { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.35); }
#internshipsPage .source-pill.jsearch { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.35); }
#internshipsPage .source-pill.indeed { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.35); }
#internshipsPage .source-pill.glassdoor { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.35); }
#internshipsPage .source-pill.remotive { background: rgba(6,182,212,0.15); color: #06b6d4; border: 1px solid rgba(6,182,212,0.35); }

/* card meta */
#internshipsPage .card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#internshipsPage .meta-chip {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 4px 10px;
  font-size: 0.8rem; color: var(--text-muted);
}
#internshipsPage .meta-chip .icon { font-size: 0.85rem; }
#internshipsPage .meta-chip.stipend { color: var(--green); border-color: rgba(16,185,129,0.2); background: rgba(16,185,129,0.05); }
#internshipsPage .meta-chip.new { color: var(--cyan); border-color: rgba(6,182,212,0.2); background: rgba(6,182,212,0.05); }

/* skill tags */
#internshipsPage .skills-row { display: flex; flex-wrap: wrap; gap: 5px; }
#internshipsPage .skill-tag {
  font-size: 0.68rem; font-family: var(--font-mono);
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.18);
  border-radius: 5px; padding: 2px 7px;
  color: var(--cyan);
}

/* ai match */
#internshipsPage .ai-match-bar {
  background: rgba(139,92,246,0.06);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 10px; padding: 0.6rem 0.8rem;
}
#internshipsPage .match-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
#internshipsPage .match-label { font-size: 0.72rem; color: #a78bfa; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
#internshipsPage .match-pct { font-family: var(--font-display); font-size: 0.9rem; color: #a78bfa; }
#internshipsPage .match-track { background: rgba(139,92,246,0.12); border-radius: 99px; height: 5px; overflow: hidden; }
#internshipsPage .match-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8b5cf6, #06b6d4); transition: width 1s cubic-bezier(0.16,1,0.3,1); }
#internshipsPage .match-reason { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; line-height: 1.4; }

/* description */
#internshipsPage .intern-desc {
  font-size: 0.8rem; color: var(--text-muted); line-height: 1.5;
  padding: 0.4rem 0 0;
  border-top: 1px solid var(--border);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* deadline */
#internshipsPage .deadline-wrap {
  display: flex; align-items: center; justify-content: space-between;
}
#internshipsPage .deadline {
  font-size: 0.75rem; color: var(--text-dim);
  display: flex; align-items: center; gap: 5px;
}
#internshipsPage .deadline.urgent { color: var(--red); }
#internshipsPage .deadline.soon { color: var(--yellow); }

/* card footer */
#internshipsPage .card-footer { display: flex; gap: 0.6rem; margin-top: auto; }
#internshipsPage .btn-apply {
  flex: 1; padding: 0.6rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border: none; border-radius: 10px;
  color: white; font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px;
  cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
#internshipsPage .btn-apply::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.12), transparent);
  transform: translateX(-100%); transition: transform 0.5s;
}
#internshipsPage .btn-apply:hover::after { transform: translateX(100%); }
#internshipsPage .btn-apply:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(6,182,212,0.3); }
#internshipsPage .btn-save {
  padding: 0.6rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  cursor: pointer; transition: all 0.2s;
  font-size: 1rem;
}
#internshipsPage .btn-save:hover { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #f59e0b; }
#internshipsPage .btn-save.saved { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #f59e0b; }

/* ===== AI AUTOMATION PANEL ===== */
#internshipsPage .automation-panel {
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 18px;
  padding: 1.4rem;
  margin-bottom: 1.8rem;
  position: relative; overflow: hidden;
}
#internshipsPage .automation-panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, #8b5cf6, #06b6d4, transparent);
}
#internshipsPage .auto-header { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
#internshipsPage .auto-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.3));
  border: 1px solid rgba(139,92,246,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
#internshipsPage .auto-title { font-family: var(--font-display); font-size: 0.85rem; color: #a78bfa; letter-spacing: 1px; }
#internshipsPage .auto-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 2px; }
#internshipsPage .auto-body { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
#internshipsPage .auto-status-row { display: flex; gap: 0.8rem; flex-wrap: wrap; flex: 1; }
#internshipsPage .auto-stat {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 0.6rem 1rem;
  min-width: 100px;
}
#internshipsPage .auto-stat-lbl { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.2px; text-transform: uppercase; }
#internshipsPage .auto-stat-val { font-family: var(--font-display); font-size: 1rem; color: var(--cyan); }
#internshipsPage .auto-stat-val.purple { color: #a78bfa; }
#internshipsPage .auto-stat-val.green { color: var(--green); }
#internshipsPage .btn-configure {
  display: flex; align-items: center; gap: 6px;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 10px; padding: 0.6rem 1.1rem;
  color: #a78bfa; font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
#internshipsPage .btn-configure:hover { background: rgba(139,92,246,0.2); transform: translateY(-1px); }

/* ===== EMPTY STATE ===== */
#internshipsPage .empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 1rem; text-align: center;
}
#internshipsPage .empty-icon { font-size: 3rem; opacity: 0.4; }
#internshipsPage .empty-title { font-family: var(--font-display); font-size: 1rem; color: var(--text-muted); letter-spacing: 0.3px; }
#internshipsPage .empty-sub { font-size: 0.85rem; color: var(--text-dim); max-width: 300px; }

/* ===== MODAL ===== */
#internshipsPage ~ .modal-overlay,
.modal-overlay#configModal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 1rem;
}
#internshipsPage ~ .modal-overlay.open,
.modal-overlay#configModal.open { display: flex; }
.modal-card {
  background: var(--bg-card);
  border: 1px solid rgba(139,92,246,0.35);
  border-radius: 24px; padding: 2rem;
  width: 100%; max-width: 520px;
  box-shadow: 0 0 60px rgba(139,92,246,0.15);
  animation: internCardIn 0.35s cubic-bezier(0.16,1,0.3,1);
  position: relative;
}
.modal-card::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 60%; height: 1px;
  background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #internshipsPage .sidebar { display: none; }
  #internshipsPage .intern-content { padding: 1.5rem 1.2rem; }
  #internshipsPage .internship-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  #internshipsPage .stats-row { gap: 0.6rem; }
  #internshipsPage .stat-card { min-width: 100px; padding: 0.75rem 1rem; }
  #internshipsPage .stat-val { font-size: 1.1rem; }
  #internshipsPage .controls-bar { flex-direction: column; }
  #internshipsPage .search-wrap { width: 100%; }
  #internshipsPage .filter-select { width: 100%; }
}

/* Intern page scoped — rules above */


/* ═══════════════════════════════════════════════════════
   DASHBOARD PAGE
═══════════════════════════════════════════════════════ */
#dashboardPage {
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* ── Internships sidebar collapse (desktop toggle) ── */
#internshipsPage .intern-sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}
#internshipsPage .intern-wrap.sidebar-collapsed .intern-sidebar { width: 0; min-width: 0; padding: 0; overflow: hidden; border: none; }

/* ── Placements sidebar collapse (desktop toggle) ── */
#placementsPage .place-sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}
#placementsPage .place-wrap.sidebar-collapsed .place-sidebar { width: 0; min-width: 0; padding: 0; overflow: hidden; border: none; }

/* Hide the desktop toggle on mobile (hamburger handles it) */
@media (max-width: 900px) {
  #internSidebarToggle, #placeSidebarToggle { display: none !important; }
}

/* Show the sidebar-toggle-btn on intern/place pages */
#internshipsPage .sidebar-toggle-btn,
#placementsPage .sidebar-toggle-btn {
  display: flex;
}

/* Shared app-sidebar that lives on Grades + Dashboard */
.app-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 0.4rem 0 1.2rem 0;
  position: sticky;
  top: 0;
  height: calc(100vh - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1), min-width 0.3s cubic-bezier(0.16,1,0.3,1);
  width: 220px;
  min-width: 220px;
  flex-shrink: 0;
  align-self: start;
  grid-column: 1;
  grid-row: 1;
}

/* Collapsed state */
.app-sidebar.collapsed {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: none;
  overflow: hidden;
}

/* The 3-dot sidebar toggle button — always visible in header area */
.sidebar-toggle-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: rgba(6,182,212,0.08);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.sidebar-toggle-btn:hover {
  background: rgba(6,182,212,0.18);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(6,182,212,0.15);
}
.sidebar-toggle-btn .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  transition: all 0.25s;
}
.sidebar-toggle-btn.open .dot:nth-child(1) { transform: translateY(4px) rotate(45deg) scaleX(5); border-radius: 2px; height: 2px; }
.sidebar-toggle-btn.open .dot:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sidebar-toggle-btn.open .dot:nth-child(3) { transform: translateY(-4px) rotate(-45deg) scaleX(5); border-radius: 2px; height: 2px; }

/* Sidebar content hidden labels when collapsed */
.app-sidebar .app-nav-btn span:last-child,
.app-sidebar .app-nav-title,
.app-sidebar .app-nav-divider,
.app-sidebar .app-nav-section-lbl,
.app-sidebar #sidebar-sems {
  transition: opacity 0.2s, transform 0.2s;
}
.app-sidebar.collapsed .app-nav-btn span:last-child,
.app-sidebar.collapsed .app-nav-title,
.app-sidebar.collapsed .app-nav-divider,
.app-sidebar.collapsed .app-nav-section-lbl,
.app-sidebar.collapsed #sidebar-sems {
  opacity: 0;
  pointer-events: none;
}

/* Adjust main-layout when sidebar collapses */
.main-layout.sidebar-collapsed {
  grid-template-columns: 0 1fr 320px;
}
@media (max-width: 1279px) {
  .main-layout.sidebar-collapsed { grid-template-columns: 0 1fr; }
}
@media (max-width: 1023px) {
  .main-layout.sidebar-collapsed { grid-template-columns: 0 1fr; }
}
@media (max-width: 767px) {
  .main-layout.sidebar-collapsed { grid-template-columns: 1fr; }
}
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.app-nav-title {
  font-size: 0.78rem; color: var(--text-dim);
  letter-spacing: 0.6px; text-transform: uppercase;
  padding: 0.25rem 1.5rem 0; margin-bottom: 0.7rem;
  font-weight: 700;
}
.app-nav-btn {
  width: 100%; background: none; border: none;
  border-left: 3px solid transparent;
  padding: 0.72rem 1.5rem;
  text-align: left; cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-body); font-size: 0.98rem; font-weight: 500;
}
.app-nav-btn:hover { background: rgba(6,182,212,0.05); color: var(--text); }
.app-nav-btn.active {
  border-left-color: var(--cyan);
  background: rgba(6,182,212,0.08);
  color: var(--cyan); font-weight: 700;
}
.app-nav-divider {
  border: none; border-top: 1px solid var(--border);
  margin: 0.8rem 1.5rem;
}
.app-nav-section-lbl {
  font-size: 0.6rem; color: var(--text-dim);
  letter-spacing: 0.3px; text-transform: uppercase;
  padding: 0 1.5rem; margin: 0.3rem 0 0.2rem;
  font-weight: 600; display: block;
}
.app-nav-btn .nav-badge {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 0.65rem;
  background: rgba(6,182,212,0.15); color: var(--cyan);
  border-radius: 4px; padding: 2px 6px;
}
.app-nav-btn.active .nav-badge { background: var(--cyan); color: var(--bg-deep); }

/* ── Dashboard body layout ── */
.dash-layout {
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: calc(100vh - 70px);
  align-items: stretch;
  box-sizing: border-box;
}
.dash-content {
  flex: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ── Dashboard hero ── */
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
  animation: dashFadeUp 0.5s cubic-bezier(0.16,1,0.3,1);
}
@keyframes dashFadeUp {
  from { opacity:0; transform:translateY(18px); }
  to   { opacity:1; transform:translateY(0); }
}
.dash-greeting {
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 800;
  color: var(--cyan); letter-spacing: 1px;
}
.dash-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 4px; }
.dash-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.15));
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 50px; padding: 0.5rem 1.2rem;
  font-family: var(--font-display); font-size: 1.2rem; color: var(--cyan);
  font-weight: 800;
}
.dash-hero-badge-lbl { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; }

/* ── Stats row ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.dash-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 1.1rem 1.3rem;
  transition: all 0.2s;
  animation: dashFadeUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.dash-stat:hover { border-color: rgba(6,182,212,0.35); transform: translateY(-2px); }
.dash-stat:nth-child(1){animation-delay:0.05s}
.dash-stat:nth-child(2){animation-delay:0.1s}
.dash-stat:nth-child(3){animation-delay:0.15s}
.dash-stat:nth-child(4){animation-delay:0.2s}
.dash-stat-lbl { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; font-weight: 600; }
.dash-stat-val { font-family: var(--font-display); font-size: 1.5rem; color: var(--cyan); margin-top: 4px; font-weight: 800; }
.dash-stat-val.purple { color: var(--purple); }
.dash-stat-val.green { color: var(--green); }
.dash-stat-val.yellow { color: var(--yellow); }
.dash-stat-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 2px; }

/* ── Quick action cards ── */
.dash-actions-title {
  font-size: 0.7rem; color: var(--text-dim);
  letter-spacing: 0.5px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 1rem;
}
.dash-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.dash-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 1.4rem;
  cursor: pointer; transition: all 0.25s;
  position: relative; overflow: hidden;
  text-align: left; color: var(--text);
  font-family: var(--font-body);
  animation: dashFadeUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}
.dash-action-card:nth-child(1){animation-delay:0.1s}
.dash-action-card:nth-child(2){animation-delay:0.15s}
.dash-action-card:nth-child(3){animation-delay:0.2s}
.dash-action-card:nth-child(4){animation-delay:0.25s}
.dash-action-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:2px;
  background: var(--card-accent, linear-gradient(90deg, var(--cyan), var(--purple)));
  opacity:0; transition:opacity 0.3s;
}
.dash-action-card:hover { transform:translateY(-4px); box-shadow:0 12px 40px rgba(0,0,0,0.3); border-color:rgba(6,182,212,0.35); }
.dash-action-card:hover::before { opacity:1; }
.dash-action-icon { font-size: 2rem; margin-bottom: 0.7rem; }
.dash-action-name {
  font-family: var(--font-display); font-size: 0.8rem;
  font-weight: 800; letter-spacing: 0.2px; color: var(--text);
  margin-bottom: 0.3rem; text-transform: uppercase;
}
.dash-action-desc { font-size: 0.85rem; color: var(--text-dim); line-height: 1.4; }
.dash-action-arrow {
  position: absolute; bottom: 1rem; right: 1.1rem;
  font-size: 1rem; color: var(--text-dim); transition: transform 0.2s;
}
.dash-action-card:hover .dash-action-arrow { transform: translateX(4px); color: var(--cyan); }

/* ── Semester progress strip ── */
.dash-sem-strip-title {
  font-size: 0.7rem; color: var(--text-dim);
  letter-spacing: 0.5px; text-transform: uppercase;
  font-weight: 600; margin-bottom: 1rem;
}
.dash-sem-strip {
  display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.dash-sem-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 0.6rem 0.9rem;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 80px;
}
.dash-sem-chip:hover { border-color: rgba(6,182,212,0.4); }
.dash-sem-chip.done { border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.04); }
.dash-sem-chip.active-sem { border-color: var(--cyan); background: rgba(6,182,212,0.08); }
.dash-sem-chip-lbl { font-size: 0.65rem; color: var(--text-dim); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.dash-sem-chip-val { font-family: var(--font-display); font-size: 0.9rem; color: var(--cyan); }
.dash-sem-chip.done .dash-sem-chip-val { color: var(--green); }

/* ── Recent activity / AI section ── */
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem; margin-bottom: 2rem;
}
@media (max-width: 1100px) { .dash-bottom-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .dash-bottom-row { grid-template-columns: 1fr; } }
.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 1.3rem;
}
.dash-panel-title {
  font-family: var(--font-display); font-size: 0.72rem;
  color: var(--cyan); letter-spacing: 0.3px; text-transform: uppercase;
  margin-bottom: 1rem;
}
.dash-tip-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted); line-height: 1.4;
}
.dash-tip-row:last-child { border-bottom: none; }
.dash-tip-dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}

/* Internship quick-peek */
.dash-intern-peek {
  display: flex; flex-direction: column; gap: 0.7rem;
}
.dash-intern-mini {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 0.7rem 1rem;
  cursor: pointer; transition: all 0.2s;
}
.dash-intern-mini:hover { border-color: rgba(6,182,212,0.35); transform: translateX(3px); }
.dash-intern-logo { font-size: 1.4rem; }
.dash-intern-info { flex: 1; min-width: 0; }
.dash-intern-title { font-size: 0.88rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-intern-co { font-size: 0.75rem; color: var(--text-dim); }
.dash-intern-match { font-family: var(--font-display); font-size: 0.75rem; color: var(--green); font-weight: 700; flex-shrink: 0; }




  * { margin:0; padding:0; box-sizing:border-box; }
  body {
    background: #ffffff;
    color: #111827;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 40px;
    min-height: 100vh;
  }
  @media print {
    body { padding: 20px; background: #ffffff !important; color: #111827 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print { display: none !important; visibility: hidden !important; }
    button { display: none !important; }
  }



.admin-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 16px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-tab:hover { border-color: rgba(6,182,212,0.4); color: var(--text); }
.admin-tab.active { background: rgba(6,182,212,0.1); border-color: var(--cyan); color: var(--cyan); }
.admin-tr-row { border-bottom: 1px solid var(--border); }
.admin-tr-row:last-child { border-bottom: none; }
.admin-tr-row:hover { background: rgba(6,182,212,0.03); }
.admin-tr-row td { padding: 9px 14px; color: var(--text); vertical-align: middle; }



/* ══════════════════════════════════════════════════════
   PLACEMENTS PAGE — CLEAN REBUILD
══════════════════════════════════════════════════════ */
#placementsPage {
  display: none;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--font-body);
}
#placementsPage.active { display: flex; }

/* ── HEADER ── */
#placementsPage .place-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  min-height: 64px;
  flex-shrink: 0;
  padding: 0 1.5rem;
  background: rgba(13,17,23,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  z-index: 200;
  gap: 1rem;
}
body.light-mode #placementsPage .place-header {
  background: rgba(255,255,255,0.97);
}
#placementsPage .place-hdr-left {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
#placementsPage .place-back-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.25);
  border-radius: 8px; padding: 6px 14px; color: var(--green);
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
#placementsPage .place-back-btn:hover { background: rgba(16,185,129,0.18); }
#placementsPage .place-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
  border-radius: 20px; padding: 5px 12px;
  font-size: 0.75rem; font-weight: 700; color: var(--green);
  letter-spacing: 0.5px; white-space: nowrap;
}
#placementsPage .place-pulse {
  width: 7px; height: 7px; background: var(--green);
  border-radius: 50%; animation: pulseDot 2s ease-in-out infinite; flex-shrink: 0;
}
#placementsPage .place-hdr-right {
  display: flex; align-items: center; gap: 0.65rem; margin-left: auto; flex-shrink: 0;
}
#placementsPage .place-user-av {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: white; flex-shrink: 0;
}
#placementsPage .place-user-nm {
  font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap;
}
#placementsPage .place-signout-btn {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px; color: var(--red); padding: 6px 14px;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
#placementsPage .place-signout-btn:hover { background: rgba(239,68,68,0.2); }

/* ── PAGE WRAP: sidebar + content ── */
#placementsPage .place-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 70px);
  overflow: hidden;
}

/* ── SIDEBAR ── */
#placementsPage .place-sidebar {
  width: 210px;
  min-width: 210px;
  height: 100%;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 1.4rem 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
#placementsPage .place-sidebar::-webkit-scrollbar { width: 3px; }
#placementsPage .place-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
#placementsPage .place-sidebar-title {
  font-size: 0.65rem; color: var(--text-dim); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 700;
  padding: 0 1.2rem; margin-bottom: 0.6rem;
}
#placementsPage .place-nav-btn {
  width: 100%; background: none; border: none;
  border-left: 3px solid transparent;
  padding: 0.65rem 1.2rem; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  color: var(--text-muted); font-family: var(--font-body);
  font-size: 0.88rem; font-weight: 500; transition: all 0.2s;
}
#placementsPage .place-nav-btn:hover { background: rgba(16,185,129,0.05); color: var(--text); }
#placementsPage .place-nav-btn.active {
  border-left-color: var(--green); background: rgba(16,185,129,0.08);
  color: var(--green); font-weight: 700;
}
#placementsPage .place-nav-count {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.65rem;
  background: rgba(16,185,129,0.12); color: var(--green);
  border-radius: 4px; padding: 1px 6px; min-width: 20px; text-align: center;
}
#placementsPage .place-nav-btn.active .place-nav-count {
  background: var(--green); color: var(--bg-deep);
}
#placementsPage .place-sidebar-divider {
  height: 1px; background: var(--border); margin: 0.8rem 1.2rem;
}

/* ── MAIN CONTENT ── */
#placementsPage .place-content {
  flex: 1; height: 100%; overflow-y: auto; overflow-x: hidden;
  padding: 1.8rem 2.2rem;
  scrollbar-width: thin; scrollbar-color: rgba(16,185,129,0.3) transparent;
}
#placementsPage .place-content::-webkit-scrollbar { width: 5px; }
#placementsPage .place-content::-webkit-scrollbar-thumb { background: rgba(16,185,129,0.3); border-radius: 10px; }

/* ── PAGE HEADER ── */
#placementsPage .place-page-hdr { margin-bottom: 1.5rem; }
#placementsPage .place-title {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 800;
  color: var(--text); letter-spacing: 1px; margin-bottom: 0.2rem;
}
#placementsPage .place-title span { color: var(--green); }
#placementsPage .place-sub { color: var(--text-muted); font-size: 0.9rem; }

/* ── STATS ROW ── */
#placementsPage .place-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem; margin-bottom: 1.5rem;
}
#placementsPage .place-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.9rem 1.1rem;
  transition: all 0.2s;
}
#placementsPage .place-stat-card:hover { border-color: rgba(16,185,129,0.35); transform: translateY(-2px); }
#placementsPage .place-stat-lbl { font-size: 0.67rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
#placementsPage .place-stat-val { font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; color: var(--green); margin-top: 2px; }
#placementsPage .place-stat-val.cyan  { color: var(--cyan); }
#placementsPage .place-stat-val.purple { color: var(--purple); }
#placementsPage .place-stat-val.yellow { color: var(--yellow); }

/* ── CONTROLS BAR ── */
#placementsPage .place-controls {
  display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 1.2rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.9rem 1.1rem;
}
#placementsPage .place-search-wrap { position: relative; flex: 1; min-width: 200px; }
#placementsPage .place-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 0.85rem; pointer-events: none;
}
#placementsPage .place-search {
  width: 100%; background: rgba(16,185,129,0.04);
  border: 1px solid rgba(16,185,129,0.2); border-radius: 9px;
  padding: 0.55rem 1rem 0.55rem 2.2rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: all 0.2s;
}
#placementsPage .place-search:focus { border-color: var(--green); background: rgba(16,185,129,0.06); }
#placementsPage .place-search::placeholder { color: var(--text-dim); }
#placementsPage .place-filter {
  background: rgba(16,185,129,0.04); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 9px; padding: 0.55rem 2rem 0.55rem 0.8rem;
  color: var(--text); font-family: var(--font-body); font-size: 0.85rem;
  outline: none; cursor: pointer; transition: all 0.2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2310b981' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center;
}
#placementsPage .place-filter:focus { border-color: var(--green); }
#placementsPage .place-filter option { background: #0f172a; color: #e2e8f0; }
body.light-mode #placementsPage .place-filter option { background: #fff; color: #0f172a; }

/* ── SOURCE TABS ── */
#placementsPage .place-src-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
#placementsPage .place-src-tab {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 9px; padding: 0.45rem 1rem; cursor: pointer;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 600;
  color: var(--text-muted); transition: all 0.2s; white-space: nowrap;
}
#placementsPage .place-src-tab:hover { border-color: rgba(16,185,129,0.4); color: var(--text); }
#placementsPage .place-src-tab.active {
  border-color: var(--green); background: rgba(16,185,129,0.08); color: var(--green);
}
#placementsPage .place-src-tab.active.jsearch {
  border-color: var(--purple); background: rgba(139,92,246,0.08); color: var(--purple);
}
#placementsPage .place-src-tab.active.remotive {
  border-color: var(--cyan); background: rgba(6,182,212,0.08); color: var(--cyan);
}
#placementsPage .place-src-dot { width: 7px; height: 7px; border-radius: 50%; }
#placementsPage .place-src-dot.all      { background: var(--green); }
#placementsPage .place-src-dot.jsearch  { background: var(--purple); }
#placementsPage .place-src-dot.remotive { background: var(--cyan); }
#placementsPage .place-src-count {
  font-family: var(--font-mono); font-size: 0.65rem;
  background: rgba(255,255,255,0.07); color: var(--text-dim);
  border-radius: 4px; padding: 1px 6px;
}

/* ── LOADING ── */
#placementsPage .place-loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 1rem; text-align: center;
}
#placementsPage .place-spinner {
  width: 56px; height: 56px;
  border: 3px solid rgba(16,185,129,0.1);
  border-top-color: var(--green); border-right-color: var(--cyan);
  border-radius: 50%; animation: placeSpin 1.1s linear infinite;
}
@keyframes placeSpin { to { transform: rotate(360deg); } }
#placementsPage .place-loading-label {
  font-family: var(--font-display); font-size: 0.82rem;
  color: var(--green); letter-spacing: 1px; text-transform: uppercase;
  animation: placeLoadPulse 1.4s ease-in-out infinite;
}
@keyframes placeLoadPulse { 0%,100%{opacity:0.5} 50%{opacity:1} }
#placementsPage .place-loading-status {
  font-size: 0.8rem; color: var(--text-dim); font-family: var(--font-mono);
}
#placementsPage .place-loading-steps {
  display: flex; flex-direction: column; gap: 5px; width: 100%; max-width: 300px;
}
#placementsPage .place-loading-step {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.8rem; color: var(--text-dim);
  padding: 5px 12px; border-radius: 7px;
  background: rgba(255,255,255,0.02); border: 1px solid transparent;
  transition: all 0.3s;
}
#placementsPage .place-loading-step.active {
  color: var(--green); border-color: rgba(16,185,129,0.2);
  background: rgba(16,185,129,0.04);
}
#placementsPage .place-loading-step.done {
  color: var(--cyan); border-color: rgba(6,182,212,0.15);
  background: rgba(6,182,212,0.03);
}

/* ── EMPTY STATE ── */
#placementsPage .place-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 4rem 2rem; gap: 0.7rem; text-align: center;
}
#placementsPage .place-empty-icon { font-size: 3rem; }
#placementsPage .place-empty-title {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text);
}
#placementsPage .place-empty-sub { font-size: 0.85rem; color: var(--text-muted); max-width: 300px; }

/* ── JOB GRID ── */
#placementsPage .place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem; align-items: start;
}

/* ── JOB CARD ── */
#placementsPage .place-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.2rem;
  transition: all 0.25s; animation: placeCardIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.7rem;
}
@keyframes placeCardIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
#placementsPage .place-card:hover {
  border-color: rgba(16,185,129,0.35); transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(16,185,129,0.08);
}
#placementsPage .place-card.src-jsearch  { border-left: 3px solid var(--purple); }
#placementsPage .place-card.src-remotive { border-left: 3px solid var(--cyan); }
#placementsPage .place-card.src-linkedin { border-left: 3px solid #a78bfa; }
#placementsPage .place-card.src-indeed   { border-left: 3px solid #60a5fa; }
#placementsPage .place-card.src-glassdoor { border-left: 3px solid var(--green); }

#placementsPage .place-card-top {
  display: flex; align-items: flex-start; gap: 0.9rem;
}
#placementsPage .place-card-logo {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-deep));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
#placementsPage .place-card-info { flex: 1; min-width: 0; }
#placementsPage .place-card-title {
  font-weight: 700; font-size: 0.95rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
#placementsPage .place-card-company {
  font-size: 0.82rem; color: var(--text-muted); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#placementsPage .place-src-pill {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; border-radius: 5px; padding: 2px 7px;
  flex-shrink: 0; align-self: flex-start; margin-top: 2px;
}
#placementsPage .place-src-pill.jsearch    { background: rgba(139,92,246,0.15); color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }
#placementsPage .place-src-pill.remotive   { background: rgba(6,182,212,0.15); color: var(--cyan); border: 1px solid rgba(6,182,212,0.3); }
#placementsPage .place-src-pill.linkedin   { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
#placementsPage .place-src-pill.indeed     { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
#placementsPage .place-src-pill.glassdoor  { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.25); }


#placementsPage .place-card-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
}
#placementsPage .place-card-tag {
  font-size: 0.7rem; font-family: var(--font-mono);
  background: rgba(6,182,212,0.08); color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.15); border-radius: 5px;
  padding: 2px 7px;
}
#placementsPage .place-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
#placementsPage .place-card-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: var(--text-muted);
}
#placementsPage .place-card-desc {
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#placementsPage .place-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-top: auto;
}
#placementsPage .place-card-posted {
  font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono);
}
#placementsPage .place-apply-btn {
  display: flex; align-items: center; gap: 5px;
  background: var(--green); color: #fff;
  border: none; border-radius: 8px; padding: 7px 16px;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
#placementsPage .place-apply-btn:hover { background: #059669; transform: scale(1.03); }

/* ── REFRESH BADGE ── */
#placementsPage .place-refresh-badge {
  font-size: 0.72rem; color: var(--text-dim); font-family: var(--font-mono);
  padding: 4px 12px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--border); border-radius: 20px; margin-bottom: 1rem;
  display: inline-flex; align-items: center; gap: 6px;
}
#placementsPage .place-refresh-dot {
  width: 6px; height: 6px; background: var(--green);
  border-radius: 50%; animation: pulseDot 2s ease-in-out infinite;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  #placementsPage .place-sidebar { display: none; }
  #placementsPage .place-content { padding: 1rem; }
  #placementsPage .place-stats { grid-template-columns: repeat(2, 1fr); }
  #placementsPage .place-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  #placementsPage .place-stats { grid-template-columns: 1fr 1fr; }
}


  /* ═══════════════════════════════════════════
     PREMIUM LIGHT MODE POLISH
  ═══════════════════════════════════════════ */
  body.light-mode {
    background: #f0f4f8;
  }
  body.light-mode .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  }
  body.light-mode .right-panel {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-left-color: rgba(2,132,199,0.15);
  }

  /* Cards in light mode — polished with depth */
  body.light-mode .subject-card,
  body.light-mode .panel-section,
  body.light-mode .dash-stat,
  body.light-mode .quick-card {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.14);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  }
  body.light-mode .subject-card:hover {
    box-shadow: 0 4px 20px rgba(2,132,199,0.12), 0 1px 4px rgba(0,0,0,0.06);
    border-color: rgba(2,132,199,0.3);
    transform: translateY(-1px);
  }
  body.light-mode .dash-stat:hover {
    box-shadow: 0 4px 20px rgba(2,132,199,0.1);
    border-color: rgba(2,132,199,0.25);
  }

  /* Nav items in light mode */
  body.light-mode .sem-btn,
  body.light-mode .app-nav-btn {
    color: #334155;
  }
  body.light-mode .sem-btn:hover,
  body.light-mode .app-nav-btn:hover {
    background: rgba(2,132,199,0.08);
    color: #0284c7;
  }
  body.light-mode .sem-btn.active,
  body.light-mode .app-nav-btn.active {
    background: rgba(2,132,199,0.12);
    color: #0284c7;
    border-left-color: #0284c7;
  }

  /* Quick access cards */
  body.light-mode .quick-card {
    background: #ffffff;
  }

  /* Semester progress pills */
  body.light-mode .sem-progress-pill {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.14);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }

  /* Grade chips */
  body.light-mode .grade-chip {
    background: rgba(2,132,199,0.07);
    border-color: rgba(2,132,199,0.2);
  }

  /* Semester buttons in left nav */
  body.light-mode .sem-list a,
  body.light-mode .sem-list button {
    color: #475569;
  }

  /* Improved contrast for text */
  body.light-mode .stat-label {
    color: #64748b;
  }

  /* Scan result modal in light mode */
  body.light-mode .scan-card {
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(139,92,246,0.15);
  }


  /* Right panel panel-sections in light mode */
  body.light-mode .panel-section {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.14);
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  }
  body.light-mode .panel-title {
    color: #0284c7;
  }
  body.light-mode .cgpa-hero-badge {
    background: linear-gradient(135deg, rgba(2,132,199,0.1), rgba(124,58,237,0.1));
    border-color: rgba(2,132,199,0.2);
  }
  body.light-mode .cgpa-num { color: #0284c7; }
  body.light-mode .cgpa-label { color: #64748b; }
  body.light-mode .dash-hero-badge {
    background: linear-gradient(135deg, rgba(2,132,199,0.1), rgba(124,58,237,0.1));
    border-color: rgba(2,132,199,0.25);
  }
  body.light-mode .sem-bars-label { color: #64748b; }
  body.light-mode .sem-bar-fill-wrap { background: rgba(2,132,199,0.1); }
  body.light-mode .grade-chip-row { border-bottom-color: rgba(2,132,199,0.08); }
  body.light-mode .grade-chip-name { color: #334155; }
  body.light-mode .insight-item { color: #334155; }
  body.light-mode .target-planner-input {
    background: rgba(2,132,199,0.05);
    border-color: rgba(2,132,199,0.2);
    color: #0f172a;
  }
  body.light-mode .planner-title-text { color: #0f172a; }
  body.light-mode .export-btn {
    background: rgba(2,132,199,0.08);
    border-color: rgba(2,132,199,0.25);
    color: #0284c7;
  }
  body.light-mode .analyse-btn-panel {
    background: rgba(245,158,11,0.08);
    border-color: rgba(245,158,11,0.25);
    color: #d97706;
  }
  /* Dashboard stats cards in light mode */
  body.light-mode .dash-stat {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.14);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 2px 12px rgba(0,0,0,0.04);
  }
  body.light-mode .dash-stat-lbl { color: #64748b; }
  body.light-mode .dash-stat-sub { color: #94a3b8; }
  body.light-mode .dash-stat-val { color: #0284c7; }
  body.light-mode .dash-stat-val.purple { color: #7c3aed; }
  body.light-mode .dash-stat-val.green { color: #059669; }
  body.light-mode .dash-stat-val.yellow { color: #d97706; }
  /* Quick access cards */
  body.light-mode .quick-card {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.14);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
  }
  body.light-mode .quick-card:hover {
    box-shadow: 0 4px 20px rgba(2,132,199,0.12), 0 1px 4px rgba(0,0,0,0.06);
    border-color: rgba(2,132,199,0.3);
    transform: translateY(-2px);
  }
  body.light-mode .quick-card-title { color: #1e293b; }
  body.light-mode .quick-card-desc { color: #475569; }
  /* Semester progress in light mode */
  body.light-mode .sem-progress-pill {
    background: #ffffff;
    border: 1px solid rgba(2,132,199,0.15);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
  body.light-mode .sem-progress-label { color: #64748b; }
  body.light-mode .sem-progress-val { color: #0284c7; }




  * { margin:0; padding:0; box-sizing:border-box; }
  body {
    background: #ffffff;
    color: #111827;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 40px;
    min-height: 100vh;
  }
  @media print {
    body { padding: 20px; background: #ffffff !important; color: #111827 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .no-print { display: none !important; visibility: hidden !important; }
    button { display: none !important; }
  }
