/* ===== UMD TERP NOTES - CSS DESIGN SYSTEM ===== */
:root {
  /* UMD Brand Colors */
  --umd-red: #E21833;
  --umd-gold: #FFD520;
  --umd-black: #000000;
  --umd-white: #FFFFFF;

  /* Red Variations */
  --red-50: #fee2e2;
  --red-100: #fecaca;
  --red-500: #ef4444;
  --red-600: #E21833;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;

  /* Gold Variations */
  --gold-50: #fffbeb;
  --gold-100: #fef3c7;
  --gold-400: #FFD520;
  --gold-500: #f59e0b;
  --gold-600: #d97706;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --color-primary: var(--umd-red);
  --color-primary-hover: var(--red-700);
  --color-accent: var(--umd-gold);
  --color-success: #10b981;
  --color-error: var(--red-600);
  --color-text: var(--gray-900);
  --color-text-light: var(--gray-600);
  --color-text-muted: var(--gray-500);
  --color-background: #ffffff;
  --color-background-secondary: var(--gray-50);
  --color-border: var(--gray-200);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;

  /* Z-Index */
  --z-sticky: 1020;
  --z-modal: 1040;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-light);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  box-sizing: border-box;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}

@media (min-width: 1600px) {
  .container {
    max-width: 1600px;
  }
}

/* ===== HEADER/NAVBAR ===== */
.topbar {
  background: linear-gradient(135deg, var(--umd-red) 0%, var(--red-700) 100%);
  color: white;
  padding: var(--space-4) var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.topbar h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
  color: white;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.topbar h2::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url('/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 8px;
  vertical-align: middle;
}

.topbar .user-info {
  font-size: var(--font-size-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.logout-btn {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--umd-gold);
  text-decoration: none;
}

/* ===== MAIN CONTENT ===== */
main {
  min-height: calc(100vh - 140px);
  padding: var(--space-8) 0;
  flex: 1;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: var(--space-8);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--umd-red);
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  margin-bottom: var(--space-8);
  line-height: var(--line-height-relaxed);
}

.features-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  max-width: 1000px;
  margin: 0 auto;
}

.feature-item {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--umd-gold);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

/* ===== BUTTONS ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.button.primary {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
}

.button.primary:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

.button.secondary {
  background: var(--color-background);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.button.secondary:hover {
  background: var(--color-background-secondary);
  border-color: var(--umd-gold);
  color: var(--umd-red);
  text-decoration: none;
}


.button.gold {
  background: linear-gradient(135deg, var(--umd-gold), var(--gold-600));
  color: var(--umd-black);
  font-weight: var(--font-weight-bold);
}

.button.download {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.button.download:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

.button.info {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
}

.button.info:hover {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

.button.warning {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
}

.button.warning:hover {
  background: linear-gradient(135deg, #D97706, #B45309);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

.button.success {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.button.success:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

.button.gold:hover {
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  transform: translateY(-1px);
  text-decoration: none;
}

.button-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.button.disabled {
  background: var(--gray-400) !important;
  color: var(--gray-600) !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.button.small {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
}

/* ===== FORMS ===== */
.auth-form {
  max-width: 540px;
  margin: 0 auto;
  padding: var(--space-10);
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-radius: var(--radius-2xl);
  box-shadow: 0 20px 60px rgba(226, 24, 51, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(226, 24, 51, 0.1);
  position: relative;
  overflow: hidden;
}

.auth-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--umd-red) 0%, var(--umd-gold) 100%);
}

.auth-form h1 {
  text-align: center;
  margin-bottom: var(--space-8);
  background: linear-gradient(135deg, var(--umd-red) 0%, var(--red-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--font-size-base);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: all var(--transition-normal);
  background: white;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--umd-red);
  box-shadow: 0 0 0 4px rgba(226, 24, 51, 0.08), inset 0 2px 4px rgba(0, 0, 0, 0.02);
  background: white;
  transform: translateY(-1px);
}

.form-group input:hover:not(:focus),
.form-group select:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
  border-color: var(--gray-300);
}

.req {
  color: var(--umd-red);
  margin-left: var(--space-1);
}

