/* Design Tokens & Theme Variables */
:root {
  /* Color Palette - Soothing Light Lavender (WCAG AAA Compliant Contrast) */
  --bg-light-canvas: #f6f4fa;      /* Off-white canvas with slight warm lilac tint */
  --bg-sidebar-grey: #e9e3f0;      /* Dedicated lavender-grey sidebar background */
  --bg-gradient: linear-gradient(135deg, #fbfafd 0%, #ebe6f2 100%);
  
  --glass-bg: #ffffff;             /* Solid white backgrounds for maximum card readability */
  --glass-border: #d1c4e9;         /* Clear pastel lavender border */
  --glass-shadow: rgba(94, 53, 177, 0.08); /* Soft purple-tinted depth shadow */
  --glass-highlight: rgba(255, 255, 255, 1);

  --accent-color: #5e35b1;         /* Rich Deep Purple - high contrast, highly legible */
  --accent-hover: #4527a0;         /* Darker purple for active/hover focus */
  --accent-light: #b39ddb;         /* Lilac highlight */
  --accent-glow: rgba(94, 53, 177, 0.12);
  
  --text-primary: #1c122c;         /* Rich dark plum - near black, excellent readability */
  --text-secondary: #4a3e5c;       /* Medium purple-grey for labels and subtext */
  --text-muted: #786e88;           /* Gray-lilac for minor text and placeholders */
  
  --success-color: #00796b;        /* Dark forest teal for success labels */
  --success-bg-alpha: rgba(0, 121, 107, 0.08);
  --danger-color: #c2185b;         /* Rich rose red for delete triggers */
  --danger-bg-alpha: rgba(194, 24, 91, 0.08);
  
  /* Fonts */
  --font-sans: 'Inter', sans-serif;
  --font-title: 'Outfit', sans-serif;
  
  /* Dimensions & Rounding */
  --sidebar-width: 280px;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-light-canvas);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(94, 53, 177, 0.03);
}

::-webkit-scrollbar-thumb {
  background: rgba(94, 53, 177, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 53, 177, 0.35);
}

/* Utilities */
.hidden {
  display: none !important;
}

/* App Shell Layout */
.dashboard-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

/* Sidebar Navigation Styling */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar-grey);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.auraclass-icon-container {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1e1b29; /* Deep dark purple so the lavender neon pops */
  color: #b39ddb; /* Base pastel lavender line color */
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: 1px solid rgba(140, 94, 201, 0.15);
}

.auraclass-svg {
  width: 24px;
  height: 24px;
  transition: filter 0.4s ease, stroke 0.4s ease;
}

.auraclass-icon-container:hover {
  color: #e0d4ff; /* Icon shifts to a brighter, glowing white-lavender core */
  background: #252036; /* Subtle backdrop warmth shift */
  box-shadow: 
    0 0 12px rgba(186, 104, 200, 0.3),  /* Tight inner aura */
    0 0 24px rgba(103, 58, 183, 0.15);  /* Deep, wide background ambient dispersion */
}

.auraclass-icon-container:hover .auraclass-svg {
  filter: 
    drop-shadow(0 0 3px #ba68c8)  /* Intense neon purple line core */
    drop-shadow(0 0 8px #9c27b0); /* Wider neon bleeding */
}

.sidebar-brand h1 {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #311b92 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-section {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  font-weight: 700;
}

.class-count {
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(94, 53, 177, 0.15);
}

.class-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.class-item:hover {
  background: rgba(94, 53, 177, 0.06);
  color: var(--accent-color);
}

.class-item.active {
  background: var(--accent-color);
  color: #ffffff;
  border: 1px solid rgba(94, 53, 177, 0.1);
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.15);
}

.class-item-name {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-item-name i {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.sidebar-footer {
  padding: 20px 16px;
  border-top: 1px solid var(--glass-border);
}

/* Main Content Workspace */
.main-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  position: relative;
}

/* Empty State Card styling */
.empty-state-container {
  display: none;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 40px;
}

.empty-state-container.active {
  display: flex;
}

.empty-state-card {
  max-width: 500px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 36px var(--glass-shadow);
  border-radius: var(--border-radius-lg);
  padding: 48px;
  text-align: center;
}

.welcome-icon {
  width: 72px;
  height: 72px;
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 1px solid rgba(94, 53, 177, 0.2);
  animation: pulse 2.5s infinite alternate;
}

.welcome-icon i {
  width: 32px;
  height: 32px;
}

.empty-state-card h2 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 12px;
  font-weight: 800;
  color: var(--text-primary);
}

.empty-state-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

/* Dashboard Workspace Setup */
.dashboard-workspace {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 28px;
}

.dashboard-workspace.active {
  display: flex;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 16px;
}

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

.class-title {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.student-count-badge {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.grid-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.sidebar-column {
  height: 100%;
}

#roster-card {
  flex: 1;
  min-height: 220px;
}

#settings-card, #saved-card {
  flex-shrink: 0;
}

/* Dashboard Cards (Solid White Panels) */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.dashboard-card {
  display: flex;
  flex-direction: column;
}

.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.collapsible-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.collapsible-header:hover {
  background: rgba(94, 53, 177, 0.04);
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.collapse-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform var(--transition-smooth);
}

.dashboard-card.collapsed .card-content {
  display: none;
}

.dashboard-card.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.dashboard-card.collapsed {
  border-color: rgba(94, 53, 177, 0.15);
  box-shadow: 0 2px 8px rgba(94, 53, 177, 0.04);
}

.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.card-header h3 i {
  color: var(--accent-color);
  width: 18px;
  height: 18px;
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Student Roster Component Styling */
.add-student-form {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

input[type="text"], input[type="number"] {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  width: 100%;
}

input[type="text"]:focus, input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #ffffff;
}

.roster-container {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
  padding-right: 4px;
}

.roster-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.student-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(94, 53, 177, 0.03);
  border: 1px solid rgba(94, 53, 177, 0.08);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
  user-select: none;
}

.student-list-item:hover {
  background: rgba(94, 53, 177, 0.08);
  border-color: rgba(94, 53, 177, 0.2);
}

.student-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00897b; /* solid dark teal for contrast */
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.student-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  transition: var(--transition-fast);
}

/* Absent State */
.student-list-item.absent {
  opacity: 0.6;
  background: #f1ebf5;
  border-color: #dcd0e8;
}

.student-list-item.absent .status-indicator {
  background: var(--text-muted);
}

.student-list-item.absent .student-name {
  text-decoration: line-through;
  color: var(--text-secondary);
}

