/* ==========================================================================
   EcoWeek Design System & Variables
   ========================================================================== */

:root {
  /* Colors */
  --bg-color: #0c120f;
  --bg-decor-1: #1b4332;
  --bg-decor-2: #081c15;
  --panel-bg: rgba(26, 46, 36, 0.45);
  --panel-border: rgba(82, 183, 136, 0.15);
  --panel-border-focus: rgba(82, 183, 136, 0.4);
  
  --text-primary: #f4f7f5;
  --text-secondary: #a9beae;
  --text-muted: #728b78;
  
  --primary: #52b788;
  --primary-hover: #74c69d;
  --primary-glow: rgba(82, 183, 136, 0.3);
  --primary-dark: #2d6a4f;
  
  --accent-gold: #ffb703;
  --accent-silver: #e0e1dd;
  --accent-bronze: #cd7f32;
  
  --success: #52b788;
  --danger: #ff4d4d;
  --danger-hover: #ff3333;
  --danger-glow: rgba(255, 77, 77, 0.2);
  --warning: #ffb703;
  
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 24px;
}

/* Light mode overrides (Can be enabled via system preference) */
@media (prefers-color-scheme: light) {
  :root {
    --bg-color: #f3f7f4;
    --bg-decor-1: #d8f3dc;
    --bg-decor-2: #b7e4c7;
    --panel-bg: rgba(255, 255, 255, 0.85);
    --panel-border: rgba(45, 106, 79, 0.12);
    --panel-border-focus: rgba(45, 106, 79, 0.4);
    
    --text-primary: #1b4332;
    --text-secondary: #40634f;
    --text-muted: #6b8f79;
    
    --primary: #2d6a4f;
    --primary-hover: #1b4332;
    --primary-glow: rgba(45, 106, 79, 0.25);
    --primary-dark: #1b4332;
    
    --card-shadow: 0 8px 32px 0 rgba(45, 106, 79, 0.08);
  }

  .btn-primary {
    background: var(--primary);
    color: #ffffff !important;
  }

  .btn-primary:focus,
  .btn-primary:active {
    background: var(--primary);
    color: #ffffff !important;
  }

  @media (hover: hover) {
    .btn-primary:hover {
      background: var(--primary-hover);
      color: #ffffff !important;
    }
  }
}

/* ==========================================================================
   Base & Reset Styles
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 2rem 1rem;
}

h1, h2, h3, .brand-text h1, .card-title-group h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Background Decorative Blobs */
.decor-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.orb-1 {
  width: 40vw;
  height: 40vw;
  background: var(--bg-decor-1);
  top: -10vw;
  right: -10vw;
}

.orb-2 {
  width: 35vw;
  height: 35vw;
  background: var(--bg-decor-2);
  bottom: -5vw;
  left: -5vw;
  animation-delay: -5s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(82, 183, 136, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -40px) scale(1.1); }
}

/* ==========================================================================
   Typography & Helpers
   ========================================================================== */

.hidden {
  display: none !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   App Containers & Layout
   ========================================================================== */

.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - 4rem);
}

/* Header Styling */
.app-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  gap: 1.5rem;
}

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

.brand-icon {
  font-size: 2rem;
  color: var(--primary);
  background: rgba(82, 183, 136, 0.15);
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 15px var(--primary-glow);
  animation: leafPulse 3s ease-in-out infinite alternate;
}

@keyframes leafPulse {
  0% { transform: scale(1); box-shadow: 0 0 15px var(--primary-glow); }
  100% { transform: scale(1.05); box-shadow: 0 0 25px rgba(82, 183, 136, 0.5); }
}

.brand-text h1 {
  font-size: 1.6rem;
  color: var(--text-primary);
}

.brand-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
}

.header-nav {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.35rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--panel-border);
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
}

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

.nav-tab-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Views Display */
.app-main {
  width: 100%;
  flex: 1;
}

.app-view {
  width: 100%;
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.app-view.active-view {
  display: block;
}

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

/* ==========================================================================
   Premium Cards Layout
   ========================================================================== */

.grid-card {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

.grid-card:hover {
  border-color: var(--panel-border-focus);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1.2rem;
}

.card-icon {
  font-size: 1.2rem;
  color: var(--primary);
  width: 38px;
  height: 38px;
  background: rgba(82, 183, 136, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--panel-border);
}

.card-title-group h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.card-title-group p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Dashboard Grid Template */
.dashboard-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 4.5fr 5.5fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   Buttons & Form Controls
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-dark);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(45, 106, 79, 0.25);
}

