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

:root {
  --bg-primary: #0a0f18;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --accent-color: #10b981; /* Emerald Green */
  --accent-color-hover: #059669;
  --accent-blue: #3b82f6; /* Blue secondary */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --backdrop-blur: blur(12px);

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
}

/* Scrollbar Style */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.sidebar-brand {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-brand-title {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

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

.sidebar-close-btn span {
  font-size: 1.35rem;
}

/* Sidebar Mobile Overlay Backdrop */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-brand img,
.sidebar-brand-logo {
  display: block;
  margin: 0 auto;
  height: var(--logo-height, 165px);
  width: auto;
  max-width: var(--logo-max-w, 215px);
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  filter: drop-shadow(1.5px 0 0 #ffffff)
          drop-shadow(-1.5px 0 0 #ffffff)
          drop-shadow(0 1.5px 0 #ffffff)
          drop-shadow(0 -1.5px 0 #ffffff)
          drop-shadow(0 0 3px #ffffff)
          drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.logo-edit-btn:hover {
  background: #2563eb !important;
  transform: scale(1.15) !important;
}

.sidebar-brand-logo:hover {
  transform: scale(1.04);
}

.sidebar-brand h1 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-item i, .menu-item span.material-icons-round {
  font-size: 1.15rem;
  width: 24px;
}

.menu-item:hover, .menu-item.active {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  transform: translateX(4px);
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, rgba(16, 114, 241, 0.05) 100%);
  border-left: 4px solid var(--accent-blue);
  color: #3b82f6;
}

.menu-item.active i, .menu-item.active span.material-icons-round {
  color: #3b82f6;
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* Main Content Area */
.main-content {
  margin-left: 280px;
  flex-grow: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}

/* Top Navigation Bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  gap: 1rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #f3f4f6;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.mobile-menu-btn span.material-icons-round {
  font-size: 1.4rem;
  color: var(--accent-color);
}

.mobile-menu-btn:hover span.material-icons-round,
.mobile-menu-btn:active span.material-icons-round {
  color: #fff;
}

.page-title h2 {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Dashboard Cards Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.3);
}

.stat-info h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-info .stat-value {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-title);
  color: var(--text-primary);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
}

.stat-icon.green {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-color);
}

.stat-icon.blue {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.stat-icon.purple {
  background-color: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

/* Main layouts and cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  transition: var(--transition-smooth);
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Two column section layout for text + images */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
}

.section-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.section-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.section-image-container:hover img {
  transform: scale(1.03);
}

.image-overlay-edit-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(4px);
  color: var(--accent-color) !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.image-overlay-edit-btn:hover {
  background-color: var(--accent-color) !important;
  color: white !important;
  transform: scale(1.1);
}

/* Photo Gallery styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background-color: rgba(31, 41, 55, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: var(--transition-smooth);
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.gallery-img-container {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}

.gallery-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-img-container img {
  transform: scale(1.05);
}

.gallery-caption {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  border-top: 1px solid var(--glass-border);
  background-color: var(--bg-secondary);
}

/* Static card image for logistics */
.static-card-image {
  aspect-ratio: 16/11;
}

/* Tab contents conditional display */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

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

/* Team section styles */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.member-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: var(--transition-smooth);
}

.member-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
}

.member-photo-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  object-fit: cover;
  margin-bottom: 1.25rem;
}

.member-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3px solid var(--accent-color);
  background-color: var(--bg-tertiary);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-secondary);
  overflow: hidden;
}

.member-name {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.member-role {
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.member-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.tag {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}

/* Participants Table section styling */
.search-bar-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input {
  flex-grow: 1;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-smooth);
}

.search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.filter-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.data-table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.data-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Charts and stats section */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
  margin-top: 1rem;
}

.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Nucleus Staff Grid & Cards */
#nucleus-staff-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.nucleus-staff-member-card {
  text-align: center;
  padding: 1rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  transition: var(--transition-smooth);
}

.nucleus-staff-member-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* Nucleus Charts Grid & Cards */
.nucleus-charts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.nucleus-chart-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1rem;
  height: 300px;
  display: flex;
  flex-direction: column;
}

/* Reports Section */
.reports-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reports-filter-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.report-chart-card {
  height: 500px;
  padding: 2rem;
}

/* Participants Section */
.participants-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.participants-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Shared Header Flex Layouts */
.card-header-flex,
.nucleus-detail-header-bar,
.folder-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.folder-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Material Inventory Tracking styles */
.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.inventory-item {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
}

.inv-details {
  flex-grow: 1;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.inv-title {
  font-weight: 600;
  font-family: var(--font-title);
}

.inv-status {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.inv-status.delivered {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-color);
}

.inv-status.pending {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 4px;
  width: 0;
  transition: width 1s ease-out;
}

/* Document section styles */
.docs-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.doc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: var(--transition-smooth);
}

