@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: 2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-brand img {
  height: 40px;
  border-radius: 8px;
}

.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);
}

.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);
}

.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(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* 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);
}

/* 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;
}

/* 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;
  background-color: rgba(6, 9, 17, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: center;
}

.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: 450px;
  padding: 2rem;
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

@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.5rem;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.75rem;
}

.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) {
  .sidebar {
    width: 80px;
  }
  .sidebar-brand h1, .sidebar-footer {
    display: none;
  }
  .sidebar-brand {
    justify-content: center;
    padding: 1.5rem 0.5rem;
  }
  .menu-item span {
    display: none;
  }
  .menu-item {
    justify-content: center;
    padding: 0.85rem;
  }
  .main-content {
    margin-left: 80px;
    padding: 1.5rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .main-content {
    padding: 1rem;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .search-bar-container {
    flex-direction: column;
  }
}