.btn-primary:focus,
.btn-primary:active {
  background: var(--primary-dark);
  color: #ffffff !important;
  outline: none;
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--primary);
    color: #0c120f !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 183, 136, 0.4);
  }
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--panel-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

.btn-danger {
  background: rgba(255, 77, 77, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.icon-btn:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Custom Dropdown Select styling */
.select-wrapper {
  position: relative;
}

.select-arrow {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: var(--transition-smooth);
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
}

select:focus + .select-arrow {
  color: var(--primary);
  transform: translateY(-50%) rotate(180deg);
}

/* Date Picker Wrapper */
.date-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-icon {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  z-index: 1;
}

input[type="date"] {
  width: 100%;
  padding: 0.8rem 1rem; /* Matched to text inputs padding */
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 44px; /* Fix iOS vertical alignment alignment */
  color-scheme: dark; /* Force native iOS/Android picker popover into dark mode */
}

@media (prefers-color-scheme: light) {
  input[type="date"] {
    color-scheme: light;
  }
}

input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  color: transparent;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  z-index: 2; /* Float above everything to catch tap inputs */
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button {
  -webkit-appearance: none;
  display: none;
}

/* Points Badge Preview */
.points-badge-preview {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  background: rgba(82, 183, 136, 0.15);
  border: 1px solid rgba(82, 183, 136, 0.3);
  color: var(--primary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
  animation: badgeIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes badgeIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Custom Searchable Dropdown for Staff */
.custom-select-container {
  position: relative;
}

.custom-select-trigger {
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
  min-width: 0;
}

#staff-selected-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
  margin-right: 0.5rem;
  min-width: 0;
}

.custom-select-trigger:hover {
  border-color: var(--text-muted);
}

.custom-select-trigger.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.custom-select-trigger .placeholder {
  color: var(--text-muted);
}

.custom-select-dropdown {
  position: absolute;
  top: 105%;
  left: 0;
  width: 100%;
  background: var(--bg-color);
  border: 1px solid var(--panel-border-focus);
  border-radius: var(--border-radius-md);
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  max-height: 250px;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-5px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.custom-select-container.open .custom-select-dropdown {
  display: flex;
}

.custom-select-container.open .custom-select-trigger i {
  transform: rotate(180deg);
  color: var(--primary);
}

.select-search-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.3);
}

.select-search-wrapper i {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.select-search-wrapper input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 0.4rem;
  width: 100%;
  outline: none;
}

.select-options-list {
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.select-options-list li {
  padding: 0.7rem 1.1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-options-list li:hover {
  background: rgba(82, 183, 136, 0.15);
  color: var(--primary);
}

.select-options-list li.no-matches {
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
  padding: 1rem;
  pointer-events: none;
}

/* ==========================================================================
   Evidence Upload Components
   ========================================================================== */

.upload-zone {
  border: 2px dashed var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 1.8rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.upload-zone:hover {
  border-color: var(--primary);
  background: rgba(82, 183, 136, 0.04);
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.cloud-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.upload-zone:hover .cloud-icon {
  color: var(--primary);
  transform: translateY(-4px);
}

.upload-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.upload-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.upload-size-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.upload-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  position: relative;
  width: 100%;
}

.media-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--panel-border-focus);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.preview-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.78rem;
}

.preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  max-width: 70%;
}

.btn-remove-file {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem;
  transition: var(--transition-smooth);
}

.btn-remove-file:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   Event Statistics Strip
   ========================================================================== */

.event-stats-strip {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--border-radius-md);
  padding: 1rem;
  border: 1px solid var(--panel-border);
  align-items: center;
  justify-content: space-around;
  margin-bottom: 0.5rem;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
}

.stat-val .unit {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 0.15rem;
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--panel-border);
}

/* ==========================================================================
   Leaderboard Podium
   ========================================================================== */

.podium-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.5rem 0.5rem 0.5rem;
  min-height: 220px;
}

