/* ==========================================================================
   COLLEGES & UNIVERSITIES HUB STYLESHEET (colleges.css v9.0)
   Features:
   - Topic Brainstorming Hub Grid & Scratchpads
   - Preset University Directory Auto-Fill Dropdown
   - Left Vertical Sidebar Navigation
   - Integrated Main Personal Statement Workspace
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-dark: #090c15;
  --bg-panel: rgba(16, 20, 32, 0.88);
  --bg-card: rgba(22, 28, 44, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  --border-focus: #7c5cff;
  
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --accent-purple: #7c5cff;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-blue: #3b82f6;
  
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-md: 0 20px 50px rgba(0,0,0,0.5);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --max-width: 1240px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: 
    radial-gradient(1200px 700px at 15% 0%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(900px 600px at 85% 10%, rgba(244, 63, 94, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg-dark), #05070c);
}

/* APP LAYOUT WITH LEFT VERTICAL SIDEBAR */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar-nav {
  width: 270px;
  min-width: 270px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: rgba(12, 16, 26, 0.92);
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 20px;
  z-index: 100;
}

.sidebar-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  width: 28px;
  height: 28px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.side-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.side-action-btn.active {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.4);
  color: #ffffff;
}

.side-action-btn.highlight {
  background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.4);
  color: #ffffff !important;
}

.side-action-btn.senior-pill {
  background: rgba(124, 92, 255, 0.16);
  border-color: rgba(124, 92, 255, 0.4);
  color: #ffffff !important;
}

.side-action-btn.primary {
  background: var(--accent-purple);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
}

.side-action-btn.primary:hover {
  background: #6c47ff;
}

/* SIDEBAR SCHOOLS LIST BY NAME */
.sidebar-schools-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.schools-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 4px;
}

