/* Ankisha LMS — shared look (same colours as Ankisha Live). Load after Bootstrap 5.3. */
:root {
  --ak-primary: #16367a;
  --ak-primary-600: #1f4aa8;
  --ak-primary-50: #eef3fc;
  --ak-accent: #f59e0b;
  --ak-ink: #0f172a;
  --ak-muted: #64748b;
  --ak-line: #e2e8f0;
  --ak-bg: #f4f6fb;
  --ak-radius: 14px;
  --bs-primary: var(--ak-primary);
  --bs-primary-rgb: 22, 54, 122;
  --bs-link-color: var(--ak-primary-600);
  --bs-link-hover-color: var(--ak-primary);
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body { background: var(--ak-bg); color: var(--ak-ink); font-family: var(--bs-body-font-family); }

.btn-primary {
  --bs-btn-bg: var(--ak-primary); --bs-btn-border-color: var(--ak-primary);
  --bs-btn-hover-bg: var(--ak-primary-600); --bs-btn-hover-border-color: var(--ak-primary-600);
  --bs-btn-active-bg: var(--ak-primary); --bs-btn-active-border-color: var(--ak-primary);
}
.form-control, .form-select { border-radius: 10px; border-color: #cbd5e1; padding: .65rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--ak-primary-600); box-shadow: 0 0 0 .2rem rgba(31, 74, 168, .15); }

/* ---------------- Login ---------------- */
.ak-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.ak-auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 56px 56px 40px;
  background: radial-gradient(1200px 500px at -10% -10%, #2b5bc4 0%, transparent 60%),
              linear-gradient(150deg, #0f2a63 0%, #16367a 55%, #1f4aa8 100%);
  display: flex; flex-direction: column;
}
.ak-auth-brand::after {           /* soft amber glow */
  content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, .35), transparent 65%);
}
.ak-brand-row { display: flex; align-items: center; gap: 14px; }
.ak-brand-row img { width: 56px; height: 56px; border-radius: 12px; background: #fff; padding: 3px; object-fit: contain; }
.ak-brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: .2px; line-height: 1.1; }
.ak-brand-sub { opacity: .75; font-size: .85rem; }
.ak-auth-hero { margin-top: auto; margin-bottom: auto; max-width: 460px; position: relative; z-index: 1; }
.ak-auth-hero h1 { font-weight: 700; font-size: 2.1rem; line-height: 1.2; margin-bottom: 14px; }
.ak-auth-hero p { opacity: .85; font-size: 1.02rem; }
.ak-feature { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.ak-feature i { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: var(--ak-accent); }
.ak-feature b { display: block; font-weight: 600; }
.ak-feature span { opacity: .75; font-size: .9rem; }
.ak-auth-foot { opacity: .6; font-size: .8rem; position: relative; z-index: 1; }

.ak-auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.ak-auth-card { width: 100%; max-width: 400px; }
.ak-auth-card h2 { font-weight: 700; font-size: 1.6rem; margin-bottom: 4px; }
.ak-auth-card .lead { color: var(--ak-muted); font-size: .95rem; margin-bottom: 28px; }
.ak-auth-card .form-label { font-weight: 600; font-size: .9rem; color: #334155; }
.ak-input-icon { position: relative; }
.ak-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.ak-input-icon > .form-control { padding-left: 42px; }
.ak-input-icon > .ak-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none;
  color: #64748b; padding: 6px 8px; border-radius: 8px; }
.ak-input-icon > .ak-eye:hover { background: var(--ak-primary-50); }
.ak-btn-lg { padding: .8rem 1rem; font-weight: 600; border-radius: 10px; }
.ak-switch { display: flex; gap: 6px; background: var(--ak-primary-50); padding: 5px; border-radius: 12px; margin-bottom: 26px; }
.ak-switch a { flex: 1; text-align: center; padding: 8px; border-radius: 9px; font-weight: 600; font-size: .9rem;
  color: var(--ak-primary); text-decoration: none; }
.ak-switch a.active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.ak-help { color: var(--ak-muted); font-size: .85rem; }
.ak-alert { border-radius: 10px; font-size: .92rem; padding: .7rem .9rem; }

@media (max-width: 900px) {
  .ak-auth { grid-template-columns: 1fr; }
  .ak-auth-brand { padding: 22px 20px 26px; }
  .ak-auth-hero { margin: 18px 0 0; }
  .ak-auth-hero h1 { font-size: 1.35rem; margin-bottom: 6px; }
  .ak-auth-hero p, .ak-feature, .ak-auth-foot { display: none; }
  .ak-auth-form { align-items: flex-start; padding: 28px 16px 40px; }
}

/* ---------------- Portal layout (student / staff) ---------------- */
.ak-shell { display: flex; min-height: 100vh; }
.ak-side { width: 264px; flex: none; background: #0f2a63; color: #c9d6f2; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; display: flex; flex-direction: column; }
.ak-side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none; }
.ak-side-brand img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 2px; }
.ak-side-brand b { display: block; font-size: .98rem; line-height: 1.1; }
.ak-side-brand small { opacity: .65; font-size: .75rem; }
.ak-live-btn { margin: 4px 14px 10px; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff !important; font-weight: 600; text-decoration: none;
  box-shadow: 0 6px 16px rgba(220, 38, 38, .35); }
.ak-live-btn:hover { filter: brightness(1.06); }
.ak-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: ak-pulse 1.8s infinite; }
@keyframes ak-pulse { 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.ak-nav-group { padding: 12px 14px 2px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #7f95c7; font-weight: 600; }
.ak-nav a { display: flex; align-items: center; gap: 11px; margin: 1px 10px; padding: 8px 12px; border-radius: 9px;
  color: #c9d6f2; text-decoration: none; font-size: .9rem; font-weight: 500; }
.ak-nav a i { width: 18px; text-align: center; color: #8fa6d8; }
.ak-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ak-nav a.active { background: #fff; color: var(--ak-primary); font-weight: 600; }
.ak-nav a.active i { color: var(--ak-accent); }
.ak-side-foot { margin-top: auto; padding: 10px 0 16px; border-top: 1px solid rgba(255,255,255,.08); }

.ak-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ak-top { height: 64px; background: #fff; border-bottom: 1px solid var(--ak-line); display: flex; align-items: center; gap: 12px;
  padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.ak-top h1 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.ak-top .ak-burger { display: none; border: 0; background: var(--ak-primary-50); color: var(--ak-primary); width: 38px; height: 38px; border-radius: 10px; }
.ak-user { margin-left: auto; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.ak-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--ak-primary-50); color: var(--ak-primary);
  display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.ak-user small { display: block; color: var(--ak-muted); font-size: .75rem; line-height: 1.1; }
.ak-content { padding: 24px; max-width: 1200px; width: 100%; }

.ak-card { background: #fff; border: 1px solid var(--ak-line); border-radius: var(--ak-radius); padding: 20px; }
.ak-card-title { font-size: .95rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.ak-card-title i { color: var(--ak-primary-600); }
.ak-stat { display: flex; align-items: center; gap: 14px; }
.ak-stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.ak-stat-label { color: var(--ak-muted); font-size: .8rem; font-weight: 500; }
.ak-stat-value { font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.ak-tint-blue { background: #e8effd; color: #1f4aa8; } .ak-tint-green { background: #e6f6ee; color: #15803d; }
.ak-tint-amber { background: #fef3c7; color: #b45309; } .ak-tint-red { background: #fde8e8; color: #c2410c; }
.ak-hero { background: linear-gradient(135deg, #16367a, #1f4aa8); color: #fff; border-radius: var(--ak-radius); padding: 22px 24px;
  display: flex; align-items: center; gap: 18px; position: relative; overflow: hidden; }
.ak-hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,.35), transparent 65%); }
.ak-hero img, .ak-hero .ak-hero-ph { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; border: 3px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.15); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; flex: none; }
.ak-hero h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; }
.ak-hero p { margin: 0; opacity: .85; font-size: .92rem; }
.ak-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px 10px; font-size: .78rem; margin: 6px 6px 0 0; }
.ak-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: 12px; border: 1px solid var(--ak-line);
  text-decoration: none; color: var(--ak-ink); font-size: .85rem; font-weight: 600; text-align: center; background: #fff; height: 100%; }
.ak-quick a i { font-size: 1.25rem; color: var(--ak-primary-600); }
.ak-quick a:hover { border-color: var(--ak-primary-600); background: var(--ak-primary-50); }
.ak-dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0; font-size: .92rem; }
.ak-dl dt { color: var(--ak-muted); font-weight: 500; } .ak-dl dd { margin: 0; font-weight: 500; }
.ak-notice { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--ak-line); font-size: .92rem; }
.ak-notice:last-child { border-bottom: 0; } .ak-notice i { color: var(--ak-accent); margin-top: 3px; }
.ak-progress { height: 8px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.ak-progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #16a34a); }

@media (max-width: 991px) {
  .ak-side { position: fixed; left: 0; top: 0; z-index: 1050; transform: translateX(-100%); transition: transform .2s ease; }
  .ak-side.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .ak-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1040; display: none; }
  .ak-backdrop.open { display: block; }
  .ak-top { padding: 0 14px; } .ak-top .ak-burger { display: inline-grid; place-items: center; }
  .ak-user > div { display: none; }
  .ak-content { padding: 16px; }
  .ak-dl { grid-template-columns: 1fr; gap: 2px; } .ak-dl dd { margin-bottom: 8px; }
}
@media (max-width: 575px) {
  .ak-card { padding: 16px; }
  .col-6 .ak-stat { flex-direction: column; align-items: flex-start; gap: 8px; }
  .col-6 .ak-stat-icon { width: 38px; height: 38px; font-size: 1rem; }
  .col-6 .ak-stat-value { font-size: 1.15rem; }
  .ak-hero { padding: 18px; gap: 14px; } .ak-hero img, .ak-hero .ak-hero-ph { width: 56px; height: 56px; font-size: 1.2rem; }
  .ak-hero h2 { font-size: 1.15rem; }
}

/* tables & small bits */
.ak-table { width: 100%; margin: 0; font-size: .92rem; }
.ak-table thead th { background: #f6f8fc; color: #475569; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid var(--ak-line); padding: 10px 12px; white-space: nowrap; }
.ak-table td { padding: 11px 12px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.ak-table tbody tr:last-child td { border-bottom: 0; }
.ak-table tbody tr:hover td { background: #fafbfe; }
.ak-table-wrap { border: 1px solid var(--ak-line); border-radius: 12px; overflow: auto; background: #fff; }
.ak-empty { text-align: center; color: var(--ak-muted); padding: 34px 12px; }
.ak-empty i { font-size: 1.8rem; color: #cbd5e1; display: block; margin-bottom: 8px; }
.ak-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; }
.ak-pill-green { background: #dcfce7; color: #166534; } .ak-pill-amber { background: #fef3c7; color: #92400e; }
.ak-pill-red { background: #fee2e2; color: #991b1b; } .ak-pill-blue { background: #e0eaff; color: #1e40af; } .ak-pill-gray { background: #eef2f7; color: #475569; }
.ak-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.ak-page-head h2 { font-size: 1.25rem; font-weight: 700; margin: 0; } .ak-page-head p { margin: 2px 0 0; color: var(--ak-muted); font-size: .9rem; }

/* ---------------- Staff panels (pages open inside the panel) ---------------- */
.ak-frame-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ak-frame-bar { display: none; align-items: center; gap: 10px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--ak-line); }
.ak-frame-bar b { font-size: .95rem; }
.ak-frame-bar.show { display: flex; }
.ak-frame { flex: 1; width: 100%; border: 0; background: #fff; display: none; min-height: calc(100vh - 64px - 49px); }
.ak-frame.show { display: block; }
.ak-launch h3 { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ak-muted); font-weight: 700; margin: 22px 0 10px; }
.ak-tile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ak-line); background: #fff;
  color: var(--ak-ink); text-decoration: none; font-weight: 600; font-size: .9rem; height: 100%; cursor: pointer; }
.ak-tile i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--ak-primary-50); color: var(--ak-primary-600); flex: none; }
.ak-tile:hover { border-color: var(--ak-primary-600); box-shadow: 0 4px 14px rgba(22,54,122,.08); }
.ak-tile .ext { margin-left: auto; color: #94a3b8; font-size: .75rem; background: none; width: auto; height: auto; }
.ak-nav a .ext { margin-left: auto; font-size: .7rem; opacity: .6; }
@media (max-width: 991px) { .ak-frame-bar { padding: 8px 14px; } }

/* notifications */
.ak-push-bar { display: flex; align-items: center; gap: 12px; background: #fff7e6; border: 1px solid #fde3a7; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 16px; }
.ak-push-bar > i { font-size: 1.2rem; color: #b45309; }
.ak-push-bar div { flex: 1; } .ak-push-bar b { display: block; font-size: .92rem; } .ak-push-bar span { color: #78716c; font-size: .82rem; }
.ak-push-bar.ok { background: #ecfdf3; border-color: #bbf7d0; } .ak-push-bar.ok > i { color: #16a34a; }
.ak-bell { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--ak-primary-50);
  color: var(--ak-primary); text-decoration: none; margin-left: auto; }
.ak-bell + .ak-user { margin-left: 6px; }
.ak-bell .count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #dc2626;
  color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.ak-notice-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef2f7; }
.ak-notice-item:last-child { border-bottom: 0; }
.ak-notice-item .dot { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--ak-primary-50); color: var(--ak-primary-600); }
.ak-notice-item.unread .dot { background: #fef3c7; color: #b45309; }
.ak-notice-item.unread b::after { content: "New"; margin-left: 8px; font-size: .68rem; background: #dc2626; color: #fff; border-radius: 99px; padding: 1px 7px; vertical-align: 2px; }
@media (max-width: 575px) { .ak-push-bar { flex-wrap: wrap; } .ak-push-bar div { flex-basis: calc(100% - 40px); } }
