/* Updated color scheme to match index page cyan/teal theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  :root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #cffafe;
    --accent: #06b6d4;
    --secondary: #10b981;
    --secondary-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-hover: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
  }
  
  [data-theme="dark"] {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --primary-light: #164e63;
    --accent: #22d3ee;
    --secondary: #10b981;
    --secondary-light: #064e3b;
    --warning: #f59e0b;
    --warning-light: #78350f;
    --danger: #ef4444;
    --danger-light: #7f1d1d;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-lg: rgba(0, 0, 0, 0.5);
  }
  
  body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    transition: var(--transition);
  }
  
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: "Space Grotesk", sans-serif;
  }
  
  /* Ethics Banner */
  .ethics-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: nowrap;
    z-index: 1000;
    font-size: 14px;
    box-shadow: 0 2px 8px var(--shadow);
    max-height: 56px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
  }
  
  .ethics-banner.closed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
  }
  
  body.ethics-banner-closed .sidebar {
    top: 0;
  }
  
  body.ethics-banner-closed .main-content {
    margin-top: 0;
  }
  
  /* Standalone pages (profile, settings): no ethics banner – align with top */
  body.researcher-profile-page .sidebar,
  body.dashboard-standalone-page .sidebar {
    top: 0;
  }
  
  body.researcher-profile-page .main-content,
  body.dashboard-standalone-page .main-content {
    margin-top: 0;
  }
  
  .ethics-banner .banner-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .ethics-banner .banner-view-link {
    flex-shrink: 0;
    color: white;
    text-decoration: underline;
    font-weight: 500;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
  }
  
  .ethics-banner .banner-view-link:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .banner-close {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  
  .banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
  }
  
  @media (max-width: 640px) {
    .ethics-banner {
      padding: 8px 12px;
      font-size: 13px;
      gap: 10px;
    }
    .ethics-banner .banner-view-link {
      font-size: 13px;
    }
  }
  
  /* Sidebar */
  .sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
  }
  
  .sidebar.collapsed {
    width: 72px;
    min-width: 72px;
  }
  
  .sidebar.collapsed .sidebar-header {
    padding: 16px 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
  }
  
  .sidebar.collapsed .sidebar-header-left {
    align-items: center;
  }
  
  .sidebar.collapsed .sidebar-account-meta {
    display: none;
  }

  .sidebar.collapsed .sidebar-brand-strip {
    display: none;
  }

  .sidebar.collapsed .sidebar-account-row {
    justify-content: center;
  }

  .sidebar.collapsed .sidebar-header-left {
    width: 100%;
    align-items: center;
  }
  
  .sidebar.collapsed .sidebar-toggle {
    margin-top: 4px;
  }
  
  .sidebar.collapsed .sidebar-nav {
    padding: 12px 8px;
  }
  
  .sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
    min-height: 44px;
  }
  
  .sidebar.collapsed .nav-item svg {
    flex-shrink: 0;
  }
  
  .sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
    align-items: center;
    gap: 8px;
  }
  
  .sidebar.collapsed .theme-toggle {
    padding: 10px;
  }
  
  .btn-sidebar-home,
  .btn-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }
  
  .sidebar-footer-icon {
    display: none;
  }
  
  .sidebar.collapsed .sidebar-footer-text {
    display: none;
  }
  
  .sidebar.collapsed .sidebar-footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .sidebar.collapsed .btn-sidebar-home,
  .sidebar.collapsed .btn-sidebar-logout {
    padding: 10px;
    min-height: 40px;
  }
  
  .sidebar.collapsed ~ .main-content {
    margin-left: 72px;
  }
  
  .sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }
  
  .sidebar-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
  }

  .sidebar-account-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .sidebar-account-meta {
    min-width: 0;
    flex: 1;
  }

  .sidebar-account-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px var(--shadow);
  }

  .sidebar.collapsed .sidebar-account-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .sidebar-verified-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
  }
  .sidebar-pending-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #92400e;
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
  }
  .sidebar-org-name {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .sidebar-brand-strip {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-hover);
  }

  .sidebar-brand-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px var(--shadow);
  }

  .sidebar-brand-chip--lrn {
    padding: 6px 10px;
    text-decoration: none;
    transition: var(--transition);
  }

  .sidebar-brand-chip--lrn:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--shadow);
  }

  .sidebar-brand-chip--vcse {
    padding: 6px 8px;
  }

  [data-theme="dark"] .sidebar-brand-chip {
    background: rgba(15, 23, 42, 0.65);
    border-color: var(--border);
  }

  [data-theme="dark"] .sidebar-brand-strip {
    background: rgba(15, 23, 42, 0.4);
  }

  .sidebar-brand-sep {
    width: 1px;
    height: 28px;
    background: var(--border);
    flex-shrink: 0;
  }

  .sidebar-brand-img {
    display: block;
    width: auto;
  }

  .sidebar-brand-img-lrn {
    height: 30px;
    max-width: 148px;
    object-fit: contain;
  }

  .sidebar-brand-img-vcse {
    height: 30px;
    width: auto;
    object-fit: contain;
  }
  
  .sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
  }
  
  .sidebar-toggle:hover {
    background: var(--surface-hover);
    color: var(--text);
  }
  
  .sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
  }
  
  .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 4px;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
  }
  
  .nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
  }
  
  .nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
  }
  
  /* Added badge styling for navigation items */
  .nav-badge {
    position: absolute;
    right: 12px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
  }
  
  .sidebar.collapsed .nav-item span {
    display: none;
  }
  
  .sidebar.collapsed .nav-item-charter span {
    display: none;
  }
  
  .sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .theme-toggle {
    width: 100%;
    padding: 12px;
    background: var(--surface-hover);
    border: none;
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .theme-toggle:hover {
    background: var(--border);
  }
  
  .btn-secondary {
    width: 100%;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    display: block;
  }
  
  .btn-secondary:hover {
    background: var(--surface-hover);
  }
  
  .btn-sidebar-home {
    width: 100%;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    display: block;
  }
  
  .btn-sidebar-home:hover {
    background: var(--surface-hover);
  }
  
  .btn-sidebar-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: var(--transition);
    display: block;
  }
  
  .btn-sidebar-logout:hover {
    background: var(--danger);
    color: white;
  }
  
  /* Main Content */
  .main-content {
    flex: 1;
    margin-left: 260px;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition), margin-top var(--transition);
  }
  
  .top-bar {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
  }
  
  .breadcrumb {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
  }
  
  .top-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  
  .icon-btn:hover {
    background: var(--surface-hover);
  }
  
  .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
  }
  
  .profile-dropdown-wrap {
    position: relative;
  }
  
  .profile-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 1002;
    display: none;
  }
  
  .profile-panel.active {
    display: block;
  }
  
  .profile-panel-greeting {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 8px 0;
  }
  
  .profile-panel-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
  }
  
  .profile-panel-meta:last-of-type {
    margin-bottom: 16px;
  }
  
  .profile-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .profile-panel-actions .profile-panel-btn,
  .profile-panel-actions .profile-logout-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .profile-panel-actions a.profile-panel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text);
  }
  
  .profile-panel-actions a.profile-panel-btn:hover {
    background: var(--surface-hover);
  }
  
  .profile-panel-actions a.profile-panel-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
  }
  
  .profile-panel-actions .profile-logout-btn {
    background: var(--danger);
    color: white;
    border: none;
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .profile-panel-actions .profile-logout-btn:hover {
    opacity: 0.9;
    filter: brightness(0.95);
  }
  
  .content-container {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
  }
  
  /* Stats Grid */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
  }
  
  .stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
  }
  
  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
  }
  
  .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }
  
  .stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  
  .stat-value {
    font-family: "Space Grotesk", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
  }
  
  /* Search & Filters */
  .search-section {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
  }
  
  .search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
  }

  .search-bar-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    flex-shrink: 0;
  }

  @media (min-width: 560px) {
    .search-bar-actions {
      flex-direction: row;
      align-items: center;
      gap: 10px;
    }
  }

  button.filters-reset-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: var(--radius);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-align: center;
    transition: color 0.15s ease, background-color 0.15s ease;
  }

  button.filters-reset-btn:hover {
    color: var(--primary);
  }

  button.filters-reset-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
  }
  
  .search-input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    transition: var(--transition);
  }
  
  .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
  }
  
  .btn {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 15px;
  }
  
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
  }
  
  .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
  }
  
  .btn-outline:hover {
    background: var(--surface-hover);
    transform: none;
    box-shadow: none;
  }
  
  .btn-danger {
    background: var(--danger);
    color: white;
  }

  .btn-danger:hover {
    background: var(--danger);
    filter: brightness(1.1);
  }

  .btn-outline-danger {
    background: transparent;
    border: 1px solid var(--danger, #ef4444);
    color: var(--danger, #ef4444);
  }

  .btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.08);
  }

