﻿/* ==============================================================================
   VLSI LMS : STYLESHEET (CLEAN, FAST, ZERO DEPENDENCY)
   Modeled identically after astarindo LMS design system
   ============================================================================== */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #111a2e;
  --ink-2: #4a5570;
  --muted: #7a849b;
  --line: #e3e7f0;
  --brand: #00A887;
  --brand-ink: #ffffff;
  --brand-soft: #e6f7f4;
  --brand-hover: #008f72;
  --side: #0b132b;
  --side-ink: #b9c1db;
  --side-on: #ffffff;
  --accent: #14b8a6;
  --green: #0f9d63; --green-soft: #e3f6ed;
  --amber: #b26b00; --amber-soft: #fff3dc;
  --red: #d33a3a;   --red-soft: #fde8e8;
  --blue: #2563eb;  --blue-soft: #e5eeff;
  --grey: #5b6478;  --grey-soft: #eef0f4;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -.01em; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 10px; }
code { background: var(--grey-soft); padding: 2px 6px; border-radius: 5px; font-size: 12px; font-family: monospace; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }
.text-red { color: var(--red); }
.inline { display: inline; }
.right-float { float: right; }

/* ---------- layout: shell & sidebar ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px;
  flex: none;
  background: var(--side);
  color: var(--side-ink);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; gap: 10px; align-items: center; color: #fff; padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand b { display: block; font-size: 15px; font-weight: 700; }
.brand small { display: block; color: var(--side-ink); font-size: 12px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #0284c7);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.brand-mark svg { width: 22px; height: 22px; }
.sidebar nav { flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--side-ink);
  font-weight: 500;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.sidebar nav a.on { background: rgba(0, 168, 135, 0.28); color: #fff; font-weight: 600; }
.sidebar nav span { flex: 1; }
.sidebar .sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: auto;
}
.count { font-style: normal; font-size: 11px; font-weight: 600; background: #f59e0b; color: #1b1300; border-radius: 10px; padding: 1px 7px; }

/* ---------- topbar & content ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(244, 246, 251, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 19px; font-weight: 650; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-user { display: flex; align-items: center; gap: 8px; }
.who { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 500; padding: 4px 8px; border-radius: 9px; }
.who:hover { background: var(--surface); text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.menu-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1360px; width: 100%; }
.scrim { display: none; }

/* ---------- surfaces & cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head.pad { padding: 16px 20px; margin: 0; border-bottom: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.grid-side { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.span-2 { grid-column: span 2; }
.grid-side.align-start { align-items: start; }

/* ---------- stats banner ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  align-items: center;
}
.stat-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.stat-ic svg { width: 22px; height: 22px; }
.stat b { font-size: 22px; font-weight: 700; line-height: 1.15; display: block; color: var(--ink); }
.stat small { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
  line-height: 1.2;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 12px; line-height: 1.35; white-space: nowrap; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-grey { background: var(--grey-soft); color: var(--grey); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
th { background: #f9fafb; font-weight: 600; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
tbody tr:hover { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- forms & toolbar ---------- */
.form label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 13px; color: var(--ink); }
.form input[type=text], .form input[type=email], .form input[type=password], .form select, .form textarea {
  width: 100%;
  margin-top: 5px;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1px solid var(--line);
  font: inherit;
  background: #fff;
  transition: border-color .15s;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 168, 135, 0.15); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters select, .filters input { padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line); font-size: 13px; background: #fff; }

/* ---------- video classroom & player ---------- */
.player-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.player-wrap video, .player-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.progress-bar-wrap { width: 100%; height: 6px; background: var(--grey-soft); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.progress-bar-wrap .fill { height: 100%; background: var(--brand); border-radius: 3px; }

.lecture-list { list-style: none; margin: 0; padding: 0; }
.lecture-list li a { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .15s; }
.lecture-list li:last-child a { border-bottom: 0; }
.lecture-list li a:hover { background: #fafbff; text-decoration: none; }
.lecture-list .ln { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.lecture-list .ln.done { background: var(--green-soft); color: var(--green); }
.lecture-list .lt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lecture-list .lm { text-align: right; color: var(--ink-2); white-space: nowrap; font-size: 12.5px; }
.lecture-list li.current a { background: var(--brand-soft); font-weight: 600; }

/* ---------- auth screens ---------- */
.auth-body { background: var(--side); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr minmax(380px, 490px); }
.auth-side {
  color: #dfe4f5;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  background: radial-gradient(800px 500px at 0% 100%, rgba(20, 184, 166, .25), transparent 60%), radial-gradient(700px 500px at 100% 0%, rgba(0, 168, 135, .35), transparent 60%);
}
.auth-side h2 { font-size: 28px; line-height: 1.3; color: #fff; max-width: 520px; font-weight: 700; }
.auth-side ul { margin: 0; padding-left: 20px; line-height: 2.1; color: #b9c1db; font-size: 15px; }
.brand-lg b { font-size: 20px; }
.auth-card { background: var(--surface); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .form { margin-top: 18px; }
.auth-alt { margin-top: 16px; text-align: center; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 15, 30, .45); z-index: 20; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar h1 { font-size: 16px; }
  .content { padding: 16px 16px 40px; }
  .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-card { padding: 32px 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; column-gap: 10px; }
  .stat-ic { width: 34px; height: 34px; }
  .stat b { font-size: 18px; }
}

