

:root {
  --navy:            #1a2744;
  --navy-dark:       #111c36;
  --navy-brand:      #070e1c;
  --navy-light:      #243157;
  --accent:          #4F8EF7;
  --accent-hover:    #3a7de8;
  --sidebar-text:    #8fa3c8;
  --sidebar-active:  rgba(79,142,247,.13);
  --success:         #2FBD77;
  --warning:         #F59E0B;
  --danger:          #EF4444;
  --info:            #3B82F6;
  --bg:              #F0F2F7;
  --card:            #ffffff;
  --border:          #E4E9F2;
  --text:            #1E2D50;
  --text-muted:      #6B7A99;
  --shadow:          0 2px 12px rgba(26,39,68,.07);
  --radius:          10px;
  --sidebar-w:       240px;
  --header-h:        60px;
  --mob-bar-h:       36px;
}

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

body {
  font-family: 'Source Sans Pro', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.nk-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  z-index: 400; display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.nk-sidebar-brand {
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;

  min-height: 68px;
}
.nk-sidebar-brand img {
  height: 44px; width: auto; max-width: 190px;
  object-fit: contain; display: block;
}
.nk-sidebar-student {
    margin: 14px 1px 8px 1px;
    width: calc(100% - 3px);
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    flex-shrink: 0;
}
.nk-sidebar-student img {
  width: 80px; height: 80px;
  border-radius: 50%; object-fit: cover;
  border: 2.5px solid var(--accent);
  margin-bottom: 8px;
}
    .nk-sidebar-student .stu-name {
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        text-align: center;
        width: 100%;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: anywhere;
    }
.nk-sidebar-student .stu-id   { color: var(--sidebar-text); font-size: 10.5px; margin-top: 2px; }
.gpa-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 8px;
  background: rgba(47,189,119,.15);
  color: #4ade80;
  border-radius: 4px; padding: 2px 10px;
  font-size: 11px; font-weight: 700;
}

.nk-sidebar-student > div[style*="display:flex"] {
    width: 100%;
    justify-content: space-between;
}