.count-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.sidebar-schools-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar-school-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sidebar-school-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sidebar-school-item.active {
  background: rgba(124, 92, 255, 0.15);
  border-color: rgba(124, 92, 255, 0.35);
  color: #ffffff;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.cat-dot.reach { background: var(--accent-rose); box-shadow: 0 0 8px rgba(244, 63, 94, 0.4); }
.cat-dot.target { background: var(--accent-purple); box-shadow: 0 0 8px rgba(124, 92, 255, 0.4); }
.cat-dot.safety { background: var(--accent-emerald); box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }

.school-name-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-app-type {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sidebar-footer {
  display: flex;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.side-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.side-link:hover {
  color: var(--text-primary);
}

/* RIGHT MAIN STAGE */
.main-stage {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

.stage-view {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 32px 36px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   PERSONAL STATEMENT & TOPIC BRAINSTORMING GRID
   ========================================================================== */
.ps-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.ps-integrated-workspace {
  background: var(--bg-panel);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 16px 40px rgba(124, 92, 255, 0.12);
}

.ps-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ps-kicker {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  text-transform: uppercase;
}

.ps-view-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.ps-view-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ps-view-meta {
  display: flex;
  gap: 8px;
}

.ps-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: #ffffff;
}

.ps-pill.muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.ps-editor-lg {
  width: 100%;
  min-height: 420px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.65;
  outline: none;
  resize: vertical;
}

.ps-editor-lg:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

/* TOPIC BRAINSTORMING PANEL */
.brainstorming-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brainstorm-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.brainstorm-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.prompt-guide-box {
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.prompt-guide-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-purple);
  cursor: pointer;
  outline: none;
}

.prompts-list {
  margin-top: 10px;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brainstorm-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brainstorm-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brainstorm-card label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.brainstorm-input {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.45;
  outline: none;
  resize: vertical;
}

.brainstorm-input:focus {
  border-color: var(--border-focus);
}

/* DEDICATED SENIOR MASTER CHECKLIST TAB WORKSPACE */
.senior-tab-workspace {
  background: var(--bg-panel);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 16px 40px rgba(124, 92, 255, 0.15);
}

.senior-tab-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.senior-tab-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.senior-tab-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.progress-pill-lg {
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.4);
  color: #a78bfa;
}

.f-progress-bar-lg {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.senior-full-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

/* SUGGESTED TASKS QUICK-ADD BANK IN CHECKLIST TAB */
.suggested-bank-box {
  background: rgba(10, 14, 24, 0.6);
  border: 1px dashed rgba(124, 92, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-title {
  font-size: 12px;
  font-weight: 700;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bank-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggest-pill {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.suggest-pill:hover {
  background: rgba(124, 92, 255, 0.25);
  border-color: rgba(124, 92, 255, 0.5);
  transform: translateY(-1px);
}

/* HERO & METRICS */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.hero-sub {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.5;
}

.metrics-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.metric-card {
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 14px 20px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
}

.metric-card.reach-metric {
  border-color: rgba(244, 63, 94, 0.35);
  background: rgba(244, 63, 94, 0.06);
}

.metric-card.submitted-metric {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.06);
}

.metric-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0;
}

.metric-note {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* CONTROLS BAR */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  border-radius: var(--radius-lg);
}

.search-box {
  flex: 2;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.select-box {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.search-box input {
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.select-box select {
  width: 100%;
  padding: 11px 36px 11px 14px;
  border-radius: var(--radius-md);
  background-color: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  transition: all 0.2s ease;
}

.select-box select option, select option, form select option {
  background-color: #0f1423 !important;
  color: #f1f5f9 !important;
  padding: 10px 14px;
  font-weight: 600;
}

.search-box input:focus, .select-box select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

.add-btn {
  padding: 11px 24px;
  border-radius: var(--radius-md);
  background: var(--accent-purple);
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.35);
  transition: all 0.2s ease;
}

.add-btn:hover {
  background: #6c47ff;
  transform: translateY(-1px);
}

/* ULTRA-COMPACT CARDS GRID */
.compact-unis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.compact-card {
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.compact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.compact-card.status-submitted {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(16, 20, 32, 0.9));
}

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

.compact-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.cat-pill.reach { background: rgba(244, 63, 94, 0.18); border: 1px solid rgba(244, 63, 94, 0.4); color: #ff6b81; }
.cat-pill.target { background: rgba(124, 92, 255, 0.18); border: 1px solid rgba(124, 92, 255, 0.4); color: #a78bfa; }
.cat-pill.safety { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; }

.app-type-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.app-type-pill.ed { background: rgba(244, 63, 94, 0.25); color: #ff6b81; }
.app-type-pill.ea { background: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.app-type-pill.rd { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.status-pill-sm {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.status-pill-sm.submitted, .status-pill-sm.accepted {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.compact-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.compact-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.compact-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.days-chip-sm {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.18);
  color: #a78bfa;
}

.tasks-count-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

/* FULL PAGE DEDICATED SCHOOL WORKSPACE VIEW */
.full-view-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.back-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.status-select-lg {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(16, 20, 32, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.btn-danger-ghost {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #ff6b81;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.2);
}

.full-view-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.school-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.school-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.cat-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.cat-badge.reach { background: rgba(244, 63, 94, 0.2); color: #ff6b81; border: 1px solid rgba(244, 63, 94, 0.4); }
.cat-badge.target { background: rgba(124, 92, 255, 0.2); color: #a78bfa; border: 1px solid rgba(124, 92, 255, 0.4); }
.cat-badge.safety { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

.type-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.status-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
}

.school-banner-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.school-banner-sub {
  font-size: 14.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

.school-banner-deadlines {
  display: flex;
  gap: 14px;
}

.dl-card {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dl-card .dl-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dl-card strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.full-workspace-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.full-workspace-tabs::-webkit-scrollbar {
  display: none;
}

.f-tab {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.f-tab.active {
  background: var(--accent-purple);
  border-color: transparent;
  color: #ffffff;
}

.f-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  border-radius: var(--radius-lg);
}

.f-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.f-panel-head h3 {
  font-size: 18px;
  font-weight: 800;
}

.f-progress-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.f-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c5cff, #a78bfa);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.f-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.f-task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
}

.f-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  cursor: pointer;
}

.f-task-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.f-task-row.done .f-task-label {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.65;
}

.f-delete-task-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.f-delete-task-btn:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.15);
}

.f-add-task input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.6);
  border: 1px dashed var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}

.f-essays-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.f-essay-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.6);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.f-essay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.f-essay-prompt {
  font-size: 14px;
  color: var(--text-secondary);
}

.f-word-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.18);
  color: #a78bfa;
}

.f-essay-editor {
  width: 100%;
  min-height: 140px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.55;
  outline: none;
  resize: vertical;
}

.f-notes-editor {
  width: 100%;
  min-height: 240px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 24, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

/* MODALS & BACKDROP */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  max-width: 680px;
  width: min(92vw, 680px);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  border: 1px solid rgba(124, 92, 255, 0.35);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.highlight-preset-group {
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.35);
  padding: 14px;
  border-radius: var(--radius-md);
}

.highlight-preset-group label {
  color: #a78bfa;
}

.preset-select {
  border-color: rgba(124, 92, 255, 0.4) !important;
}

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

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.autocomplete-group {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 2500;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: rgba(14, 18, 30, 0.96);
  border: 1px solid rgba(124, 92, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ac-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all 0.15s ease;
}

.ac-item:hover {
  background: rgba(124, 92, 255, 0.2);
}

.ac-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.ac-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background-color: rgba(10, 14, 24, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-group select {
  padding-right: 38px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}

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

.btn-ghost {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-purple);
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

/* CUSTOM GLASS CONFIRMATION MODAL */
.confirm-modal-card {
  max-width: 440px;
  width: 100%;
  border-radius: 20px;
  background: var(--bg-panel);
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 25px 70px rgba(244, 63, 94, 0.2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
}

.confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.18);
  color: #ff6b81;
  font-size: 22px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.confirm-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.confirm-message {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.btn-danger {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  background: var(--accent-rose);
  border: none;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.35);
}

.btn-danger:hover {
  background: #e11d48;
}

/* ACTION-ORIENTED INTERACTIVE POINTER GUIDED TOUR SYSTEM */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(5, 7, 13, 0.7);
  pointer-events: auto !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.tour-pointer-box {
  position: fixed;
  z-index: 3100;
  width: 320px;
  background: var(--bg-panel);
  border: 1px solid rgba(124, 92, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(124, 92, 255, 0.35);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.tour-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(124, 92, 255, 0.18);
  border: 1px solid rgba(124, 92, 255, 0.4);
  color: #a78bfa;
  text-transform: uppercase;
}

.tour-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.tour-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.tour-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.btn-ghost-sm {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary-sm {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-purple);
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger-sm {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #ff6b81;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.tour-spotlight-active {
  position: relative;
  z-index: 3050 !important;
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.7), 0 0 30px rgba(124, 92, 255, 0.5) !important;
  transition: all 0.2s ease;
}

.hidden { display: none !important; }

/* Responsive Layout */
@media (max-width: 1024px) {
  .ps-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-layout { flex-direction: column; }
  .sidebar-nav { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .stage-view { padding: 16px 14px 48px; }
  .form-row { grid-template-columns: 1fr; }
  .metrics-grid { display: none !important; }

  /* Mobile Topbar Actions */
  .full-view-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .full-view-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }
  .back-btn {
    width: 100%;
    text-align: center;
  }
  .status-select-lg {
    flex: 1;
    min-width: 0;
  }
  .btn-danger-ghost {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Mobile School Banner */
  .school-banner {
    padding: 16px;
    flex-direction: column;
    gap: 14px;
  }
  .school-banner-title {
    font-size: 20px;
    line-height: 1.3;
    word-break: break-word;
  }
  .school-banner-sub {
    font-size: 13px;
    word-break: break-word;
  }
  .school-banner-deadlines {
    width: 100%;
  }
  .dl-card {
    width: 100%;
  }

  /* Mobile Workspace Panels */
  .f-panel {
    padding: 16px;
  }
  .f-panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .f-panel-head h3 {
    font-size: 16px;
  }
  .add-essay-btn {
    width: 100%;
    text-align: center;
  }
  .f-essay-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .f-word-badge {
    align-self: flex-start;
  }

  /* Mobile Controls & Filter Bar */
  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-box, .select-box, .add-btn {
    width: 100%;
  }
}