.doc-card:hover {
  border-color: #3b82f6;
  transform: translateY(-3px);
}

.doc-info {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.doc-icon {
  font-size: 2.25rem;
}

.doc-icon.docx { color: #2b579a; }
.doc-icon.xlsx { color: #217346; }
.doc-icon.pdf { color: #f40f02; }
.doc-icon.image { color: #e91e63; }

.doc-meta {
  flex-grow: 1;
}

.doc-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.doc-size {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.doc-action-btn {
  width: 100%;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.6rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.doc-action-btn:hover {
  background-color: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* Custom visual cards for sleep quality section */
.sleep-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.sleep-metric-card {
  background-color: rgba(31, 41, 55, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.sleep-metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #a78bfa;
  margin-bottom: 0.25rem;
}

.sleep-metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* -------------------------------------------------- */
/* ADMIN STYLING ADDITIONS                            */
/* -------------------------------------------------- */

/* Top Admin bar when logged in */
.admin-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(90deg, #0f172a 0%, #1e1b4b 100%);
  border-bottom: 2px solid var(--accent-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

.admin-bar-content {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-bar-content span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-logout-btn {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.admin-logout-btn:hover {
  background-color: #dc2626;
}

/* Shift main layout down slightly if admin bar is active */
body.admin-mode-active {
  margin-top: 50px;
}
body.admin-mode-active .sidebar {
  height: calc(100vh - 50px);
  top: 50px;
}
body.admin-mode-active .main-content {
  height: calc(100vh - 50px);
}

/* Password change menu item - only visible when logged in */
#change-pass-li {
  display: none !important;
}
body.admin-mode-active #change-pass-li {
  display: block !important;
}

/* Edit action buttons */
.edit-btn, .delete-btn, .add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.edit-btn {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.4rem;
  border-radius: 8px;
}
.edit-btn:hover {
  background-color: #3b82f6;
  color: white;
}

.delete-btn {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.4rem;
  border-radius: 8px;
}
.delete-btn:hover {
  background-color: #ef4444;
  color: white;
}

.add-btn {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  gap: 6px;
}
.add-btn:hover {
  background-color: var(--accent-color);
  color: white;
}

/* Home Admin Edit Pencil Buttons */
.home-admin-btn,
#edit-general-btn,
#edit-about-btn,
#edit-about-image-btn,
#edit-objectives-btn,
#edit-timeline-btn,
#add-gallery-btn {
  display: none !important;
}

body.admin-mode-active .home-admin-btn,
body.admin-mode-active #edit-general-btn,
body.admin-mode-active #edit-about-btn,
body.admin-mode-active #edit-about-image-btn,
body.admin-mode-active #edit-objectives-btn,
body.admin-mode-active #edit-timeline-btn,
body.admin-mode-active #add-gallery-btn,
body.can-edit-home .home-admin-btn,
body.can-edit-home #edit-general-btn,
body.can-edit-home #edit-about-btn,
body.can-edit-home #edit-about-image-btn,
body.can-edit-home #edit-objectives-btn,
body.can-edit-home #edit-timeline-btn,
body.can-edit-home #add-gallery-btn {
  display: inline-flex !important;
}

.home-admin-btn {
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18) !important;
  border: 1px solid rgba(59, 130, 246, 0.45) !important;
  color: #93c5fd !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.home-admin-btn:hover {
  background: #3b82f6 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Inline admin action floats for list items */
.admin-actions-inline {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 8px;
  z-index: 10;
}

/* Modals Overlay (glassmorphic fullscreen overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(6, 9, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.5rem 1rem;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex;
  animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Card */
.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  padding: 1.75rem 2rem;
  position: relative;
  margin: auto;
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-card.editor-modal-card {
  max-width: 620px;
}

.modal-card::-webkit-scrollbar {
  width: 6px;
}
.modal-card::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

@keyframes scaleUp {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.75rem;
  position: sticky;
  top: -1.75rem;
  margin-top: -0.5rem;
  padding-top: 0.5rem;
  background: var(--bg-secondary);
  z-index: 10;
}

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}
.modal-close:hover {
  color: #ef4444;
}

/* Forms styling inside modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: #3b82f6;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.modal-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.85rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
  transition: var(--transition-smooth);
}

.modal-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

/* Responsive elements */
@media (max-width: 991px) {
  .mobile-menu-btn {
    display: inline-flex !important;
  }
  .sidebar-close-btn {
    display: inline-flex !important;
  }
  .sidebar {
    width: min(300px, 85vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 99999 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.9) !important;
    background-color: #111827 !important;
  }
  .sidebar.active {
    transform: translateX(0) !important;
  }
  .sidebar-brand h1 {
    display: block;
  }
  .sidebar-footer {
    display: block;
  }
  .menu-item {
    justify-content: flex-start;
    padding: 0.85rem 1rem;
  }
  .menu-item span {
    display: inline-block;
  }
  .menu-item span.material-icons-round {
    display: inline-flex;
  }
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding: 0.85rem !important;
    height: 100vh;
    height: 100dvh;
  }
  
  body.admin-mode-active .sidebar {
    top: 50px;
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
  }

  #change-pass-li {
    display: none !important;
  }
  body.admin-mode-active #change-pass-li {
    display: block !important;
  }

  .top-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: rgba(10, 15, 24, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    padding: 0.75rem 0.5rem !important;
    margin-bottom: 1.25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  .top-bar-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
  }
  .page-title {
    min-width: 0 !important;
    flex-grow: 1 !important;
  }
  .page-title h2 {
    font-size: 1.1rem !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  .page-title p {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    margin: 2px 0 0 0 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .card {
    padding: 1.25rem 1rem !important;
    margin-bottom: 1.25rem !important;
  }
  .grid-2col {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .team-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  #nucleus-staff-container {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .nucleus-staff-member-card {
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
  }
  .nucleus-header-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .nucleus-header-grid .nucleus-cover-container,
  .nucleus-cover-container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/10 !important;
    margin: 0 auto !important;
  }
  .nucleus-header-grid .dashboard-grid,
  .nucleus-metric-cards {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    gap: 1rem !important;
  }
  .nucleus-info-columns {
    flex-direction: column !important;
    gap: 12px !important;
  }
  .nucleus-charts-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .nucleus-chart-card {
    height: 280px !important;
  }
  .reports-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 14px !important;
  }
  .reports-filter-wrapper {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    width: 100% !important;
  }
  #reports-nucleus-filter {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .report-chart-card {
    height: auto !important;
    min-height: 380px !important;
    padding: 1.25rem 0.85rem !important;
  }
  .report-chart-card .chart-container {
    height: 280px !important;
    width: 100% !important;
  }
  .participants-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .participants-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .participants-actions .add-btn {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
  .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .data-table {
    min-width: 600px !important;
  }
  .card-header-flex {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .card-header-flex .add-btn {
    align-self: flex-start !important;
  }
  .nucleus-detail-header-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 1.5rem !important;
  }
  .folder-header-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 1.5rem !important;
  }
  .folder-actions {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .folder-actions .add-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  .section-image-container {
    height: 220px !important;
  }
  .search-bar-container {
    flex-direction: column !important;
    gap: 10px !important;
  }
  .search-input,
  .filter-select {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nuclei-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
    gap: 12px !important;
  }
  .folder-card {
    padding: 1rem 0.75rem !important;
  }
  .folder-icon {
    font-size: 2.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .folder-name {
    font-size: 0.85rem !important;
  }
  .folder-files-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .modal-overlay {
    padding: 1rem 0.5rem !important;
    align-items: flex-start !important;
  }
  .modal-card {
    width: 100% !important;
    max-width: calc(100vw - 1rem) !important;
    padding: 1.25rem 1rem !important;
    max-height: calc(100vh - 2rem) !important;
    max-height: calc(100dvh - 2rem) !important;
    overflow-y: auto !important;
    margin: auto !important;
  }
  .modal-card .modal-header {
    top: -1.25rem !important;
    padding-top: 0.25rem !important;
  }
}

@media (max-width: 576px) {
  .admin-bar {
    padding: 0 0.75rem;
    overflow-x: auto;
  }
  .admin-bar-content {
    min-width: max-content;
    gap: 10px;
  }
  .user-profile .profile-name {
    display: none !important;
  }
}

/* -------------------------------------------------- */
/* MULTI-NUCLEI FOLDERS & DIRECTORY STYLES           */
/* -------------------------------------------------- */

.nuclei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.folder-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.folder-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-blue);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.folder-icon {
  font-size: 3.5rem;
  color: #fbbf24; /* Amber Folder Color */
  margin-bottom: 0.75rem;
  transition: var(--transition-smooth);
}

.folder-card:hover .folder-icon {
  transform: scale(1.08);
  color: #f59e0b;
}

.folder-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.folder-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Folder Files Grid View */
.folder-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.file-preview-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  position: relative;
}

.file-preview-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.file-thumb-container {
  width: 100%;
  aspect-ratio: 16/10;
  background-color: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}

.file-thumb-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-info-bar {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.file-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Floating Scroll To Top Button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-color);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background-color 0.2s ease;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top-btn:hover {
  background: #059669;
  transform: translateY(-2px);
}

.scroll-to-top-btn .material-icons-round {
  font-size: 1.5rem;
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
  max-width: 90vw;
  width: 420px;
}

.toast-item {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 10px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--accent-blue);
  animation: toastFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-item.success {
  border-left-color: var(--accent-color);
}

.toast-item.error {
  border-left-color: #ef4444;
}

.toast-item.info {
  border-left-color: var(--accent-blue);
}

.toast-item.hide {
  opacity: 0;
  transform: translateY(12px);
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .sidebar,
  .top-bar,
  .sidebar-overlay,
  .mobile-menu-btn,
  .scroll-to-top-btn,
  .toast-container,
  #print-reports-btn,
  .reports-filter-wrapper,
  .modal-overlay,
  .edit-btn,
  .add-btn,
  .admin-only-folder {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }
  .card, .stat-card, .report-chart-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
  }
  .card-title, h1, h2, h3, h4 {
    color: #0f172a !important;
  }
  p, span, td, th {
    color: #334155 !important;
  }
  .chart-container canvas {
    max-width: 100% !important;
  }
}

/* Attendance Status Button Styles */
.attendance-status-btn {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  font-family: inherit;
}
.attendance-status-btn:hover {
  filter: brightness(1.2);
}
.attendance-status-btn:active {
  transform: scale(0.94);
}

/* ==================================================
   CONTROLE & AUDITORIA DE SUPERVISORES
   ================================================== */
.control-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.control-kpi-card {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}
.control-kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
}

.control-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.control-kpi-info {
  display: flex;
  flex-direction: column;
}
.control-kpi-value {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}
.control-kpi-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}
.status-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
}
.status-pill.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.status-pill.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #3b82f6;
}
.status-pill.neutral {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.control-supervisor-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.control-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  flex-shrink: 0;
}

