/* Google Classroom Replica - High Fidelity Stylesheet with Course Player Mode */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&family=Fira+Code:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
  --font-family: 'Google Sans', Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-code: 'Fira Code', Consolas, Monaco, monospace;
  
  --color-primary: #1967d2;
  --color-primary-hover: #185abc;
  --color-primary-bg: #e8f0fe;
  
  --theme-blue: #1967d2;
  --theme-teal: #007b83;
  --theme-amber: #b06000;
  --theme-indigo: #3949ab;
  --theme-rose: #c2185b;
  --theme-green: #137333;
  
  --text-primary: #3c4043;
  --text-secondary: #5f6368;
  --text-tertiary: #80868b;
  
  --bg-app: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f4;
  --bg-selected: #e8f0fe;
  
  --border-color: #dadce0;
  --border-subtle: #e0e0e0;
  
  --header-height: 64px;
  --drawer-width: 280px;
  --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-md: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  --shadow-lg: 0 4px 12px 0 rgba(60,64,67,0.2), 0 8px 24px 4px rgba(60,64,67,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-app);
  overflow-x: hidden;
  line-height: 1.5;
}

button, input, textarea, select {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 0.15s ease;
}

.icon-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.classroom-logo-svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.brand-text {
  font-family: 'Google Sans', sans-serif;
  font-size: 22px;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: -0.2px;
}

.header-class-info {
  display: flex;
  flex-direction: column;
  margin-left: 8px;
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-class-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-class-section {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.header-center-tabs {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-tab-link {
  height: var(--header-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.header-tab-link:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.02);
}

.header-tab-link.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.user-avatar-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
}

.user-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Dropdown Menus */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  min-width: 220px;
  z-index: 200;
  display: none;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
}

.user-account-switcher {
  min-width: 300px;
  padding: 16px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.account-header .user-avatar-img {
  width: 48px;
  height: 48px;
}

.account-info-name {
  font-weight: 500;
  font-size: 0.95rem;
}

.account-info-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.account-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  background: var(--bg-selected);
  color: var(--color-primary);
  border-radius: 12px;
  margin-top: 4px;
  font-weight: 500;
}

.switch-list-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 6px;
}

.switch-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.switch-user-item:hover {
  background: var(--bg-hover);
}

.switch-user-item.active {
  background: var(--bg-selected);
}

/* ==========================================================================
   NAVIGATION DRAWER
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--drawer-width);
  height: 100vh;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  z-index: 160;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-content {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
}

.drawer-item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  padding: 0 24px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0 24px 24px 0;
  margin-right: 8px;
}

.drawer-item:hover {
  background-color: var(--bg-hover);
}

.drawer-item.active {
  background-color: var(--color-primary-bg);
  color: var(--color-primary);
}

.drawer-item.active .material-symbols-outlined {
  color: var(--color-primary);
}

.drawer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

.drawer-section-title {
  padding: 12px 24px 4px 24px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.drawer-class-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: bold;
  flex-shrink: 0;
}

.drawer-class-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}

/* ==========================================================================
   MAIN DASHBOARD / BERANDA (CARD GRID)
   ========================================================================== */
.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
  min-height: calc(100vh - var(--header-height));
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 290px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.class-card:hover {
  box-shadow: var(--shadow-md);
}