.podium-card {
  flex: 1 1 0px; /* Use flex-basis 0px to force equal column widths regardless of children */
  max-width: 33%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, rgba(82, 183, 136, 0.06), rgba(82, 183, 136, 0.02));
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 1rem 0.5rem 0.8rem;
  position: relative;
  transition: var(--transition-smooth);
  min-width: 0;
}

.podium-card:hover {
  transform: translateY(-5px);
  border-color: var(--panel-border-focus);
}

/* Rank heights for podium visual structure */
.podium-card.rank-1 {
  height: 190px;
  order: 2;
  border-color: rgba(255, 183, 3, 0.3);
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.08), rgba(0, 0, 0, 0.2));
}

.podium-card.rank-2 {
  height: 165px;
  order: 1;
  border-color: rgba(224, 225, 221, 0.3);
  background: linear-gradient(135deg, rgba(224, 225, 221, 0.05), rgba(0, 0, 0, 0.2));
}

.podium-card.rank-3 {
  height: 150px;
  order: 3;
  border-color: rgba(205, 127, 50, 0.3);
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.05), rgba(0, 0, 0, 0.2));
}

.podium-crown {
  position: absolute;
  top: -12px;
  font-size: 1.2rem;
}

.rank-1 .podium-crown { color: var(--accent-gold); filter: drop-shadow(0 0 6px var(--accent-gold)); }
.rank-2 .podium-crown { color: var(--accent-silver); }
.rank-3 .podium-crown { color: var(--accent-bronze); }

.podium-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  border: 2px solid var(--panel-border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  margin-bottom: 0.6rem;
  background: #2a6f4e; /* Default avatar background */
}

.rank-1 .podium-avatar { border-color: var(--accent-gold); background: linear-gradient(135deg, #f4a261, #e76f51); }
.rank-2 .podium-avatar { border-color: var(--accent-silver); background: linear-gradient(135deg, #a8dadc, #457b9d); }
.rank-3 .podium-avatar { border-color: var(--accent-bronze); background: linear-gradient(135deg, #dda15e, #bc6c25); }

.podium-name {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  width: 100%;
  padding: 0 4px;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  height: 2.3em;
  overflow: hidden;
  box-sizing: border-box;
}

.podium-pts {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.25rem;
  font-family: 'Outfit', sans-serif;
}

.rank-1 .podium-pts { color: var(--accent-gold); }

.podium-label-badge {
  position: absolute;
  bottom: -10px;
  background: var(--bg-color);
  border: 1px solid var(--panel-border);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.rank-1 .podium-label-badge { border-color: var(--accent-gold); color: var(--accent-gold); }

/* ==========================================================================
   Leaderboard Rows (Rank 4-10)
   ========================================================================== */

.leaderboard-list-container {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}

.list-headers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr) minmax(0, 3fr) minmax(0, 1.5fr);
  padding: 0.6rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--panel-border);
}

.leaderboard-rows-wrapper {
  display: flex;
  flex-direction: column;
  max-height: 380px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr) minmax(0, 3fr) minmax(0, 1.5fr);
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(82, 183, 136, 0.05);
  transition: var(--transition-smooth);
}

.leaderboard-row:hover {
  background: rgba(82, 183, 136, 0.04);
}

.row-rank {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.row-name-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  width: 100%;
}

.row-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  background: #3e5c4a;
  flex-shrink: 0;
}

.row-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.row-progress-container {
  padding-right: 1.5rem;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--primary-glow);
}

.row-points {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-align: right;
  font-family: 'Outfit', sans-serif;
}

.no-rows-msg {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  font-size: 0.9rem;
}

/* ==========================================================================
   Admin Authentication Portal (PIN)
   ========================================================================== */

.auth-card {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-icon {
  font-size: 2.2rem;
  color: var(--primary);
  width: 68px;
  height: 68px;
  background: rgba(82, 183, 136, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
}

.auth-card h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
}

.auth-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pin-display {
  display: flex;
  gap: 1rem;
  margin: 0.5rem 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--panel-border);
  background: transparent;
  transition: var(--transition-smooth);
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transform: scale(1.1);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  width: 100%;
  max-width: 280px;
}

.keypad-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  outline: none;
}

