/* ============================================================
   Anzeru Central — style.css
   Modern SaaS/university LMS aesthetic
   ============================================================ */

:root{
  --lh-primary:#4f46e5;
  --lh-primary-600:#4338ca;
  --lh-primary-50:#eef2ff;
  --lh-ink:#0f172a;
  --lh-ink-2:#334155;
  --lh-muted:#6b7280;
  --lh-line:#eef0f4;
  --lh-line-strong:#e5e7eb;
  --lh-bg:#f8f9fc;
  --lh-card:#ffffff;
  --lh-success:#16a34a;
  --lh-warning:#f59e0b;
  --lh-danger:#ef4444;
  --lh-radius:14px;
  --lh-shadow:0 1px 2px rgba(15,23,42,.03), 0 4px 16px rgba(15,23,42,.04);
  --sidebar-w:260px;
  --topnav-h:68px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  background:var(--lh-bg);
  color:var(--lh-ink);
  font-family:'Poppins','Segoe UI',system-ui,-apple-system,Roboto,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
h1,h2,h3,h4,h5,h6{font-family:'Poppins',sans-serif;letter-spacing:-.015em}
.btn{font-family:'Poppins',sans-serif;font-weight:500;letter-spacing:-.005em}
.form-control,.form-select,.input-group-text{font-family:'Poppins',sans-serif;font-size:.9rem}
code{font-family:'Fira Code','Consolas',monospace;font-size:.85em}
a{color:var(--lh-primary)}
.btn-primary{background:var(--lh-primary);border-color:var(--lh-primary)}
.btn-primary:hover,.btn-primary:focus{background:var(--lh-primary-600);border-color:var(--lh-primary-600)}
.btn-outline-primary{color:var(--lh-primary);border-color:var(--lh-primary)}
.btn-outline-primary:hover{background:var(--lh-primary);border-color:var(--lh-primary)}
.text-primary{color:var(--lh-primary)!important}
.bg-primary-soft{background:var(--lh-primary-50);color:var(--lh-primary)}

/* ---------- Login ---------- */
.login-wrapper{
  min-height:100vh;
  background:
    radial-gradient(1200px 600px at -20% -10%, #eef2ff 0%, transparent 60%),
    radial-gradient(900px 500px at 120% 110%, #dcfce7 0%, transparent 55%),
    #f6f7fb;
  padding:1rem;
}
.login-card{
  max-width:920px;width:100%;
  border:0;border-radius:20px;overflow:hidden;
}
.login-hero{
  background:linear-gradient(135deg,#4f46e5 0%,#6366f1 55%,#8b5cf6 100%);
  min-height:520px;
}
.brand-logo{
  width:48px;height:48px;border-radius:12px;
  background:rgba(255,255,255,.18);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:1.4rem;
}
.brand-logo-sm{width:38px;height:38px;font-size:1.1rem;background:var(--lh-primary);color:#fff}
.hero-stats > div{background:rgba(255,255,255,.12);border-radius:12px;padding:.75rem 1rem;flex:1}

/* ---------- Layout ---------- */
#appView{min-height:100vh}
.sidebar{
  position:fixed;top:0;left:0;bottom:0;
  width:var(--sidebar-w);
  background:#fff;border-right:1px solid var(--lh-line);
  z-index:1030;
}
.sidebar-inner{height:100%;overflow-y:auto}
.sidebar .nav-link{
  color:var(--lh-ink-2);border-radius:10px;
  display:flex;align-items:center;gap:.7rem;
  padding:.6rem .85rem;font-weight:400;font-size:.9rem;
}
.sidebar .nav-link i{font-size:1.05rem;color:var(--lh-muted);width:20px;text-align:center}
.sidebar .nav-link:hover{background:var(--lh-primary-50);color:var(--lh-primary)}
.sidebar .nav-link:hover i{color:var(--lh-primary)}
.sidebar .nav-link.active{background:var(--lh-primary);color:#fff;font-weight:500;box-shadow:0 4px 12px rgba(79,70,229,.25)}
.sidebar .nav-link.active i{color:#fff}
.sidebar .nav-link.text-danger:hover{background:#fef2f2;color:var(--lh-danger)!important}

.main-area{
  margin-left:var(--sidebar-w);
  min-height:100vh;
  display:flex;flex-direction:column;
}
.topnav{
  position:sticky;top:0;z-index:1020;
  height:var(--topnav-h);
  background:#fff;border-bottom:1px solid var(--lh-line);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 1.25rem;
}
.search-box{
  background:var(--lh-bg);border-radius:10px;padding:.4rem .75rem;
  display:flex;align-items:center;gap:.5rem;min-width:340px;
}
.search-box input{background:transparent;border:0;outline:0;flex:1;font-size:.9rem}
.search-box i{color:var(--lh-muted)}

.page-container{padding:1.5rem;flex:1}

@media (max-width: 767.98px){
  .main-area{margin-left:0}
  .search-box{min-width:auto;width:auto}
}

/* ---------- Cards / general ---------- */
.card{
  border:1px solid var(--lh-line);border-radius:var(--lh-radius);
  box-shadow:var(--lh-shadow);background:#fff;
}
.card-body{padding:1.35rem}
.card-title{font-weight:600;color:var(--lh-ink);font-size:1rem}
.section-title{font-weight:600;color:var(--lh-ink);letter-spacing:-.02em;font-size:1.05rem}
.text-muted{color:var(--lh-muted)!important;font-weight:400}
.fw-semibold{font-weight:500!important}
.fw-bold{font-weight:600!important}
hr{border-color:var(--lh-line);opacity:1}

.avatar{
  width:44px;height:44px;border-radius:50%;
  background:var(--lh-primary-50);color:var(--lh-primary);
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:600;font-size:.9rem;flex:0 0 auto;
}
.avatar-sm{width:34px;height:34px;font-size:.8rem}
.avatar-lg{width:64px;height:64px;font-size:1.1rem}
.avatar-xl{width:96px;height:96px;font-size:1.5rem}

.badge-soft-primary{background:var(--lh-primary-50);color:var(--lh-primary);font-weight:600}
.badge-soft-success{background:#dcfce7;color:#166534;font-weight:600}
.badge-soft-warning{background:#fef3c7;color:#92400e;font-weight:600}
.badge-soft-danger{background:#fee2e2;color:#991b1b;font-weight:600}
.badge-soft-secondary{background:#e2e8f0;color:#334155;font-weight:600}

.progress{height:8px;border-radius:8px;background:#eef2f7}
.progress-bar{background:var(--lh-primary)}

/* ---------- Stat cards ---------- */
.stat-card{padding:1.25rem;border-radius:var(--lh-radius);background:#fff;border:1px solid var(--lh-line);height:100%;box-shadow:var(--lh-shadow)}
.stat-card .stat-icon{
  width:46px;height:46px;border-radius:12px;
  display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem;
}
.stat-card .stat-num{font-size:1.75rem;font-weight:600;letter-spacing:-.03em;line-height:1.1;color:var(--lh-ink)}
.stat-card .stat-lbl{color:var(--lh-muted);font-size:.82rem;font-weight:400}

/* ---------- Course cards ---------- */
.course-thumb{
  height:120px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:2.2rem;
}
.thumb-web{background:linear-gradient(135deg,#4f46e5,#8b5cf6)}
.thumb-db{background:linear-gradient(135deg,#0891b2,#0ea5e9)}
.thumb-se{background:linear-gradient(135deg,#16a34a,#22c55e)}
.thumb-net{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.thumb-ai{background:linear-gradient(135deg,#db2777,#f43f5e)}
.thumb-mob{background:linear-gradient(135deg,#0ea5e9,#4f46e5)}
.thumb-sec{background:linear-gradient(135deg,#334155,#0f172a)}

.course-card{transition:transform .15s ease, box-shadow .15s ease;cursor:pointer;height:100%}
.course-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(15,23,42,.08)}
.course-card .card-body{display:flex;flex-direction:column}

/* ---------- Lessons list ---------- */
.lesson-item{
  display:flex;align-items:center;gap:.8rem;
  padding:.85rem 1rem;border:1px solid var(--lh-line);
  border-radius:10px;background:#fff;cursor:pointer;
  transition:background .12s ease;
}
.lesson-item:hover{background:var(--lh-primary-50)}
.lesson-item .lesson-icon{
  width:34px;height:34px;border-radius:50%;
  background:#eef2ff;color:var(--lh-primary);
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;
}
.lesson-item.done .lesson-icon{background:#dcfce7;color:#166534}
.lesson-item.active{border-color:var(--lh-primary);box-shadow:0 0 0 3px rgba(79,70,229,.12)}

/* ---------- Timeline ---------- */
.timeline{position:relative;padding-left:24px}
.timeline:before{
  content:"";position:absolute;left:10px;top:6px;bottom:6px;
  width:2px;background:var(--lh-line);
}
.timeline-item{position:relative;padding:.3rem 0 1rem 0}
.timeline-item:before{
  content:"";position:absolute;left:-19px;top:8px;
  width:14px;height:14px;border-radius:50%;
  background:#fff;border:3px solid var(--lh-muted);
}
.timeline-item.done:before{background:var(--lh-success);border-color:var(--lh-success)}
.timeline-item.active:before{background:var(--lh-primary);border-color:var(--lh-primary);box-shadow:0 0 0 4px rgba(79,70,229,.18)}

/* ---------- Calendar ---------- */
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-head{font-weight:600;color:var(--lh-muted);font-size:.8rem;text-align:center;padding:.25rem 0}
.cal-cell{
  background:#fff;border:1px solid var(--lh-line);border-radius:10px;
  min-height:88px;padding:.4rem;position:relative;
}
.cal-cell.other{background:#fafbfc;color:#cbd5e1}
.cal-cell.today{border-color:var(--lh-primary);box-shadow:0 0 0 2px rgba(79,70,229,.14)}
.cal-cell .cal-date{font-weight:600;font-size:.85rem}
.cal-event{
  display:block;font-size:.72rem;font-weight:600;
  padding:2px 6px;border-radius:6px;margin-top:3px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  cursor:pointer;
}
.ev-assignment{background:#fee2e2;color:#991b1b}
.ev-exam{background:#e0e7ff;color:#3730a3}
.ev-class{background:#dcfce7;color:#166534}
.ev-project{background:#fef3c7;color:#92400e}

/* ---------- Messages ---------- */
.msg-layout{display:grid;grid-template-columns:280px 1fr;gap:1rem;min-height:520px}
@media (max-width: 767.98px){.msg-layout{grid-template-columns:1fr}}
.msg-contact{display:flex;align-items:center;gap:.65rem;padding:.6rem;border-radius:10px;cursor:pointer}
.msg-contact:hover{background:var(--lh-primary-50)}
.msg-contact.active{background:var(--lh-primary-50)}
.msg-thread{background:#fff;border:1px solid var(--lh-line);border-radius:var(--lh-radius);display:flex;flex-direction:column;height:100%}
.msg-body{flex:1;overflow-y:auto;padding:1rem;background:#f9fafb}
.bubble{max-width:70%;padding:.55rem .85rem;border-radius:14px;margin-bottom:.5rem;font-size:.9rem;line-height:1.35}
.bubble-in{background:#fff;border:1px solid var(--lh-line);border-top-left-radius:4px}
.bubble-out{background:var(--lh-primary);color:#fff;border-top-right-radius:4px;margin-left:auto}
.bubble .time{display:block;font-size:.7rem;opacity:.7;margin-top:2px}
.msg-input{border-top:1px solid var(--lh-line);padding:.75rem;display:flex;gap:.5rem}

/* ---------- Notifications ---------- */
.notif-item{padding:.75rem 1rem;border-bottom:1px solid var(--lh-line);display:flex;gap:.75rem;align-items:flex-start;cursor:pointer}
.notif-item.unread{background:var(--lh-primary-50)}
.notif-item:hover{background:#f8fafc}
.notif-item .n-icon{width:36px;height:36px;border-radius:50%;background:#eef2ff;color:var(--lh-primary);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}

/* Side panels (dropdown for notif/msg from topnav) */
.side-panel{
  position:fixed;top:70px;right:20px;width:360px;max-width:calc(100vw - 40px);
  background:#fff;border:1px solid var(--lh-line);border-radius:12px;
  box-shadow:0 20px 40px rgba(15,23,42,.14);
  display:none;z-index:1060;max-height:70vh;overflow:hidden;
}
.side-panel.show{display:block}
.side-panel .notif-list{max-height:calc(70vh - 60px);overflow-y:auto}

/* ---------- Certificate ---------- */
.certificate{
  border:8px double var(--lh-primary);
  padding:2.5rem 2rem;
  text-align:center;
  background:#fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g fill='%23eef2ff' opacity='.35'><circle cx='100' cy='100' r='70'/></g></svg>") center/300px no-repeat;
  border-radius:16px;
}
.certificate .seal{
  width:80px;height:80px;border-radius:50%;
  background:linear-gradient(135deg,#4f46e5,#8b5cf6);color:#fff;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:2rem;margin-bottom:.5rem;
}

/* ---------- Quiz ---------- */
.quiz-option{
  display:flex;align-items:center;gap:.6rem;padding:.7rem .9rem;
  border:1px solid var(--lh-line);border-radius:10px;cursor:pointer;margin-bottom:.5rem;
  transition:all .12s ease;background:#fff;
}
.quiz-option:hover{border-color:var(--lh-primary);background:var(--lh-primary-50)}
.quiz-option.selected{border-color:var(--lh-primary);background:var(--lh-primary-50)}
.quiz-option.correct{border-color:var(--lh-success);background:#dcfce7;color:#166534}
.quiz-option.wrong{border-color:var(--lh-danger);background:#fee2e2;color:#991b1b}
.quiz-option input{margin:0}

/* ---------- Misc ---------- */
.tab-btn{
  padding:.6rem 1rem;border:0;background:transparent;color:var(--lh-muted);font-weight:500;
  border-bottom:2px solid transparent;
}
.tab-btn.active{color:var(--lh-primary);border-bottom-color:var(--lh-primary);font-weight:600}

.code-block{
  background:#0f172a;color:#e2e8f0;padding:1rem;border-radius:10px;
  font-family:'Fira Code','Consolas',monospace;font-size:.85rem;overflow-x:auto;
}
.callout{
  border-left:4px solid var(--lh-primary);background:var(--lh-primary-50);
  padding:.75rem 1rem;border-radius:8px;color:var(--lh-ink-2);
}
.callout-warning{border-color:var(--lh-warning);background:#fffbeb;color:#78350f}

.list-hover .list-group-item{cursor:pointer;transition:background .12s ease}
.list-hover .list-group-item:hover{background:var(--lh-primary-50)}

/* subtle enter transition when swapping pages */
.fade-in{animation:fadeIn .18s ease-out}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* PDF embed for lesson viewer */
.pdf-embed{
  border:1px solid var(--lh-line);border-radius:12px;overflow:hidden;
  background:#f1f3f8;height:640px;box-shadow:var(--lh-shadow);
}
.pdf-embed iframe{width:100%;height:100%;border:0;display:block;background:#fff}
@media (max-width: 767.98px){.pdf-embed{height:480px}}

/* file upload area */
.upload-drop{
  border:2px dashed var(--lh-line);border-radius:12px;
  padding:1.5rem;text-align:center;color:var(--lh-muted);
  cursor:pointer;transition:all .12s ease;background:#fafbfc;
}
.upload-drop:hover,.upload-drop.drag{border-color:var(--lh-primary);background:var(--lh-primary-50);color:var(--lh-primary)}