/* Action Buttons */
.btn-delete-student {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-delete-student:hover {
  background: var(--danger-bg-alpha);
  color: var(--danger-color);
}

.btn-delete-student i {
  width: 14px;
  height: 14px;
}

.empty-roster-message, .empty-saved-message {
  text-align: center;
  padding: 30px 10px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 550;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(94, 53, 177, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(94, 53, 177, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--glass-border);
  color: var(--accent-color);
}

.btn-secondary:hover {
  background: rgba(94, 53, 177, 0.05);
  border-color: var(--accent-color);
}

.btn-accent {
  background: var(--accent-color);
  color: #ffffff;
  border: 1px solid var(--accent-color);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-danger-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

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

.btn-secondary-text {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-secondary-text:hover {
  background: var(--accent-glow);
  color: var(--accent-color);
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 0.95rem;
}

.margin-top-md {
  margin-top: 16px;
}

/* Radio Toggle Switch */
.settings-group {
  margin-bottom: 20px;
}

.setting-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 10px;
}

.radio-toggle-group {
  display: flex;
  background: #ffffff;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
}

.toggle-option {
  flex: 1;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.toggle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-option span {
  display: block;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.toggle-option.active span {
  background: var(--accent-color);
  color: #ffffff;
}

.toggle-option:hover:not(.active) span {
  color: var(--accent-color);
  background: rgba(94, 53, 177, 0.08);
}

/* Number Input Box Custom styling */
.number-input-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.number-input-container input {
  border: none;
  background: transparent;
  text-align: center;
  padding: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.number-input-container input:focus {
  box-shadow: none;
}

.num-btn {
  background: rgba(94, 53, 177, 0.05);
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  width: 46px;
  height: 42px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.num-btn:hover {
  background: rgba(94, 53, 177, 0.15);
  color: var(--accent-color);
}

/* Saved Groupings Panel */
.saved-groupings-container {
  overflow-y: auto;
  max-height: 180px;
  padding-right: 4px;
}

.saved-groupings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saved-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(94, 53, 177, 0.03);
  border: 1px solid rgba(94, 53, 177, 0.08);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  cursor: pointer;
}

.saved-group-item:hover {
  background: rgba(94, 53, 177, 0.08);
  border-color: rgba(94, 53, 177, 0.2);
}

.saved-group-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.saved-group-info i {
  color: var(--accent-color);
  width: 14px;
  height: 14px;
}

.saved-group-delete {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.saved-group-delete:hover {
  background: var(--danger-bg-alpha);
  color: var(--danger-color);
}

.saved-group-delete i {
  width: 14px;
  height: 14px;
}

/* Grouping Display / Interactive Output Grid */
.main-display-card {
  flex: 1;
  min-height: 0;
}

.group-layout-container {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  min-height: 300px;
}

.layout-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 250px;
  text-align: center;
  color: var(--text-secondary);
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
  color: var(--accent-color);
}

.placeholder-icon i {
  width: 54px;
  height: 54px;
}

.layout-placeholder h4 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.layout-placeholder p {
  font-size: 0.85rem;
  max-width: 320px;
  line-height: 1.5;
}

/* Active Sorting Grouping Cards Grid */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.group-card {
  background: rgba(94, 53, 177, 0.02);
  border: 2px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.group-card.drag-over {
  border-color: var(--accent-color);
  background: rgba(94, 53, 177, 0.06);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: scale(1.01);
}

/* Editable group title */
.group-title-input {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 6px 8px;
  margin-bottom: 12px;
  width: 100%;
  transition: var(--transition-fast);
}

.group-title-input:hover {
  background: rgba(94, 53, 177, 0.03);
  border-color: var(--accent-light);
}

.group-title-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Student Items inside layout */
.group-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  list-style: none;
}

.draggable-student {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid rgba(94, 53, 177, 0.15);
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  color: var(--text-primary);
  transition: transform 0.1s ease, border-color var(--transition-fast);
}

.draggable-student:hover {
  background: rgba(94, 53, 177, 0.06);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.draggable-student:active {
  cursor: grabbing;
}

.draggable-student.dragging {
  opacity: 0.3;
  transform: scale(0.96);
  border: 1.5px dashed var(--accent-color);
}

.draggable-student i {
  color: var(--text-secondary);
  width: 14px;
  height: 14px;
  cursor: grab;
}

/* Modals Overlay Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(28, 18, 44, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  box-shadow: 0 16px 40px rgba(28, 18, 44, 0.15);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
}

.animated-scale {
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .animated-scale {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

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

.btn-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.btn-close i {
  width: 18px;
  height: 18px;
}

#create-class-form, #save-grouping-form, #rename-class-form, #teacher-settings-form, #selector-save-list-form, #activity-add-form, #link-edit-form {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  font-weight: 700;
}

.helper-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Settings Dialog Data Management Styles */
.settings-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 20px 0;
  opacity: 0.7;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-section h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.settings-section h4 i {
  width: 16px;
  height: 16px;
  color: var(--accent-color);
}

.settings-section-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 4px;
}

.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.backup-grid .btn {
  width: 100%;
  justify-content: center;
}

.import-wrapper {
  position: relative;
}

#backup-status-text {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 1rem;
}

#backup-status-text.success {
  color: var(--success-color);
}

.settings-subdivider {
  height: 1px;
  background: var(--glass-border);
  margin: 16px 0;
  opacity: 0.4;
  border-style: dashed;
  border-width: 1px 0 0 0;
}

.gdrive-sync-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gdrive-sync-section h5 {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.gdrive-sync-section h5 i {
  width: 14px;
  height: 14px;
  color: var(--accent-color);
}

.gdrive-actions {
  margin-top: 4px;
}

#gdrive-connect-btn {
  width: 100%;
  justify-content: center;
}

#gdrive-connected-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: rgba(94, 53, 177, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
}

#gdrive-connected-container.hidden {
  display: none !important;
}

.gdrive-account-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.gdrive-account-info i.success-icon {
  width: 16px;
  height: 16px;
  color: var(--success-color);
}

.gdrive-sync-buttons {
  display: flex;
  gap: 8px;
}

#gdrive-sync-btn {
  flex-grow: 1;
  justify-content: center;
}

/* Sync animations and styles for the status indicator */
#gdrive-status-indicator {
  transition: var(--transition-fast);
}

#gdrive-status-indicator.synced {
  color: var(--success-color);
  border-color: rgba(0, 121, 107, 0.2);
  background: var(--success-bg-alpha);
}

#gdrive-status-indicator.syncing {
  color: var(--accent-color);
  border-color: var(--glass-border);
  background: rgba(94, 53, 177, 0.05);
}

#gdrive-status-indicator.syncing i {
  animation: spin 2s linear infinite;
}

#gdrive-status-indicator.error {
  color: var(--danger-color);
  border-color: rgba(194, 24, 91, 0.2);
  background: var(--danger-bg-alpha);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Fullscreen Projection Overlay Styling */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #110822; /* High contrast deep plum background for projection */
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 40px;
  overflow: hidden; /* Prevent body scroll, let inner container scroll if needed */
}

.fullscreen-overlay.active {
  display: flex;
}

.projection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid rgba(179, 157, 219, 0.3);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.projection-title-block h1 {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.projection-title-block h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-light);
  margin-top: 4px;
}

.btn-exit-project {
  background: rgba(255, 112, 140, 0.12);
  border: 1px solid rgba(255, 112, 140, 0.3);
  color: #ff8fa3;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-fast);
}