.keypad-btn:hover {
  background: rgba(82, 183, 136, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.keypad-btn:active {
  background: var(--primary);
  color: #0c120f;
}

.keypad-btn.btn-clear {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.keypad-btn.btn-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 77, 77, 0.1);
}

.keypad-btn.btn-exit {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.keypad-btn.btn-exit:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.pin-error-text {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.4rem;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ==========================================================================
   Admin Console Layout
   ========================================================================== */

.admin-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2rem;
  min-height: 550px;
}

@media (max-width: 800px) {
  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Admin Sidebar */
.admin-sidebar {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1rem;
}

.admin-avatar {
  font-size: 1.3rem;
  color: var(--primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(82, 183, 136, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--panel-border);
}

.admin-info h3 {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-admin {
  background: rgba(82, 183, 136, 0.15);
  color: var(--primary);
  border: 1px solid var(--primary);
  margin-top: 0.15rem;
}

.badge-counter {
  background: var(--danger);
  color: white;
  border-radius: 10px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
}

.admin-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
}

.admin-tab-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.admin-tab-btn.active {
  background: rgba(82, 183, 136, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding-left: 0.8rem;
}

.logout-btn {
  width: 100%;
}

/* Admin Content Panels */
.admin-content {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  padding: 2.2rem;
  overflow: hidden;
}

.admin-sect {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

.admin-sect.active-sect {
  display: flex;
}

.sect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 1.2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.sect-header h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

.sect-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Submissions Filter buttons */
.filter-group {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--panel-border);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn.active {
  background: var(--primary-dark);
  color: white;
}

/* ==========================================================================
   Admin Submissions Verification Card Items
   ========================================================================== */

.submissions-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.5rem;
}

.submission-item-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 1.2rem;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

.submission-item-card:hover {
  border-color: var(--panel-border-focus);
}

.sub-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  width: 100%;
}

.sub-staff-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-activity-title {
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-time-pts {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.sub-time-pts span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sub-pts-tag {
  color: var(--primary);
  font-weight: 700;
  background: rgba(82, 183, 136, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(82, 183, 136, 0.15);
}

/* Sub Evidence Preview thumbnail */
.sub-evidence-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.evidence-thumb-container {
  width: 90px;
  height: 60px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid var(--panel-border);
  position: relative;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: var(--transition-smooth);
}

.evidence-thumb-container:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.evidence-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.evidence-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  gap: 0.2rem;
}

.evidence-thumb-placeholder i {
  font-size: 1.1rem;
}

.evidence-thumb-placeholder span {
  font-size: 0.65rem;
  font-weight: 500;
}

.video-badge {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(0,0,0,0.7);
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

/* Action controls */
.sub-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

.badge-status {
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-status.approved {
  background: rgba(82, 183, 136, 0.15);
  color: var(--primary);
  border: 1px solid rgba(82, 183, 136, 0.3);
}

.badge-status.rejected {
  background: rgba(255, 77, 77, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 77, 0.3);
}

@media (max-width: 640px) {
  .submission-item-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .sub-evidence-preview {
    justify-content: flex-start;
  }
  .sub-actions {
    justify-content: flex-start;
  }
}

/* ==========================================================================
   Admin Tables & Management Lists
   ========================================================================== */

.admin-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 960px) {
  .admin-split-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-control-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.admin-control-card h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.6rem;
}

.form-actions-inline {
  display: flex;
  gap: 0.6rem;
}

.admin-table-card {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.table-wrapper {
  max-height: 450px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

th, td {
  padding: 0.95rem 1.2rem;
  font-size: 0.88rem;
}

th {
  background: rgba(0, 0, 0, 0.3);
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--panel-border);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

td {
  border-bottom: 1px solid rgba(82, 183, 136, 0.05);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

tr:hover td {
  background: rgba(82, 183, 136, 0.02);
}

.table-actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.btn-table-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-table-icon.btn-edit {
  color: var(--primary);
  background: rgba(82, 183, 136, 0.1);
}

.btn-table-icon.btn-edit:hover {
  background: var(--primary);
  color: #0c120f;
}

.btn-table-icon.btn-delete {
  color: var(--danger);
  background: rgba(255, 77, 77, 0.1);
}

.btn-table-icon.btn-delete:hover {
  background: var(--danger);
  color: white;
}

/* ==========================================================================
   Settings Panel Styles
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.settings-card {
  background: rgba(0,0,0,0.15);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.settings-card h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 0.6rem;
}

.settings-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.settings-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.settings-actions-vertical .btn {
  width: 100%;
}

.btn-icon-left {
  justify-content: flex-start;
  padding-left: 1.5rem;
}

.settings-message {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: var(--border-radius-sm);
  margin-top: 0.2rem;
  animation: badgeIn 0.3s ease-out;
}

.settings-message.success {
  background: rgba(82, 183, 136, 0.15);
  color: var(--primary);
  border: 1px solid rgba(82, 183, 136, 0.3);
}

.settings-message.error {
  background: rgba(255, 77, 77, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 77, 77, 0.3);
}

/* ==========================================================================
   Lightbox / Modal View
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease-out;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-content-wrapper {
  max-width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lightbox-close:hover {
  transform: scale(1.1);
  color: var(--primary);
}

.lightbox-media-container {
  background: #000;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media-container img, 
.lightbox-media-container video {
  max-width: 100%;
  max-height: 70vh;
  display: block;
}

.lightbox-caption {
  color: var(--text-primary);
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

/* ==========================================================================
   Toast Notification Popups
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  animation: slideLeftIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideLeftIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-body {
  background: #111e17;
  border: 1px solid var(--primary);
  border-radius: var(--border-radius-md);
  padding: 0.8rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.toast-icon {
  color: var(--primary);
  font-size: 1.1rem;
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff !important;
}

/* Footer Styling */
.app-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-border);
}

/* ==========================================================================
   Mobile & Responsive Adjustments (Global Breakpoints)
   ========================================================================== */

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  /* Prevent iOS Safari auto-zoom on input focus */
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  .select-search-wrapper input {
    font-size: 16px !important;
  }
  
  .app-container {
    gap: 1.25rem;
  }

  .app-header {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
    gap: 1.25rem;
    text-align: center;
  }
  
  .header-brand {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .brand-text p {
    font-size: 0.8rem;
  }

  .header-nav {
    justify-content: center;
  }
  
  .nav-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  .grid-card {
    padding: 1.25rem;
    gap: 1.25rem;
  }
  
  .card-header {
    padding-bottom: 0.8rem;
  }
  
  .card-title-group h2 {
    font-size: 1.15rem;
  }
}

@media (max-width: 500px) {
  /* Auth Card PIN pad scaling */
  .auth-card {
    margin: 2rem auto;
    padding: 1.5rem;
    width: 100%;
    max-width: 380px;
  }
  
  .pin-keypad {
    gap: 0.6rem;
    max-width: 240px;
  }
  
  .keypad-btn {
    height: 48px;
    font-size: 1.15rem;
  }

  /* Event Stats Strip mobile layout */
  .event-stats-strip {
    padding: 0.75rem 0.4rem;
  }
  
  .stat-val {
    font-size: 1.1rem;
  }
  
  .stat-lbl {
    font-size: 0.65rem;
  }

  /* Podium responsive scaling */
  .podium-container {
    min-height: 185px;
    gap: 0.5rem;
    align-items: flex-end;
    padding-top: 1.2rem;
  }
  
  .podium-card {
    padding: 0.75rem 0.3rem 0.6rem;
    max-width: 33%;
    min-width: 0;
  }

  .podium-card.rank-1 { height: 160px; }
  .podium-card.rank-2 { height: 135px; }
  .podium-card.rank-3 { height: 125px; }

  .podium-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
  }
  
  .podium-name {
    font-size: 0.78rem;
  }
  
  .podium-pts {
    font-size: 0.85rem;
    margin-top: 0.15rem;
  }
  
  .podium-crown {
    font-size: 1rem;
    top: -10px;
  }

  /* Hide progress bar on tiny screens to allow rank, name, and points to display beautifully */
  .list-headers {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 6.3fr) minmax(0, 2.5fr);
  }
  
  .header-bar {
    display: none;
  }

  .leaderboard-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 6.3fr) minmax(0, 2.5fr);
    padding: 0.75rem 0.5rem;
  }
  
  .row-progress-container {
    display: none;
  }
  
  .row-name {
    font-size: 0.85rem;
  }
  
  .row-rank {
    font-size: 0.8rem;
  }
  
  .row-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }
}

@media (max-width: 800px) {
  /* Admin layout stacking adjustments */
  .admin-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
  
  .admin-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    gap: 1rem;
  }
  
  .admin-profile {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .admin-nav-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    gap: 0.4rem;
  }
  
  .admin-tab-btn {
    width: auto;
    flex: 1;
    min-width: 130px;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
  }
  
  .admin-tab-btn.active {
    border-left: none;
    border-bottom: 3px solid var(--primary);
    background: rgba(82, 183, 136, 0.08);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    padding-left: 0.75rem;
  }
  
  .logout-btn {
    width: auto;
    margin-left: auto;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
  
  .admin-content {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   Cloud Sync Badge Styling
   ========================================================================== */

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  margin-left: 0.75rem;
  transition: var(--transition-smooth);
  vertical-align: middle;
}

.sync-badge.syncing {
  color: var(--warning);
  border-color: rgba(255, 183, 3, 0.3);
  background: rgba(255, 183, 3, 0.05);
}

.sync-badge.syncing i {
  animation: spin 1s linear infinite;
}

.sync-badge.error {
  color: var(--danger);
  border-color: rgba(255, 77, 77, 0.3);
  background: rgba(255, 77, 77, 0.05);
}

.sync-badge.synced {
  color: var(--primary);
  border-color: rgba(82, 183, 136, 0.3);
  background: rgba(82, 183, 136, 0.05);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Admin Lightbox Actions & Button Spinner
   ========================================================================== */

.lightbox-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  width: 100%;
}

.lightbox-actions .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* ==========================================================================
   Statistics Dashboard Styles
   ========================================================================== */

.statistics-dashboard {
  width: 100%;
}

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

.chart-subtitle {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.top-activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.top-activity-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.top-activity-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.top-activity-name {
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}

.top-activity-count {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.top-activity-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.top-activity-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.top-activity-points {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 0.15rem;
}

/* ==========================================================================
   Streak Alerts & Active Streak Widget
   ========================================================================== */

.streak-alerts-container {
  width: 100%;
}

.streak-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 159, 67, 0.15);
  border: 1px solid rgba(255, 159, 67, 0.3);
  border-radius: var(--border-radius-md);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideInUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  gap: 1rem;
}

.streak-alert-item.streak-5 {
  background: rgba(239, 71, 111, 0.15);
  border-color: rgba(239, 71, 111, 0.3);
}

.streak-alert-item.streak-5 i.fa-fire {
  color: #ef476f !important;
}

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

.active-streaks-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.streak-warrior-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.streak-warrior-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 159, 67, 0.35);
  transform: translateY(-2px);
}

.streak-warrior-item.streak-high:hover {
  border-color: rgba(239, 71, 111, 0.35);
}

.streak-warrior-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.streak-warrior-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 159, 67, 0.15);
  color: #ff9f43;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 159, 67, 0.25);
}

