/* ============================================================
   ROOMSYNC — MAIN STYLESHEET
   Mobile-first. Breakpoints: tablet (768px+), desktop (1200px+)
   ============================================================ */

/* ---------- RESET ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", Arial, sans-serif;
  background: #ffffff;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
img, svg, video { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- DESIGN TOKENS ---------- */
:root {
  --near-black: #1d1d1f;
  --gray-bg: #f5f5f7;
  --gray-bg-2: #fbfbfd;
  --gray-text: #86868d;
  --gray-text-2: #6e6e75;
  --hairline: #d2d2d9;
  --blue: #0073ec;

   /* THIS IS FIXED. DO NOT CHANGE THIS!! */
  --exam: #DF0000;
  --quiz: #F2B84B;
  --case-study: #C79ADB;
  --activity: #F2795A;
  --seatwork: #009CDF;
  --assignment: #8F8F97;

  
  --radius-lg: 20px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --radius-pill: 1000px;
}

/* ============================================================
   VISIBILITY UTILITIES (swapped per breakpoint below)
   ============================================================ */
.desktop-only,
.desktop-only-inline,
.desktop-tablet-only,
.desktop-tablet-expanded-only { display: none !important; }

.mobile-only { display: flex !important; }
.mobile-only-inline { display: inline !important; }
.mobile-only-inline-flex { display: flex !important; }
.tablet-only { display: none !important; }
.tablet-mobile-only { display: flex !important; }

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  height: 62px;
  background: #333333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
/* Brand logo — entirely separate from any avatar/circle class. Never has border-radius, on purpose:
   the imported logo image already has its own curved corners baked in. */