/* Theme color variations */
.theme-blue { background: #1967d2 !important; }
.theme-teal { background: #007b83 !important; }
.theme-amber { background: #b06000 !important; }
.theme-indigo { background: #3949ab !important; }
.theme-rose { background: #c2185b !important; }
.theme-green { background: #137333 !important; }

.theme-blue-text { color: #1967d2 !important; }
.theme-teal-text { color: #007b83 !important; }
.theme-amber-text { color: #b06000 !important; }
.theme-indigo-text { color: #3949ab !important; }
.theme-rose-text { color: #c2185b !important; }
.theme-green-text { color: #137333 !important; }

.class-card-header {
  padding: 16px;
  height: 135px;
  color: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-size: cover;
  background-position: center;
}

.class-card-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.class-card-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 2px;
  position: relative;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.class-card-title:hover {
  text-decoration: underline;
}

.class-card-section {
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.class-card-teacher {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 2;
  margin-top: 10px;
}

.class-card-menu-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffffff;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.class-card-menu-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.class-card-avatar {
  position: absolute;
  bottom: -24px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
  z-index: 4;
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.class-card-body {
  padding: 16px;
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 95px;
}

.class-card-footer {
  border-top: 1px solid var(--border-subtle);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  gap: 4px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.empty-state-icon {
  font-size: 72px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ==========================================================================
   INSIDE CLASS VIEW: BANNER, STREAM, CLASSWORK, PEOPLE, GRADES
   ========================================================================== */
.class-detail-view {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Hero Banner */
.class-banner {
  border-radius: 8px;
  height: 240px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.class-banner-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.2;
  background-image: radial-gradient(circle at 20% 40%, rgba(255,255,255,0.8) 0%, transparent 40%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.6) 0%, transparent 30%);
}

.class-banner-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.class-banner-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4px;
}

.class-banner-section {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 8px;
}

.class-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
  user-select: none;
}

.class-code-pill:hover {
  background: rgba(255, 255, 255, 0.35);
}

.class-code-text {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Stream Layout */
.stream-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}

.stream-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stream-sidebar-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.stream-sidebar-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.stream-sidebar-content {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.stream-sidebar-link {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-top: 12px;
  text-align: right;
  cursor: pointer;
}

.stream-sidebar-link:hover {
  text-decoration: underline;
}

.stream-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement-box-collapsed {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  transition: box-shadow 0.2s ease;
}

.announcement-box-collapsed:hover {
  box-shadow: var(--shadow-sm);
}

.announcement-box-collapsed .user-avatar-img {
  width: 40px;
  height: 40px;
}

.announcement-placeholder {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}

.announcement-box-expanded {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  gap: 16px;
}

.announcement-textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 90px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-primary);
}

.announcement-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.announcement-tools-left, .announcement-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Post Cards */
.post-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  overflow: hidden;
}

.post-card-header {
  padding: 16px 16px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-author-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.post-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.post-card-body {
  padding: 8px 16px 16px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-attachments {
  padding: 0 16px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  background: #fafafa;
  max-width: 100%;
  cursor: pointer;
}

.attachment-chip:hover {
  background: #f1f3f4;
}

.attachment-chip-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  font-weight: 500;
}

.post-card-comments {
  border-top: 1px solid var(--border-subtle);
  background: #fafafa;
  padding: 12px 16px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comment-item .user-avatar-img {
  width: 32px;
  height: 32px;
}

.comment-content-wrap {
  flex: 1;
}

.comment-author-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.comment-author {
  font-weight: 500;
  color: var(--text-primary);
}

.comment-time {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.comment-text {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.add-comment-form {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.add-comment-input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.85rem;
  background: #ffffff;
  outline: none;
}

.add-comment-input:focus {
  border-color: var(--color-primary);
}

.send-comment-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* ==========================================================================
   CLASSWORK TAB: COURSE VIEW BANNER & CURRICULUM
   ========================================================================== */
.classwork-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Big Course Progress & Viewer Banner */
.course-hero-card {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.course-hero-left {
  flex: 1;
  min-width: 260px;
}

.course-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.course-hero-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.course-hero-desc {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 14px;
}

.course-progress-wrap {
  max-width: 380px;
}

.course-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.course-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  overflow: hidden;
}

.course-progress-bar-fill {
  height: 100%;
  background: #34a853;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.btn-open-course-player {
  background: #ffffff;
  color: #1a73e8;
  border: none;
  border-radius: 24px;
  padding: 12px 24px;
  font-size: 0.925rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.btn-open-course-player:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Course Module Sections */
.course-module-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.course-module-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60,64,67,0.08);
}

.course-module-header {
  padding: 16px 20px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.module-header-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-lesson-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.course-lesson-list {
  display: flex;
  flex-direction: column;
}

.course-lesson-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
  cursor: pointer;
}

.course-lesson-row:last-child {
  border-bottom: none;
}

.course-lesson-row:hover {
  background-color: var(--bg-hover);
}

.lesson-left-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lesson-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.type-video {
  background: #e8f0fe;
  color: #1967d2;
}

.type-reading {
  background: #fef7e0;
  color: #b06000;
}

.type-assignment {
  background: #e6f4ea;
  color: #137333;
}

.type-quiz {
  background: #fce8e6;
  color: #d93025;
}

.lesson-title-meta {
  display: flex;
  flex-direction: column;
}

.lesson-row-title {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-primary);
}

.lesson-row-sub {
  font-size: 0.775rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.lesson-right-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-badge-completed {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #137333;
  font-size: 0.8rem;
  font-weight: 500;
}

.btn-start-lesson {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-start-lesson:hover {
  background: var(--color-primary);
  color: #ffffff;
}

/* ==========================================================================
   IMMERSIVE COURSE PLAYER VIEW
   ========================================================================== */
.course-player-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 400;
  display: none;
  flex-direction: column;
}

.course-player-view.active {
  display: flex;
}

/* Player Top Bar */
.course-player-topbar {
  height: 60px;
  background: #1f1f1f;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.player-top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-exit-player {
  background: transparent;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
}

.btn-exit-player:hover {
  background: rgba(255, 255, 255, 0.15);
}

.player-course-name {
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.player-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.player-progress-text {
  font-size: 0.825rem;
  color: #dadce0;
}

/* Player Layout Split */
.course-player-layout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Sidebar Syllabus */
.course-player-sidebar {
  width: 360px;
  background: #f8f9fa;
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.player-sidebar-header {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-module-group {
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-module-title {
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: #f1f3f4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-lesson-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.1s ease;
  background: #ffffff;
  border-bottom: 1px solid #f1f3f4;
}

.sidebar-lesson-item:hover {
  background: #f1f3f4;
}

.sidebar-lesson-item.active {
  background: #e8f0fe;
  border-left-color: var(--color-primary);
}

.sidebar-lesson-checkbox {
  margin-top: 3px;
  color: #137333;
}

.sidebar-lesson-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.sidebar-lesson-duration {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Player Main Viewer */
.course-player-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.player-content-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* Video Player Box */
.video-responsive-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000000;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.video-responsive-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.player-lesson-header {
  margin-bottom: 20px;
}

.player-lesson-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.player-lesson-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.825rem;
  color: var(--text-secondary);
}

.badge-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

/* Rich Content & Code Styling */
.course-article-body {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #202124;
  margin-bottom: 32px;
}

.course-article-body h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 24px 0 12px 0;
  color: var(--text-primary);
}

.course-article-body h4 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 18px 0 8px 0;
  color: var(--text-primary);
}

.course-article-body p {
  margin-bottom: 14px;
}

.course-article-body ul, .course-article-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.course-article-body li {
  margin-bottom: 6px;
}

.course-callout {
  background: #e8f0fe;
  border-left: 4px solid #1967d2;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.95rem;
}

.course-callout.tip {
  background: #e6f4ea;
  border-left-color: #137333;
}

.code-box {
  background: #282c34;
  color: #abb2bf;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: var(--font-code);
}

.code-header {
  background: #21252b;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #828997;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-box pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Lesson Navigation Bottom Bar */
.lesson-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.btn-toggle-completed {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-primary);
}

.btn-toggle-completed.completed {
  background: #e6f4ea;
  color: #137333;
  border-color: #137333;
}

/* Discussion Q&A Box inside Course Player */
.course-qa-section {
  margin-top: 40px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.qa-section-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   PEOPLE TAB (ANGGOTA) & GRADES TAB
   ========================================================================== */
.people-section {
  margin-bottom: 40px;
}

.people-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.people-section-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 1.75rem;
  color: var(--color-primary);
  font-weight: 400;
}

.people-list {
  display: flex;
  flex-direction: column;
}

.people-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.people-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.people-user-info .user-avatar-img {
  width: 36px;
  height: 36px;
}

.people-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.grades-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #ffffff;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.grades-table th, .grades-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  text-align: left;
}

.grades-table th {
  background: #fafafa;
  font-weight: 500;
  color: var(--text-secondary);
}

.grades-student-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.grade-input-box {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.85rem;
  text-align: center;
}

/* ==========================================================================
   MODALS & TOAST
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  animation: scaleUp 0.15s ease-out;
}

.modal-header {
  padding: 20px 24px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-bg);
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-subtle);
}

.btn-text {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
}

.btn-text:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
}

.btn-banner-action {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-banner-action:hover {
  background: rgba(255, 255, 255, 0.35);
}

.btn-danger {
  background: #d93025;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-danger:hover {
  background: #b3261e;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.825rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline:hover {
  background: var(--bg-hover);
}

/* Card & Item Contextual Menus */
.context-menu-container {
  position: absolute;
  top: 44px;
  right: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  min-width: 190px;
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.1s ease;
}
.context-menu-container.show {
  display: flex;
}
.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.1s ease;
}
.context-menu-item:hover {
  background-color: var(--bg-hover);
}
.context-menu-item.danger {
  color: #d93025;
}

.btn-delete-comment {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px;
  opacity: 0.6;
}
.btn-delete-comment:hover {
  color: #d93025;
  opacity: 1;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.toast {
  background: #323232;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 4px;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInUp 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
  .course-player-layout {
    flex-direction: column;
  }
  .course-player-sidebar {
    width: 100%;
    max-height: 200px;
  }
  .course-player-main {
    padding: 16px;
  }
  .stream-grid {
    grid-template-columns: 1fr;
  }
  .stream-sidebar {
    display: none;
  }
  .header-center-tabs {
    display: none;
  }
}