.btn-delete-project {
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.35);
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
}

.btn-delete-project:hover {
  background: #fee2e2;
  border-color: rgba(220, 38, 38, 0.55);
  color: #991b1b;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.12);
}

  .btn-success {
    background: linear-gradient(135deg, var(--success, #10b981) 0%, #059669 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(5, 150, 105, 0.55);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  }

  .btn-success:hover {
    background: linear-gradient(135deg, #0ea472 0%, #047857 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  }

  /* Request cards (match organisation dashboard style) */
  .request-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition);
  }

  .request-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
  }

  .request-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
  }

  .researcher-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }

  .researcher-meta {
    font-size: 14px;
    color: var(--text-secondary);
  }

  .request-badge {
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }

  .request-message {
    background: var(--background);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
  }

  .request-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .filter-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
  }
  
  .filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
  }
  
  .quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
  }
  
  .chip {
    padding: 8px 16px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .chip:hover,
  .chip.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
  }
  
  .view-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .view-toggle {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
  }
  
  .view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .view-btn.active {
    background: var(--primary);
    color: white;
  }
  
  /* Organisation Cards */
  .org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
  }
  
  .org-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
  }
  
  .org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow);
  }
  
  .org-card.blurred .org-name {
    filter: blur(6px);
    user-select: none;
  }
  
  .org-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
  }
  
  .org-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  
  .org-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  
  .tag {
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .tag.secondary {
    background: var(--secondary-light);
    color: var(--secondary);
  }
  
  .tag.warning {
    background: var(--warning-light);
    color: var(--warning);
  }
  
  .org-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
  }
  
  .org-communities {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
  }
  
  .org-actions {
    display: flex;
    gap: 8px;
  }
  
  .btn-small {
    padding: 10px 16px;
    font-size: 14px;
    flex: 1;
  }
  
  .btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn-icon.saved {
    background: var(--warning);
  }
  
  .availability-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .availability-badge.available {
    background: var(--secondary-light);
    color: var(--secondary);
  }
  
  .availability-badge.limited {
    background: var(--warning-light);
    color: var(--warning);
  }
  
  .availability-badge.unavailable {
    background: var(--danger-light);
    color: var(--danger);
  }
  
  /* Map */
  #map {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
  }
  
  /* Network View */
  .network-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid var(--border);
  }
  
  .tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .tab-btn.active {
    background: var(--primary);
    color: white;
  }
  
  .connection-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
  }
  
  .connection-card .availability-badge {
    position: static;
    top: auto;
    right: auto;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
  }
  
  .connection-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
  }

  .connection-card .connection-card-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }

  .connection-card .connection-card-actions .btn {
    flex: 1 1 120px;
    min-width: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .connection-card .connection-card-actions .btn.btn-small {
    flex: 1 1 120px;
    min-width: 0;
    padding: 10px 16px;
    font-size: 14px;
  }

  .connection-card .connection-card-actions .btn-remove-connection {
    background: var(--background);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: none;
    font-weight: 600;
  }

  .connection-card .connection-card-actions .btn-remove-connection:hover {
    background: rgba(239, 68, 68, 0.07);
    border-color: var(--danger, #ef4444);
    color: var(--danger, #ef4444);
    transform: none;
    box-shadow: none;
  }

  .connection-card .connection-card-actions .btn-flag-profile {
    background: var(--background);
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    box-shadow: none;
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0.7;
  }

  .connection-card .connection-card-actions .btn-flag-profile:hover {
    background: rgba(245, 158, 11, 0.07);
    border-color: #f59e0b;
    color: #b45309;
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
  
  .connection-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
  }
  
  .connection-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  
  .connection-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
  }
  
  .connection-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
  }
  
  .connection-status.connected {
    background: var(--success-light);
    color: var(--success);
  }
  
  .connection-status.pending {
    background: var(--warning-light);
    color: var(--warning);
  }
  
  .connection-status.declined {
    background: var(--danger-light);
    color: var(--danger);
  }
  
  /* Added Messages styling */
  .messages-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
  }
  
  .messages-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
  }
  
  .message-item {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .message-item:hover {
    background: var(--surface-hover);
  }
  
  .message-item.active {
    background: var(--primary-light);
  }
  
  .message-item.unread {
    border-left: 3px solid var(--primary);
  }
  
  .message-sender {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  
  .message-preview {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
  }
  
  .message-time {
    font-size: 12px;
    color: var(--text-tertiary);
  }
  
  .message-thread {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
  }
  
  .thread-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
  
  .thread-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  
  .thread-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
  }
  
  .thread-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--background);
    border: 1px solid var(--border);
  }
  
  .message-bubble.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
  }
  
  .message-bubble-text {
    margin-bottom: 4px;
    line-height: 1.5;
  }
  
  .message-bubble-time {
    font-size: 11px;
    opacity: 0.7;
  }
  
  .thread-input {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
  }
  
  .thread-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text);
  }
  
  /* Added Documents styling */
  .documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .document-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
  }
  
  .document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
  }
  
  .document-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .document-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
  }
  
  .document-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .document-info {
    font-size: 13px;
    color: var(--text-tertiary);
  }
  
  .document-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }
  
  /* Added Calendar styling */
  .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .calendar-nav {
    display: flex;
    gap: 12px;
    align-items: center;
  }
  
  .calendar-month {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
  }
  
  .calendar-grid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
  }
  
  .calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .calendar-day-header {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px;
  }
  
  .calendar-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
  }
  
  .calendar-date {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
  }
  
  .calendar-date:hover {
    background: var(--surface-hover);
  }
  
  .calendar-date.today {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
  }
  
  .calendar-date.has-event::after {
    content: "";
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
  }
  
  .meetings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .meeting-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
  }
  
  .meeting-card:hover {
    box-shadow: 0 4px 12px var(--shadow);
  }
  
  .meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
  }
  
  .meeting-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
  }
  
  .meeting-time {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }
  
  .meeting-org {
    font-size: 14px;
    color: var(--text-tertiary);
  }
  
  /* Activity Feed */
  .activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .activity-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: start;
  }
  
  .activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
  }
  
  .activity-content {
    flex: 1;
  }
  
  .activity-text {
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.5;
  }
  
  .activity-time {
    font-size: 13px;
    color: var(--text-tertiary);
  }
  
  /* Modals */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  
  .modal.active {
    display: flex;
  }
  
  .modal-content {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px var(--shadow-lg);
  }
  
  .modal-large {
    max-width: 700px;
  }

  /* Organisation modal: larger, scrollable */
  #orgModal .modal-content {
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #orgModal #orgModalContent {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 4px;
  }
  #orgModal #orgModalContent .org-modal-section {
    margin-bottom: 24px;
  }
  #orgModal #orgModalContent .org-modal-section:last-of-type {
    margin-bottom: 0;
  }
  #orgModal #orgModalContent .org-modal-section h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text);
  }
  #orgModal #orgModalContent .org-modal-section p,
  #orgModal #orgModalContent .org-modal-section .org-modal-field {
    margin: 0 0 6px 0;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
  }
  #orgModal #orgModalContent .org-modal-section .org-modal-field:last-child {
    margin-bottom: 0;
  }