.rs-brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 0;
  object-fit: cover;

}
.rs-brand-logo-lg {
  width: 44px;
  height: 44px;
}
.brand-word { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 15px; color: #fff; }
.brand-word .dim { color: rgba(255,255,255,0.4); }
.brand-word-lg { font-size: 19px; color: var(--near-black); }
.brand-word-lg .dim { color: rgba(51,51,51,0.35); }

.topbar-nav { gap: 28px; align-items: center; }
.topbar-nav a { font-size: 15px; font-weight: 500; color: #d6d6d6; }
.topbar-nav a.active { color: #fff; font-weight: 700; }
.topbar-nav a:hover { color: #fff; }

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-todo {
  height: 35px;
  padding: 0 18px 0 13px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  border: 0.3px solid var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-todo:hover { background: #0064cc; border-color: #0064cc; }
.btn-todo .plus { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 19px; line-height: 1; }

/* Hamburger */
.hamburger {
  width: 24px;
  height: 18px;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 200ms, opacity 200ms;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================
   APP SHELL / SIDEBAR
   ============================================================ */
.app-shell { display: flex; min-height: calc(100vh - 62px); }
.sidebar-logo-row { display: none; align-items: center; gap: 14px; margin-bottom: 20px; }

.sidebar {
  position: fixed;
  top: 62px;
  left: 0;
  bottom: 0;
  width: 78%;
  max-width: 340px;
  background: var(--gray-bg);
  z-index: 45;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 250ms ease;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-top { padding: 24px 20px; }
.sidebar-wordmark { color: var(--near-black); }
.sidebar-divider { height: 1px; background: var(--hairline); margin-bottom: 16px; }

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 10px;
  border-radius: 10px;
  color: var(--gray-text-2);
  font-size: 15px;
  font-weight: 500;
}
.sidebar-link.active { color: var(--near-black); font-weight: 700; }
.sidebar-link:hover { background: rgba(0,0,0,0.04); }
.sidebar-icon { width: 22px; height: 22px; flex-shrink: 0; position: relative; }
.sidebar-icon svg { width: 100%; height: 100%; }
.sidebar-icon .icon-filled { display: none; }
.sidebar-link.active .sidebar-icon .icon-outline { display: none; }
.sidebar-link.active .sidebar-icon .icon-filled { display: block; }
.sidebar-icon.icon-placeholder {
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, #e5e5e5, #e5e5e5 4px, #ececec 4px, #ececec 8px);
  border: 1px dashed #b8b8b8;
}

.sidebar-footer { padding: 0; margin-top: auto; flex-shrink: 0; }
.profile-row {
  width: 100%;
  background: #333333;
  border-radius: 15px 15px 0 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-row-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.profile-row-link:hover .profile-name { text-decoration: underline; }
.avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(217,217,217,0.6);
  border: 0.2px solid #fff;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  border: 1.5px solid #333;
}
.profile-text { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-name { font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2; }
.profile-status { font-size: 14px; color: var(--gray-text); line-height: 1.2; }
.settings-icon { width: 20px; height: 20px; color: var(--gray-text); flex-shrink: 0; padding: 0; display: flex; align-items: center; justify-content: center; }
.settings-icon:hover { color: var(--near-black); }
.settings-icon svg { width: 100%; height: 100%; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 62px 0 0 0;
  background: rgba(0,0,0,0.35);
  z-index: 44;
}
.sidebar-overlay.open { display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.content {
  flex: 1;
  padding: 20px 18px 100px;
  min-width: 0;
}

.room-switcher { position: relative; }
.room-pill-floating {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  border-radius: var(--radius-pill);
  padding: 6px 16px 6px 6px;
  width: fit-content;
  margin-left: auto;
  margin-bottom: 12px;
}
.room-pill-floating:hover { background: #0064cc; }
.room-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
  padding: 6px;
  min-width: 170px;
  z-index: 60;
}
.room-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--near-black);
  text-align: left;
}
.room-dropdown-item:hover { background: var(--gray-bg); }
.room-dropdown-item.active { color: var(--blue); }
.room-dropdown-item .room-avatar { margin: 0; }
.room-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7a2b2b;
  border: 0.2px solid #fff;
  flex-shrink: 0;
}
.room-avatar-outline { background: var(--gray-bg); border: 0.2px solid #868686; }
.room-pill-floating .room-name { font-size: 12.5px; font-weight: 700; color: #fff; }
.room-pill-floating img { border-radius: 100%;}
.page-header { margin-bottom: 16px; }
.page-eyebrow { font-size: 12.5px; font-weight: 700; color: var(--exam); letter-spacing: 0.5px; margin-bottom: 6px; }
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin-bottom: 6px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", sans-serif; }
.page-subtitle { font-size: 15px; color: var(--gray-text-2); }

.mobile-fab-bar {
  position: fixed;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}
.fab-right-group { display: flex; align-items: center; gap: 12px; }
.fab-pill {
  background: rgba(211,211,211,0.9);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
}
.fab-round {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(211,211,211,0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.25);
}
.fab-round svg { width: 22px; height: 22px; }
.fab-round-primary { background: var(--near-black); margin-left: 8px; }

/* ---------- Week sections ---------- */
.week-section { margin-bottom: 4px; }
.week-label { font-size: 14px; font-weight: 800; color: var(--gray-text); letter-spacing: 0.5px; margin-bottom: 14px; }
.week-label-accent { color: var(--blue); }
.week-label-accent-muted { color: var(--gray-text); }
.week-label .bullet { color: var(--gray-text); font-weight: 400; margin: 0 2px; }
.section-rule { border: none; border-top: 1px solid var(--hairline); margin: 18px 0; }
.empty-week-note { font-size: 15px; color: var(--gray-text); padding: 8px 0 20px; }

.board { display: flex; flex-direction: column; gap: 12px; }
.board.view-scroll { display: flex; flex-direction: column; }
.board.view-scroll .day-card,
.board.view-scroll .notes-file-card { flex: none; width: 100%; max-width: none; }

.day-card {
  background: var(--gray-bg-2);
  border: 1px solid rgba(134,134,134,0.25);
  border-radius: var(--radius-md);
  padding: 20px 18px 22px;
}
.day-card-today { background: #f7f7f7; border: 1.2px solid var(--blue); border-radius: var(--radius-lg); }

.day-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.day-name { font-size: 16.5px; font-weight: 700; letter-spacing: -0.3px; }
.day-date-sub { font-size: 11px; color: var(--gray-text); margin-top: 3px; }
.day-card-meta { display: flex; align-items: center; gap: 8px; }
.date-pill { background: var(--blue); color: #fff; font-size: 9px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
.task-count {
  width: 17px; height: 17px; border-radius: 100%; background: #d9d9d9; color: var(--gray-text);
  font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.reminder-card {
  background: #fff;
  border: 0.5px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-top: 12px;
  cursor: pointer;
}
.reminder-card:hover { border-color: var(--blue); }
.reminder-card:first-of-type { margin-top: 0; }
.reminder-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.reminder-bullet {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--hairline);
  flex-shrink: 0; margin-top: 1px;
  padding: 0;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}
.reminder-bullet:hover { border-color: var(--blue); }
.reminder-bullet::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity 150ms;
}
.reminder-bullet.is-complete { background: #34c759; border-color: #34c759; }
.reminder-bullet.is-complete::after { opacity: 1; }
.reminder-card.is-complete { opacity: 0.6; }
.reminder-card.is-complete .reminder-title { text-decoration: line-through; color: var(--gray-text); }
.reminder-title { font-size: 14px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.3; }
.reminder-tags { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.reminder-time { font-size: 10px; font-weight: 700; color: var(--gray-text); text-align: right; }

.type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.type-exam { background: var(--exam); }
.type-quiz { background: var(--quiz); }
.type-case-study { background: var(--case-study); }
.type-activity { background: var(--activity); }
.type-seatwork { background: var(--seatwork); }
.type-assignment { background: var(--assignment); }
.subject-tag { font-size: 10px; color: var(--gray-text); font-weight: 500; }

/* ---------- Legend ---------- */
.task-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 35;
  background: #fff;
  border-top: 1px solid var(--hairline);
  padding: 12px 18px;
}
.page-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gray-text); }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot-exam { background: var(--exam); }
.legend-dot-quiz { background: var(--quiz); }
.legend-dot-case-study { background: var(--case-study); }
.legend-dot-activity { background: var(--activity); }
.legend-dot-seatwork { background: var(--seatwork); }
.legend-dot-assignment { background: var(--assignment); }

/* Mobile: hide desktop-only room button list, layout toggle, room-buttons row */
.room-buttons { display: none; }
.board-controls { display: none; }
.layout-toggle {
  display: inline-flex; gap: 5px; background: var(--gray-bg); border-radius: 8px; padding: 3px;
}
.layout-btn {
  display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 500; color: var(--gray-text-2);
  padding: 6px 10px; border-radius: 7px;
}
.layout-btn-active { background: #fff; color: var(--near-black); box-shadow: 0 0 1px rgba(115,115,115,0.4); }
.layout-btn svg { width: 10px; height: 10px; }
.task-colors {
  display: none;
}

/* ============================================================
   TABLET — 768px and up
   ============================================================ */
@media (min-width: 768px) {
  .task-colors {
    display: flex; /* whatever it currently is at tablet/desktop */
  }
  .mobile-only { display: none !important; }
  .mobile-only-inline { display: none !important; }
  .tablet-only { display: flex !important; }

  .topbar { display: flex; } /* tablet: icon rail on the left AND this thin bar stays, matching Figma — bar just hides brand/nav/hamburger, keeping only its background */
  .topbar-actions { margin-left: auto; } /* topbar-brand and topbar-nav are hidden at tablet, so topbar-actions is the only flex child left — without this it sits at the start (left) instead of the end (right) */
  .topbar-brand { display: none; } /* avoid duplicating the logo already shown in the sidebar rail */

  .app-shell { min-height: 100vh; }
  .content { margin-left: 84px; }

  .sidebar {
    position: fixed;
    top: 62px;
    bottom: 0;
    transform: none;
    width: 84px !important;
    max-width: none;
    transition: width 220ms ease !important;
    z-index: 20;
    padding-top: 20px;
    overflow-y: auto;
  }
  .sidebar.expanded, .sidebar:hover { width: 300px !important; z-index: 46; box-shadow: 0 0 24px rgba(0,0,0,0.15); }

  .sidebar-top { padding: 0 16px; display: flex; flex-direction: column; align-items: center; }
  .sidebar.expanded .sidebar-top, .sidebar:hover .sidebar-top { align-items: stretch; }

  .desktop-tablet-only { display: block !important; }
  .sidebar-logo-row { display: flex !important; margin-bottom: 24px; }
  .sidebar.expanded .sidebar-logo-row, .sidebar:hover .sidebar-logo-row { justify-content: flex-start; }
  .sidebar:not(.expanded):not(:hover) .sidebar-wordmark { display: none; }

  .sidebar:not(.expanded):not(:hover) .sidebar-divider { width: 60%; }
  .sidebar-nav { width: 100%; align-items: center; } /* collapsed rail: center icons */
  .sidebar.expanded .sidebar-nav, .sidebar:hover .sidebar-nav { align-items: stretch; } /* expanded: links stretch full width so text left-aligns */
  .sidebar.expanded .sidebar-link, .sidebar:hover .sidebar-link { width: 100%; justify-content: flex-start; }
  .sidebar:not(.expanded):not(:hover) .sidebar-link { justify-content: center; padding: 12px; }
  .sidebar:not(.expanded):not(:hover) .sidebar-label { display: none; }

  .profile-row { border-radius: 0; justify-content: center; }
  .sidebar:not(.expanded):not(:hover) .profile-text-conditional { display: none; }
  .sidebar.expanded .profile-text-conditional, .sidebar:hover .profile-text-conditional { display: flex; }
  .sidebar.expanded .profile-row, .sidebar:hover .profile-row { justify-content: flex-start; }

  .content { padding: 24px 24px 76px; }

  .room-pill-floating { display: flex; }
  .topbar-actions .room-pill-floating { margin: 0; }
  .page-header-row .btn-todo.tablet-only { margin-bottom: 0; }
  .btn-todo.tablet-only { margin-bottom: 20px; }

  .page-title { font-size: 20px; letter-spacing: -1px; font-weight: 700; }
  .page-subtitle { font-size: 12.5px; }

  .desktop-tablet-only.page-eyebrow { display: block !important; color: var(--exam); }

  .board-controls { display: block; margin-bottom: 20px; }
  .layout-toggle {
    display: inline-flex; gap: 5px; background: var(--gray-bg); border-radius: 8px; padding: 3px;
  }
  .layout-btn {
    display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 500; color: var(--gray-text-2);
    padding: 5px 8px; border-radius: 6px;
  }
  .layout-btn-active { background: #fff; color: var(--near-black); box-shadow: 0 0 1px rgba(115,115,115,0.4); }
  .layout-btn svg { width: 8px; height: 8px; }

  .board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 14px;
  }
  .day-card-today { max-width: 270px; }
  .board.board-grid .day-card { display: flex; flex-direction: column; }

  .task-colors { left: 84px; }

  /* Grid vs scroll view toggle (JS adds .view-scroll to .board) — was missing at tablet, only existed at desktop */
  .board.view-scroll {
    display: flex;
    flex-direction: column;
  }
  .board.view-scroll .day-card { flex: none; width: 100%; max-width: none; }
  .board.view-scroll .day-card-today { max-width: none; }

  .sidebar-overlay { z-index: 21; }
  .sidebar-overlay.open { display: block; inset: 0; }
  #sidebar:hover ~ #sidebarOverlay { display: block; inset: 0; }
}


/* ============================================================
   DESKTOP — 1200px and up
   ============================================================ */
@media (min-width: 1200px) {

  .desktop-only { display: flex !important; }
  .desktop-only-inline { display: inline !important; }
  .tablet-only { display: none !important; }
  .desktop-tablet-only { display: block !important; }
  .desktop-tablet-expanded-only { display: flex !important; }

  .topbar { display: flex; }
  .topbar-brand { display: flex; } /* re-enable the logo at desktop — the tablet rule that hides it (to avoid duplicating the sidebar's own logo) was bleeding through since min-width rules don't stop applying at wider widths */
  .topbar-actions { margin-left: 0; } /* cancel the tablet fix's margin-left:auto, which was also bleeding through here and fighting with topbar-nav's own auto margin below, splitting the free space between both instead of pushing nav fully right */
  .topbar-nav { display: flex; margin-left: auto; }

  .sidebar {
    position: sticky;
    top: 62px;
    width: 300px !important;
    max-width: 300px !important;
    height: calc(100vh - 62px);
    transform: none;
    transition: none !important;
    z-index: 5;
    box-shadow: none;
    padding-top: 0;
  }
  .content { margin-left: 0; }
  .sidebar.expanded { width: 300px !important; }
  .sidebar:hover { box-shadow: none !important; z-index: 5 !important; }
  .sidebar-top { align-items: stretch; padding: 24px 0 0; }
  .sidebar-logo-row { display: none !important; } /* desktop shows logo/wordmark in the top bar instead */
  .sidebar-divider { display: none; }
  .sidebar-nav { display: none; } /* desktop navigates via the top bar links instead of a sidebar icon rail */
  .sidebar-link.mobile-only-inline-flex { display: none !important; }

  .profile-row { border-radius: 15px 15px 0 0; justify-content: flex-start; padding-left: 24px; padding-right: 24px; }
  .profile-text-conditional { display: flex !important; }

  .sidebar-overlay { display: none !important; }
  .task-colors { left: 300px; }

  .content { padding: 30px 40px 60px; }

  .room-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px;
    margin-top: 16px;
    margin-bottom: 32px;
  }
  .room-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 4px 18px 4px 6px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 0.5px solid var(--hairline);
    width: 100%;
  }
  .room-pill-active { background: var(--near-black); border-color: var(--near-black); }
  .room-pill-active .room-name { color: #fff; }
  .room-avatar-outline { background: var(--gray-bg); border: 0.2px solid #868686; }
  .room-name { font-size: 12.5px; font-weight: 600; color: var(--gray-text-2); }
  .room-dot { width: 5px; height: 5px; border-radius: 50%; background: #34c759; }
  .room-count { font-size: 11px; font-weight: 600; color: var(--gray-text); margin-left: auto; }

  .room-pill-floating { display: none !important; }

  .page-header { margin-bottom: 0; }
  .page-title { font-size: 20px; letter-spacing: -1px; margin-bottom: 6px; }
  .page-subtitle { font-size: 12.5px; }

  .board-controls { margin-top: 10px; margin-bottom: 24px; display: flex; justify-content: flex-end; }

  .week-section { margin-bottom: 0; }
  .board-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 17px;
  }
  .day-card-today { max-width: 260px; }

  /* Grid vs scroll view toggle (JS adds .view-scroll to .board) */
  .board.view-scroll {
    display: flex;
    flex-direction: column;
  }
  .board.view-scroll .day-card { flex: none; width: 100%; max-width: none; }
  .board.view-scroll .day-card-today { max-width: none; }

  .mobile-fab-bar { display: none !important; }
}

/* ============================================================
   SETTINGS PAGE
   Shares the exact same sidebar/hamburger system as home.html.
   Desktop: sidebar hidden, plain text nav in the top bar instead.
   Tablet/mobile: identical icon rail + drawer behavior as home.html.
   ============================================================ */

.settings-nav-desktop { display: none; }

.settings-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

.settings-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.settings-title { font-size: 30px; font-weight: 700; letter-spacing: -0.5px; }
.settings-close {
  width: 27px;
  height: 27px;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-close svg { width: 20px; height: 20px; }
.settings-close:hover { color: var(--near-black); }

.settings-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px 26px 8px;
  margin-bottom: 24px;
}
.settings-card legend {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0 8px;
  margin-left: -2px;
}
.settings-card-danger { border-color: rgba(223,0,0,0.5); }
.settings-card-danger legend { color: rgba(223,0,0,0.7); }

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.settings-row-last { border-bottom: none; }
.settings-row-text { flex: 1; min-width: 0; }
.settings-row-label { font-size: 16px; font-weight: 590; color: var(--near-black); }
.settings-room-name { text-transform: uppercase; }
.settings-row-sub { font-size: 12.5px; color: #8f8f97; margin-top: 4px; }

/* Toggle switch */
.settings-toggle { position: relative; width: 46px; height: 27px; flex-shrink: 0; cursor: pointer; }
.settings-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.settings-toggle-track {
  position: absolute; inset: 0; background: #d2d2d9; border-radius: 999px;
  transition: background 150ms; pointer-events: none;
}
.settings-toggle-track::before {
  content: ''; position: absolute; width: 23px; height: 23px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: transform 150ms;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.settings-toggle input:checked + .settings-toggle-track { background: var(--blue); }
.settings-toggle input:checked + .settings-toggle-track::before { transform: translateX(19px); }

/* Theme select */
.settings-select-wrap select {
  height: 38px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 510;
  color: var(--gray-text-2);
  background: transparent;
  min-width: 123px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e75' stroke-width='2'%3E%3Cpolyline points='9 18 15 12 9 6' transform='rotate(90 12 12)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 34px;
}

/* Leave room / delete account buttons */
.btn-leave-room {
  height: 38px;
  padding: 0 20px;
  border-radius: 10px;
  background: rgba(223,0,0,0.2);
  border: 1px solid rgba(223,0,0,0.5);
  color: var(--exam);
  font-size: 15px;
  font-weight: 590;
  white-space: nowrap;
}
.btn-leave-room:hover { background: rgba(223,0,0,0.3); }

.btn-delete-account {
  height: 38px;
  padding: 0 20px;
  border-radius: 10px;
  background: rgba(223,0,0,0.2);
  border: 1px solid rgba(223,0,0,0.5);
  color: var(--exam);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.btn-delete-account:hover { background: rgba(223,0,0,0.3); }

.btn-save-changes {
  height: 42px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 860;
  text-transform: uppercase;
  border: none;
  margin-top: 8px;
}
.btn-save-changes:hover { background: #0064cc; }

@media (min-width: 1200px) {
  .settings-nav-desktop { display: flex !important; margin-left: auto; }
  .rs-brand-logo { margin-left: 0.4rem;}
}

@media (max-width: 640px) {
  .settings-main { padding: 32px 18px 80px; }
  .settings-title { font-size: 24px; }
  .settings-card { padding: 20px 18px 4px; }
  .settings-row { flex-wrap: wrap; }
}

/* ============================================================
   CALENDAR PAGE
   Reuses .board/.day-card/.reminder-card/.type-badge/.week-label
   from Home for the Exams section — same components, same colors,
   and now shown at every breakpoint (not desktop-only).
   ============================================================ */

/* The whole calendar (nav + grid) is one unified card. Width is fluid
   (no hardcoded max-width) so it actually scales with the viewport —
   fixed-pixel widths were why zooming out left dead space instead of
   the calendar growing to fill it. */
.cal-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin-bottom: 24px;
}

.cal-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-month-title { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }

.cal-nav-group { display: flex; gap: 6px; }
.cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gray-bg);
  color: var(--gray-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  padding: 0;
}
.cal-nav-btn svg { width: 15px; height: 15px; }
.cal-nav-btn:hover { background: var(--hairline); color: var(--near-black); }

.cal-grid-wrap {
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.cal-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-bg);
}
.cal-dow-row-mobile { display: none; }
.cal-dow-row-desktop { display: grid; }
.cal-dow-row div {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #8d8d95;
  padding: 9px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-cell {
  border: 0.5px solid var(--hairline);
  min-height: 68px;
  padding: 4px 4px 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  overflow: hidden;
}
.cal-cell-empty { background: var(--gray-bg-2); }
.cal-cell-exam { background: rgba(223,0,0,0.06); }
body[data-current-room]:not([data-current-room="The Bozos"]) .cal-cell-exam { background: #fff; }
.cal-daynum { font-size: 11px; font-weight: 600; color: #8d8d95; align-self: flex-start; }
.cal-daynum.cal-daynum-today { color: #fff; }
.cal-daynum-today {
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
}
.cal-chip {
  font-size: 7.5px;
  font-weight: 700;
  color: #fff;
  padding: 2.5px 4px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.cal-chip-exam { background: var(--exam); }
.cal-chip-quiz { background: var(--quiz); }
.cal-chip-case-study { background: var(--case-study); }
.cal-chip-activity { background: var(--activity); }
.cal-chip-seatwork { background: var(--seatwork); }
.cal-chip-assignment { background: var(--assignment); }

.exams-section { margin-top: 8px; }
.exam-proctor { font-size: 10px; color: var(--gray-text); margin-top: -4px; margin-bottom: 6px; padding-top: 10px; }


/* ============================================================
   CALENDAR — TABLET (matches Home's 768px breakpoint)
   ============================================================ */
@media (min-width: 768px) {
  .cal-card {
    padding: 24px;
    background: var(--gray-bg-2);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }

  .cal-month-title { font-size: 20px; }
  .cal-cell { min-height: 82px; padding: 5px; }
  .cal-daynum { font-size: 12.5px; }
  .cal-chip { font-size: 9px; padding: 2.5px 5px; }
  .cal-dow-row div { font-size: 12.5px; padding: 10px 0; }
  .exam-proctor { font-size: 11px; }
}


/* ============================================================
   CALENDAR — DESKTOP (matches Home's 1200px breakpoint)
   ============================================================ */
@media (min-width: 1200px) {
  .cal-card { padding: 28px 30px; margin-top: 2rem; }
  .cal-month-title { font-size: 20px; }
  .cal-cell { min-height: 100px; padding: 7px; }
  .cal-daynum { font-size: 14px; }
  .cal-daynum-today { width: 22px; height: 22px; font-size: 12px; }
  .cal-chip { font-size: 10.5px; padding: 3px 7px; }
  .cal-dow-row div { font-size: 15.5px; padding: 11px 0; }
  .exam-proctor { font-size: 12.5px; margin-top: -6px; }
  
}

/* ============================================================
   PROFILE PAGE
   Reuses the shared sidebar/topbar chrome, colors, and radii.
   Mobile-first, same breakpoint pattern as the rest of the site.
   ============================================================ */

.profile-content { max-width: 760px; margin: 0 auto; padding-top: 20px; }

/* ---------- Status control (top of page) ---------- */
.status-control-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.status-control-label { font-size: 14px; font-weight: 700; color: var(--gray-text); text-transform: uppercase; letter-spacing: 0.3px; }
.status-select-wrap select {
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--near-black);
  background: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e75' stroke-width='2'%3E%3Cpolyline points='9 18 15 12 9 6' transform='rotate(90 12 12)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 28px;
}
.status-custom-input {
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 500;
  min-width: 160px;
  flex: 1;
}
.status-custom-input:focus { outline: none; border-color: var(--blue); }

/* ---------- Profile head ---------- */
.profile-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 10px 0 24px;
}
.profile-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-close svg { width: 20px; height: 20px; }
.profile-close:hover { color: var(--near-black); }

.profile-photo-wrap { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blue);
}
.profile-photo-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gray-bg);
  border: 2px solid #fff;
  color: var(--gray-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-photo-edit svg { width: 13px; height: 13px; }
.profile-photo-edit:hover { background: var(--hairline); }

.profile-head-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-name-big { font-size: 26px; font-weight: 800; letter-spacing: -0.8px; }
.profile-email { font-size: 15px; color: var(--gray-text-2); }
.profile-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.profile-badge {
  background: rgba(0,115,236,0.15);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ---------- Shared section pattern ---------- */
.profile-section { margin-bottom: 24px; }
.profile-section-title { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 10px; }

.profile-info-box { border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  gap: 12px;
}
.profile-info-row-last { border-bottom: none; }
.profile-info-label { font-size: 15px; font-weight: 500; color: #a8a8ab; }
.profile-info-value { font-size: 15px; font-weight: 600; color: var(--near-black); text-align: right; }

.profile-room-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.profile-room-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
}
.profile-room-name { font-size: 15px; font-weight: 700; }
.profile-room-role { font-size: 15px; color: #8f8f97; margin-top: 2px; }
.profile-room-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.profile-stats-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.profile-stat {
  text-align: center;
  padding: 18px 8px;
  border-right: 1px solid var(--hairline);
}
.profile-stat:last-child { border-right: none; }
.profile-stat-num { font-size: 30px; font-weight: 800; }
.profile-stat-label { font-size: 11px; font-weight: 600; color: #8f8f97; letter-spacing: 0.3px; margin-top: 2px; }

.profile-actions { display: flex; gap: 10px; margin-bottom: 28px; }
.btn-edit-profile, .btn-logout {
  height: 34px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: transparent;
  font-size: 15px;
  font-weight: 590;
}
.btn-edit-profile { color: var(--near-black); }
.btn-edit-profile:hover { background: var(--gray-bg); }
.btn-logout { color: var(--exam); }
.btn-logout:hover { background: rgba(223,0,0,0.08); }

/* ---------- History table ---------- */
.profile-history-table { border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; }
.profile-history-head {
  display: none;
  background: #333;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px 16px;
}
.profile-history-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.profile-history-row-last { border-bottom: none; }
.profile-history-row span[data-label]::before {
  content: attr(data-label) ": ";
  font-weight: 600;
  color: #8f8f97;
}
.profile-history-row span[data-label="Submitted by"] { font-weight: 600; color: var(--near-black); }
.profile-history-row span[data-label="Submitted by"]::before { content: ''; }

.history-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.history-status-approved { background: #e6f8eb; color: #248a3d; }
.history-status-rejected { background: #ff9696; color: #992828; }
.history-status-pending { background: #fbeede; color: #c17400; }


@media (min-width: 768px) {
  .profile-content { padding: 24px 0 60px; }
  .profile-head { flex-direction: row; text-align: left; align-items: center; gap: 20px; }
  .profile-head-text { align-items: flex-start; }
  .profile-badges { justify-content: flex-start; }
  .profile-photo-wrap { width: 90px; height: 90px; }
  .profile-name-big { font-size: 32px; }

  .profile-room-grid { grid-template-columns: repeat(2, 1fr); }

  .profile-history-head { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 1fr; }
  .profile-history-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.4fr 1fr;
    align-items: center;
    gap: 8px;
  }
  .profile-history-row span[data-label]::before { content: ''; }
  .profile-history-row span[data-label="Room"],
  .profile-history-row span[data-label="Activity"] { color: #8f8f97; }
}

@media (min-width: 1200px) {
  .profile-content { max-width: 900px; }
  .profile-name-big { font-size: 40px; }
  .profile-photo-wrap { width: 90px; height: 90px; }
  .profile-room-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-stat-num { font-size: 50px; }
}

/* ============================================================
   NOTES PAGE
   Reuses the shared topbar/sidebar/room-switcher/FAB-bar exactly
   as Home does. Only the quick-action cards, filter pills, and
   file grid below are new to this page.
   ============================================================ */

.notes-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
    margin-top: 1rem;

}
.notes-quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: left;
}
.notes-quick-card:hover { border-color: #b8b8bd; }

.notes-quick-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.notes-icon-doc { background: #009cdf; }
.notes-icon-sheet { background: #00ca48; color: #fff; }
.notes-icon-generic { background: #8e8e95; font-size: 9px; }
.notes-icon-generic svg { width: 16px; height: 16px; stroke: #fff; }

.notes-quick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notes-quick-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; color: var(--near-black); }
.notes-quick-sub { font-size: 12.5px; color: var(--gray-text-2); }

/* ---------- Filter pills ---------- */
.notes-filter-row { display: flex; gap: 8px; margin: 16px 0 18px; align-items: center; flex-wrap: wrap; }
.sort-select {
  margin-left: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--gray-text-2);
  font-size: 12.5px;
  font-weight: 590;
  font-family: inherit;
  cursor: pointer;
}
.sort-select:focus { outline: none; border-color: var(--blue); }
.notes-filter-pill {
  height: 30px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--gray-text-2);
  font-size: 12.5px;
  font-weight: 590;
}
.notes-filter-active { background: #333; color: #fff; }
.notes-filter-pill:not(.notes-filter-active):hover { background: var(--gray-bg); }

/* ---------- File grid ---------- */
.notes-file-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 24px;
}
.notes-file-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  text-align: left;
}
.notes-file-card:hover { border-color: #b8b8bd; }
.notes-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}
.notes-file-name { font-size: 15px; font-weight: 700; color: var(--gray-text-2); letter-spacing: -0.3px; }
.notes-file-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gray-text-2); }
.notes-file-dot { width: 4px; height: 4px; border-radius: 50%; background: #34c759; flex-shrink: 0; }

/* This page's Grid/Scroll toggle is visible at every breakpoint, including mobile —
   unlike Home/Calendar where .board-controls is tablet+ only. Scoped to this page's
   own class so Home/Calendar's existing behavior isn't affected. */
.notes-board-controls { display: flex !important; margin-bottom: 14px; }


@media (min-width: 768px) {
  .notes-quick-actions { flex-direction: row; }
  .notes-quick-card { flex: 1; }
  .notes-file-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .notes-quick-card { flex: 1; max-width: 225px; }
  .notes-file-grid { grid-template-columns: repeat(4, 1fr); }
  .notes-file-name { font-size: 15px; }
}

/* ============================================================
   DISCUSSION PAGE
   Reuses the shared topbar/sidebar/room-switcher exactly as the
   rest of the site. Only the chat thread below is new.
   ============================================================ */

.disc-content { display: flex; flex-direction: column; }

/* Mobile: no header text at all for this page — just the room pill, full width */
.disc-content .page-header-row { display: none; }
.disc-content .room-switcher.mobile-only { width: 100%; margin-bottom: 12px; }
.disc-content .room-switcher.mobile-only .room-pill-floating {
  width: 100%;
  margin-left: 0;
  justify-content: flex-start;
  padding: 8px 16px 8px 6px;
}
.disc-content .room-switcher.mobile-only .room-name { font-size: 16px; }

.disc-thread {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 0 90px;
  flex: 1;
}

.disc-msg-group { display: flex; flex-direction: column; gap: 6px; max-width: 82%; }
.disc-msg-own { align-self: flex-end; align-items: flex-end; }

.disc-msg-meta { display: flex; align-items: center; gap: 8px; }
.disc-msg-own .disc-msg-meta { justify-content: flex-end; }

.disc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1d1d1f;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.disc-name { font-size: 14px; font-weight: 700; color: #333; }
.disc-time { font-size: 11px; color: var(--gray-text-2); }
.disc-time::before { content: '•'; margin-right: 8px; color: var(--gray-text-2);  padding-right: 0.5rem;}
.disc-msg-own .disc-time::before { margin-right: 0; margin-left: 8px;}

.disc-bubble-row { display: flex; }
.disc-msg-own .disc-bubble-row { justify-content: flex-end; }

.disc-bubble-stack { display: inline-flex; flex-direction: column; max-width: 100%; }

.disc-bubble {
  background: var(--gray-bg);
  border: none;
  border-radius: 70px 70px 70px 0;
  padding: 9px 20px;
  font-size: 15px;
  color: #333;
  text-align: left;
  line-height: 1.4;
  max-width: 100%;
}
.disc-msg-own .disc-bubble { text-align: right; border-radius: 70px 70px 0 70px; }
.disc-bubble:hover { background: var(--hairline); cursor: pointer; }

/* When a bubble has a reply-tag attached below it, the "point" moves down to
   whichever piece is now at the bottom of the stack — keeps the tailed look
   as one continuous shape instead of two separately-pointed pieces. */
.disc-bubble-stack .disc-bubble { border-radius: 70px 70px 8px 8px; }
.disc-msg-own .disc-bubble-stack .disc-bubble { border-radius: 70px 70px 8px 8px; }

.disc-reply-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--hairline);
  color: #535353;
  font-size: 11px;
  padding: 4px 10px 4px 8px;
  border-radius: 8px 8px 70px 0;
  margin-top: 1px;
}
.disc-msg-own .disc-reply-tag { border-radius: 8px 8px 0 70px; }
.disc-reply-tag svg { width: 11px; height: 11px; flex-shrink: 0; }

.disc-typing {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--gray-bg);
  border-radius: 12px;
  padding: 10px 14px;
}
.disc-typing span {
  width: 5px; height: 5px; border-radius: 50%; background: #a8a8ab;
  animation: disc-typing-bounce 1.2s infinite ease-in-out;
}
.disc-typing span:nth-child(2) { animation-delay: 0.15s; }
.disc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes disc-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.disc-seenby { font-size: 11px; color: var(--gray-text-2); text-align: right; margin-top: -6px; }

/* ---------- Reply indicator above the input ---------- */
.disc-reply-indicator[hidden] { display: none; }
.disc-reply-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(110,110,117,0.15);
  color: #535353;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.disc-reply-indicator svg { width: 13px; height: 13px; flex-shrink: 0; }
.disc-reply-indicator span { flex: 1; }
.disc-reply-indicator button {
  width: 20px; height: 20px; border-radius: 50%; color: #535353;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.disc-reply-indicator button:hover { background: rgba(0,0,0,0.08); }
.disc-reply-indicator button svg { width: 12px; height: 12px; }

/* ---------- Message input bar ---------- */
.disc-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gray-bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  padding: 10px 8px 10px 16px;
  margin-top: auto;
  position: sticky;
  bottom: 12px;
}
.disc-clip { width: 16px; height: 16px; color: var(--gray-text-2); flex-shrink: 0; }
.disc-input-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  color: var(--near-black);
  min-width: 0;
}
.disc-input-bar input:focus { outline: none; }
.disc-input-bar input::placeholder { color: #b1b1b2; }
.disc-send-btn {
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.disc-send-btn:hover { background: #0064cc; }


@media (min-width: 768px) {
  .disc-content .page-header-row { display: flex; }
  .disc-msg-group { max-width: 62%; }
  .disc-avatar { width: 38px; height: 38px; font-size: 14px; }
  .disc-name { font-size: 15px; }
  .disc-bubble { font-size: 15.5px; }
}

@media (min-width: 1200px) {
  .disc-content { padding-bottom: 24px; }
  .disc-msg-group { max-width: 44%; }
  .disc-avatar { width: 40px; height: 40px; font-size: 15px; }
  .disc-name { font-size: 16px; }
  .disc-time { font-size: 12.5px; }
  .disc-bubble { font-size: 16px; padding: 10px 16px; }
}

/* ============================================================
   ABOUT PAGE
   Reuses shared chrome + FAB bar. Three client-side tabs share
   one URL — About Us / Feedback / Contact Us — switched via JS.
   ============================================================ */

.abt-hero-band {
  background: var(--gray-bg);
  margin: -20px -18px 24px;
  padding: 32px 18px 28px;
  position: relative;
  z-index: 0;
}
.abt-hero { text-align: center; padding: 8px 0 4px; }
.abt-eyebrow { font-size: 14px; font-weight: 860; color: var(--blue); letter-spacing: 0.5px; margin-bottom: 8px; }
.abt-title { font-size: 22px; font-weight: 700; letter-spacing: -0.8px; margin-bottom: 10px; }
.abt-title .dim { color: #c1c1c1; }
.abt-subtitle { font-size: 15px; color: var(--gray-text-2); line-height: 1.6; }

.abt-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--gray-bg);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
  margin: -18px auto 24px;
  position: relative;
  z-index: 1;
}
.abt-tab {
  font-size: 14px;
  font-weight: 510;
  color: var(--gray-text);
  padding: 6px 14px;
  border-radius: 6px;
}
.abt-tab-active { background: #fff; color: var(--near-black); font-weight: 700; box-shadow: 0 0 1px rgba(115,115,115,0.4); }
.abt-tab:hover:not(.abt-tab-active) { color: var(--near-black); }

.abt-panel { display: none; }
.abt-panel-active { display: block; }
[data-room-panel].abt-panel-active { display: flex; }

/* ---------- Team cards ---------- */
.abt-team-grid { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.abt-team-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.abt-team-photo { width: 100%; aspect-ratio: 336/174; object-fit: cover; display: block; border-bottom: 1px solid var(--hairline); }
.abt-team-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.abt-team-name { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.abt-team-role { font-size: 15px; color: var(--blue); font-weight: 600; margin: 3px 0 10px; }
.abt-team-bio { font-size: 15px; color: var(--gray-text-2); line-height: 1.55; margin-bottom: 14px; }
.abt-team-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.abt-tag { background: var(--gray-bg); color: var(--gray-text-2); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
.abt-team-links { display: flex; gap: 14px; margin-top: auto; }
.abt-team-links a { font-size: 15px; color: var(--gray-text-2); font-weight: 510; }
.abt-team-links a:hover { color: var(--blue); }

/* ---------- Stats ---------- */
.abt-stats {
  background: var(--gray-bg);
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  padding: 40px 20px;
  text-align: center;
  margin: 0 -18px 40px;
}
.abt-stats-title { font-size: 22px; font-weight: 590; margin-bottom: 16px; }
.abt-stats-rule { border: none; border-top: 1px solid var(--hairline); margin: 0; }
.abt-stats-row { display: flex; justify-content: center; gap: 32px; padding: 28px 0; flex-wrap: wrap; }
.abt-stat-num { font-size: 52px; font-weight: 1000; letter-spacing: -1px; line-height: 1; }
.abt-stat-label { font-size: 15px; color: var(--gray-text-2); font-weight: 590; margin-top: 8px; letter-spacing: 0.3px; }

/* ---------- Testimonials ---------- */
.abt-testimonial-title { font-size: 17px; font-weight: 590; margin-bottom: 16px; }
.abt-testimonial-grid { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.abt-testimonial-card {
  background: var(--gray-bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.abt-testimonial-text { font-size: 15px; font-style: italic; color: var(--near-black); line-height: 1.6; margin-bottom: 16px; }
.abt-testimonial-who { display: flex; align-items: center; gap: 10px; }
.abt-testimonial-avatar {
  width: 36px; height: 36px; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 590; flex-shrink: 0;
}
.abt-testimonial-name { font-size: 16px; font-weight: 700; }
.abt-testimonial-room { font-size: 14px; color: var(--gray-text-2); }

/* ---------- Forms (Feedback + Contact) ---------- */
.abt-form-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.abt-form-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.abt-field { display: flex; flex-direction: column; gap: 6px; }
.abt-field-label { font-size: 14px; font-weight: 700; color: var(--gray-text-2); letter-spacing: 0.3px; }
.abt-field input, .abt-field select, .abt-field textarea {
  border: 1px solid var(--hairline);
  border-radius: 13px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--near-black);
  resize: vertical;
}
.abt-field input:focus, .abt-field select:focus, .abt-field textarea:focus { outline: none; border-color: var(--blue); }
.abt-field input::placeholder, .abt-field textarea::placeholder { color: #bababc; }
.abt-form-actions { display: flex; gap: 10px; margin-top: 4px; }
.abt-btn-submit, .abt-btn-reset {
  height: 37px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
}
.abt-btn-submit { background: var(--blue); color: #fff; }
.abt-btn-submit:hover { background: #0064cc; }
.abt-btn-reset { background: #fff; border: 1px solid var(--hairline); color: var(--near-black); }
.abt-btn-reset:hover { background: var(--gray-bg); }

.abt-contact-layout { display: flex; flex-direction: column; gap: 20px; }
.abt-contact-info { display: flex; flex-direction: column; gap: 12px; }
.abt-info-card { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 16px 18px; }
.abt-info-label { font-size: 14px; font-weight: 700; color: var(--gray-text-2); letter-spacing: 0.3px; margin-bottom: 4px; }
.abt-info-value { font-size: 15px; font-weight: 600; color: var(--near-black); }
.abt-info-link { color: var(--blue); }
.abt-info-link:hover { text-decoration: underline; }

.abt-footer { text-align: center; font-size: 14px; color: var(--gray-text-2); padding: 28px 0 8px; }

.abt-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--near-black);
  color: #fff;
  font-size: 16px;
  font-weight: 590;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 200;
}
.abt-toast.abt-toast-show { opacity: 1; transform: translateX(-50%) translateY(0); }


@media (min-width: 768px) {
  .abt-hero-band { margin: -24px -24px 32px -108px; padding: 40px 24px 28px 108px; }
  .abt-title { font-size: 30px; }
  .abt-subtitle { font-size: 16px; }
  .abt-team-grid { flex-direction: row; }
  .abt-team-card { flex: 1; display: flex; flex-direction: column; }
  .abt-testimonial-grid { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; }
  .abt-contact-layout { flex-direction: row; align-items: flex-start; }
  .abt-contact-info { flex: 1; }
  .abt-form-card { flex: 1.4; }
  .abt-stat-num { font-size: 60px; }
  .abt-stats { padding: 48px 24px 48px 108px; margin: 0 -24px 40px -108px; }
}

@media (min-width: 1200px) {
  .abt-hero-band { margin: -30px -40px 40px -340px; padding: 48px 40px 32px 340px; }
  .abt-stats { margin: 0 -40px 40px -340px; padding: 56px 40px 56px 340px; }
  .abt-hero { max-width: 720px; margin: 0 auto; }
  .abt-title { font-size: 36px; }
  .abt-testimonial-grid { grid-template-columns: repeat(3, 1fr); align-items: start; }
  .abt-contact-info { flex: 0.8; }
  .abt-stat-num { font-size: 70px; }
  .abt-stats-row { gap: 90px; }
}

/* ============================================================
   APPROVE PAGE
   Reuses the shared topbar/sidebar/room-switcher/FAB-bar exactly
   as the rest of the site, plus the same legend component.
   Only the submission cards below are new to this page.
   ============================================================ */

.appr-eyebrow { color: #ff9003; }

.appr-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 0 24px;
}

.appr-card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.appr-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.appr-card-text { min-width: 0; }
.appr-card-title { font-size: 17.5px; font-weight: 700; color: var(--near-black); letter-spacing: -0.3px; }
.appr-card-meta { font-size: 12.5px; color: var(--gray-text-2); margin-top: 4px; }

.appr-badge {
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.4px;
  color: #fff;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.appr-badge-exam { background: var(--exam); }
.appr-badge-quiz { background: var(--quiz); }
.appr-badge-case-study { background: var(--case-study); }
.appr-badge-activity { background: var(--activity); }
.appr-badge-seatwork { background: var(--seatwork); }
.appr-badge-assignment { background: var(--assignment); }

.appr-card-actions { display: flex; gap: 10px; }
.appr-btn-approve, .appr-btn-reject {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 590;
}
.appr-btn-approve svg, .appr-btn-reject svg { width: 12px; height: 12px; flex-shrink: 0; }
.appr-btn-approve { background: #00ca48; color: #fff; }
.appr-btn-approve:hover { background: #00b33f; }
.appr-btn-reject { background: var(--gray-bg); color: var(--gray-text-2); }
.appr-btn-reject:hover { background: var(--hairline); }

.appr-card.appr-card-resolved { opacity: 0.45; pointer-events: none; }

.appr-empty { font-size: 15px; color: var(--gray-text); padding: 20px 0; }


@media (min-width: 768px) {
  .appr-card { padding: 17px 24px 16px 19px; }
  .appr-card-title { font-size: 16px; }
  .appr-card-meta { font-size: 12.5px; }
}

@media (min-width: 1200px) {
  .appr-list { max-width: 1082px; }
  .appr-card-title { font-size: 17px; }
}

/* ============================================================
   ONLINE USERS LIST (sidebar) — repopulated per room by rooms.js
   ============================================================ */
.online-users { padding: 0 20px 16px; }
.online-users.profile-text-conditional { flex-direction: column !important; align-items: flex-start !important; }
.online-users-title { font-size: 12.5px; font-weight: 700; color: var(--gray-text); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.online-users-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.online-user-more { font-size: 14px; color: var(--gray-text-2); font-weight: 590; padding-left: 42px; background: none; border: none; cursor: pointer; text-align: left; }
.online-user-more:hover { color: var(--blue); text-decoration: underline; }
.online-user { display: flex; align-items: center; gap: 8px; }
.online-user-avatar {
  position: relative;
  width: 32px; height: 32px; border-radius: 50%;
  background: #1d1d1f; color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.online-dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #b6b6ba; border: 1.5px solid #fff;
}
.online-dot-active { background: #34c759; }
.online-user-name { font-size: 15px; font-weight: 590; color: var(--near-black); }

/* When switched to a room with no real data yet, the page structure
   (headers, controls, calendar dates, quick-actions, legend, input bar)
   stays fully visible — only the actual data items disappear. */
body[data-current-room]:not([data-current-room="The Bozos"]) .reminder-card,
body[data-current-room]:not([data-current-room="The Bozos"]) .cal-chip,
body[data-current-room]:not([data-current-room="The Bozos"]) .notes-file-card,
body[data-current-room]:not([data-current-room="The Bozos"]) .disc-msg-group,
body[data-current-room]:not([data-current-room="The Bozos"]) .appr-card,
body[data-current-room]:not([data-current-room="The Bozos"]) .disc-typing,
body[data-current-room]:not([data-current-room="The Bozos"]) .disc-seenby,
body[data-current-room]:not([data-current-room="The Bozos"]) .task-count {
  display: none !important;
}


/* ============================================================
   NEW TODO MODAL — shared across every page with a New TODO button.
   Reuses .abt-field/.abt-form-card/.abt-btn-submit for form styling.
   ============================================================ */
.todo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.todo-modal-overlay[hidden] { display: none; }
.todo-modal {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
}
.todo-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.todo-modal-close {
  width: 26px; height: 26px; border-radius: 50%;
  color: var(--gray-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.todo-modal-close svg { width: 16px; height: 16px; }
.todo-modal-close:hover { background: var(--gray-bg); color: var(--near-black); }
/* ---------- Calendar "+N More" expandable popover ---------- */
.cal-cell-has-more { position: relative; overflow: visible !important; }
.cal-chip-more { border: none; cursor: pointer; font-family: inherit; }
.cal-chip-more:hover { filter: brightness(0.9); }
.cal-more-popover[hidden] { display: none; }
.cal-more-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
}
.cal-more-popover .cal-chip { font-size: 11px; white-space: normal; }

/* ---------- New Room button (desktop pill + dropdown item) ---------- */
.room-pill-new, .room-dropdown-item-new { color: var(--gray-text-2); }
.room-pill-new-icon {
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--gray-bg); color: var(--near-black);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.room-pill-new:hover .room-pill-new-icon,
.room-dropdown-item-new:hover .room-pill-new-icon { background: var(--blue); color: #fff; }

/* ---------- Profile rooms — max 4 visible, "+N more" expands to show the rest ---------- */
.profile-room-more { background: var(--gray-bg); border-style: dashed; cursor: pointer; width: 100%; text-align: left; font-family: inherit; }
.profile-room-more .profile-room-name { color: var(--blue); }
.profile-room-more:hover { background: var(--hairline); }

.online-user-clickable { cursor: pointer; border-radius: 8px; padding: 2px 4px; margin: -2px -4px; }
.online-user-clickable:hover { background: var(--gray-bg); }

/* ---------- Task colors (Settings) + custom type (New TODO) + empty days ---------- */
.tc-name { display: flex; align-items: center; gap: 12px; }
.tc-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.tc-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tc-color {
  width: 46px; height: 36px; padding: 3px; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 10px; background: transparent;
}
.tc-name-input {
  height: 36px; width: 150px; padding: 0 12px; font-size: 15px;
  border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--near-black);
}
.tc-name-input:focus { outline: none; border-color: var(--blue); }
.tc-btn {
  height: 36px; padding: 0 16px; font-size: 14px; font-weight: 590; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 10px; background: transparent; color: var(--gray-text-2);
}
.tc-btn:hover { background: var(--gray-bg); color: var(--near-black); }
.tc-btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.tc-btn-primary:hover { background: #0064cc; color: #fff; }
.abt-custom-type { display: flex; flex-direction: column; gap: inherit; }
.abt-custom-type[hidden] { display: none; }
.abt-field input[type="color"] { height: 42px; padding: 4px; cursor: pointer; }
@media (max-width: 600px) {
  .tc-add-row { flex-direction: column; align-items: stretch; }
  .tc-add-row .tc-controls { width: 100%; }
  .tc-add-row .tc-name-input { flex: 1; min-width: 0; width: auto; }
}

