.admin-page {
  background: white;
  padding: 0;
  min-height: 100vh;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles - Same as Account Page */
.admin-sidebar {
  width: 280px;
  background: white;
  border-right: 1px solid #e9ecef;
  padding: 0;
  flex-shrink: 0;
  min-height: 100vh;
}

.admin-sidebar .sidebar-header {
  padding: 30px 25px 20px 25px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
}

.admin-sidebar .sidebar-header h2 {
  margin: 0;
  color: #343a40;
  font-size: 1.5em;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
}

.admin-sidebar .sidebar-nav {
  padding: 20px 0;
}

.admin-sidebar .nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 15px 25px;
  border: none;
  background: none;
  text-align: left;
  font-size: 1em;
  color: #2f2d2d;
  cursor: pointer;
  font-family: 'Crimson Text', 'Georgia', serif;
  gap: 12px;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  transition: none;
}

.admin-sidebar .nav-item:hover {
  background: #f8f9fa;
  color: #1a1818;
  box-shadow: none;
  transform: none;
}

.admin-sidebar .nav-item.active {
  background: #2f2d2d;
  color: white;
  box-shadow: none;
  transform: none;
}

.admin-sidebar .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-sidebar .nav-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.admin-sidebar .nav-item.active .nav-icon svg {
  stroke: white;
}

.admin-sidebar .sidebar-divider {
  height: 1px;
  background: #e9ecef;
  margin: 15px 25px;
}

/* Content Area Styles */
.admin-content {
  flex: 1;
  background: white;
  padding: 60px;
  min-height: 100vh;
  width: 100%;
}

/* Center only the user management section */
.admin-content[data-section="users"] {
  margin-left: 400px;
  margin-right: 400px;
  width: 1400px;
}

/* Ensure user tables maintain consistent width */
.admin-content[data-section="users"] .admin-table {
  width: 100%;
  min-width: 1300px;
}

.admin-content[data-section="users"] .section-body {
  width: 100%;
  overflow-x: auto;
}

/* Center the admin dashboard with different margins */
.admin-content[data-section="dashboard"] {
  margin-left: 570px;
  margin-right: 570px;
}

/* Center the admin logs section with reduced margins */
.admin-content[data-section="logs"] {
  margin-left: 430px;
  margin-right: 430px;
}

/* Increase logs table width */
.admin-content[data-section="logs"] .admin-table {
  width: 100%;
  min-width: 1200px;
}

.admin-content[data-section="logs"] .logs-table-container {
  width: 100%;
  overflow-x: auto;
}

/* Reduce space between filters and table */
.admin-content[data-section="logs"] .logs-filters {
  margin-bottom: 10px;
}

/* Position refresh button to the right */
.admin-content[data-section="logs"] .table-controls {
  position: relative;
  padding-right: 100px;
}

.admin-content[data-section="logs"] .refresh-logs-btn {
  position: absolute;
  right: -300px;
  top: 0;
}

/* Ensure dashboard cards maintain their original size */
.admin-content[data-section="dashboard"] .dashboard-cards-grid {
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  min-width: 900px;
}

.admin-content[data-section="dashboard"] .admin-cards {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  min-width: 900px;
}

.content-section {
  max-width: none;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 30px;
}

.section-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #6c757d;
}

.section-header h1 {
  margin: 0 0 8px 0;
  color: #343a40;
  font-size: 2em;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 700;
}

.section-header p {
  margin: 0;
  color: #2f2d2d;
  font-size: 1.1em;
  line-height: 1.4;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 500;
}

.section-body {
  padding: 0;
  width: 100%;
  max-width: none;
}

.content-section {
  width: 100%;
  max-width: none;
}

/* Dashboard Cards Grid - Force horizontal layout */
.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
  max-width: none;
}

/* Admin Cards */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
  max-width: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.admin-card {
  background: #f8f9fa;
  padding: 45px 30px;
  border-radius: 0;
  border: 1px solid #e9ecef;
}

.admin-card h4 {
  margin: 0 0 15px 0;
  color: #2f2d2d;
  font-size: 1.1em;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
}