/* Activity Timeline */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: var(--transition-smooth);
  flex-wrap: wrap;
  gap: 10px;
}
.activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}
.activity-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  flex: 1;
}
.activity-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .activity-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .activity-item-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* Ranking & Activity Performance */
.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.ranking-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rank-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
}
.rank-card:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}
.rank-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rank-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.rank-number.gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}
.rank-number.silver {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  color: white;
}
.rank-number.bronze {
  background: linear-gradient(135deg, #b45309, #78350f);
  color: white;
}
.rank-number.alert {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
}

.score-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}
.score-bar-fill.high {
  background: linear-gradient(90deg, #10b981, #059669);
}
.score-bar-fill.medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.score-bar-fill.low {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.orientation-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.tab-filter-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.tab-filter-btn.active, .tab-filter-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue);
  color: #93c5fd;
}

/* Super Admin Controle Visibility Guarantee */
body.is-super-admin #controle-admin-bar-btn {
  display: inline-flex !important;
}
body.is-super-admin #controle-sidebar-li {
  display: block !important;
}

/* Sidebar Tutorial Button - Only visible when logged in */
#sidebar-tutorial-btn {
  display: none !important;
}
body.admin-mode-active #sidebar-tutorial-btn {
  display: inline-flex !important;
}

/* Module Manager Modal & Toggle Switches */
.modules-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 6px;
}