.btn-exit-project:hover {
  background: rgba(255, 112, 140, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.projection-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: minmax(0, 1fr); /* Force rows to share the available height exactly without expanding */
  gap: 28px;
  flex: 1;
  min-height: 0; /* Enable flex-shrink behavior inside the fullscreen overlay */
  overflow: hidden; /* Keep container strictly locked to screen bounds */
}

.projection-group-card {
  border-radius: var(--border-radius-lg);
  padding: 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
  color: #110822; /* Enforce high contrast text by default */
}

/* Dynamic Color Schemes for Visual Contrast */
.projection-group-card.scheme-0 { background: #b39ddb; border: none; } /* Soft Purple */
.projection-group-card.scheme-1 { background: #80cbc4; border: none; } /* Soft Teal */
.projection-group-card.scheme-2 { background: #F6963F; border: none; } /* Marigold Orange */
.projection-group-card.scheme-3 { background: #f8bbd0; border: none; } /* Soft Pink */
.projection-group-card.scheme-4 { background: #90caf9; border: none; } /* Soft Blue */
.projection-group-card.scheme-5 { background: #a5d6a7; border: none; } /* Soft Green */
.projection-group-card.scheme-6 { background: #fff59d; border: none; } /* Lemon Yellow */
.projection-group-card.scheme-7 { background: #ffffff; border: none; } /* White */
.projection-group-card.scheme-8 { background: #ef9a9a; border: none; } /* Soft Red */
.projection-group-card.scheme-9 { background: #bcaaa4; border: none; } /* Soft Brown */
.projection-group-card.scheme-10 { background: #c5cae9; border: none; } /* Soft Indigo */
.projection-group-card.scheme-11 { background: #e6ee9c; border: none; } /* Soft Lime */

.projection-group-name {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 800;
  color: #110822;
  border-bottom: 2px solid rgba(17, 8, 34, 0.15); /* Dark layout separation line */
  padding-bottom: 12px;
  margin-bottom: 30px;
  text-align: center;
  flex-shrink: 0;
}

.projection-students-list {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center students vertically */
  align-items: center; /* Center names horizontally */
  flex: 1;
  list-style: none;
  gap: 24px; /* Comfortably spaced vertical gap */
}

.projection-student-item {
  font-weight: 800; /* Extra bold for projector screen pop */
  color: #110822;
  line-height: 1.2; /* Restrict height multiplier footprint to 1.2x font size */
  text-shadow: none;
  text-align: center;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  width: 100%;
}

/* Animations */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(94, 53, 177, 0.2);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(94, 53, 177, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(94, 53, 177, 0);
  }
}

/* Responsive Scaling details */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar-column {
    max-height: none;
  }
}

/* ==========================================
   MEMBER MODULES HUB VIEW
   ========================================== */
.sidebar.hidden {
  display: none !important;
}

.hub-container {
  display: none;
  width: 100%;
  min-height: 100%;
  padding: 36px 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath d='M40 33 Q40 45 28 45 Q40 45 40 57 Q40 45 52 45 Q40 45 40 33 Z' fill='rgba(94, 53, 177, 0.035)'/%3E%3Cpath d='M80 68 Q80 80 68 80 Q80 80 80 92 Q80 80 92 80 Q80 80 80 68 Z' fill='none' stroke='rgba(94, 53, 177, 0.05)' stroke-width='1.2'/%3E%3Cpath d='M120 103 Q120 115 108 115 Q120 115 120 127 Q120 115 132 115 Q120 115 120 103 Z' fill='rgba(94, 53, 177, 0.035)'/%3E%3Cpath d='M120 32 Q120 40 112 40 Q120 40 120 48 Q120 40 128 40 Q120 40 120 32 Z' fill='none' stroke='rgba(94, 53, 177, 0.05)' stroke-width='1.2'/%3E%3Cpath d='M40 105 Q40 115 30 115 Q40 115 40 125 Q40 115 50 115 Q40 115 40 105 Z' fill='rgba(94, 53, 177, 0.035)'/%3E%3Cpath d='M52 97 Q52 103 46 103 Q52 103 52 109 Q52 103 58 103 Q52 103 52 97 Z' fill='none' stroke='rgba(94, 53, 177, 0.05)' stroke-width='1.2'/%3E%3Ccircle cx='25' cy='135' r='1.2' fill='rgba(94, 53, 177, 0.04)'/%3E%3Ccircle cx='140' cy='25' r='1.2' fill='rgba(94, 53, 177, 0.04)'/%3E%3Ccircle cx='85' cy='75' r='1' fill='rgba(94, 53, 177, 0.025)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-attachment: local;
}

.hub-container.active {
  display: flex;
  flex-direction: column;
}

.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 24px;
}

.hub-header-left h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.hub-header-left p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.hub-center-clock-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 36px;
  width: 100%;
}

.clock-widget-large {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 6px solid var(--accent-light);
  padding: 20px 48px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px var(--glass-shadow);
  text-align: center;
  min-width: 320px;
}

.selector-card-bg-sparkle-bl {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 480px;
  height: 480px;
  color: var(--accent-light); /* Medium lavender/purple */
  opacity: 0.25;
  transform: rotate(15deg);
  z-index: -1;
  pointer-events: none;
}

.qotd-card-bg-sparkle-tr {
  position: absolute;
  top: 0;
  right: 0;
  width: 480px;
  height: 480px;
  color: var(--accent-light); /* Medium lavender/purple */
  opacity: 0.25;
  transform: rotate(-15deg);
  z-index: -1;
  pointer-events: none;
}

.time-display-large {
  font-family: var(--font-title);
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: -0.5px;
  line-height: 1;
}

.date-display-large {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 8px;
  letter-spacing: 0.8px;
}

.hub-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-pill {
  background: #ffffff;
  border: 1.5px solid var(--glass-border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-pill:hover:not(.active) {
  background: rgba(94, 53, 177, 0.06);
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.filter-pill.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.2);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding-bottom: 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.module-card {
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 16px 36px rgba(94, 53, 177, 0.15);
}

.module-card.placeholder:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border);
  box-shadow: 0 6px 16px rgba(0,0,0,0.03);
}

.module-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 53, 177, 0.15);
  transition: var(--transition-fast);
}

.module-card:hover .module-icon-wrap {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.module-card.placeholder .module-icon-wrap {
  background: #f1ecf7;
  color: var(--text-muted);
  border-color: transparent;
}

.module-card.placeholder:hover .module-icon-wrap {
  background: #f1ecf7;
  color: var(--text-muted);
  border-color: transparent;
}

.module-icon-wrap i, .module-icon-wrap svg {
  width: 24px;
  height: 24px;
}

.module-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-info h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.module-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.module-footer-action {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

.module-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.module-btn i {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.module-card:hover .module-btn i {
  transform: translateX(4px);
}

.module-btn.placeholder-btn {
  color: var(--text-muted);
  background: rgba(94, 53, 177, 0.05);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Persistent Module Workspace Clock */
.workspace-clock-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  padding: 6px 16px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 12px var(--glass-shadow);
  margin: 0 16px;
}

.workspace-time-display {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-color);
  line-height: 1;
  letter-spacing: -0.2px;
}

.workspace-date-display {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

/* Fullscreen Projector Mode Clock */
.projector-clock-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(179, 157, 219, 0.35);
  padding: 8px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  align-self: center;
}

.projector-time-display {
  font-family: var(--font-title);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
  letter-spacing: -0.2px;
}

.projector-date-display {
  font-size: 0.8rem;
  font-weight: 700;
  color: #b39ddb;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 4px;
}

/* ==========================================
   SEATING CHART MODULE STYLING
   ========================================== */
.seating-workspace {
  display: none;
  flex-direction: column;
  width: 100%;
  padding: 24px 30px;
  height: calc(100vh - 80px); /* Fit vertically exactly inside layout viewport */
  box-sizing: border-box;
  overflow: hidden; /* Avoid main window scrolling */
}

.seating-workspace:not(.hidden) {
  display: flex;
}

.seating-designer-container, 
.seating-assignment-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  margin-top: 10px;
  min-height: 0; /* Allows children to shrink vertically to fit container */
}

.designer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}

.designer-toolbar h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.designer-toolbar p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.designer-canvas-wrapper, 
.assignment-canvas-wrapper {
  flex: 1;
  background: #fcfbfe;
  border-radius: var(--border-radius-lg);
  position: relative;
  border: 1.5px dashed rgba(94, 53, 177, 0.12);
  overflow: hidden;
  min-height: 0; /* Enable internal viewport shrinking */
}

.seating-grid-canvas {
  width: 100%;
  height: 100%;
  position: relative;
  background-size: 24px 24px;
  background-image: 
    linear-gradient(to right, rgba(94, 53, 177, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(94, 53, 177, 0.025) 1px, transparent 1px);
}

/* Draggable Desk Cards */
.draggable-desk {
  position: absolute;
  width: 120px;
  height: 80px;
  background: #ffffff;
  border: 2px solid var(--accent-color);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 12px var(--glass-shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: move;
  user-select: none;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  z-index: 10;
}

.draggable-desk:hover {
  box-shadow: 0 6px 16px rgba(94, 53, 177, 0.16);
  border-color: var(--accent-light);
}

.draggable-desk.dragging {
  opacity: 0.65;
  box-shadow: 0 12px 24px rgba(94, 53, 177, 0.25);
  transform: scale(1.02);
  z-index: 100;
}

.draggable-desk.drag-over {
  border-color: var(--accent-light);
  background: rgba(94, 53, 177, 0.04);
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(94, 53, 177, 0.2);
}

.desk-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  pointer-events: none;
}

.desk-student-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.desk-student-name.empty {
  font-style: italic;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.8rem;
}

.desk-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 112, 140, 0.08);
  color: #ff708c;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.draggable-desk:hover .desk-delete-btn {
  opacity: 1;
}

.desk-delete-btn:hover {
  background: #ff708c;
  color: #ffffff;
}

/* Seating Roster Split Layout */
.seating-split-layout {
  display: flex;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.unassigned-students-pane {
  width: 280px;
  display: flex;
  flex-direction: column;
  border-radius: var(--border-radius-lg);
}

.unassigned-students-pane .pane-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.unassigned-students-pane .pane-header h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.unassigned-students-pane .pane-header .unassigned-count {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 12px;
}

.unassigned-students-pane .pane-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

/* Draggable Student Chips */
.student-chip {
  padding: 6px 14px;
  background: #ffffff;
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: grab;
  user-select: none;
  box-shadow: 0 2px 4px rgba(94, 53, 177, 0.04);
  transition: border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.student-chip:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 4px 10px rgba(94, 53, 177, 0.1);
}

.student-chip.dragging {
  opacity: 0.4;
  cursor: grabbing;
}

.seating-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1.5px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================
   BUTTON WIDTH & ALIGNMENT FIXES
   ========================================== */
#toggle-seating-mode-btn,
#randomize-seats-btn {
  width: 190px !important;
  justify-content: center !important;
}

/* ==========================================
   TEACHER DESK & DOOR OBJECT TYPE VARIANTS
   ========================================== */
.draggable-desk.type-teacher {
  background: linear-gradient(135deg, #1e1435 0%, #2d1b4e 100%);
  border: 2.5px solid #7c4dff;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.desk-teacher-title {
  color: #b39ddb;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.draggable-desk.type-teacher .desk-student-name {
  color: #e8dbff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.draggable-desk.type-door {
  background: transparent !important;
  border: 1.5px dashed transparent !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: grab;
  transition: background 0.2s, border-color 0.2s;
}

.draggable-desk.type-door:hover,
.draggable-desk.type-door.dragging {
  background: rgba(149, 117, 205, 0.08) !important;
  border-color: rgba(149, 117, 205, 0.4) !important;
  border-radius: 10px;
}

.draggable-desk.type-door .desk-student-name {
  color: #b39ddb;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================
   CHECKMARK BUTTON FEEDBACK ANIMATION
   ========================================== */
.btn.btn-feedback-success {
  background: #43a047 !important;
  border-color: #43a047 !important;
  color: #ffffff !important;
  pointer-events: none;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* ==========================================
   FULLSCREEN SEATING CHART OVERLAY
   ========================================== */
#fullscreen-seating-view {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(145deg, #0d0618 0%, #1a0e2e 50%, #110822 100%);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}

#fullscreen-seating-view.active {
  display: flex;
}

.seating-projection-canvas {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.seating-projection-canvas .projection-desk {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  transition: transform 0.2s ease;
}

.seating-projection-canvas .projection-desk.occupied {
  background: linear-gradient(145deg, #1e1435 0%, #2d1b4e 100%);
  border: 2px solid #7c4dff;
  box-shadow: 0 4px 16px rgba(124, 77, 255, 0.2);
}

.seating-projection-canvas .projection-desk.empty-desk {
  background: rgba(30, 20, 53, 0.4);
  border: 1.5px dashed rgba(179, 157, 219, 0.2);
}

.seating-projection-canvas .projection-desk.obj-teacher {
  background: linear-gradient(145deg, #311b92 0%, #4527a0 100%);
  border: 2.5px solid #b388ff;
  box-shadow: 0 4px 20px rgba(179, 136, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.proj-teacher-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #b39ddb;
  text-transform: uppercase;
}

.seating-projection-canvas .projection-desk.obj-door {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.seating-projection-canvas .projection-desk .proj-name {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seating-projection-canvas .projection-desk .proj-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #b39ddb;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ==========================================
   PRINT MEDIA STYLESHEET OVERRIDES
   ========================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  /* Hide sidebar and workspace controls during printing */
  .sidebar,
  .workspace-header .header-actions,
  .workspace-header .workspace-clock-widget,
  .unassigned-students-pane,
  #designer-canvas .desk-delete-btn,
  .seating-designer-container,
  .fullscreen-overlay,
  .modal-overlay {
    display: none !important;
  }
  
  html, body {
    height: 100% !important;
    overflow: hidden !important;
    page-break-after: avoid !important;
    page-break-before: avoid !important;
  }
  
  .main-content {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  
  .dashboard-shell {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  .seating-workspace {
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .workspace-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 45px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1.5px solid #000000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: transparent !important;
  }

  .workspace-header .class-title {
    font-size: 1.35rem !important;
    color: #000000 !important;
    margin: 0 !important;
  }

  .workspace-header .header-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0 !important;
  }

  .seating-footer-bar {
    display: block !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 25px !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    color: #555555 !important;
    border-top: 1.5px solid #000000 !important;
    padding-top: 4px !important;
    margin: 0 !important;
    background: #ffffff !important;
  }
  
  .seating-split-layout {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
  }
  
  .assignment-canvas-wrapper {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 100% !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  
  .seating-grid-canvas {
    width: 100% !important;
    height: 100% !important;
    background-image: none !important;
    border: none !important;
    overflow: visible !important;
  }
  
  .draggable-desk {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    color: #000000 !important;
    background: #ffffff !important;
    position: absolute !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  .draggable-desk.type-teacher {
    background: #ffffff !important;
    border: 3px solid #000000 !important;
  }

  .desk-teacher-title {
    color: #000000 !important;
    font-weight: 750 !important;
  }
  
  .draggable-desk.type-door {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .door-svg-icon {
    color: #000000 !important;
  }
  
  .desk-student-name {
    color: #000000 !important;
    font-weight: 900 !important;
  }
  
  /* Hide labels on empty desks for clean print output */
  .desk-student-name.empty,
  .desk-label {
    display: none !important;
  }
  
  .workspace-header .header-info {
    padding: 12px 0 !important;
  }
}

/* ==========================================
   STUDENT GROUPING STATE CUSTOM STYLES
   ========================================== */
.saved-group-item.selected {
  background: rgba(0, 121, 107, 0.08) !important;
  border-color: #00796b !important;
}

.saved-group-item.selected .saved-group-item-name {
  color: #00796b !important;
  font-weight: 700;
}

.draggable-student.absent {
  opacity: 0.5;
  text-decoration: line-through;
  border-color: var(--glass-border) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: var(--text-muted) !important;
}

/* ==========================================
   RANDOM SELECTOR WHEEL STYLES
   ========================================== */
.selector-workspace {
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}

.selector-landing-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
}

.selector-landing-grid {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: stretch;
  max-width: 900px;
  width: 100%;
  flex-wrap: wrap;
}

.selector-option-card {
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 8px 32px var(--glass-shadow);
  padding: 45px 35px;
  width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.selector-option-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-light);
  box-shadow: 0 12px 40px rgba(94, 53, 177, 0.12), 0 0 20px rgba(179, 157, 219, 0.2);
}

.selector-option-card .option-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(94, 53, 177, 0.05);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  transition: var(--transition-smooth);
  border: 1px solid rgba(94, 53, 177, 0.1);
}

.selector-option-card:hover .option-icon-wrap {
  background: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(94, 53, 177, 0.3);
}

.selector-option-card h3 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.selector-option-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.selector-option-card .btn {
  width: 100%;
}

.selector-workspace-container {
  height: calc(100vh - 150px);
  margin-top: 10px;
}

.selector-split-layout {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: 24px;
  height: 100%;
  transition: grid-template-columns 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.selector-split-layout.editor-open {
  grid-template-columns: 340px 340px 1fr 340px;
}

.selector-split-layout.placeholder-active {
  grid-template-columns: 340px 1fr;
}

.selector-placeholder-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.selector-left-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.selector-left-pane .pane-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
}

.selector-left-pane .pane-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
  overflow-y: auto;
}

.selector-middle-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.selector-right-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.selector-right-pane .pane-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selector-right-pane .pane-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
  overflow-y: auto;
}

.selector-editor-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  box-shadow: 0 8px 32px var(--glass-shadow);
}

.selector-editor-pane.hidden {
  display: none;
}

.pane-divider {
  border: 0;
  height: 1px;
  background: var(--glass-border);
  margin: 10px 0;
}

.saved-lists-section h4 {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.saved-lists-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.saved-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  background: rgba(94, 53, 177, 0.03);
  border: 1px solid transparent;
  transition: var(--transition-fast);
  cursor: pointer;
}

.saved-list-item:hover {
  background: rgba(94, 53, 177, 0.06);
  border-color: var(--accent-light);
}

.saved-list-item.editing {
  background: var(--success-bg-alpha);
  border-color: var(--success-color);
}

.saved-list-item.editing .saved-list-item-name {
  color: var(--success-color);
  font-weight: 700;
}

.saved-list-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.saved-list-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-list {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-edit-list:hover {
  color: var(--success-color);
  background: var(--success-bg-alpha);
}

.btn-close-pane {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-close-pane:hover {
  color: var(--danger-color);
  background: var(--danger-bg-alpha);
}

.btn-delete-list {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.btn-delete-list:hover {
  color: var(--danger-color);
  background: var(--danger-bg-alpha);
}

.wheel-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(94, 53, 177, 0.02);
}

.wheel-controls-header .control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-option-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  user-select: none;
}

.toggle-option-checkbox input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.speed-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.selector-select {
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-fast);
}

.selector-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.wheel-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  height: calc(100% - 60px);
  padding: 20px;
}

.wheel-canvas-wrapper {
  position: relative;
  width: 95%;
  max-width: calc(100vh - 240px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
}

#wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 12px 48px rgba(94, 53, 177, 0.16), 0 0 0 10px rgba(94, 53, 177, 0.05);
  background: #ffffff;
}

.wheel-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 28px solid #e040fb;
  filter: drop-shadow(0 4px 6px rgba(224, 64, 251, 0.4));
  z-index: 5;
}

#wheel-center-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: radial-gradient(circle, #7b1fa2 0%, #4a148c 100%);
  border: 4px solid #ffffff;
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(74, 20, 140, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  z-index: 6;
  transition: var(--transition-fast);
  user-select: none;
}

#wheel-center-pin:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 8px 25px rgba(74, 20, 140, 0.5), 0 0 15px rgba(224, 64, 251, 0.4);
}

#wheel-center-pin:active {
  transform: translate(-50%, -50%) scale(0.95);
}

.results-list-wrapper {
  flex-grow: 1;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  background: rgba(94, 53, 177, 0.01);
  padding: 12px;
  margin-bottom: 16px;
}

.results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.results-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  border: 1px solid rgba(94, 53, 177, 0.06);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  animation: slideInResults 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.results-list li::before {
  content: attr(data-index);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.empty-results-message {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 40px 20px;
  line-height: 1.5;
}

.results-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@keyframes slideInResults {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Winner Modal Customizations */
.winner-card {
  max-width: 480px;
  text-align: center;
  padding: 45px 35px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--accent-light) !important;
}

.winner-icon-container {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, #e040fb 0%, #9c27b0 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(224, 64, 251, 0.4);
  animation: pulseWinnerIcon 2.5s infinite;
}

.winner-announcement-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.winner-name-display {
  font-family: var(--font-title);
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-color);
  margin: 15px 0 30px;
  word-wrap: break-word;
  text-shadow: 0 2px 12px rgba(94, 53, 175, 0.15);
  animation: popWinnerName 0.55s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pulseWinnerIcon {
  0% { transform: scale(1); box-shadow: 0 0 15px rgba(224, 64, 251, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 30px rgba(224, 64, 251, 0.7); }
  100% { transform: scale(1); box-shadow: 0 0 15px rgba(224, 64, 251, 0.4); }
}

@keyframes popWinnerName {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (max-width: 1024px) {
  .selector-split-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
  }
  .selector-workspace-container {
    height: auto;
  }
  .wheel-canvas-wrapper {
    width: 90vw;
    height: 90vw;
    max-width: 500px;
    max-height: 500px;
  }
}

/* ==========================================================================
   ACTIVITY PICKER MODULE STYLES
   ========================================================================= */
.activity-picker-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  animation: fadeIn 0.4s ease;
  padding: 30px;
}

.activity-workspace-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  gap: 20px;
}

/* Tabs Navigation */
.activity-nav-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 10px;
}

.activity-nav-tabs .tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.activity-nav-tabs .tab-btn:hover {
  background: var(--accent-glow);
  color: var(--accent-color);
}

.activity-nav-tabs .tab-btn.active {
  background: var(--accent-color);
  color: #ffffff;
}

.activity-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

/* Jar Layout container */
.jar-layout-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 0;
}

@media (max-width: 768px) {
  .jar-layout-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Jar Visualization Side */
.jar-visualization-side {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Glass Jar Styles */
.activity-jar-wrapper {
  position: relative;
  width: 500px;
  height: 600px;
  background: rgba(255, 255, 255, 0.15);
  border: 6px solid rgba(255, 255, 255, 0.6);
  border-top: none;
  border-radius: 0 0 190px 190px;
  box-shadow: 
    0 15px 35px rgba(94, 53, 177, 0.15),
    inset 0 -20px 50px rgba(94, 53, 177, 0.05),
    inset 0 0 40px rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  z-index: 2;
  transition: transform 0.15s ease;
}

/* Glass reflections */
.activity-jar-wrapper::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 8%;
  width: 42px;
  height: 75%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  border-radius: 30px;
  pointer-events: none;
}

.activity-jar-wrapper::after {
  content: '';
  position: absolute;
  top: 15%;
  right: 8%;
  width: 20px;
  height: 60%;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  border-radius: 30px;
  pointer-events: none;
}

.jar-lid {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 36px;
  background: #a1887f; /* Cork material color */
  border-radius: 6px 6px 3px 3px;
  border: 2px solid #8d6e63;
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.1),
    inset 0 4px 5px rgba(255,255,255,0.2);
  z-index: 5;
}

.jar-neck {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: 6px solid rgba(255, 255, 255, 0.6);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  box-shadow: inset 0 5px 10px rgba(255, 255, 255, 0.5);
  z-index: 3;
}

.jar-body {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-bottom: 20px;
}

/* Jar Shaking animation state */
.activity-jar-wrapper.shake {
  animation: jarShake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes jarShake {
  10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-1deg); }
  20%, 80% { transform: translate3d(4px, 0, 0) rotate(2deg); }
  30%, 50%, 70% { transform: translate3d(-6px, -2px, 0) rotate(-3deg); }
  40%, 60% { transform: translate3d(6px, 2px, 0) rotate(3deg); }
}

/* Floating strips inside the jar */
.floating-paper-strip {
  position: absolute;
  width: 100px;
  height: 30px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
  opacity: 0.9;
  border: 1px solid rgba(255,255,255,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.floating-paper-strip:hover {
  transform: scale(1.1) !important;
  z-index: 100 !important;
  opacity: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Color schemes for strips */
.floating-paper-strip.brain-break-strip {
  background: linear-gradient(135deg, #b39ddb, #7e57c2);
  box-shadow: 0 2px 4px rgba(126, 87, 194, 0.2);
}

.floating-paper-strip.game-strip {
  background: linear-gradient(135deg, #ffb74d, #F6963F);
  box-shadow: 0 2px 4px rgba(246, 150, 63, 0.2);
}

/* Flying out animation for the drawn strip */
@keyframes flyOutStrip {
  0% {
    bottom: 10%;
    left: 40%;
    transform: scale(1) rotate(0deg);
    opacity: 1;
    z-index: 50;
  }
  40% {
    bottom: 90%;
    left: 45%;
    transform: scale(1.2) rotate(180deg);
    opacity: 1;
    z-index: 50;
  }
  100% {
    bottom: 150%;
    left: 45%;
    transform: scale(2.5) rotate(360deg);
    opacity: 0;
    z-index: 50;
  }
}

.flying-strip-animation {
  position: absolute;
  width: 100px;
  height: 30px;
  border-radius: 4px;
  z-index: 50;
  animation: flyOutStrip 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.4);
}

/* Drift animations */
@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) rotate(15deg); }
  50% { transform: translate(5px, -15px) rotate(22deg); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) rotate(-10deg); }
  50% { transform: translate(-8px, -10px) rotate(-18deg); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) rotate(-25deg); }
  50% { transform: translate(10px, -5px) rotate(-15deg); }
}
@keyframes drift-4 {
  0%, 100% { transform: translate(0, 0) rotate(5deg); }
  50% { transform: translate(-5px, -20px) rotate(-5deg); }
}
@keyframes drift-5 {
  0%, 100% { transform: translate(0, 0) rotate(-35deg); }
  50% { transform: translate(8px, -12px) rotate(-45deg); }
}

/* Controls side styling */
.jar-controls-side {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: 0 10px 30px var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jar-intro-text h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.jar-intro-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.jar-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.btn-draw-break, .btn-draw-game {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  border: none;
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: var(--transition-smooth);
}

.btn-draw-break {
  background: linear-gradient(135deg, #7e57c2 0%, #5e35b1 100%);
}

.btn-draw-break:hover {
  background: linear-gradient(135deg, #9575cd 0%, #4527a0 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(94, 53, 177, 0.25);
}

.btn-draw-game {
  background: linear-gradient(135deg, #F6963F 0%, #e65100 100%);
}

.btn-draw-game:hover {
  background: linear-gradient(135deg, #ffa726 0%, #e65100 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(246, 150, 63, 0.25);
}

.btn-draw-break:active, .btn-draw-game:active {
  transform: translateY(0);
}

/* Browse panel styling */
.browse-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  margin-top: 10px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.search-box-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.search-box-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.search-box-wrap input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.browse-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  flex: 1;
  min-height: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

@media (max-width: 768px) {
  .browse-columns-grid {
    grid-template-columns: 1fr;
  }
}

.browse-column {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 24px var(--glass-shadow);
}

.column-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.column-header h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
  flex: 1;
}

.column-icon {
  font-size: 1.25rem;
}

.column-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-glow);
  color: var(--accent-color);
  padding: 2px 8px;
  border-radius: 20px;
}

.column-header.break-theme {
  border-bottom: 2px solid var(--accent-color);
}
.column-header.break-theme h3 {
  color: var(--accent-color);
}

.column-header.game-theme {
  border-bottom: 2px solid #F6963F;
}
.column-header.game-theme h3 {
  color: #F6963F;
}
.column-header.game-theme .column-count-badge {
  background: rgba(246, 150, 63, 0.08);
  color: #F6963F;
}

.column-list {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.3);
}

/* Activity Item Cards */
.activity-item-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.activity-item-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
}

.activity-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(94, 53, 177, 0.08);
  border-color: var(--accent-light);
}

.activity-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.activity-card-info h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-card-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item-card.break-card::after {
  background: var(--accent-color);
}
.activity-item-card.game-card::after {
  background: #F6963F;
}

.activity-item-card.game-card:hover {
  border-color: #ffb74d;
}

/* Category Badge Pills */
.category-badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
}

.category-badge-pill.brain-break {
  background: var(--accent-glow);
  color: var(--accent-color);
}

.category-badge-pill.game {
  background: rgba(246, 150, 63, 0.08);
  color: #F6963F;
}

/* ==========================================================================
   QUESTION OF THE DAY (QOTD) MODULE STYLES
   ========================================================================= */
.qotd-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  animation: fadeIn 0.4s ease;
  padding: 30px;
}