.form-buttons {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

input[type="submit"],
input[type="reset"] {
  flex: 1;
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

input[type="submit"] {
  background: linear-gradient(135deg, var(--umd-red), var(--red-700));
  color: white;
}

input[type="submit"]:hover {
  background: linear-gradient(135deg, var(--red-700), var(--red-800));
  transform: translateY(-1px);
}

input[type="reset"] {
  background: var(--color-background-secondary);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.alt-link {
  margin-top: var(--space-6);
  text-align: center;
  font-size: var(--font-size-sm);
}

/* ===== DASHBOARD ===== */
.dashboard-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.search-bar {
  display: flex;
  gap: var(--space-3);
}

.search-bar input[type="text"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
}

.search-bar button {
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--umd-red), var(--red-700));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-bar button:hover {
  background: linear-gradient(135deg, var(--red-700), var(--red-800));
}

.filter-controls {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
  align-items: start;
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 0;
  height: 38px;
  line-height: 1.5;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.filter-select:focus {
  outline: none;
  border-color: var(--umd-red);
}

/* Custom Multi-Select Dropdowns */
.multi-select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.multi-select-btn {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  min-width: 0;
  height: 38px;
  line-height: 1.5;
  font-family: inherit;
  box-sizing: border-box;
}

.multi-select-btn:hover {
  border-color: var(--umd-red);
}

.multi-select-btn:focus {
  outline: none;
  border-color: var(--umd-red);
  box-shadow: 0 0 0 3px rgba(226, 24, 51, 0.1);
}

.dropdown-arrow {
  transition: transform 0.2s;
  color: var(--gray-600);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.multi-select-btn:hover .dropdown-arrow {
  color: var(--umd-red);
}

.multi-select-btn > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: white;
  border: 2px solid var(--umd-red);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.multi-select-dropdown.show {
  display: block;
  animation: slideDown 0.2s ease;
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.multi-select-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.multi-select-option:hover {
  background: var(--gray-100);
}

.multi-select-option input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--umd-red);
}

.multi-select-option input[type="checkbox"]:checked + span {
  font-weight: 600;
  color: var(--umd-red);
}

.multi-select-dropdown::-webkit-scrollbar {
  width: 8px;
}

.multi-select-dropdown::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 4px;
}

.multi-select-dropdown::-webkit-scrollbar-thumb {
  background: var(--umd-red);
  border-radius: 4px;
}

.multi-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--red-700);
}

/* ===== FILE CARDS ===== */
.file-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  width: 100%;
  box-sizing: border-box;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  width: 100%;
  box-sizing: border-box;
}

.file-list-item {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  gap: 1rem;
}

.file-list-item:hover {
  border-color: var(--umd-red);
  box-shadow: 0 4px 12px rgba(224, 58, 60, 0.12);
  transform: translateY(-1px);
}

.file-list-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.file-list-main {
  flex: 1;
  min-width: 0;
}

.file-list-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-list-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #6B7280;
  flex-wrap: wrap;
}

.file-list-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.file-list-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.file-list-downloads {
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-right: 0.5rem;
  cursor: help;
}