.module-toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: all 0.25s ease;
  gap: 16px;
}

.module-toggle-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.module-toggle-card.module-card-disabled {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.04);
}

.module-toggle-card.module-card-enabled {
  border-left: 4px solid #10b981;
}

.module-info {
  flex: 1;
}

.module-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.module-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.module-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.module-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-status-badge.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.module-status-badge.badge-inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Custom iOS/Material Switch Toggle */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.switch-toggle input:checked + .switch-slider {
  background-color: #10b981;
  border-color: #059669;
}

.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(23px);
}

.module-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 1.25rem 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Home editing buttons */
.home-admin-btn,
#edit-general-btn,
#edit-about-btn,
#edit-about-image-btn,
#edit-objectives-btn,
#edit-timeline-btn,
#add-gallery-btn {
  display: none !important;
}

body.admin-mode-active .home-admin-btn,
body.admin-mode-active #edit-general-btn,
body.admin-mode-active #edit-about-btn,
body.admin-mode-active #edit-about-image-btn,
body.admin-mode-active #edit-objectives-btn,
body.admin-mode-active #edit-timeline-btn,
body.admin-mode-active #add-gallery-btn,
body.can-edit-home .home-admin-btn,
body.can-edit-home #edit-general-btn,
body.can-edit-home #edit-about-btn,
body.can-edit-home #edit-about-image-btn,
body.can-edit-home #edit-objectives-btn,
body.can-edit-home #edit-timeline-btn,
body.can-edit-home #add-gallery-btn {
  display: inline-flex !important;
}