.qotd-workspace-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow-y: auto;
  gap: 20px;
}

.qotd-panel-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

/* Qotd Category Grid: centered and compact */
.qotd-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 980px;
  margin: 30px auto 0 auto;
  width: 100%;
}

/* Category card base layout */
.qotd-cat-card {
  cursor: pointer;
  padding: 36px;
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.qotd-cat-card:hover {
  transform: translateY(-6px);
}

/* Color Filled Backgrounds & Glows */
.qotd-cat-card.qotd-theme-purple {
  background: linear-gradient(135deg, #6c40c5 0%, #5e35b1 100%);
  box-shadow: 0 6px 20px rgba(94, 53, 177, 0.25);
}
.qotd-cat-card.qotd-theme-purple:hover {
  box-shadow: 0 12px 28px rgba(94, 53, 177, 0.4);
}

.qotd-cat-card.qotd-theme-teal {
  background: linear-gradient(135deg, #009688 0%, #00796b 100%);
  box-shadow: 0 6px 20px rgba(0, 121, 107, 0.2);
}
.qotd-cat-card.qotd-theme-teal:hover {
  box-shadow: 0 12px 28px rgba(0, 121, 107, 0.35);
}

.qotd-cat-card.qotd-theme-orange {
  background: linear-gradient(135deg, #ff9100 0%, #e65100 100%);
  box-shadow: 0 6px 20px rgba(230, 81, 0, 0.2);
}
.qotd-cat-card.qotd-theme-orange:hover {
  box-shadow: 0 12px 28px rgba(230, 81, 0, 0.35);
}

/* Card Header elements */
.qotd-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qotd-cat-icon {
  background: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease;
}

.qotd-cat-card:hover .qotd-cat-icon {
  transform: scale(1.1);
}

/* Icons colors inside white circles */
.qotd-theme-purple .qotd-cat-icon {
  color: #5e35b1;
}
.qotd-theme-teal .qotd-cat-icon {
  color: #00796b;
}
.qotd-theme-orange .qotd-cat-icon {
  color: #e65100;
}

/* Prompt counts badges styling on colored background */
.qotd-count-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

/* Card Text elements */
.qotd-cat-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qotd-cat-body h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.qotd-cat-body p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.45;
  margin: 0;
}

/* Card Footer elements */
.qotd-cat-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.9;
  transition: gap 0.2s ease;
}

.qotd-cat-card:hover .qotd-cat-footer {
  gap: 12px;
}

.qotd-cat-footer i {
  width: 16px;
  height: 16px;
}

/* Color Coding for category badges */
.category-badge-pill.qotd {
  background: rgba(179, 157, 219, 0.15);
  color: #5e35b1;
}

.category-badge-pill.reflection {
  background: rgba(128, 203, 196, 0.15);
  color: #00796b;
}

.category-badge-pill.would_you_rather {
  background: rgba(246, 150, 63, 0.15);
  color: #d84315;
}

/* Database lists and prompt item cards */
.qotd-prompt-list {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 12px;
}

.qotd-item-card {
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: var(--transition-fast);
  margin-bottom: 10px;
}

.qotd-item-card:last-child {
  margin-bottom: 0;
}

.qotd-item-card:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 8px rgba(94, 53, 177, 0.04);
}

.qotd-item-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
  word-break: break-word;
}