@media (max-width: 1200px) {
  .file-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Grouped/Accordion View Styles */
.major-group {
  margin-bottom: 1.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.major-group:hover {
  box-shadow: 0 4px 12px rgba(224, 58, 60, 0.1);
  border-color: var(--umd-red);
}

.major-header {
  background: linear-gradient(135deg, #E03A3C 0%, #C42F31 100%);
  color: white;
  padding: 1rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  user-select: none;
  transition: all 0.2s ease;
}

.major-header:hover {
  background: linear-gradient(135deg, #C42F31 0%, #A52527 100%);
}

.major-header .expand-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.major-header .file-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
}

.course-list {
  display: none;
  padding: 0.5rem;
  background: #F9FAFB;
}

.course-list.show {
  display: block;
  animation: slideDown 0.3s ease;
}

.course-group {
  margin-bottom: 0.5rem;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: all 0.2s ease;
}

.course-group:hover {
  border-color: var(--umd-red);
  box-shadow: 0 2px 8px rgba(224, 58, 60, 0.08);
}

.course-header {
  background: linear-gradient(135deg, #FFD700 0%, #FFC700 100%);
  color: #1F2937;
  padding: 0.875rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  user-select: none;
  transition: all 0.2s ease;
}

.course-header:hover {
  background: linear-gradient(135deg, #FFC700 0%, #FFB700 100%);
}

.course-header .expand-icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.course-header .file-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-files {
  display: none;
  padding: 1rem;
  background: #FFFFFF;
}

.course-files.show {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  animation: slideDown 0.3s ease;
}

.grouped-file-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
}

.grouped-file-card:hover {
  border-color: var(--umd-red);
  box-shadow: 0 4px 12px rgba(224, 58, 60, 0.12);
  transform: translateY(-2px);
}

.expand-collapse-all {
  text-align: right;
  margin-bottom: 1rem;
}

.expand-collapse-all button {
  background: #F3F4F6;
  border: 1px solid #D1D5DB;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4B5563;
  transition: all 0.2s ease;
}

.expand-collapse-all button:hover {
  background: var(--umd-red);
  border-color: var(--umd-red);
  color: white;
}

/* Custom Dropdown for Course Selection */
.custom-dropdown-wrapper {
  position: relative;
}

.custom-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--umd-red);
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 8px 24px rgba(224, 58, 60, 0.15);
}

.custom-dropdown.show {
  display: block;
  animation: slideDown 0.2s ease;
}

.custom-dropdown-item {
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #F3F4F6;
  transition: all 0.2s ease;
}

.custom-dropdown-item:last-child {
  border-bottom: none;
}

.custom-dropdown-item:hover,
.custom-dropdown-item.selected {
  background: linear-gradient(135deg, rgba(224, 58, 60, 0.05) 0%, rgba(224, 58, 60, 0.1) 100%);
  border-left: 3px solid var(--umd-red);
  padding-left: calc(1rem - 3px);
}

.custom-dropdown-item.selected {
  background: linear-gradient(135deg, rgba(224, 58, 60, 0.1) 0%, rgba(224, 58, 60, 0.15) 100%);
}

.course-code {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--umd-red);
  display: block;
  margin-bottom: 0.25rem;
}

.course-name {
  font-size: 0.85rem;
  color: #6B7280;
  display: block;
  line-height: 1.4;
}

.custom-dropdown-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #9CA3AF;
  font-size: 0.875rem;
}

.custom-dropdown::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown::-webkit-scrollbar-track {
  background: #F9FAFB;
}

.custom-dropdown::-webkit-scrollbar-thumb {
  background: var(--umd-red);
  border-radius: 4px;
}

.custom-dropdown::-webkit-scrollbar-thumb:hover {
  background: #C42F31;
}

/* Highlight matching text */
.highlight {
  background: rgba(255, 215, 0, 0.4);
  font-weight: 600;
}

/* Professor-specific styles */
.professor-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1F2937;
  display: block;
  margin-bottom: 0.25rem;
}

.professor-semesters {
  font-size: 0.8rem;
  color: #6B7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.semester-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: linear-gradient(135deg, rgba(224, 58, 60, 0.1) 0%, rgba(224, 58, 60, 0.15) 100%);
  border: 1px solid rgba(224, 58, 60, 0.3);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--umd-red);
  white-space: nowrap;
}

/* Dropdown animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .course-files.show {
    grid-template-columns: 1fr;
  }

  .major-header {
    font-size: 1rem;
    padding: 0.875rem 1rem;
  }

  .course-header {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }

  .custom-dropdown {
    max-height: 300px;
  }

  .custom-dropdown-item {
    padding: 0.75rem 0.875rem;
  }
}

.file-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid rgba(226, 24, 51, 0.08);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  text-align: center !important;
}

.file-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--umd-red), var(--umd-gold));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.file-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(226, 24, 51, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
  border-color: rgba(226, 24, 51, 0.2);
}

.file-card:hover::before {
  opacity: 1;
}

.file-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--space-3) !important;
  margin-bottom: var(--space-4) !important;
}

.file-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--red-100), var(--red-200));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
}

.file-info h3 {
  font-size: var(--font-size-lg);
  margin: 0;
  color: var(--color-text);
  word-break: break-word;
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.file-meta-item {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.file-meta-item strong {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

.major-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: white;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.class-code-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: linear-gradient(135deg, var(--umd-red), var(--red-700));
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.5px;
}

.file-actions {
  display: flex !important;
  gap: var(--space-2) !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

.file-actions .button {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  min-width: 80px;
}

.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1; /* Span all grid columns */
}

