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

:root {
  /* Light Mode Palette */
  --bg-color: hsl(210, 20%, 98%);
  --card-bg: hsl(0, 0%, 100%);
  --text-color: hsl(222, 47%, 11%);
  --text-muted: hsl(215, 16%, 47%);
  --border-color: hsl(214, 32%, 91%);
  --primary-color: hsl(238, 75%, 60%);
  --primary-hover: hsl(238, 75%, 52%);
  --primary-light: hsl(238, 75%, 96%);
  --accent-color: hsl(262, 80%, 60%);
  --danger-color: hsl(0, 72%, 51%);
  --danger-hover: hsl(0, 72%, 45%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sidebar-width: 420px;
}

body.dark-mode {
  /* Dark Mode Palette */
  --bg-color: hsl(222, 47%, 6%);
  --card-bg: hsl(222, 47%, 10%);
  --text-color: hsl(210, 20%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --border-color: hsl(222, 47%, 16%);
  --primary-color: hsl(238, 85%, 66%);
  --primary-hover: hsl(238, 85%, 72%);
  --primary-light: hsl(222, 47%, 14%);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Main Layout Grid */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navbar */
header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  background-color: var(--primary-light);
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

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

.btn-secondary {
  background-color: var(--card-bg);
  color: var(--text-color);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--text-color);
  border-color: var(--text-muted);
  background-color: var(--primary-light);
}

/* Main Dashboard Area */
main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Search and Filters Bar */
.search-filter-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.search-wrapper {
  position: relative;
  display: flex;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.875rem 1.25rem 0.875rem 3.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.filters-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.select-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.select-wrapper {
  position: relative;
}

.filter-select {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.625rem 2.25rem 0.625rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  color: var(--text-color);
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
}

.filter-select:focus {
  border-color: var(--primary-color);
}

.select-wrapper::after {
  content: '↓';
  font-size: 0.75rem;
  color: var(--text-muted);
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.view-controls {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.25rem;
}

.view-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition);
}

.view-btn.active {
  background-color: var(--card-bg);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Stats and Active Filters Row */
.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.active-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-badge {
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.filter-badge button {
  background: transparent;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
}

/* Grid & List Views */
.directory-container {
  min-height: 400px;
}

/* Grid Mode */
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.member-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.member-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: var(--transition);
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* Avatar generator */
.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  flex-shrink: 0;
  text-transform: uppercase;
}

.card-title-wrap {
  min-width: 0;
}

.member-name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-dept {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 0.25rem;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.member-meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.member-meta-item svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

/* List Mode (Table View) */
.directory-list {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.directory-table th, .directory-table td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.directory-table th {
  font-weight: 600;
  color: var(--text-muted);
  background-color: var(--primary-light);
  user-select: none;
}

.directory-table tr {
  cursor: pointer;
  transition: var(--transition);
}

.directory-table tr:hover {
  background-color: var(--primary-light);
}

.table-member-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-member-cell .avatar {
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
}

.table-name-wrap {
  display: flex;
  flex-direction: column;
}

.table-name {
  font-weight: 600;
}

/* Sidebar Profile Drawer (Details View) */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.profile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: var(--sidebar-width);
  height: 100%;
  background-color: var(--card-bg);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.sidebar-overlay.active .profile-sidebar {
  transform: translateX(0);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

.sidebar-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.5rem;
}

.sidebar-info-block {
  width: 100%;
  text-align: left;
  background-color: var(--bg-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.info-val {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.info-val a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-val a:hover {
  text-decoration: underline;
}

.sidebar-actions {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
}

.sidebar-actions button {
  flex: 1;
}

/* Modal styling (for Excel Upload) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-color);
}

.drop-zone.dragover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.drop-zone-icon {
  color: var(--primary-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.drop-zone-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.drop-zone-subtext {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-input {
  display: none;
}

/* Mapping Panel */
.mapping-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mapping-title {
  font-size: 0.875rem;
  font-weight: 600;
}

.mapping-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.mapping-row {
  display: contents;
}

.mapping-label {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Empty State styling */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  background-color: var(--primary-light);
  color: var(--primary-color);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  main {
    padding: 1rem;
    gap: 1rem;
  }
  
  .search-filter-section {
    padding: 1rem;
  }
  
  .filters-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .select-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .select-wrapper, .filter-select {
    width: 100%;
  }
  
  .directory-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-sidebar {
    max-width: 100%;
  }
}

/* Pagination controls */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 1rem 0;
}

.pagination-info {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Google Auth Sign In Styles */
.login-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.3s ease;
}

.login-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  font-weight: 800;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* User profile widget in header */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--primary-light);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
}

@media (max-width: 600px) {
  .user-name {
    display: none;
  }
}

/* Directory Tabs Selector */
.directory-tabs {
  display: inline-flex;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
}

.tab-btn {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-color);
}

.tab-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}



/* Admin Dashboard Layout */
.admin-dashboard-section {
  padding: 2.5rem 1.5rem;
  max-width: 1200px;
  margin: 2rem auto;
  width: 100%;
}

.admin-dashboard-container {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.admin-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.stat-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stat-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  flex: 1;
  justify-content: center;
}

/* Copy protection layout rules for non-admin users */
body.disable-copy {
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
}

/* Cabinet Officer Custom Card Styles */
.member-card.cabinet-officer {
  background-color: #E6E6FA !important;
}

body.dark-mode .member-card.cabinet-officer {
  background-color: hsl(240, 25%, 15%) !important;
}

.member-card.cabinet-officer .member-role {
  font-weight: 700 !important;
}

/* District Chairperson Custom Card Styles */
.member-card.district-chairperson {
  background-color: #E0F2F1 !important;
}

body.dark-mode .member-card.district-chairperson {
  background-color: hsl(170, 25%, 13%) !important;
}

/* ====================================================
   COMPREHENSIVE RESPONSIVE DESIGN (Mobile, Tablet, PC)
   ==================================================== */

/* --- TABLET BREAKPOINT (601px - 1024px) --- */
@media (max-width: 1024px) {
  header {
    padding: 1rem 1.5rem;
  }

  main {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .directory-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .filters-wrapper {
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .select-filters {
    width: 100%;
    justify-content: flex-start;
  }

  .select-wrapper {
    flex: 1;
    min-width: 160px;
  }

  .filter-select {
    width: 100%;
  }

  .view-controls {
    margin-left: auto;
  }
}

/* --- MOBILE BREAKPOINT (<= 600px) --- */
@media (max-width: 600px) {
  header {
    padding: 0.85rem 1rem;
  }

  .brand h1 {
    font-size: 1.05rem;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
  }

  main {
    padding: 1rem;
    gap: 1.25rem;
  }

  .search-filter-section {
    padding: 1rem;
    gap: 1rem;
  }

  .search-input {
    font-size: 0.95rem;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
  }

  .search-icon {
    left: 1rem;
  }

  .directory-tabs {
    width: 100%;
    display: flex;
  }

  .tab-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .filters-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .select-filters {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .select-wrapper {
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }

  .view-controls {
    width: 100%;
    justify-content: center;
  }

  .view-btn {
    flex: 1;
    justify-content: center;
  }

  .stats-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .directory-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .member-card {
    padding: 1.15rem;
  }

  .card-header {
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .avatar {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
  }

  .member-name {
    font-size: 1.05rem;
  }

  .member-role {
    font-size: 0.8rem;
  }

  .pagination-container {
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
    text-align: center;
  }

  .pagination-controls {
    width: 100%;
    justify-content: center;
  }

  .login-card {
    width: 94%;
    padding: 2rem 1.25rem;
  }

  .admin-dashboard-section {
    padding: 1rem;
  }

  .admin-dashboard-container {
    padding: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
    padding: 1.25rem;
  }
}