.qotd-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.qotd-item-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.qotd-item-btn:hover {
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
}

.qotd-item-btn.delete-btn:hover {
  background: var(--danger-bg-alpha);
  color: var(--danger-color);
}


/* ==========================================================================
   WORK TIME MODULE STYLING
   ========================================================================== */

.worktime-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  padding: 30px;
  overflow-y: auto;
  animation: fadeIn 0.4s ease;
}

.worktime-workspace-content {
  padding: 8px 0 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.worktime-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  align-items: stretch;
}

@media (max-width: 992px) {
  .worktime-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.worktime-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.worktime-grid .glass-panel {
  height: auto !important;
}

.worktime-col .card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(94, 53, 177, 0.03);
  border: 1px solid var(--glass-border);
  border-bottom: none;
  border-top-left-radius: var(--border-radius-md);
  border-top-right-radius: var(--border-radius-md);
  align-items: center;
}

.toolbar-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.toolbar-btn:hover {
  background: rgba(94, 53, 177, 0.08);
  color: var(--accent-color);
}

.toolbar-btn.active {
  background: rgba(94, 53, 177, 0.15);
  color: var(--accent-color);
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background: var(--glass-border);
  margin: 0 6px;
}

/* Rich Text Editor Box */
.worktime-rich-editor {
  min-height: 250px;
  max-height: 380px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: var(--border-radius-md);
  border-bottom-right-radius: var(--border-radius-md);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  transition: var(--transition-fast);
}