.empty-state h3 {
  font-size: var(--font-size-xl);
  color: var(--umd-red);
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
  background: var(--color-background);
  border: 2px dashed var(--umd-gold);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-8);
  margin-bottom: var(--space-12);
}

.upload-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.upload-header h3 {
  color: var(--umd-red);
  margin-bottom: var(--space-2);
}

.file-type-notice {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  text-align: left;
  color: #0C4A6E;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.upload-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
}

.required {
  color: var(--umd-red);
}

.file-input-wrapper {
  position: relative;
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 2px dashed var(--umd-gold);
  border-radius: var(--radius-lg);
  background: var(--gold-50);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-input-label:hover {
  background: var(--umd-gold);
  border-color: var(--umd-red);
}

.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  transition: all var(--transition-fast);
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--umd-red);
  box-shadow: 0 0 0 3px rgba(226, 24, 51, 0.1);
}

/* Merged above with main .form-textarea definition */

.form-help {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.form-actions {
  text-align: center;
  margin-top: var(--space-6);
}

/* Bulk Upload Button */
#bulkUploadBtn {
  margin-left: var(--space-3);
}

/* ===== USER ROLE BADGES ===== */
.user-role {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: capitalize;
}

.role-admin {
  background: white;
  color: var(--umd-red);
  border: 1px solid var(--umd-red);
  font-weight: var(--font-weight-bold);
}

.role-contributor {
  background: rgba(255, 213, 32, 0.25);
  color: #b8860b;
  border: 1px solid var(--umd-gold);
}

.role-viewer {
  background: rgba(107, 114, 128, 0.15);
  color: var(--gray-700);
  border: 1px solid var(--gray-400);
}

/* ===== ADMIN DASHBOARD ===== */
.admin-header {
  text-align: center;
  margin-bottom: var(--space-8);
  margin-top: var(--space-8);
}

.admin-header h1 {
  color: var(--umd-red);
  margin-bottom: var(--space-3);
}

.admin-header p {
  color: var(--gray-600);
  font-size: var(--font-size-lg);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 2px solid var(--umd-gold);
}

@media (max-width: 1024px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-controls {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .admin-stats {
    grid-template-columns: 1fr;
  }
}

.users-section {
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  border: 2px solid var(--umd-gold);
  margin-bottom: var(--space-12);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.search-controls {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.search-input {
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 200px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-6);
}

.user-card {
  background: var(--color-background);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.user-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--umd-gold);
}

.user-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--umd-red), var(--umd-gold));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.user-card .user-info h3 {
  margin: 0 0 var(--space-1) 0;
  color: var(--umd-red);
}

.user-email {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  word-break: break-all;
}

.user-id {
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.role-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.role-select {
  padding: var(--space-1) var(--space-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.action-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.protected-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-align: center;
  background: var(--umd-red);
  color: white;
}

.current-user-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-align: center;
  background: var(--gold-100);
  color: var(--umd-red);
  border: 1px solid var(--umd-gold);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-background);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  border: 2px solid var(--umd-gold);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-6);
}

/* ===== FOOTER ===== */
footer {
  background: var(--gray-100);
  border-top: 2px solid var(--umd-gold);
  padding: var(--space-6) 0;
  text-align: center;
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}

footer a {
  color: var(--umd-red);
  text-decoration: underline;
  margin: 0 0.5rem;
  font-weight: 600;
}

footer a:hover {
  color: #991B1B;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.hidden { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column;
    gap: var(--space-3);
  }

  .file-grid,
  .users-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .search-controls {
    width: 100%;
  }

  .filter-select,
  .search-input {
    width: 100%;
  }

  .profile-page {
    padding: var(--space-4);
  }
}

/* ===== PROFILE PAGE ===== */
.profile-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-6) 0;
}

.profile-page h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
  color: var(--umd-red);
}

.profile-subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}

.profile-section {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.profile-section h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  color: var(--umd-red);
}