.nk-sidebar-student .stu-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}
.nk-sidebar-nav { flex: 1; padding: 4px 10px 10px; overflow-y: auto; }
.nav-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(143,163,200,.4); padding: 12px 10px 4px;
}
.nk-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none; font-size: 13px; font-weight: 600;
  position: relative; margin-bottom: 1px;
  transition: all .16s;
}
.nk-nav-item:hover { background: rgba(255,255,255,.05); color: #c8d8f5; }
.nk-nav-item.active { background: var(--sidebar-active); color: #fff; }
.nk-nav-item.active::before {
  content: ''; position: absolute; left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nk-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.nk-nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-count {
  margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 20px; font-size: 10px; font-weight: 700;
  padding: 1px 6px; min-width: 18px; text-align: center;
}
.nav-count.orange { background: var(--warning); }
.nk-sidebar-footer { padding: 10px; border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.sb-footer-btn {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.08); background: transparent;
  color: var(--sidebar-text); font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; width: 100%; margin-bottom: 5px;
  transition: all .15s;
}
.sb-footer-btn:last-child { margin-bottom: 0; }
.sb-footer-btn:hover { background: rgba(255,255,255,.06); color: #c8d8f5; }
.sb-footer-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── TOPBAR ── */
.nk-header {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0;
  height: var(--header-h);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; gap: 12px;
  z-index: 300; transition: left .28s;
}
.nk-header-wrap { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.hamburger {
  width: 36px; height: 36px; min-width: 36px; flex-shrink: 0;
  border-radius: 7px; border: 1px solid var(--border);
  background: var(--card); display: none;
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
}
.hamburger svg { width: 18px; height: 18px; }
.nk-school-info { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.nk-session-pill {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--bg);
  padding: 5px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  white-space: nowrap; letter-spacing: .3px; flex-shrink: 0;
}
.nk-session-pill svg { width: 12px; height: 12px; color: var(--accent); flex-shrink: 0; }
.nk-school-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  padding: 5px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .3px; min-width: 0;
}
.nk-school-pill svg { width: 12px; height: 12px; flex-shrink: 0; }
.nk-school-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nk-header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nk-icon-btn {
  width: 36px; height: 36px; border-radius: 7px;
  border: 1px solid var(--border); background: var(--card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted); position: relative;
  transition: background .15s;
}
.nk-icon-btn:hover { background: var(--bg); }
.nk-icon-btn svg { width: 17px; height: 17px; }
.nk-badge {
  position: absolute; top: 3px; right: 3px;
  background: var(--danger); color: #fff; border-radius: 50%;
  width: 14px; height: 14px; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--card);
}
.nk-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 6px; border-radius: 8px;
  transition: background .15s;
}
.nk-user:hover { background: var(--bg); }
.nk-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.nk-user-info .un { font-size: 12.5px; font-weight: 700; color: var(--text); }
.nk-user-info .ur { font-size: 10.5px; color: var(--text-muted); }

/* Mobile school bar */
.nk-mobile-school {
  display: none; position: fixed;
  top: var(--header-h); left: 0; right: 0;
  z-index: 200; flex-direction: row;
  align-items: stretch; height: var(--mob-bar-h);
}
.nk-mobile-school .ms-sess {
  display: flex; align-items: center; gap: 5px;
  background: var(--navy-dark);
  border-right: 1px solid rgba(255,255,255,.1);
  padding: 0 12px; font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,.75); letter-spacing: .3px;
  text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.nk-mobile-school .ms-sess svg { width: 11px; height: 11px; color: var(--accent); flex-shrink: 0; }
.nk-mobile-school .ms-school {
  display: flex; align-items: center; gap: 5px;
  background: var(--accent); padding: 0 12px;
  font-size: 10px; font-weight: 700; color: #fff;
  letter-spacing: .3px; text-transform: uppercase;
  flex: 1; min-width: 0; overflow: hidden;
}
.nk-mobile-school .ms-school svg { width: 11px; height: 11px; flex-shrink: 0; }
.nk-mobile-school .ms-school span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── MAIN ── */
.nk-main {
  margin-left: var(--sidebar-w);
  margin-top: var(--header-h);
  padding: 22px;
  min-height: calc(100vh - var(--header-h));
  transition: margin-left .28s;
}

/* OVERLAY */
.nk-overlay { display: none; position: fixed; inset: 0; background: rgba(10,20,50,.45); z-index: 350; }
.nk-overlay.show { display: block; }

/* ── WELCOME BANNER ── */
.nk-welcome {
  background: linear-gradient(130deg, var(--navy) 0%, #1e3a8a 55%, #1e40af 100%);
  border-radius: var(--radius);
  padding: 24px 26px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 22px;
  position: relative; overflow: hidden; flex-wrap: wrap;
}
.nk-welcome::before { content: ''; position: absolute; right: 140px; top: -50px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.06); }
.nk-welcome::after  { content: ''; position: absolute; right: 200px; bottom: -60px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.04); }
.nkw-text { flex: 1; min-width: 140px; }
.nkw-text h2 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.nkw-text p  { font-size: 12.5px; color: rgba(255,255,255,.75); }
.nkw-goal { background: rgba(255,255,255,.12); border-radius: 9px; padding: 12px 16px; flex: 1; min-width: 180px; }
.nkw-gl   { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: rgba(255,255,255,.88); margin-bottom: 7px; }
.nkw-bar  { height: 6px; background: rgba(255,255,255,.25); border-radius: 20px; overflow: hidden; }
.nkw-bar .f { height: 100%; background: #60A5FA; border-radius: 20px; }
.nkw-sub  { font-size: 10.5px; color: rgba(255,255,255,.65); margin-top: 5px; }
.nkw-gpa  { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 14px 20px; text-align: center; flex-shrink: 0; position: relative; z-index: 1; }
.nkw-gpa .gt { width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); display: flex; align-items: center; justify-content: center; margin: 0 auto 5px; }
.nkw-gpa .gt svg { width: 18px; height: 18px; stroke: #fff; fill: none; }
.nkw-gpa .gl2 { font-size: 10px; color: rgba(255,255,255,.75); margin-bottom: 2px; }
.nkw-gpa .gv  { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }

/* ── STAT CARDS ── */
.nk-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
.nk-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue   { background: #EFF6FF; color: var(--info); }
.stat-icon.amber  { background: #FFFBEB; color: var(--warning); }
.stat-icon.green  { background: #ECFDF5; color: var(--success); }
.stat-icon.red    { background: #FEF2F2; color: var(--danger); }
.stat-info .sc  { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-info .sl  { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.stat-info .ss  { font-size: 10.5px; color: var(--success); font-weight: 600; margin-top: 2px; }

/* ── SECTION HEAD ── */
.nk-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.nk-section-head h3 { font-size: 14.5px; font-weight: 700; color: var(--text); }
.nk-section-head a  { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* ── QUICK ACCESS ── */
.nk-quick { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.nk-qa { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 14px 16px; text-align: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.nk-qa:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,39,68,.1); }
.qa-ico { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.qa-ico svg { width: 23px; height: 23px; }
.qa-ico.blue   { background: #EFF6FF; color: var(--info); }
.qa-ico.amber  { background: #FFFBEB; color: var(--warning); }
.qa-ico.green  { background: #ECFDF5; color: var(--success); }
.qa-ico.purple { background: #F5F3FF; color: #7C3AED; }
.nk-qa h4 { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.nk-qa p  { font-size: 11px; color: var(--text-muted); }

/* ── COURSES ── */
.nk-courses { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.nk-course { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.nk-course:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,39,68,.1); }
.nk-ct { height: 115px; position: relative; overflow: hidden; }
.nk-chip { position: absolute; top: 9px; right: 9px; background: rgba(0,0,0,.5); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; backdrop-filter: blur(6px); }
.nk-cb { padding: 13px 14px 14px; }
.nk-cb h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.nk-cb .pr { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.nk-cb .pr .kb { color: #D1D5DB; cursor: pointer; font-size: 15px; }
.nk-bar { height: 4px; background: var(--border); border-radius: 20px; overflow: hidden; }
.nk-bar .f { height: 100%; background: var(--accent); border-radius: 20px; }
.nk-bar-pct { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-align: right; }

/* ── BOTTOM GRID ── */
.nk-bottom-grid { display: grid; grid-template-columns: 1fr 280px; gap: 16px; margin-top: 22px; }
.nk-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.nk-card-head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.nk-card-head h4 { font-size: 13.5px; font-weight: 700; color: var(--text); }
.nk-card-head a  { font-size: 11.5px; color: var(--accent); text-decoration: none; font-weight: 600; }
.nk-card-body { padding: 12px 16px; }

/* Activity */
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.act-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act-dot svg { width: 15px; height: 15px; }
.act-dot.blue  { background: #EFF6FF; color: var(--info); }
.act-dot.green { background: #ECFDF5; color: var(--success); }
.act-dot.amber { background: #FFFBEB; color: var(--warning); }
.act-dot.red   { background: #FEF2F2; color: var(--danger); }
.act-content .at { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.act-content .at strong { font-weight: 700; }
.act-content .as { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Events */
.nk-event { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.nk-event:last-child { border-bottom: none; padding-bottom: 0; }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.ev-dot.amber { background: var(--warning); }
.ev-dot.blue  { background: var(--info); }
.ev-dot.red   { background: var(--danger); }
.ev-info h5  { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ev-info span{ font-size: 11px; color: var(--text-muted); }

/* ── PAGE-SPECIFIC: Content panels ── */
.page-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.page-card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); background: #fafbfd; display: flex; align-items: center; gap: 10px; }
.page-card-head h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.page-card-head .badge-pill { background: var(--accent); color: #fff; border-radius: 20px; font-size: 11px; font-weight: 700; padding: 2px 10px; }
.page-card-body { padding: 20px; }

/* Tabs */
.nk-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.nk-tab  { padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; text-decoration: none; }
.nk-tab:hover  { color: var(--accent); }
.nk-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Table */
.nk-table { width: 100%; border-collapse: collapse; }
.nk-table th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); background: #f8f9fc; border-bottom: 1px solid var(--border); }
.nk-table td { padding: 12px 14px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.nk-table tr:last-child td { border-bottom: none; }
.nk-table tr:hover td { background: #fafbff; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-success { background: #ECFDF5; color: var(--success); }
.badge-warning { background: #FFFBEB; color: var(--warning); }
.badge-danger  { background: #FEF2F2; color: var(--danger); }
.badge-info    { background: #EFF6FF; color: var(--info); }
.badge-primary { background: #EEF2FF; color: #4F46E5; }

/* Forms */
.nk-form-group  { margin-bottom: 18px; }
.nk-form-label  { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.nk-form-control {
  width: 100%; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: 7px;
  background: #fff; font-size: 13.5px; font-family: inherit;
  color: var(--text); outline: none; transition: border-color .15s;
}
.nk-form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,142,247,.1); }
.nk-form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B7A99' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 20px; border-radius: 7px; font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; transition: all .16s; text-decoration: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success   { background: var(--success); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 5px 13px; font-size: 12px; }

/* Result card */
.result-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; overflow: hidden; margin-bottom: 16px; }
.result-card-head { background: linear-gradient(130deg, var(--navy) 0%, #1e40af 100%); padding: 16px 20px; color: #fff; }
.result-card-head h4 { font-size: 14px; font-weight: 700; }
.result-card-head p  { font-size: 11.5px; color: rgba(255,255,255,.75); margin-top: 2px; }
.result-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; border-bottom: 1px solid var(--border); }
.result-summary-item { padding: 14px 16px; text-align: center; border-right: 1px solid var(--border); }
.result-summary-item:last-child { border-right: none; }
.result-summary-item .rv { font-size: 20px; font-weight: 700; color: var(--text); }
.result-summary-item .rl { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .4px; }

/* Alert */
.nk-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
}
.nk-alert svg, .nk-alert i { width: 18px; height: 18px; flex-shrink: 0; font-size: 18px; }
.nk-alert.info    { background: #f0f7ff; color: #1e40af; border-color: #dbeafe; }
.nk-alert.info svg, .nk-alert.info i       { color: #3b82f6; }
.nk-alert.success { background: #f0fdf4; color: #14532d; border-color: #dcfce7; }
.nk-alert.success svg, .nk-alert.success i { color: #22c55e; }
.nk-alert.warning { background: #fffaf0; color: #78350f; border-color: #fde68a; }
.nk-alert.warning svg, .nk-alert.warning i { color: #f59e0b; }
.nk-alert.danger  { background: #fef2f2; color: #7f1d1d; border-color: #fecaca; }
.nk-alert.danger svg, .nk-alert.danger i   { color: #ef4444; }

/* Footer */
.nk-footer { text-align: center; padding: 16px; font-size: 11.5px; color: var(--text-muted); margin-top: 8px; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .nk-stats       { grid-template-columns: repeat(2,1fr); }
  .nk-bottom-grid { grid-template-columns: 1fr; }
  .result-summary { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1024px) {
  .nk-courses { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .nk-sidebar   { transform: translateX(-100%); }
  .nk-sidebar.open { transform: translateX(0); }
  .nk-header    { left: 0; }
  .nk-main      { margin-left: 0; margin-top: calc(var(--header-h) + var(--mob-bar-h)); }
  .hamburger    { display: flex; }
  .nk-user-info { display: none; }
  .nk-school-info  { display: none; }
  .nk-mobile-school { display: flex; }
}
@media (max-width: 640px) {
  .nk-quick   { grid-template-columns: repeat(2,1fr); }
  .nk-courses { grid-template-columns: 1fr; }
  .nk-stats   { grid-template-columns: repeat(2,1fr); }
  .nk-welcome { padding: 16px; }
  .nkw-goal   { min-width: 100%; }
  .nk-main    { padding: 14px; }
  .nk-header  { padding: 0 12px; }
}
@media (max-width: 400px) {
  .nk-stats { grid-template-columns: 1fr; }
  .nk-quick { grid-template-columns: repeat(2,1fr); }
}


/* ════════════════════════════════════════════
   eMiS — Topbar layout fixes (school info pills)
   ════════════════════════════════════════════ */
.nk-school-info-wrap { display: flex; align-items: center; }
.nk-school-info-wrap .nk-school-info { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }

/* Hide search/language/dark-mode toggles when school pills need room */
@media (max-width: 1400px) {
  .topbar-item .hide-phone.app-search { display: none !important; }
}
@media (max-width: 1100px) {
  .topbar-item .dropdown:has(img[src*="us_flag"]) { display: none !important; }
  #light-dark-mode { display: none !important; }
}

/* Hide topbar school pills below 992px (use mobile bar instead) */
@media (max-width: 991.98px) {
  .nk-school-info-wrap { display: none !important; }
}

/* ════════════════════════════════════════════
   eMiS — Mobile bar sits flush below topbar
   ════════════════════════════════════════════ */
@media (max-width: 991.98px) {
  .nk-mobile-school { display: flex !important; top: var(--bs-topbar-height, 52px); }
  /* push page content down to make room for the mobile school bar */
  .page-wrapper { padding-top: var(--mob-bar-h); }
}
@media (min-width: 992px) {
  .nk-mobile-school { display: none !important; }
  .page-wrapper { padding-top: 0; }
}

/* ════════════════════════════════════════════
   eMiS — Mobile sidebar: drawer (not full page)
   Dastone uses .startbar-enable on body to show sidebar; restrict its width
   ════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .startbar { width: 260px !important; max-width: 80vw; }
}

/* Overlay backdrop when sidebar open on mobile */
.startbar-overlay { 
  background: rgba(10,20,50,.5);
}

/* ════════════════════════════════════════════
   eMiS — Component layout overrides on small screens
   ════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .nk-stats { grid-template-columns: repeat(2, 1fr); }
  .nk-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .nk-courses { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nk-quick { grid-template-columns: repeat(2, 1fr); }
  .nk-courses { grid-template-columns: 1fr; }
  .nk-stats { grid-template-columns: 1fr; }
  .nk-welcome { padding: 16px; flex-direction: column; align-items: stretch; }
  .nkw-goal { min-width: 100%; }
}

/* Welcome banner — make sure flex layout works */
.nk-welcome { flex-wrap: wrap; }
.nk-welcome > * { flex: 1 1 auto; }
.nkw-gpa { flex: 0 0 auto; }


/* ════════════════════════════════════════════════════════
   eMiS — FIXES: logo size, mobile sidebar, sign out button
   ════════════════════════════════════════════════════════ */

/* ── 1. LOGO: bigger and centered in the brand area ── */
.startbar .brand {
  justify-content: center !important;
  padding: 10px 12px !important;
  height: auto !important;
  min-height: 70px !important;

  border-bottom: 1px solid rgba(255,255,255,.07);
}
.startbar .brand .logo {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}
.startbar .brand .logo .logo-sm { display: none !important; }
.startbar .brand .logo .logo-lg {
  height: 48px !important;
  width: auto !important;
  max-width: 180px !important;
  margin: 0 !important;
  object-fit: contain !important;
}

/* ── 2. STUDENT CARD: Inbox / Chat buttons ── */
.nk-sidebar-student .stu-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}
.nk-sidebar-student .stu-btn:hover { opacity: .85; }
.nk-sidebar-student .stu-btn.inbox {
  background: rgba(255,255,255,.1);
  color: #fff !important;
}
.nk-sidebar-student .stu-btn.chat {
  background: var(--accent);
  color: #fff !important;
}

/* ── 3. SIGN OUT NAV ITEM: visible danger styling ── */
.startbar .navbar-nav .nav-item .nav-link.text-danger {
  color: #fca5a5 !important;
}
.startbar .navbar-nav .nav-item .nav-link.text-danger:hover {
  color: #fff !important;
  background: rgba(252,165,165,.08) !important;
  border-radius: var(--bs-border-radius);
}
.startbar .navbar-nav .nav-item .nav-link.text-danger .menu-icon,
.startbar .navbar-nav .nav-item .nav-link.text-danger i {
  color: #fca5a5 !important;
}

/* ── 4. MOBILE SIDEBAR: fully off-screen when collapsed ── */
@media (max-width: 1199.98px) {
  /* Dastone toggles data-sidebar-size="collapsed" on body for mobile.
     When collapsed: hide sidebar fully off-screen (no sliver).
     When default (open): slide it in. */
  body[data-sidebar-size=collapsed] .startbar {
    transform: translateX(-100%) !important;
    margin-left: 0 !important;
    width: 260px !important;
    max-width: 80vw !important;
  }
  body[data-sidebar-size=default] .startbar {
    transform: translateX(0) !important;
    margin-left: 0 !important;
    width: 260px !important;
    max-width: 80vw !important;
    z-index: 1005;
  }
  body[data-sidebar-size=default] .startbar-overlay {
    display: block !important;
    position: fixed; inset: 0;
    background: rgba(10,20,50,.5);
    z-index: 1003;
  }
  body[data-sidebar-size=collapsed] .startbar-overlay {
    display: none !important;
  }
  /* Page content always full-width on mobile */
  .page-wrapper { margin-left: 0 !important; }
  .page-wrapper .page-content { margin-left: 0 !important; width: 100% !important; }
  .topbar { left: 0 !important; width: 100% !important; }
}

/* On desktop sidebar always visible */
@media (min-width: 1200px) {
  .startbar { transform: translateX(0) !important; }
  .startbar-overlay { display: none !important; }
}
}


/* ════════════════════════════════════════════
   eMiS — Layout helpers (used by sub pages)
   ════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.mt-4 { margin-top: 16px; }

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Page card head with section title */
.page-card-head h3 { margin: 0; }


/* ════════════════════════════════════════════
   eMiS — Pinned Sign Out at sidebar bottom
   ════════════════════════════════════════════ */

/* Make the startbar a flex column so the signout can pin to the bottom */
.startbar-menu {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - 70px) !important; /* full sidebar minus brand area */
  padding-bottom: 0 !important;
}

/* The scrollable nav takes remaining space */
.startbar-collapse {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
}

/* The pinned sign-out section sits below the scroll area */
.startbar-signout {
  flex-shrink: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: var(--navy-dark, #111c36);
}

.startbar-signout .signout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  background: transparent;
  color: #fca5a5 !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all .15s;
  width: 100%;
  cursor: pointer;
}

.startbar-signout .signout-btn:hover {
  background: rgba(252,165,165,.08);
  color: #fff !important;
  border-color: rgba(252,165,165,.3);
}

.startbar-signout .signout-btn i {
  font-size: 16px;
  flex-shrink: 0;
}


/* ════════════════════════════════════════════
   eMiS — Mobile topbar logo
   ════════════════════════════════════════════ */
.topbar-mobile-logo { display: none; }
.topbar-mobile-logo a {
  display: flex; align-items: center;
  padding: 0 8px;
}
.topbar-mobile-logo img {
  height: 28px; width: auto; max-width: 110px;
  object-fit: contain;
  filter: invert(1) brightness(.4);
}
@media (max-width: 1199.98px) {
  .topbar-mobile-logo { display: inline-flex !important; }
}


/* ════════════════════════════════════════════════════════════════
   eMiS — Login pages (standalone, no sidebar/topbar wrapper)
   ════════════════════════════════════════════════════════════════ */

body.nk-login-bg {
  background: linear-gradient(135deg, #1a4f8a 0%, #0d2f5c 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
}

body.nk-login-bronzebit {
  background: linear-gradient(135deg, #1a0511 0%, #3a0f1f 50%, #5b1a2e 100%);
}

.nk-login-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nk-login-card {
  background: #fff;
  border-radius: 14px;
  padding: 36px 38px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.45);
  box-sizing: border-box;
}

.nk-login-bronzebit-card {
  background: #1f0817 !important;
  border: 1px solid #5b1a2e;
  color: #fca5a5;
}

.nk-login-brand {
  text-align: center;
  margin-bottom: 18px;
}

.nk-login-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #0d1117;
  text-align: center;
  letter-spacing: -.4px;
}

.nk-login-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin: 6px 0 22px;
  text-align: center;
  line-height: 1.5;
}

.nk-form-group {
  margin-bottom: 16px;
}

.nk-form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.nk-form-icon-input {
  position: relative;
}
.nk-form-icon-input i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
}
.nk-form-icon-input .nk-form-control,
.nk-form-icon-input input {
  padding-left: 38px !important;
}

.nk-form-control {
  width: 100%;
  height: 40px;
  padding: 8px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  font-size: 13.5px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: all .12s ease;
  box-sizing: border-box;
}
.nk-form-control:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.nk-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236b7280'%3e%3cpath d='M8 11.5L3 6.5h10z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 36px !important;
}

.nk-form-hint {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

/* Login button override - blue not purple */
.nk-login-card .btn-primary,
.nk-login-card input[type="submit"].btn-primary {
  background: #1a4f8a !important;
  border-color: #1a4f8a !important;
  color: #fff !important;
  padding: 11px 18px !important;
  border-radius: 7px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
}
.nk-login-card .btn-primary:hover,
.nk-login-card input[type="submit"].btn-primary:hover {
  background: #0d2f5c !important;
  border-color: #0d2f5c !important;
}

/* OR divider between PIN and Password */
.nk-or-divider {
  text-align: center;
  margin: 18px 0;
  position: relative;
  height: 1px;
  background: #e5e7eb;
}
.nk-or-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: .8px;
}

.nk-login-footer {
  text-align: center;
  margin-top: 22px;
  border-top: 1px solid #f3f4f6;
  padding-top: 14px;
}
.nk-login-footer p {
  font-size: 11px;
  color: #9ca3af;
  margin: 0;
}

.nk-login-help {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
}
.nk-login-help a {
  color: #1a4f8a;
  text-decoration: none;
  font-weight: 500;
}
.nk-login-help a:hover { text-decoration: underline; }

.nk-bz-warning {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid #5b1a2e;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 11.5px;
  color: #fca5a5;
  margin-bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.nk-bz-badge {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.2);
  border: 2px solid #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
}

/* (consolidated into .nk-alert above) */

/* 3-column grid for Session/Form/Class on login page */
.nk-login-card .grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

/* Student picker (after class load) */
.nk-student-picker-wrap {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
}
.nk-student-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #f3f4f6;
  border-radius: 7px;
}
.nk-student-row {
  display: grid;
  grid-template-columns: 70px 110px 1fr 1fr 0.7fr 0.4fr;
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
  border-bottom: 1px solid #f9fafb;
  font-size: 12px;
}
.nk-student-row:last-child { border-bottom: none; }
.nk-student-row:hover { background: #f9fafb; }
.nk-stu-aslin { font-family: monospace; font-size: 10.5px; color: #6b7280; word-break: break-all; }
.nk-stu-lname { font-weight: 700; color: #111827; }
.nk-stu-fname, .nk-stu-mname { color: #374151; }
.nk-stu-sex { color: #6b7280; font-size: 10.5px; text-transform: uppercase; }

.nk-selected-student {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin-bottom: 16px;
}
.nk-selected-student .ss-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #1a4f8a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.nk-selected-student .ss-info { flex: 1; }
.nk-selected-student .ss-name {
  font-weight: 700; font-size: 13.5px; color: #0d1117;
}
.nk-selected-student .ss-aslin {
  font-family: monospace; font-size: 11px; color: #6b7280;
}

@media (max-width: 480px) {
  .nk-login-card { padding: 24px 22px; max-width: 100%; }
  .nk-login-title { font-size: 19px; }
  .nk-login-card .grid-3 { grid-template-columns: 1fr; }
  .nk-student-row {
    grid-template-columns: 70px 1fr;
    gap: 4px;
  }
  .nk-student-row > * { font-size: 11.5px; }
  .nk-stu-fname, .nk-stu-mname, .nk-stu-sex { display: none; }
}