.worktime-rich-editor:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(94, 53, 177, 0.1);
}

.worktime-rich-editor:empty:before {
  content: attr(placeholder);
  color: var(--text-muted);
  cursor: text;
}

.worktime-rich-editor ul, .worktime-rich-editor ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.worktime-rich-editor li {
  margin-bottom: 4px;
}

.editor-actions {
  margin-top: 16px;
}

/* Timer Section Config */
.timer-presets-label,
.custom-timer-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.custom-timer-label {
  margin-top: 24px;
}

.timer-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.preset-btn {
  background: #ffffff;
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.preset-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(94, 53, 177, 0.02);
}

.preset-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #ffffff;
}

.custom-timer-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(94, 53, 177, 0.02);
  border: 1.5px dashed var(--glass-border);
  border-radius: var(--border-radius-md);
  padding: 14px;
}

.input-spinner-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.input-spinner-group input[type="number"] {
  width: 75px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--accent-color);
  border: none;
  background: transparent;
  outline: none;
}

/* Hide HTML5 numeric spin arrows */
.input-spinner-group input[type="number"]::-webkit-inner-spin-button,
.input-spinner-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-spinner-group input[type="number"] {
  -moz-appearance: textfield;
}

.input-spinner-unit {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}

.input-spinner-separator {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-top: -20px;
}

