/* ================================================
   teacher.css — Oxford EduVision Teacher Hub v2
   ================================================ */

/* ── TOKENS ── */
:root {
  --bg: #f0f4fa;
  --text: #0f172a;
  --muted: rgba(15,23,42,.70);
  --muted2: rgba(15,23,42,.50);
  --line: rgba(15,23,42,.10);
  --line2: rgba(15,23,42,.07);
  --brand: #1d4ed8;
  --brand2: #2563eb;
  --brandSoft: rgba(37,99,235,.12);
  --card: #ffffff;
  --shadow: 0 2px 12px rgba(2,6,23,.06);
  --r-lg: 18px;
  --r-md: 12px;
  --r-sm: 8px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background-color: #f4f7fc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cline x1='0' y1='28' x2='6' y2='28' stroke='%23c8d5e8' stroke-width='1'/%3E%3Cline x1='50' y1='28' x2='56' y2='28' stroke='%23c8d5e8' stroke-width='1'/%3E%3Cline x1='28' y1='0' x2='28' y2='6' stroke='%23c8d5e8' stroke-width='1'/%3E%3Cline x1='28' y1='50' x2='28' y2='56' stroke='%23c8d5e8' stroke-width='1'/%3E%3Crect x='6' y='6' width='44' height='44' rx='7' ry='7' fill='none' stroke='%23cfd9ea' stroke-width='1.1'/%3E%3Cpath d='M28%2C12 L44%2C28 L28%2C44 L12%2C28 Z' fill='none' stroke='%23c4d2e6' stroke-width='1'/%3E%3Ccircle cx='28' cy='28' r='4' fill='none' stroke='%23c4d2e6' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 56px 56px;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15,23,42,.14); border-radius: 99px; }

/* ── PASSWORD GATE ── */
.gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,23,.65);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: opacity .25s ease;
}
.gate.is-hidden { opacity: 0; pointer-events: none; }
.gate__panel {
  background: #fff; border-radius: 24px;
  padding: 32px 28px 28px;
  width: min(400px, calc(100% - 40px));
  box-shadow: 0 30px 80px rgba(2,6,23,.22);
  border: 1px solid rgba(15,23,42,.08);
  display: flex; flex-direction: column; gap: 20px;
  animation: gateIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes gateIn {
  from { transform: scale(.92) translateY(16px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.gate__panel.shake { animation: gateShake .35s ease both; }
@keyframes gateShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-8px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}
.gate__logo { display: flex; align-items: center; gap: 12px; }
.gate__logo img { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(15,23,42,.10); }
.gate__logo strong { display: block; font-size: 14px; font-weight: 700; }
.gate__logo small { font-size: 12px; color: var(--muted2); margin-top: 2px; display: block; }
.gate__title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.gate__sub { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.gate__field { display: flex; flex-direction: column; gap: 8px; }
.gate__label { font-size: 12px; font-weight: 600; color: var(--muted); }
.gate__input {
  padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid rgba(15,23,42,.14);
  font-size: 15px; font-family: inherit; outline: none;
  transition: border-color .18s, box-shadow .18s; width: 100%;
}
.gate__input:focus { border-color: rgba(37,99,235,.45); box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.gate__err { font-size: 13px; color: #dc2626; font-weight: 600; min-height: 18px; }
.gate__actions { display: flex; gap: 10px; }
.gate__actions .gbtn { flex: 1; padding: 11px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; border: 1.5px solid; transition: all .15s; text-align: center; font-family: inherit; }
.gbtn--ghost { background: #f8fafc; border-color: rgba(15,23,42,.14); color: var(--text); }
.gbtn--ghost:hover { background: #f1f5f9; }
.gbtn--primary { background: linear-gradient(180deg,#2563eb,#1d4ed8); border-color: rgba(29,78,216,.30); color: #fff; }
.gbtn--primary:hover { opacity: .92; }

/* ── LAYOUT ── */
.th-layout { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }

/* ── SIDEBAR ── */
.th-sidebar {
  background: #0f172a;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto; padding: 20px 12px 24px; gap: 2px;
}
.sb-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: 8px;
}
.sb-brand__logo { width: 34px; height: 34px; border-radius: 10px; object-fit: contain; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
.sb-brand__text strong { font-size: 13px; font-weight: 700; display: block; color: #fff; }
.sb-brand__text small { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 1px; display: block; }
.sb-label { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: rgba(255,255,255,.22); padding: 10px 10px 4px; }
.sb-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.50);
  cursor: pointer; transition: all .14s;
  border: 1px solid transparent; text-decoration: none;
}
.sb-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.80); }
.sb-item.active { background: rgba(37,99,235,.28); color: #93c5fd; border-color: rgba(37,99,235,.32); }
.sb-icon { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.si-blue   { background: rgba(37,99,235,.22); }
.si-amber  { background: rgba(161,98,7,.22); }
.si-purple { background: rgba(126,34,206,.22); }
.si-pink   { background: rgba(157,23,77,.22); }
.si-green  { background: rgba(21,128,61,.22); }
.sb-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sb-back {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.38); cursor: pointer; transition: all .14s; text-decoration: none;
}
.sb-back:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.65); }

/* ── MAIN ── */
.th-main { display: flex; flex-direction: column; min-width: 0; }

/* ── TOP BAR ── */
.th-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229,231,235,.75);
  position: sticky; top: 0; z-index: 40; gap: 12px;
}
.th-topbar h1 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.th-topbar p  { font-size: 12px; color: var(--muted2); margin-top: 1px; }
.pg-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: #dcfce7; color: #15803d;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid rgba(21,128,61,.18); white-space: nowrap;
}
.pg-dot { width: 6px; height: 6px; border-radius: 99px; background: #22c55e; animation: pgPulse 2s ease infinite; }
@keyframes pgPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── CONTENT AREA ── */
.th-content { padding: 20px 24px 48px; display: flex; flex-direction: column; gap: 16px; }

/* ── ANNOUNCEMENT SLIDER ── */
.announce-slider {
  border-radius: 22px; overflow: hidden;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(229,231,235,.88);
  box-shadow: 0 14px 50px rgba(11,18,32,.07);
}
.announce-track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); cursor: grab; user-select: none; touch-action: pan-y; -webkit-user-select: none; }
.announce-slide { min-width: 100%; overflow: hidden; display: block; }

/* Gambar penuh lebar */
.announce-slide-img {
  width: 100%; height: 200px;
  object-fit: fill; display: block;
}
.announce-tag {
  display: inline-flex; padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; margin-bottom: 8px; width: fit-content;
}
.tag-blue   { background: #dbeafe; color: #1d4ed8; border: 1px solid rgba(37,99,235,.15); }
.tag-green  { background: #dcfce7; color: #15803d; border: 1px solid rgba(21,128,61,.15); }
.tag-amber  { background: #fef9c3; color: #a16207; border: 1px solid rgba(161,98,7,.15); }
.tag-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid rgba(126,34,206,.15); }

.announce-body h3 { font-size: 15px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 6px; color: var(--text); }
.announce-body p  { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

.announce-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 10px;
  background: #f8fafc;
  border-top: 1px solid rgba(15,23,42,.06);
}
.announce-dots { display: flex; gap: 5px; }
.a-dot { width: 6px; height: 6px; border-radius: 99px; background: rgba(15,23,42,.15); cursor: pointer; transition: all .22s; }
.a-dot.active { width: 18px; background: #2563eb; }
.announce-arrows { display: flex; gap: 6px; }
.a-arrow {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--muted);
  transition: all .14s; font-family: inherit;
}
.a-arrow:hover { background: #f1f5f9; }

/* ── QUICK ACCESS GRID ── */
.quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.quick-card {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px; border-radius: 18px;
  background: rgba(255,255,255,.80);
  border: 1px solid rgba(229,231,235,.88);
  transition: all .15s; cursor: pointer;
  box-shadow: 0 10px 28px rgba(11,18,32,.06);
  text-decoration: none; color: inherit;
}
.quick-card:hover { border-color: rgba(28,106,228,.22); box-shadow: 0 14px 40px rgba(11,18,32,.10); transform: translateY(-2px); }
.qc-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.qci-blue  { background: #dbeafe; }
.qci-green { background: #dcfce7; }
.qc-body strong { font-size: 13px; font-weight: 700; display: block; }
.qc-body span   { font-size: 11.5px; color: var(--muted2); margin-top: 2px; display: block; }
.qc-arrow { margin-left: auto; font-size: 16px; color: rgba(15,23,42,.28); flex-shrink: 0; }

/* ── SECTION CARD ── */
.sec-card {
  background: rgba(255,255,255,.88);
  border-radius: 22px;
  border: 1px solid rgba(229,231,235,.88);
  box-shadow: 0 14px 50px rgba(11,18,32,.07);
  overflow: hidden;
}
.sec-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(229,231,235,.80);
}
.sec-head-left { display: flex; align-items: center; gap: 10px; }
.sec-head-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.sec-head h2   { font-size: 14px; font-weight: 700; }

/* badges */
.badge { display: inline-flex; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px solid; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; border-color: rgba(37,99,235,.18); }
.badge-amber  { background: #fef9c3; color: #a16207; border-color: rgba(161,98,7,.18); }
.badge-purple { background: #f3e8ff; color: #7e22ce; border-color: rgba(126,34,206,.18); }
.badge-pink   { background: #fce7f3; color: #9d174d; border-color: rgba(157,23,77,.18); }
.badge-green  { background: #dcfce7; color: #15803d; border-color: rgba(21,128,61,.18); }

/* ── APPS GRID (full width, 7 cols) ── */
.apps-grid-full {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px; padding: 14px;
}
.app-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 6px; border-radius: 14px;
  cursor: pointer; transition: background .14s; text-decoration: none;
}
.app-item:hover { background: rgba(11,58,130,.06); }
.app-item:active { transform: scale(.97); }
.app-thumb {
  width: 56px; height: 56px; border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(229,231,235,.88);
  background: #f8fafc;
  box-shadow: 0 4px 14px rgba(11,18,32,.08);
}
.app-name {
  font-size: 11px; font-weight: 600;
  color: rgba(11,18,32,.78);
  text-align: center; line-height: 1.25;
}

/* Lock info */
.apps-lock-info {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(251,191,36,.07);
  border: 1px solid rgba(251,191,36,.28);
  padding: 12px 16px;
}
.ali-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.ali-body strong { font-size: 12.5px; font-weight: 700; color: #92400e; display: block; margin-bottom: 3px; }
.ali-body p { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }

.apps-hint {
  text-align: center; padding: 10px 14px;
  font-size: 11.5px; font-weight: 700;
  color: rgba(29,78,216,.85);
  background: #f0f6ff;
  border-top: 1px solid rgba(37,99,235,.08);
}

/* ── 2-COL BOTTOM ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.right-col { display: flex; flex-direction: column; gap: 16px; }

/* ── DRIVE / LINK LIST ── */
.drive-list { display: flex; flex-direction: column; }
.drive-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  cursor: pointer; transition: background .13s;
  text-decoration: none; color: inherit;
}
.drive-item:last-child { border-bottom: none; }
.drive-item:hover { background: #f8fafc; }
.drive-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.di-amber  { background: #fef9c3; }
.di-blue   { background: #dbeafe; }
.di-purple { background: #f3e8ff; }
.drive-text strong { font-size: 12.5px; font-weight: 700; display: block; color: var(--text); }
.drive-text span   { font-size: 11px; color: var(--muted2); margin-top: 1px; display: block; }
.drive-arrow { margin-left: auto; font-size: 14px; color: rgba(15,23,42,.28); flex-shrink: 0; }

/* ── PANDUAN LIST ── */
.panduan-list { display: flex; flex-direction: column; }
.panduan-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  text-decoration: none; color: inherit; transition: background .13s;
}
.panduan-item:last-child { border-bottom: none; }
.panduan-item:hover { background: #f8fafc; }
.panduan-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.panduan-text strong { font-size: 12.5px; font-weight: 700; color: var(--text); display: block; }
.panduan-text span   { font-size: 11px; color: var(--muted2); margin-top: 1px; display: block; }

/* ── SUPPORT ── */
.support-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; }
.s-type {
  border: 1.5px solid rgba(15,23,42,.10);
  border-radius: 14px; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: all .15s; text-align: center;
}
.s-type:hover { border-color: #93c5fd; background: #f8fafc; transform: translateY(-1px); }
.s-type.active { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.10); }
.s-type-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.s-type strong { font-size: 12.5px; font-weight: 700; color: var(--text); }
.s-type p { font-size: 11px; color: var(--muted2); line-height: 1.45; }

.support-form-wrap { padding: 0 16px 16px; display: none; }
.support-form-wrap.show { display: block; }
.dest-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: #f0fdf4; border: 1px solid rgba(21,128,61,.18);
  font-size: 12.5px; font-weight: 600; color: #15803d; margin-bottom: 14px;
}
.dest-dot { width: 8px; height: 8px; border-radius: 99px; background: #22c55e; flex-shrink: 0; animation: pulse 2s ease infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 3px rgba(34,197,94,.20)} 50%{box-shadow:0 0 0 5px rgba(34,197,94,.10)} }

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-label  { font-size: 12px; font-weight: 600; color: var(--muted); }
.form-input, .form-textarea {
  padding: 10px 13px; border-radius: 11px;
  border: 1.5px solid rgba(15,23,42,.12);
  font-size: 13.5px; font-family: inherit;
  color: var(--text); outline: none;
  transition: border-color .18s, box-shadow .18s; width: 100%;
}
.form-input:focus, .form-textarea:focus {
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,.10);
}
.form-textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; border-radius: 999px; border: none; cursor: pointer;
  background: linear-gradient(135deg,#25d366,#128c50);
  color: #fff; font-size: 14px; font-weight: 800; font-family: inherit;
  box-shadow: 0 8px 24px rgba(18,140,80,.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(18,140,80,.30); }
.btn-wa svg { width: 20px; height: 20px; fill: #fff; flex-shrink: 0; }

/* ── MOBILE BOTTOM NAV ── */
.mobile-nav { display: none; }

@media (max-width: 1100px) {
  .apps-grid-full { grid-template-columns: repeat(5,1fr); }
}
@media (max-width: 900px) {
  .th-layout { grid-template-columns: 1fr; }
  .th-sidebar { display: none; }
  .th-main { padding-bottom: 70px; }
  .th-content { padding: 14px 12px 80px; overflow-x: hidden; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(229,231,235,.88);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  }
  .mn-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 8px; cursor: pointer; text-decoration: none; color: rgba(15,23,42,.42); transition: color .15s; }
  .mn-item.active { color: #1d4ed8; }
  .mn-icon  { font-size: 20px; }
  .mn-label { font-size: 10px; font-weight: 600; }
  .two-col  { grid-template-columns: 1fr; }
  /* Quick grid — paksa 2 kolum */
  .quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  /* Apps — 4 kolum, overflow hidden */
  .apps-grid-full { grid-template-columns: repeat(4,1fr); overflow: hidden; }
  /* Elak content overflow */
  .sec-card, .announce-slider, .quick-card { max-width: 100%; }
}
@media (max-width: 520px) {
  .th-content { padding: 12px 12px 80px; }
  .th-topbar  { padding: 12px 14px; }
  /* Apps 4 kolum pada phone kecil */
  .apps-grid-full { grid-template-columns: repeat(4,1fr); gap: 2px; padding: 10px 8px; }
  .app-thumb { width: 48px; height: 48px; border-radius: 13px; }
  .app-name  { font-size: 10px; }
  .support-types { grid-template-columns: 1fr; }
  /* Quick 2 kolum pada phone */
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-card { padding: 10px 10px; }
  /* Slider image — stretch penuh pada semua saiz */
  .announce-slide-img { width: 100%; height: 160px; object-fit: fill; }
  /* Prevent horizontal overflow */
  html, body { max-width: 100%; overflow-x: hidden; }
  .th-main, .th-content { max-width: 100%; overflow-x: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}