/* Request detail modal layout (researcher incoming requests) */
.request-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.request-profile-section {
  margin-bottom: 16px;
}

.request-profile-section h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.request-profile-section p,
.request-profile-section .org-modal-field {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.6;
}

.request-profile-section .org-modal-field:last-child {
  margin-bottom: 0;
}

.request-profile-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
  
  /* Larger, denser layout for project create/edit */
  .project-modal {
    max-width: 780px;
    padding: 40px 48px;
  }
  
  .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--surface);
    border: none;
    border-radius: 50%;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  
  .modal-close:hover {
    background: var(--surface-hover);
  }
  
  .modal-confirm .modal-confirm-text {
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.5;
  }
  
  .modal-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
  }
  
  .modal-confirm-actions .btn {
    min-width: 100px;
  }
  
  .btn-logout-confirm {
    background: var(--danger);
    color: white;
    border: none;
  }
  
  .btn-logout-confirm:hover {
    filter: brightness(0.95);
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
  }
  
  .form-group input,
.form-group select,
  .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-family: "Inter", sans-serif;
  }
  
  .form-group textarea {
    resize: vertical;
  }
  
  /* Notification Panel */
  .notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--background);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px var(--shadow);
    z-index: 1001;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
  }
  
  .notification-panel.active {
    right: 0;
  }
  
  .notification-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .notification-header h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    color: var(--text);
  }
  
  .btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
  }
  
  .notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
  }
  
  .notification-item {
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
  }
  
  .notification-item:hover {
    background: var(--surface-hover);
  }
  
  .notification-item.unread {
    border-left: 3px solid var(--primary);
  }
  
  .notification-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  
  .notification-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
  }
  
  .notification-time {
    font-size: 12px;
    color: var(--text-tertiary);
  }
  
  /* Toast */
  .toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: 0 8px 20px var(--shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
  }
  
  @keyframes slideIn {
    from {
      transform: translateX(400px);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  .toast.success {
    border-left: 4px solid var(--secondary);
  }
  
  .toast.error {
    border-left: 4px solid var(--danger);
  }
  
  .toast.info {
    border-left: 4px solid var(--primary);
  }
  
  /* Feedback FAB */
  .feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
  }
  
  .feedback-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.4);
  }
  
  .feedback-fab:active {
    transform: scale(0.95);
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .sidebar {
      transform: translateX(-100%);
      top: 48px;
    }
  
    body.ethics-banner-closed .sidebar {
      top: 0;
    }
  
    body.researcher-profile-page .sidebar,
    body.dashboard-standalone-page .sidebar {
      top: 0;
    }
  
    .sidebar.mobile-open {
      transform: translateX(0);
    }
  
    .main-content {
      margin-left: 0;
      width: 100%;
      min-width: 0;
    }

    .sidebar.collapsed ~ .main-content {
      margin-left: 0;
    }
  
    .content-container {
      padding: 20px;
    }
  
    .stats-grid {
      grid-template-columns: 1fr;
    }
  
    .org-grid {
      grid-template-columns: 1fr;
    }
  
    .notification-panel {
      width: 100%;
      right: -100%;
    }
  
    .filters-row {
      flex-direction: column;
      align-items: stretch;
    }
  
    .feedback-fab {
      bottom: 16px;
      right: 16px;
      width: 48px;
      height: 48px;
    }
  
    /* Mobile responsive for messages */
    .messages-container {
      grid-template-columns: 1fr;
    }
  
    .messages-list {
      display: none;
    }
  
    .messages-container.show-list .messages-list {
      display: block;
    }
  
    .messages-container.show-list .message-thread {
      display: none;
    }
  
    /* Mobile responsive for documents */
    .documents-grid {
      grid-template-columns: 1fr;
    }
  }
  
  /* Empty State */
  .empty-state {
    text-align: center;
    padding: 60px 20px;
  }
  
  .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
  }
  
  .empty-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    color: var(--text);
    margin-bottom: 8px;
  }
  
  .empty-text {
    color: var(--text-secondary);
    font-size: 15px;
  }
  
  /* === Enlarged Feedback Modal Only === */
  .large-feedback {
    max-width: 720px !important;       /* wider modal */
    padding: 48px 56px !important;     /* more breathing space */
    line-height: 1.6;
    font-size: 1rem;
  }
  
  .large-feedback h2 {
    font-size: 1.6rem;
    margin-bottom: 16px;
  }
  
  .large-feedback p {
    font-size: 1rem;
    margin-bottom: 18px;
  }
  
  .large-feedback textarea {
    font-size: 15px;
    line-height: 1.5;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #ccc);
  }
  
  /* Project View Styles */
  .projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
  }
  
  .project-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
  }
  
  .project-tab {
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
  }
  
  .project-tab:hover {
    color: var(--text);
  }
  
  .project-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
  
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  
  .project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.2s;
    position: relative;
  }
  
  .project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
  }
  
  .project-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
  }
  
  .project-status.active { background: var(--success-light); color: var(--success); }
  .project-status.planning { background: var(--info-light); color: var(--info); }
  .project-status.on-hold { background: var(--warning-light); color: var(--warning); }
  .project-status.completed { background: var(--secondary-light); color: var(--secondary); }
  
  .project-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
  }
  
  .project-desc {
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.5;
      margin-bottom: 16px;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
  }
  
  .project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
  }

  .project-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .visibility-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
  }

  .project-visibility-badge {
    padding: 4px 10px;
    background: var(--secondary-light);
    color: var(--secondary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }
  
  /* Toggle Switch */
  .toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
  }
  
  .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 24px;
  }
  
  .toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }
  
  input:checked + .toggle-slider {
    background-color: var(--primary);
  }
  
  input:checked + .toggle-slider:before {
    transform: translateX(20px);
  }
  
  .progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin: 12px 0;
    overflow: hidden;
  }
  
  .progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
  }
  
  /* Project tasks list in modal */
  #projectTasksList {
    margin-top: 4px;
  }

  .project-commitments-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
  }

  .project-commitment-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: flex-start;
    column-gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
  }

  .project-commitment-row:last-child {
    border-bottom: none;
  }

  .project-commitment-row:hover {
    background: var(--surface-hover, rgba(0,0,0,0.02));
  }

  .project-commitment-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .project-commitment-tick {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: transparent;
    flex-shrink: 0;
    margin-top: 1px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  }

  .project-commitment-row.is-done .project-commitment-tick {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #15803d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
  }

  .project-commitment-row.is-done .project-commitment-label {
    color: var(--text);
  }

  .project-commitment-label {
    flex: 1;
    min-width: 0;
  }
  
  @media (max-width: 768px) {
    .project-modal {
      max-width: 100%;
      padding: 24px 20px;
    }
  }
  
  /* Project context section in modal */
  .project-context-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
  }
  
  @media (max-width: 768px) {
    .project-context-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }

.location-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-bottom: 8px;
}
.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.875rem;
  background: var(--primary-light, rgba(0,128,128,0.1));
  color: var(--primary, #008080);
  border-radius: var(--radius, 6px);
  border: 1px solid var(--border, #e0e0e0);
}
.location-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  width: 18px;
  height: 18px;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 2px;
  cursor: pointer;
}
.location-chip-remove:hover { background: rgba(0,0,0,0.08); }
.location-chips-input-wrap { position: relative; }
.location-chips-input {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius, 6px);
  background: var(--background, #fff);
  color: var(--text, #222);
}
.location-chips-input:focus {
  border-color: var(--primary, #008080);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light, rgba(0,128,128,0.1));
}
.location-chips-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 4px;
  background: var(--background, #fff);
  border: 1px solid var(--border, #e0e0e0);
  border-radius: var(--radius, 6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
}
.location-chips-list.open { display: block; }
.location-chips-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.location-chips-item:hover { background: var(--surface-hover, #f5f5f5); }

/* Discover filter layout — pilot filter separated to the right */
.discover-filters-with-pilot {
  display: flex;
  align-items: flex-end;
  gap: 0;
  flex-wrap: wrap;
}

.discover-filters-with-pilot .filters-row {
  flex: 1;
  min-width: 0;
}

.pilot-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  margin-left: 16px;
  padding-left: 16px;
}

@media (max-width: 640px) {
  .pilot-filter-group {
    border-left: none;
    border-top: 1px solid var(--border);
    margin-left: 0;
    padding-left: 0;
    padding-top: 12px;
    margin-top: 4px;
    width: 100%;
  }
}

/* Researcher opportunities → Requests tab (match org collaboration-request cards) */
.collab-request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.collab-request-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.collab-request-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  border-color: rgba(107, 114, 128, 0.35);
}

.collab-request-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.collab-request-card-body {
  flex: 1 1 220px;
  min-width: 0;
}

.collab-request-via {
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.collab-request-response {
  font-size: 14px;
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.collab-request-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 1 auto;
}

.collab-request-actions .btn,
.collab-request-actions .btn.btn-small {
  flex: 0 0 auto;
}

.collab-request-status.tag {
  font-size: 12px;
  font-weight: 600;
}

.collab-request-actions .btn-flag-profile {
  background: var(--background);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  box-shadow: none;
  font-weight: 500;
  font-size: 0.75rem;
  opacity: 0.85;
}

.collab-request-actions .btn-flag-profile:hover {
  background: rgba(245, 158, 11, 0.07);
  border-color: #f59e0b;
  color: #b45309;
  opacity: 1;
  transform: none;
  box-shadow: none;
}

/* Project filter bar */
.project-filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.project-search-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.project-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb, 99, 102, 241), 0.15);
}

.project-filters-bar .filter-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.project-filters-bar .filter-select:focus {
  outline: none;
  border-color: var(--primary);
}

.project-filters-bar .filters-reset-wrap {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.project-filters-bar .filters-reset-btn {
  padding: 8px 6px;
  text-align: right;
}