.sound-option-toggle {
  margin-top: 20px;
  display: flex;
  align-items: center;
}

/* --- FULLSCREEN WORKTIME DISPLAY OVERLAY --- */
/* --- FULLSCREEN WORKTIME DISPLAY OVERLAY --- */
.worktime-projection-body {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align flush with top edge of paper text box */
  gap: 60px;
  height: auto;
  max-width: 1600px; /* Expanded to contain the wider paper card and timer side-by-side */
  margin: 0 auto; /* Remove top margin to slide elements up */
  width: 100%;
  padding-top: 0;
}

@media (max-width: 1100px) {
  .worktime-projection-body {
    flex-direction: column;
    height: auto;
    overflow-y: auto;
    padding: 20px;
  }
}

/* Portrait wrapper for tasks header and paper sheet */
.worktime-projection-tasks-wrap {
  display: flex;
  flex-direction: column;
  width: 990px; /* Widened by 1.5x to 990px */
  flex-shrink: 0;
}

/* Tasks Header sits clean above the paper sheet in white */
.projection-tasks-header {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 2.6rem; /* Large proper title */
  font-weight: 800;
  font-family: var(--font-title);
  color: #ffffff; /* White contrast text */
  padding: 0 0 18px 4px;
}

.projection-tasks-header i {
  width: 34px;
  height: 34px;
  color: #ffffff; /* Match text color */
}

/* Portrait notebook paper styling for Task List */
.worktime-projection-tasks {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto; /* Auto height based on task list contents */
  min-height: 458px; /* Minimum proportion height */
  background-color: #fdfcf7 !important; /* Loose leaf warm off-white paper */
  background-image: 
    /* Slightly more defined pink vertical margin line */
    linear-gradient(to right, transparent 48px, rgba(244, 63, 94, 0.20) 48px, rgba(244, 63, 94, 0.20) 49px, transparent 49px) !important;
  background-size: auto !important;
  border: 1px solid #e2dcb5 !important;
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 5px 15px rgba(0, 0, 0, 0.3) !important;
  position: relative;
  overflow: hidden;
  padding-left: 46px; /* Reduced left padding to pull text leftwards */
}

/* Notebook ring punch holes */
.worktime-projection-tasks::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle, #0f081d 7px, transparent 8px),
    radial-gradient(circle, #0f081d 7px, transparent 8px),
    radial-gradient(circle, #0f081d 7px, transparent 8px);
  background-position: 
    center 20%,
    center 50%,
    center 80%;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  width: 20px;
  pointer-events: none;
}

/* Clean off-white paper contents with balanced margins and scrolling ruled lines */
.projection-tasks-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 14px 32px 14px 20px; /* Adjusted vertical padding to align first baseline */
  font-size: 2.4rem; /* Significantly larger text size for visibility */
  line-height: 56px !important; /* Strict 56px line grid height */
  color: #1c122c !important; /* Rich contrast ink color */
  background-color: transparent !important;
  background-image: 
    /* Slightly more defined blue horizontal ruled lines scrolling with content */
    repeating-linear-gradient(to bottom, transparent, transparent 55px, rgba(59, 130, 246, 0.13) 55px, rgba(59, 130, 246, 0.13) 56px) !important;
  background-size: 100% 56px !important;
  background-position: 0 0px !important;
}

.projection-tasks-content p {
  margin: 0 !important;
  line-height: 56px !important;
}

.projection-tasks-content ul,
.projection-tasks-content ol {
  margin-left: 28px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.projection-tasks-content li {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  line-height: 56px !important;
}

.projection-tasks-content h1,
.projection-tasks-content h2,
.projection-tasks-content h3 {
  font-family: var(--font-title);
  color: #1c122c !important;
  margin-top: 10px;
  margin-bottom: 18px;
  font-weight: 800;
}

.projection-tasks-content h1 { font-size: 3.0rem; }
.projection-tasks-content h2 { font-size: 2.7rem; }
.projection-tasks-content h3 { font-size: 2.4rem; }

.projection-tasks-content strong {
  color: #000000;
  font-weight: 700;
}

.worktime-projection-timer {
  display: flex;
  align-items: flex-start; /* Align progress ring wrapper to top of the column */
  justify-content: center;
  height: auto;
  flex-grow: 1;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-top: 26px; /* Offset to align progress ring top edge exactly flush with paper sheet top edge */
  padding: 0;
}

.projection-timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

/* Enlarged Timer Circle SVG */
.svg-timer-wrap {
  position: relative;
  width: 480px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s linear;
}

.timer-digits-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timer-digits {
  font-family: var(--font-title);
  font-size: 7.8rem; /* Giant centered digits */
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 24px rgba(6, 182, 212, 0.45);
  letter-spacing: -2px;
  line-height: 1;
}

.timer-status-text {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 2.5px;
  margin-top: 6px;
}

.worktime-timer-controls {
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.timer-ctrl-btn {
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timer-ctrl-btn i {
  width: 20px;
  height: 20px;
}

.timer-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  transform: scale(1.1);
}

.timer-ctrl-btn:active {
  transform: scale(0.95);
}

/* Medium Time Warning Alert (Orange glow, under 5 minutes) */
.timer-warning-medium .timer-digits {
  color: #f97316 !important;
  text-shadow: 0 0 24px rgba(249, 115, 22, 0.6) !important;
  animation: pulseWarning 1.2s infinite alternate;
}

.timer-warning-medium .progress-ring-circle {
  stroke: #f97316 !important;
}

/* Active Time Warning Alert (Red glow, final minute) */
.timer-warning-active .timer-digits {
  color: #ef4444 !important;
  text-shadow: 0 0 24px rgba(239, 68, 68, 0.65) !important;
  animation: pulseWarning 1s infinite alternate;
}

.timer-warning-active .progress-ring-circle {
  stroke: #ef4444 !important;
}

@keyframes pulseWarning {
  0% { transform: scale(1); }
  100% { transform: scale(1.04); }
}

/* Expiration Overlay styling */
.timer-expiration-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 8, 29, 0.96);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}

