/* ------------------------------
   LearnHub Students — UI (List)
   ------------------------------ */

.ea-shell-content .lh-page{max-width:100%;margin:0;}

.ea-shell-content .lh-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px;}
.ea-shell-content .lh-head__title{margin:0;font-size:26px;line-height:1.2;}
.ea-shell-content .lh-head__desc{margin:6px 0 0;color:#5f6368;font-size:14px;}

.ea-shell-content .lh-head__actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}

.ea-shell-content .lh-search{position:relative;}
.ea-shell-content .lh-search input{width:240px;max-width:60vw;height:40px;padding:0 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;outline:none;}
.ea-shell-content .lh-search input:focus{border-color:#0b5fff;box-shadow:0 0 0 4px rgba(11,95,255,.10)}

.ea-shell-content .lh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 14px;border-radius:10px;border:1px solid #0b5fff;background:#0b5fff;color:#fff;font-weight:700;font-size:14px;cursor:pointer;}
.ea-shell-content .lh-btn:hover{filter:brightness(.96)}
.ea-shell-content .lh-btn--ghost{border-color:#e5e7eb;background:#fff;color:#111827;font-weight:600;}

.ea-shell-content .lh-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 8px 22px rgba(17,24,39,.06);overflow:hidden;}
.ea-shell-content .lh-card__bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);}
.ea-shell-content .lh-card__bar h3{margin:0;font-size:16px;}
.ea-shell-content .lh-badge{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:#6b7280;}

.ea-shell-content .lh-table-wrap{width:100%;overflow:auto;}
.ea-shell-content .lh-table{width:100%;border-collapse:separate;border-spacing:0;min-width:820px;}
.ea-shell-content .lh-table th{position:sticky;top:0;z-index:1;background:#f8fafc;text-align:left;font-size:12px;letter-spacing:.02em;text-transform:uppercase;color:#6b7280;border-bottom:1px solid #eef2f7;padding:12px 14px;white-space:nowrap;}
.ea-shell-content .lh-table td{border-bottom:1px solid #eef2f7;padding:12px 14px;vertical-align:middle;white-space:nowrap;}
.ea-shell-content .lh-table tr:hover td{background:#fbfdff;}

.ea-shell-content .lh-profile{display:flex;align-items:center;gap:12px;min-width:240px;}
.ea-shell-content .lh-avatar{width:40px;height:40px;border-radius:50%;background:#eef2f7;flex:0 0 40px;display:flex;align-items:center;justify-content:center;overflow:hidden;}
.ea-shell-content .lh-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.ea-shell-content .lh-avatar span{font-weight:800;color:#64748b;}
.ea-shell-content .lh-profile__main{display:flex;flex-direction:column;gap:2px;}
.ea-shell-content .lh-profile__name{font-weight:800;color:#111827;line-height:1.15;}
.ea-shell-content .lh-profile__meta{font-size:12px;color:#6b7280;}

.ea-shell-content .lh-uid{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;font-weight:800;font-size:12px;}

.ea-shell-content .lh-actions{display:flex;gap:8px;align-items:center;}
.ea-shell-content .lh-link{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;border-radius:10px;border:1px solid #e5e7eb;background:#fff;color:#111827;font-weight:700;font-size:13px;text-decoration:none;}
.ea-shell-content .lh-link:hover{background:#f8fafc;}
.ea-shell-content .lh-link--primary{border-color:#0b5fff;background:#0b5fff;color:#fff;}
.ea-shell-content .lh-link--primary:hover{filter:brightness(.96)}

.ea-shell-content .lh-alert{margin:0 0 14px;padding:12px 14px;border-radius:12px;border:1px solid #fde68a;background:#fffbeb;color:#92400e;font-size:13px;}
.ea-shell-content .lh-alert--ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534;}

/* Modal */
.ea-shell-content .lh-modal{position:fixed;inset:0;background:rgba(17,24,39,.50);display:none;align-items:center;justify-content:center;padding:18px;z-index:9999;}
.ea-shell-content .lh-modal.is-open{display:flex;}
.ea-shell-content .lh-modal__panel{width:720px;max-width:100%;background:#fff;border-radius:16px;border:1px solid #e5e7eb;box-shadow:0 30px 80px rgba(0,0,0,.25);overflow:hidden;}
.ea-shell-content .lh-modal__head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid #eef2f7;background:#f8fafc;}
.ea-shell-content .lh-modal__head h3{margin:0;font-size:16px;}
.ea-shell-content .lh-modal__close{border:0;background:transparent;font-size:20px;cursor:pointer;line-height:1;}
.ea-shell-content .lh-modal__body{padding:16px;}
.ea-shell-content .lh-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.ea-shell-content .lh-form .lh-field{display:flex;flex-direction:column;gap:6px;}
.ea-shell-content .lh-form label{font-size:12px;color:#6b7280;font-weight:700;}
.ea-shell-content .lh-form input,.ea-shell-content .lh-form select{height:42px;padding:0 12px;border:1px solid #e5e7eb;border-radius:10px;outline:none;}
.ea-shell-content .lh-form input:focus,.ea-shell-content .lh-form select:focus{border-color:#0b5fff;box-shadow:0 0 0 4px rgba(11,95,255,.10)}
.ea-shell-content .lh-form .lh-span-2{grid-column:1 / span 2;}
.ea-shell-content .lh-form__actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px;}

@media (max-width: 820px){
  .ea-shell-content .lh-head{flex-direction:column;align-items:stretch;}
  .ea-shell-content .lh-head__actions{justify-content:space-between;}
  .ea-shell-content .lh-form{grid-template-columns:1fr;}
  .ea-shell-content .lh-form .lh-span-2{grid-column:auto;}
  .ea-shell-content .lh-table{min-width:680px;}
}

/* ------------------------------
   LearnHub Student — UI (Profile)
   ------------------------------ */

.ea-shell-content .lh-student{max-width:100%;margin:0;}

.ea-shell-content .lh-link{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:10px;border:1px solid #e5e7eb;background:#fff;color:#111827;font-weight:800;font-size:13px;text-decoration:none;}
.ea-shell-content .lh-link:hover{background:#f8fafc;}
.ea-shell-content .lh-link--primary{border-color:#0b5fff;background:#0b5fff;color:#fff;}
.ea-shell-content .lh-link--primary:hover{filter:brightness(.96);}


.ea-shell-content .lh-student__top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;}
.ea-shell-content .lh-student__title{margin:0;font-size:22px;font-weight:900;}
.ea-shell-content .lh-student__subtitle{margin:6px 0 0;color:#6b7280;font-size:13px;}

.ea-shell-content .lh-student__actions{display:flex;gap:10px;flex-wrap:wrap;}

.ea-shell-content .lh-scard{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 10px 26px rgba(17,24,39,.08);overflow:hidden;}
.ea-shell-content .lh-scard__grid{display:grid;grid-template-columns:320px 1fr;}

.ea-shell-content .lh-scard__left{padding:18px;border-right:1px solid #eef2f7;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;}
.ea-shell-content .lh-scard__avatar{width:110px;height:110px;border-radius:50%;background:#eef2f7;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;}
.ea-shell-content .lh-scard__avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.ea-shell-content .lh-scard__avatar span{font-size:34px;font-weight:900;color:#64748b;}

/* Avatar quick-edit (admin only) */
.ea-shell-content .lh-avatar-edit{
  position:absolute;
  right:6px;
  bottom:6px;
  width:34px;
  height:34px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:900;
  font-size:14px;
  line-height:1;
  color:#111827;
  background:#ffffff;
  border:1px solid #e5e7eb;
  box-shadow:0 8px 18px rgba(17,24,39,.12);
}
.ea-shell-content .lh-avatar-edit:hover{ background:#f8fafc; }

.ea-shell-content .lh-scard__name{margin:0;font-size:22px;font-weight:900;}
.ea-shell-content .lh-scard__meta{color:#6b7280;font-size:13px;}
.ea-shell-content .lh-scard__meta strong{color:#111827;}

.ea-shell-content .lh-status{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;}

.ea-shell-content .lh-scard__btns{display:flex;gap:10px;justify-content:center;margin-top:10px;flex-wrap:wrap;}

.ea-shell-content .lh-info{padding:18px;}
.ea-shell-content .lh-info__head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px;}
.ea-shell-content .lh-info__head h3{margin:0;font-size:16px;font-weight:900;}

.ea-shell-content .lh-kv{display:block;}
.ea-shell-content .lh-kv__row{display:grid;grid-template-columns:200px 1fr;gap:14px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2f7;}
.ea-shell-content .lh-kv__row:last-child{border-bottom:0;}

.ea-shell-content .lh-kv__k{color:#374151;font-weight:800;font-size:13px;}
.ea-shell-content .lh-kv__v{color:#6b7280;font-size:13px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.ea-shell-content .lh-kv__sep{color:#94a3b8;font-weight:900;}
.ea-shell-content .lh-kv__v a{color:#0b5fff;text-decoration:none;font-weight:800;}

.ea-shell-content .lh-tabs{margin-top:14px;}
.ea-shell-content .lh-tabbar{display:flex;gap:18px;flex-wrap:wrap;align-items:center;padding:10px 12px;border:1px solid #e5e7eb;border-radius:14px;background:#f8fafc;}
.ea-shell-content .lh-tab{display:inline-flex;align-items:center;gap:8px;padding:10px 8px;border:0;background:transparent;font-weight:900;color:#6b7280;cursor:pointer;position:relative;}
.ea-shell-content .lh-tab[aria-selected="true"]{color:#111827;}
.ea-shell-content .lh-tab[aria-selected="true"]:after{content:"";position:absolute;left:8px;right:8px;bottom:2px;height:3px;border-radius:99px;background:#10b981;}

.ea-shell-content .lh-panel{display:none;margin-top:12px;}
.ea-shell-content .lh-panel.is-active{display:block;}

.ea-shell-content .lh-panel .lh-panel__card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 10px 26px rgba(17,24,39,.06);padding:16px;}

.ea-shell-content .lh-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;}
.ea-shell-content .lh-metric{border:1px solid #eef2f7;border-radius:14px;background:#ffffff;padding:14px;}
.ea-shell-content .lh-metric__k{font-size:12px;color:#6b7280;font-weight:800;text-transform:uppercase;letter-spacing:.02em;}
.ea-shell-content .lh-metric__v{margin-top:6px;font-size:16px;font-weight:900;color:#111827;}

@media (max-width: 980px){
  .ea-shell-content .lh-scard__grid{grid-template-columns:1fr;}
  .ea-shell-content .lh-scard__left{border-right:0;border-bottom:1px solid #eef2f7;}
  .ea-shell-content .lh-kv__row{grid-template-columns:160px 1fr;}
  .ea-shell-content .lh-metrics{grid-template-columns:repeat(2,1fr);}
}
@media (max-width: 540px){
  .ea-shell-content .lh-kv__row{grid-template-columns:1fr;gap:6px;}
  .ea-shell-content .lh-metrics{grid-template-columns:1fr;}
}

/* ------------------------------
   LearnHub Student — UI (Edit)
   ------------------------------ */

.ea-shell-content .lh-edit{max-width:100%;margin:0;}
.ea-shell-content .lh-edit__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 16px 0;}
.ea-shell-content .lh-edit__title{font-size:24px;line-height:1.2;margin:0;color:#0f172a;}
.ea-shell-content .lh-edit__meta{margin:6px 0 0 0;color:#64748b;font-size:14px;}
.ea-shell-content .lh-edit__actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.ea-shell-content .lh-edit__card{padding:18px;}

/* Make EA form full width inside LearnHub cards */
.ea-shell-content .lh-edit .ea-form{max-width:none;}

/* Two-column form grid (auto collapses) */
.ea-shell-content .lh-edit .ea-form__row{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
@media (max-width: 860px){
  .ea-shell-content .lh-edit .ea-form__row{grid-template-columns:1fr;}
}

/* File input nice baseline */
.ea-shell-content .lh-file{display:flex;flex-direction:column;gap:8px;}
.ea-shell-content .lh-file input[type="file"]{padding:10px;border:1px dashed #cbd5e1;border-radius:12px;background:#fff;}

/* Actions align right */
.ea-shell-content .lh-edit .ea-form__actions{display:flex;justify-content:flex-end;gap:12px;margin-top:16px;}
@media (max-width: 640px){
  .ea-shell-content .lh-edit .ea-form__actions{flex-direction:column;align-items:stretch;}
  .ea-shell-content .lh-edit .ea-form__actions .ea-btn{width:100%;}
}


/* ------------------------------
   LearnHub Sidebar — active item visibility
   ------------------------------ */

.ea-dashboard__sidebar details[open] > summary{font-weight:700;}
.ea-dashboard__sidebar a[aria-current="page"]{font-weight:700;}


/* ------------------------------
   LearnHub Layout — parity with /dashboard/
   ------------------------------ */

/* Ensure LearnHub pages have the same vertical rhythm as the portal dashboard. */
.ea-learnhub-page .ea-dashboard__grid{
  grid-template-columns:392px minmax(0,1fr);
  gap:28px;
  align-items:start;
}
.ea-learnhub-page .ea-dashboard__sidebar{
  position:sticky;
  top:92px;
  align-self:start;
}
.ea-learnhub-page .ea-dashboard__main{min-width:0}


/* ---- LearnHub Shell layout parity (dashboard-equivalent grid + sticky sidebar) ---- */
.ea-shell__grid{
  display:grid;
  grid-template-columns: 392px 1fr;
  gap:32px;
  align-items:start;
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
}
.ea-shell__sidebar{
  position:sticky;
  top:92px;
}
@media (max-width: 980px){
  .ea-shell__grid{ grid-template-columns:1fr; }
  .ea-shell__sidebar{ position:relative; top:auto; }
}
/* ---------------------------------------------------------------------------------- */

/* === LH-PARITY-PATCH (do not remove) ===========================================
   Ensures LearnHub pages match /dashboard/ grid + spacing.
   Safe to keep; idempotent marker.
================================================================================== */
.ea-learnhub-page .ea-dashboard__grid{
  align-items:start;
  gap:24px;
}
.ea-learnhub-page .ea-dashboard__sidebar{ position:sticky; top:92px; }
.ea-learnhub-page .ea-dashboard__main{ min-width:0; }
@media (max-width: 980px){
  .ea-learnhub-page .ea-dashboard__grid{ grid-template-columns:1fr; }
  .ea-learnhub-page .ea-dashboard__sidebar{ position:relative; top:auto; }
}
/* ============================================================================== */
/*=== LH-STUDENT-PROFILE-UI:START ===*/
/* Version: 2026-02-08
   Purpose: Student Profile UI fallback when pages render outside .ea-shell-content.
   Scope: .lh-student/.lh-scard/.lh-tabs only.
*/

.lh-student{max-width:100%;margin:0;}

.lh-scard{background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 10px 26px rgba(17,24,39,.08);overflow:hidden;}
.lh-scard__grid{display:grid;grid-template-columns:320px 1fr;}
.lh-scard__left{padding:18px;border-right:1px solid #eef2f7;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;}

.lh-scard__avatar{width:110px;height:110px;border-radius:50%;background:#eef2f7;display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;}
.lh-scard__avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.lh-scard__avatar span{font-size:34px;font-weight:900;color:#64748b;}

.lh-avatar-edit{position:absolute;right:6px;bottom:6px;width:34px;height:34px;border-radius:999px;display:flex;align-items:center;justify-content:center;text-decoration:none;font-weight:900;font-size:14px;line-height:1;color:#111827;background:#ffffff;border:1px solid #e5e7eb;box-shadow:0 8px 18px rgba(17,24,39,.12);}
.lh-avatar-edit:hover{background:#f8fafc;}

.lh-scard__name{margin:0;font-size:22px;font-weight:900;}
.lh-scard__meta{color:#6b7280;font-size:13px;}
.lh-scard__meta strong{color:#111827;}

.lh-status{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:#dcfce7;color:#166534;border:1px solid #bbf7d0;}

.lh-scard__btns{display:flex;gap:10px;justify-content:center;margin-top:10px;flex-wrap:wrap;}

.lh-info{padding:18px;}
.lh-info__head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px;}
.lh-info__head h3{margin:0;font-size:16px;font-weight:900;}

.lh-kv{display:block;}
.lh-kv__row{display:grid;grid-template-columns:200px 1fr;gap:14px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2f7;}
.lh-kv__row:last-child{border-bottom:0;}
.lh-kv__k{color:#374151;font-weight:800;font-size:13px;}
.lh-kv__v{color:#6b7280;font-size:13px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.lh-kv__sep{color:#94a3b8;font-weight:900;}
.lh-kv__v a{color:#0b5fff;text-decoration:none;font-weight:800;}

@media (max-width: 980px){
  .lh-scard__grid{grid-template-columns:1fr;}
  .lh-scard__left{border-right:0;border-bottom:1px solid #eef2f7;}
  .lh-kv__row{grid-template-columns:160px 1fr;}
}
@media (max-width: 540px){
  .lh-kv__row{grid-template-columns:1fr;gap:6px;}
}

/*=== LH-STUDENT-PROFILE-UI:END ===*/