.stat-number {
  font-size: 2em;
  font-weight: bold;
  color: #2f2d2d;
  margin: 10px 0;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.stat-indicator {
  font-size: 1.2em;
  font-weight: 600;
  color: #2f2d2d;
  margin: 10px 0;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.stat-indicator.healthy {
  color: #28a745;
}

.admin-card p {
  margin: 0;
  color: #2f2d2d;
  font-size: 0.9em;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.stat-breakdown, .action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.stat-row span:first-child {
  color: #2f2d2d;
  font-weight: 500;
}

.stat-row span:last-child {
  color: #2f2d2d;
  font-weight: 600;
}

/* Action Sections */
.system-actions, .content-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.system-actions h3, .content-actions h3 {
  margin: 0 0 15px 0;
  color: #2f2d2d;
  font-size: 1.2em;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.admin-button {
  padding: 12px 20px;
  border: 1px solid #2f2d2d;
  border-radius: 0;
  background: white;
  color: #2f2d2d;
  cursor: pointer;
  font-weight: 500;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-size: 1em;
  transition: all 0.2s ease;
  text-decoration: none;
}

.admin-button:hover {
  background: #2f2d2d !important;
  color: white !important;
  border-color: #2f2d2d !important;
  box-shadow: none !important;
  opacity: 0.8;
  transform: translateY(-1px);
}

.admin-button.primary {
  background: #2f2d2d;
  color: white;
  border-color: #2f2d2d;
}

.admin-button.primary:hover {
  background: #1a1818 !important;
  box-shadow: none !important;
  opacity: 0.8;
  transform: translateY(-1px);
}

.admin-button.warning {
  background: #ffc107;
  color: #212529;
  border-color: #ffc107;
}

.admin-button.warning:hover {
  box-shadow: none !important;
  opacity: 0.8;
  transform: translateY(-1px);
}

/* Settings Styles */
.settings-group {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.settings-group:last-child {
  border-bottom: none;
}

.settings-group h3 {
  margin: 0 0 15px 0;
  color: #343a40;
  font-size: 1.2em;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
}

.setting-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
}

.setting-item label {
  font-weight: 600;
  color: #343a40;
  font-family: 'Crimson Text', 'Georgia', serif;
  min-width: 150px;
}

.setting-item input[type="checkbox"] {
  transform: scale(1.2);
}

.setting-description {
  color: #2f2d2d;
  font-size: 0.9em;
  font-style: italic;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.settings-actions {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 15px;
}

/* Messages */
.admin-message {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.admin-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.admin-message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.admin-message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.admin-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.loading-message {
  text-align: center;
  padding: 40px;
  color: #2f2d2d;
  font-family: 'Crimson Text', 'Georgia', serif;
}

.stat-number.alert {
  color: #dc3545 !important;
  background: rgba(220, 53, 69, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Projects Tab Styles */
.projects-header {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.projects-summary-centered {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.summary-stat-horizontal {
  text-align: center;
}

.stat-number-crimson {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: #2f2d2d !important;
  font-family: 'Crimson Text', 'Georgia', serif;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label-crimson {
  display: block;
  font-size: 0.9rem;
  color: #2f2d2d !important;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.back-button-container-top-right {
  flex-shrink: 0;
}

/* Make all project text use Crimson Text font */
.projects-detailed-view h4,
.projects-detailed-view h3,
.projects-detailed-view th,
.projects-detailed-view td,
.projects-detailed-view .project-title,
.projects-detailed-view .project-info,
.projects-section h4,
.projects-section h3,
.no-memberships p,
.memberships-management-view h4,
.memberships-management-view h3,
.memberships-management-view th,
.memberships-management-view td,
.memberships-section h4,
.memberships-section h3,
.project-members-view h4,
.project-members-view h3,
.project-members-view h5,
.project-members-view th,
.project-members-view td,
.members-section h4,
.members-section h3,
.no-projects p,
.no-members p,
.project-members-card .member-name,
.project-members-card .member-email,
.project-members-card .member-role,
.project-members-card .member-status {
  color: #2f2d2d !important;
  font-family: 'Crimson Text', 'Georgia', serif;
}

/* Project title larger font size */
.project-members-view h5,
.project-header h5 {
  font-size: 1.5rem !important;
  font-weight: bold !important;
}