.expiration-card {
  max-width: 460px;
  width: 100%;
  padding: 44px 32px;
  border-radius: var(--border-radius-lg);
  text-align: center;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.18) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

.expiration-icon {
  width: 76px;
  height: 76px;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  margin: 0 auto 20px auto;
  animation: pulseAlarm 1.5s infinite;
}

.expiration-icon i {
  width: 36px;
  height: 36px;
}

.expiration-card h2 {
  font-family: var(--font-title);
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.expiration-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

@keyframes pulseAlarm {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(239, 68, 68, 0);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: scale(1);
  }
}

/* Center Bottom Actions Bar */
.worktime-actions-center {
  display: flex;
  justify-content: center;
  margin-top: 32px;
  width: 100%;
  max-width: 960px;
}

.worktime-actions-center button {
  min-width: 260px;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 6px 18px rgba(94, 53, 177, 0.15);
  transition: var(--transition-smooth);
}

.worktime-actions-center button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(94, 53, 177, 0.25);
}

/* Checkbox lists in editor and projector */
.worktime-rich-editor ul.checkbox-list,
.projection-tasks-content ul.checkbox-list {
  list-style: none;
  padding-left: 6px;
}

.worktime-rich-editor ul.checkbox-list li,
.projection-tasks-content ul.checkbox-list li {
  position: relative;
  padding-left: 28px !important;
  margin-bottom: 8px;
  list-style-type: none !important;
}

.worktime-rich-editor ul.checkbox-list li::before,
.projection-tasks-content ul.checkbox-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 16px;
  height: 16px;
  border: 2.5px solid var(--accent-color);
  border-radius: 4px;
  background: #ffffff;
  transition: var(--transition-fast);
}

/* Fullscreen workmode projection checkboxes */
.projection-tasks-content ul.checkbox-list li {
  cursor: pointer;
  user-select: none;
  padding-left: 48px !important;
  margin-bottom: 20px;
}

.projection-tasks-content ul.checkbox-list li::before {
  border: 3px solid var(--accent-color) !important; /* Thicker purple outline */
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px;
  top: 5px;
  left: 4px;
  background: #ffffff;
}

/* Click-to-complete checked styling */
.projection-tasks-content ul.checkbox-list li.checked {
  text-decoration: line-through;
  opacity: 0.55;
}

.projection-tasks-content ul.checkbox-list li.checked::before {
  background: var(--accent-light) !important;
  border-color: var(--accent-light) !important;
  content: "✓";
  color: #1c122c;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Highlight styling in editor and projection */
.worktime-rich-editor mark,
.projection-tasks-content mark {
  background-color: #ccfbf1; /* soft light teal */
  color: #1c122c;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: inherit;
}

/* Soft lavender highlight */
.worktime-rich-editor span[style*="background-color"],
.projection-tasks-content span[style*="background-color"] {
  padding: 2px 6px;
  border-radius: 4px;
}

/* Customizable Finished Early Pane styled in light purple */
.worktime-finished-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #b39ddb !important; /* Solid Light purple fill #b39ddb */
  border: 1.5px solid #9575cd !important; /* Slightly darker purple border outline */
  border-radius: 8px;
  padding: 24px 32px 24px 54px; /* Increased left padding to align content with paper hole punches */
  box-sizing: border-box;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.4s ease;
}

.finished-pane-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 2.6rem; /* Large proper title, matches Tasks header */
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--accent-light); /* Accent Lilac/Purple #b39ddb */
  padding: 0 0 18px 4px;
}

.finished-pane-title i {
  width: 34px;
  height: 34px;
  color: var(--accent-light);
}

.finished-pane-content {
  font-family: var(--font-sans);
  font-size: 2.2rem; /* Big font size to fill the pane when projected! */
  font-weight: 700;
  color: #1c122c; /* Contrast dark plum text */
  line-height: 1.4;
  white-space: pre-wrap; /* Preserve linebreaks */
}

/* Load Playlist Embed Styling rules */
.playlist-pane-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 2.6rem; /* Large proper title, matches Tasks header */
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--accent-light); /* Accent Lilac/Purple #b39ddb */
  padding: 0 0 18px 4px;
}

.playlist-pane-title i {
  width: 34px;
  height: 34px;
  color: var(--accent-light);
}

.worktime-playlist-pane {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.4s ease;
}

/* Custom Links Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(28, 18, 44, 0.15);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.links-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100%;
  background: var(--bg-light-canvas);
  border-left: 1px solid var(--glass-border);
  box-shadow: -8px 0 32px rgba(94, 53, 177, 0.1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.links-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.drawer-header h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-header h3 i {
  width: 20px;
  height: 20px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--glass-border);
  background: #ffffff;
}

/* Empty State */
.links-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  flex: 1;
}

.empty-state-icon {
  margin-bottom: 16px;
}

.purple-sparkle-large {
  width: 40px;
  height: 40px;
  color: var(--accent-color);
  opacity: 0.6;
  animation: float 3s ease-in-out infinite;
}

.links-empty-state p {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.links-empty-state .subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Custom Links List */
.custom-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Link Item styling with hover animations */
.link-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
  position: relative;
  gap: 12px;
}

.link-item:hover {
  border-color: var(--accent-light);
  box-shadow: 0 4px 12px rgba(94, 53, 177, 0.05);
  transform: translateY(-1px);
}

.link-item.dragging {
  opacity: 0.4;
  border: 1px dashed var(--accent-color);
  background: var(--bg-sidebar-grey);
}

/* Drag Handle */
.link-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s ease;
  margin-left: -4px;
}

.link-drag-handle:active {
  cursor: grabbing;
}

.link-drag-handle i {
  width: 16px;
  height: 16px;
}

.link-item:hover .link-drag-handle {
  opacity: 1;
}

/* Favicon */
.link-favicon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.link-favicon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.purple-sparkle {
  width: 16px;
  height: 16px;
  color: var(--accent-hover);
}

/* Anchor Link */
.link-anchor {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.link-anchor:hover {
  color: var(--accent-color);
}

/* Actions styling */
.link-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.link-item:hover .link-actions {
  opacity: 1;
}

.btn-link-action {
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.btn-link-action:hover {
  background: var(--bg-sidebar-grey);
}

.btn-link-action.edit-link-btn:hover {
  color: var(--accent-color);
}

.btn-link-action.delete-link-btn:hover {
  color: var(--danger-color);
  background: var(--danger-bg-alpha);
}

.btn-link-action i {
  width: 14px;
  height: 14px;
}

#link-edit-modal {
  z-index: 1100;
}

.card-overflow-visible {
  overflow: visible !important;
}

/* Removed old edge sparkles - consolidated into .card-center-bg-sparkle */