.streak-warrior-item.streak-high .streak-warrior-avatar {
  background: rgba(239, 71, 111, 0.15);
  color: #ef476f;
  border-color: rgba(239, 71, 111, 0.25);
}

.streak-warrior-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.streak-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 159, 67, 0.12);
  color: #ff9f43;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(255, 159, 67, 0.2);
}

.streak-warrior-item.streak-high .streak-badge {
  background: rgba(239, 71, 111, 0.12);
  color: #ef476f;
  border-color: rgba(239, 71, 111, 0.2);
}

/* ==========================================================================
   CO2 Savings Equivalency Card
   ========================================================================== */

.equivalencies-container {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 0.5rem;
}

.eq-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease;
  opacity: 0;
  transform: translateY(10px);
}

.eq-item:hover {
  transform: translateY(-2px) !important;
  background: rgba(255, 255, 255, 0.06);
}

.eq-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.eq-item:nth-child(1) .eq-icon {
  background: rgba(54, 162, 235, 0.15);
  color: #36a2eb;
}
.eq-item:nth-child(2) .eq-icon {
  background: rgba(75, 192, 192, 0.15);
  color: #4bc0c0;
}
.eq-item:nth-child(3) .eq-icon {
  background: rgba(255, 205, 86, 0.15);
  color: #ffcd56;
}

.eq-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.eq-value {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
}

.eq-label {
  font-size: 0.74rem;
  color: var(--text-muted);
}