.profile-form .form-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.disabled-input {
  background-color: #F3F4F6 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

button.disabled,
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.password-error,
.password-match-error {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.role-display {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.info-section {
  background-color: #F9FAFB;
}

.info-grid {
  display: grid;
  gap: var(--space-3);
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3);
  background: white;
  border-radius: var(--radius-md);
}

/* Username Warning */
.username-warning {
  margin-top: var(--space-2);
  padding: var(--space-3);
  background-color: #FEF3C7;
  border: 2px solid #F59E0B;
  border-radius: var(--radius-md);
  color: #92400E;
  font-size: var(--font-size-sm);
}

.username-warning strong {
  color: #B45309;
}

/* ===== TERMS OF SERVICE ===== */
.terms-agreement {
  margin: var(--space-6) 0;
}

.terms-box {
  background: #F0F9FF;
  border: 2px solid #3B82F6;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.terms-box h4 {
  color: #1E40AF;
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-3);
}

.terms-text {
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.terms-list {
  margin: var(--space-3) 0;
  padding-left: var(--space-5);
  color: var(--text-primary);
}

.terms-list li {
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

.terms-warning {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding: var(--space-3);
  margin: var(--space-4) 0;
  border-radius: var(--radius-md);
  color: #92400E;
  line-height: 1.6;
}

.terms-warning strong {
  color: #B45309;
  display: block;
  margin-bottom: var(--space-2);
}

.terms-warning.academic-integrity {
  background: #FEE2E2;
  border-left: 4px solid #DC2626;
  color: #7F1D1D;
}

.terms-warning.academic-integrity strong {
  color: #991B1B;
  font-size: var(--font-size-md);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-label span {
  color: var(--text-primary);
  font-weight: var(--font-weight-medium);
  line-height: 1.5;
}

/* ===== DRAG AND DROP UPLOAD ===== */
.upload-drop-zone {
  border: 3px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-drop-zone:hover {
  border-color: var(--umd-red);
  background: #FEF2F2;
}

.upload-drop-zone.drag-over {
  border-color: var(--umd-red);
  background: #FEE2E2;
  transform: scale(1.02);
}

.file-input-hidden {
  display: none;
}

.drop-zone-content {
  pointer-events: none;
}

.drop-zone-icon {
  font-size: 4rem;
  margin-bottom: var(--space-3);
}

.drop-zone-text {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.drop-zone-text strong {
  color: var(--umd-red);
}

.drop-zone-hint {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.selected-files {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 2px solid var(--border-color);
  text-align: left;
}

.selected-files-header {
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-3);
  color: var(--umd-red);
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  background: white;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-2);
  border: 1px solid var(--border-color);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.file-item-icon {
  font-size: 1.5rem;
}

.file-item-name {
  font-weight: var(--font-weight-medium);
  word-break: break-word;
}

.file-item-size {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  margin-left: var(--space-2);
}

.files-summary {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: #F0F9FF;
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  color: #1E40AF;
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab-upload {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--umd-red);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(224, 58, 60, 0.4);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  z-index: 100;
}

.fab-upload:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(224, 58, 60, 0.6);
  background: #B82E30;
}

.fab-upload:active {
  transform: scale(0.95);
}

.fab-icon {
  font-size: 1.5rem;
}

.fab-text {
  font-size: 0.7rem;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Pulse animation for drop zone */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    border-color: var(--border-color);
  }
  50% {
    transform: scale(1.02);
    border-color: var(--umd-red);
  }
}

/* Mobile adjustments for FAB */
@media (max-width: 768px) {
  .fab-upload {
    width: 60px;
    height: 60px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .fab-icon {
    font-size: 1.3rem;
  }

  .fab-text {
    font-size: 0.6rem;
  }
}

/* ===== ADMIN REPORTS SECTION ===== */
.reports-section {
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  background: #FEF2F2;
  border: 2px solid #FCA5A5;
  border-radius: var(--radius-lg);
}

.reports-section h2 {
  color: #DC2626;
  margin-bottom: var(--space-4);
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-4);
}

.report-card {
  background: white;
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.report-header {
  margin-bottom: var(--space-3);
}

.report-header h3 {
  font-size: var(--font-size-md);
  color: var(--text-primary);
  word-break: break-word;
}

.report-reason-box {
  background: #FEE2E2;
  border-left: 4px solid #DC2626;
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: #991B1B;
  word-wrap: break-word;
  line-height: 1.5;
}

/* Report action buttons - color coded */

.report-dismiss-btn {
  background: #10B981 !important;
  color: white !important;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s;
}

.report-dismiss-btn:hover {
  background: #059669 !important;
}

.report-review-btn {
  background: #3B82F6 !important;
  color: white !important;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.report-review-btn:hover {
  background: #2563EB !important;
}


.report-details {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

/* Virus Scan Status Badges */
.scan-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Category Badges */
.category-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.category-exam { background: #FEE2E2; color: #DC2626; }
.category-lecture { background: #DBEAFE; color: #2563EB; }
.category-homework { background: #EDE9FE; color: #7C3AED; }
.category-study { background: #D1FAE5; color: #059669; }
.category-cheat { background: #FFEDD5; color: #EA580C; }
.category-project { background: #CFFAFE; color: #0891B2; }
.category-lab { background: #FAE8FF; color: #C026D3; }
.category-other { background: #F3F4F6; color: #6B7280; }

.scan-clean {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #10B981;
}

.scan-pending {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #F59E0B;
  animation: pulse-scan 2s infinite;
}

.scan-error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}

@keyframes pulse-scan {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.report-details p {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.report-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ===== LEGAL PAGES STYLING ===== */
.legal-content {
  line-height: 1.8;
}

.legal-content h2 {
  color: var(--umd-red);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  border-bottom: 2px solid var(--umd-red);
  padding-bottom: 0.5rem;
}

.legal-content h3 {
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: #4B5563;
}

/* ===== ANNOUNCEMENTS ===== */
.announcement-banner {
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.announcement-banner-info {
  background: #DBEAFE;
  border-left: 4px solid #3B82F6;
  color: #1E40AF;
}

.announcement-banner-warning {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  color: #92400E;
}

.announcement-banner-success {
  background: #D1FAE5;
  border-left: 4px solid #10B981;
  color: #065F46;
}

.announcement-card {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid;
}

.announcement-card.announcement-info {
  border-left-color: #3B82F6;
  background: #EFF6FF;
}

.announcement-card.announcement-warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}

.announcement-card.announcement-success {
  border-left-color: #10B981;
  background: #ECFDF5;
}

/* Announcement Type Cards */
.announcement-type-option {
  cursor: pointer;
}

.type-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.2s;
  font-weight: 600;
}

.type-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.type-card-info {
  background: #DBEAFE;
  color: #1E40AF;
}

.type-card-warning {
  background: #FEF3C7;
  color: #92400E;
}

.type-card-success {
  background: #D1FAE5;
  color: #065F46;
}

.announcement-type-option input:checked + .type-card {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.announcement-type-option input:checked + .type-card-info {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.announcement-type-option input:checked + .type-card-warning {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.announcement-type-option input:checked + .type-card-success {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.stats-section {
  padding: 5rem 2rem;
  background: white;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.stats-title {
  font-size: 2.5rem;
  color: #1F2937;
  margin-bottom: 4rem;
  font-weight: 800;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.homepage-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  border: 1px solid rgba(226, 24, 51, 0.08);
  position: relative;
  overflow: hidden;
}

.homepage-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--umd-red) 0%, var(--umd-gold) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.homepage-stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(226, 24, 51, 0.15);
  border-color: rgba(226, 24, 51, 0.2);
}

.homepage-stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--umd-red) 0%, var(--red-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.stat-label {
  color: var(--gray-600);
  font-size: 1.125rem;
  font-weight: 500;
}

/* Responsive Stats Grid */
@media (max-width: 968px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .stat-card:last-child {
    grid-column: span 2;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }

  .stats-title {
    font-size: 2rem;
  }

  .stat-number {
    font-size: 3rem;
  }
}


/* ===== FINAL LAUNCH POLISH ===== */

/* How It Works - Fix white text */
.how-it-works * {
  color: white !important;
}

.step * {
  color: white !important;
}

/* Footer - Restore dark gradient */
footer {
  background: linear-gradient(135deg, #1F2937 0%, #000000 100%) !important;
  border-top: 4px solid var(--umd-red);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 3rem 2rem;
  color: white;
  text-align: center;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--umd-red), var(--umd-gold));
}

footer a {
  color: var(--umd-gold) !important;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

footer a:hover {
  color: var(--gold-400) !important;
  transform: translateY(-2px);
}

/* Page Headers - Cleaner Layout */
main h1 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

main > .container > p:first-of-type {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 3rem;
}

/* Admin Dashboard - Wider Stats */
.admin-stat-card {
  min-width: 200px;
}

/* Fix CTA Button Spacing */
.cta-disclaimer {
  margin-top: 3rem !important;
}


/* Announcements Section Styling */
.announcements-section {
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  border: 2px solid var(--umd-gold);
  margin-bottom: var(--space-12);
}

.announcements-section h2 {
  color: var(--umd-red);
  margin-bottom: var(--space-4);
}

/* Profile Page Polish */
.profile-page {
  max-width: 800px !important;
  margin: 0 auto !important;
}

.profile-section {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  margin-bottom: var(--space-8);
  box-shadow: 0 8px 24px rgba(226, 24, 51, 0.06);
  border-top: 4px solid var(--umd-red);
  position: relative;
  overflow: hidden;
}

.profile-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(226, 24, 51, 0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.profile-section h2 {
  background: linear-gradient(135deg, var(--umd-red) 0%, var(--red-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-6);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

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

/* Search box in multi-select dropdowns */
.search-box {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--gray-50);
}

.search-box input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.875rem;
  background: white;
}

.search-box input:focus {
  outline: none;
  border-color: var(--umd-red);
  box-shadow: 0 0 0 2px rgba(226, 24, 51, 0.1);
}

.no-options {
  padding: 1rem;
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Removed - now using same CSS class as grid view */

/* Ensure active filters don't affect grouped view layout */
#activeFilters {
  box-sizing: border-box;
}

/* When active filters are hidden, ensure they don't take up space */
#activeFilters[style*="display: none"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ===== DELETE ACCOUNT SECTION ===== */
.danger-section {
  border: 2px solid var(--red-200);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
  border-radius: var(--border-radius-lg);
}

.danger-section h2 {
  color: var(--red-700);
  margin-bottom: var(--space-4);
}

.danger-warning {
  background: rgba(254, 226, 226, 0.8);
  border: 1px solid var(--red-300);
  border-radius: var(--border-radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
}

.danger-warning p {
  margin-bottom: var(--space-3);
  color: var(--red-800);
}

.danger-warning ul {
  margin: var(--space-3) 0;
  padding-left: var(--space-6);
  color: var(--red-700);
}

.danger-warning li {
  margin-bottom: var(--space-2);
}

.button.danger {
  background: linear-gradient(135deg, var(--red-600), var(--red-700));
  color: white;
  border: 2px solid var(--red-600);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-3) var(--space-8);
  transition: all var(--transition-fast);
}

.button.danger:hover {
  background: linear-gradient(135deg, var(--red-700), var(--red-800));
  border-color: var(--red-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.button.danger:disabled {
  background: var(--gray-400) !important;
  color: var(--gray-600) !important;
  border-color: var(--gray-400) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* DANGER ZONE Styling */
.danger-zone {
  border: 3px solid var(--red-300);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(220, 38, 38, 0.08));
  border-radius: var(--border-radius-xl);
  margin-top: var(--space-8);
  padding: var(--space-6);
}

.danger-zone-title {
  color: var(--red-700);
  margin-bottom: var(--space-6);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.danger-zone .danger-section {
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  border: 2px solid var(--red-200);
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--border-radius-lg);
}

.danger-zone .danger-section:last-child {
  margin-bottom: 0;
}

.danger-zone .danger-section h3 {
  color: var(--red-600);
  margin-bottom: var(--space-3);
  font-size: 1.1rem;
  font-weight: 600;
}

.danger-zone .danger-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(220, 38, 38, 0.05));
  border: 1px solid var(--red-200);
  border-radius: var(--border-radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.danger-zone .danger-warning p {
  margin-bottom: var(--space-3);
  color: var(--gray-700);
  line-height: 1.6;
}

.danger-zone .danger-warning p:last-child {
  margin-bottom: 0;
}

.danger-zone .danger-warning ul {
  margin: var(--space-2) 0;
  padding-left: var(--space-6);
}

.danger-zone .danger-warning li {
  margin-bottom: var(--space-1);
  color: var(--gray-700);
  line-height: 1.5;
}

/* Revert to original - no width constraints */

