/* ============================================================
   75 HARD CHALLENGE TRACKER — COMPLETE STYLESHEET
   75hard.fun
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors */
  --color-bg:          #0F1629;
  --color-surface:     #1A2332;
  --color-card:        #1E2A3A;
  --color-card-hover:  #243042;
  --color-border:      rgba(255,255,255,0.08);
  --color-border-focus: #D4A843;

  --color-gold:        #D4A843;
  --color-gold-dark:   #B8912E;
  --color-gold-light:  #E8C56A;

  --color-white:       #FFFFFF;
  --color-muted:       #94A3B8;
  --color-muted-dark:  #64748B;

  --color-success:     #22C55E;
  --color-success-bg:  rgba(34,197,94,0.12);
  --color-danger:      #EF4444;
  --color-danger-bg:   rgba(239,68,68,0.12);
  --color-warning:     #F59E0B;
  --color-warning-bg:  rgba(245,158,11,0.12);
  --color-info-bg:     rgba(212,168,67,0.12);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Border Radius */
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-nav:  0 2px 20px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 20px rgba(212,168,67,0.25);

  /* Nav height */
  --nav-height: 64px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;
}

/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-white);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 16px; /* Prevent iOS zoom */
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1 { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.9rem; font-weight: 600; }

p { line-height: 1.7; color: var(--color-muted); }

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-white { color: var(--color-white); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-6); }
}

@media (min-width: 1024px) {
  .container { padding: 0 var(--space-8); }
}

.page-content {
  padding-top: calc(var(--nav-height) + var(--space-6));
  padding-bottom: var(--space-12);
  min-height: 100vh;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(15, 22, 41, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-nav);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .navbar-inner { padding: 0 var(--space-6); }
}

.navbar-logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-white);
  text-transform: uppercase;
}

.navbar-logo span {
  color: var(--color-gold);
}

.navbar-links {
  display: none;
  align-items: center;
  gap: var(--space-2);
}

.navbar-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-white);
  background: rgba(255,255,255,0.06);
}

.navbar-links a.nav-logout {
  color: var(--color-danger);
}

.navbar-links a.nav-logout:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

@media (min-width: 768px) {
  .navbar-links { display: flex; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.hamburger:hover {
  background: rgba(255,255,255,0.06);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .hamburger { display: none; }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(15, 22, 41, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  padding: var(--space-8) var(--space-6);
  gap: var(--space-2);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-white);
  font-size: 1.25rem;
  font-weight: 600;
  padding: var(--space-4) var(--space-4);
  border-radius: var(--radius-lg);
  min-height: 56px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.mobile-menu a:hover {
  background: rgba(255,255,255,0.06);
}

.mobile-menu a.nav-logout {
  color: var(--color-danger);
}

.mobile-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2) 0;
}

/* ============================================================
   6. CARDS
   ============================================================ */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.card-glass {
  background: rgba(30, 42, 58, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: -var(--space-2);
  margin-bottom: var(--space-4);
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px var(--space-5);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  min-height: 44px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: #0F1629;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(212,168,67,0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212,168,67,0.4);
}

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

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(212,168,67,0.06);
}

.btn-outline-gold {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
}

.btn-outline-gold:hover:not(:disabled) {
  background: rgba(212,168,67,0.1);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.05);
  color: var(--color-white);
}

.btn-sm {
  padding: 8px var(--space-4);
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-lg {
  padding: 14px var(--space-8);
  font-size: 1rem;
  min-height: 52px;
}

.btn-full { width: 100%; }

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* Loading spinner in button */
.btn .spinner-sm {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   8. FORM INPUTS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

.form-input {
  width: 100%;
  background: var(--color-surface);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 12px var(--space-4);
  font-size: 16px; /* Prevent iOS zoom */
  color: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  min-height: 48px;
}

.form-input::placeholder {
  color: var(--color-muted-dark);
}

.form-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.15);
}

.form-input.error {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.input-wrapper {
  position: relative;
}

.input-wrapper .form-input {
  padding-right: 48px;
}

.input-icon-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
  min-width: 32px;
  min-height: 32px;
}

.input-icon-btn:hover {
  color: var(--color-white);
}

/* Password strength */
.password-strength {
  margin-top: var(--space-2);
}

.strength-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-normal), background var(--transition-normal);
  width: 0%;
}

.strength-fill.weak   { width: 33%; background: var(--color-danger); }
.strength-fill.medium { width: 66%; background: var(--color-warning); }
.strength-fill.strong { width: 100%; background: var(--color-success); }

.strength-label {
  font-size: 0.75rem;
  color: var(--color-muted);
}
.strength-label.weak   { color: var(--color-danger); }
.strength-label.medium { color: var(--color-warning); }
.strength-label.strong { color: var(--color-success); }

/* ============================================================
   9. CUSTOM CHECKBOXES
   ============================================================ */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  padding: var(--space-3) 0;
  min-height: 44px;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkbox-custom {
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
  content: '';
  display: block;
  width: 14px;
  height: 9px;
  border-left: 2.5px solid #0F1629;
  border-bottom: 2.5px solid #0F1629;
  transform: rotate(-45deg) translateY(-2px);
}

.checkbox-wrapper:hover .checkbox-custom {
  border-color: var(--color-gold);
}

.checkbox-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-white);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.checkbox-label.completed {
  text-decoration: line-through;
  color: var(--color-muted);
}

/* ============================================================
   10. TOGGLE SWITCH
   ============================================================ */
.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  min-height: 44px;
}

.toggle-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-white);
  flex: 1;
}

.toggle-sublabel {
  font-size: 0.8125rem;
  color: var(--color-muted);
  display: block;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

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

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--color-gold);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(24px);
}

/* ============================================================
   11. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + var(--space-4));
  right: var(--space-4);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 360px;
  width: calc(100% - var(--space-8));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastSlideIn var(--transition-normal) ease forwards;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.toast.dismissing {
  animation: toastSlideOut var(--transition-normal) ease forwards;
}

.toast-success {
  background: rgba(22,101,52,0.9);
  border-color: rgba(34,197,94,0.3);
}

.toast-error {
  background: rgba(127,29,29,0.9);
  border-color: rgba(239,68,68,0.3);
}

.toast-info {
  background: rgba(92,60,0,0.9);
  border-color: rgba(212,168,67,0.3);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 2px;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.toast-close:hover { color: white; }

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

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

/* ============================================================
   12. MODALS & OVERLAYS
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn var(--transition-normal);
}

.overlay.hidden { display: none; }

.modal {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  animation: modalSlideIn var(--transition-normal);
}

.modal-lg {
  max-width: 720px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--color-muted);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.modal-close:hover { background: rgba(255,255,255,0.12); color: white; }

.overlay .modal { position: relative; }

@keyframes modalSlideIn {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* ============================================================
   13. LOADING SPINNER
   ============================================================ */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(212,168,67,0.2);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-16);
  color: var(--color-muted);
  font-size: 0.9rem;
}

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

/* ============================================================
   14. EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-16) var(--space-4);
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--color-white);
}

.empty-state p {
  font-size: 0.9rem;
  color: var(--color-muted);
  max-width: 300px;
}

/* ============================================================
   15. STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-gold    { background: var(--color-info-bg);    color: var(--color-gold); }
.badge-muted   { background: rgba(148,163,184,0.1);   color: var(--color-muted); }

/* ============================================================
   16. PROGRESS RING (SVG)
   ============================================================ */
.progress-ring-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-svg {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
}

.progress-ring-fill {
  fill: none;
  stroke: var(--color-gold);
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-slow);
}

.progress-ring-text {
  position: absolute;
  text-align: center;
}

.progress-ring-percent {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
  display: block;
}

.progress-ring-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 500;
  display: block;
  margin-top: 2px;
}

/* ============================================================
   17. CALENDAR GRID
   ============================================================ */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
}

.calendar-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(255,255,255,0.05);
  color: var(--color-muted-dark);
  border: 1.5px solid transparent;
  position: relative;
  min-height: 28px;
  user-select: none;
}

.calendar-cell.completed {
  background: rgba(34,197,94,0.2);
  color: var(--color-success);
  border-color: rgba(34,197,94,0.3);
}

.calendar-cell.completed:hover {
  background: rgba(34,197,94,0.3);
  transform: scale(1.05);
}

.calendar-cell.cheated {
  background: rgba(245,158,11,0.2);
  color: var(--color-warning);
  border-color: rgba(245,158,11,0.3);
}

.calendar-cell.failed {
  background: rgba(239,68,68,0.15);
  color: var(--color-danger);
  border-color: rgba(239,68,68,0.2);
}

.calendar-cell.current {
  border-color: var(--color-gold);
  color: var(--color-gold);
  animation: pulse-border 2s ease-in-out infinite;
}

.calendar-cell.future {
  opacity: 0.4;
  cursor: default;
}

.calendar-cell.future:hover {
  transform: none;
}

.cheated-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-danger);
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,67,0.4); }
  50%       { box-shadow: 0 0 0 4px rgba(212,168,67,0); }
}

@media (min-width: 768px) {
  .calendar-cell {
    font-size: 0.75rem;
    min-height: 36px;
  }
  .calendar-grid { gap: 5px; }
}

/* ============================================================
   18. PHOTO UPLOAD / DROP ZONE
   ============================================================ */
.photo-dropzone {
  border: 2px dashed rgba(212,168,67,0.35);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(212,168,67,0.03);
}

.photo-dropzone:hover,
.photo-dropzone.dragover {
  border-color: var(--color-gold);
  background: rgba(212,168,67,0.07);
}

.photo-dropzone-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-3);
}

.photo-dropzone-text {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}

.photo-upload-btns {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.photo-upload-btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px var(--space-5);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  min-height: 44px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.photo-upload-btn-label.primary-label {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: #0F1629;
  font-weight: 700;
}

.photo-upload-btn-label.outline-label {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.3);
}

.photo-upload-btn-label:hover { opacity: 0.9; }

.photo-preview-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0,0,0,0.3);
}

.photo-preview {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.photo-preview-actions {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: var(--space-2);
}

/* ============================================================
   19. STATS BAR
   ============================================================ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
  transition: transform var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
}

/* ============================================================
   20. LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-normal);
}

.lightbox.hidden { display: none; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}

.lightbox-close:hover { background: rgba(255,255,255,0.2); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: background var(--transition-fast);
}

.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }

.lightbox-caption {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   21. GALLERY GRID
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
}

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

.gallery-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-thumb-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--color-muted-dark);
}

.gallery-card-info {
  padding: var(--space-3);
}

.gallery-day-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-white);
}

.gallery-date {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 2px;
}

.gallery-card-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
}

/* ============================================================
   22. ADMIN TABLE
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

thead th {
  background: rgba(255,255,255,0.04);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}

tbody td {
  padding: var(--space-3) var(--space-4);
  font-size: 0.9rem;
  color: var(--color-white);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}

tbody tr:hover td {
  background: rgba(255,255,255,0.02);
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

/* Search + filter bar */
.table-controls {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.table-controls .form-input {
  flex: 1;
  min-width: 180px;
}

.table-controls select.form-input {
  max-width: 160px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.pagination-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.pagination-btn:hover,
.pagination-btn.active {
  background: var(--color-gold);
  color: #0F1629;
  border-color: var(--color-gold);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ============================================================
   23. CONFETTI ANIMATION
   ============================================================ */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  opacity: 0;
}

/* 50 confetti pieces with varied animations */
.confetti-piece:nth-child(1)  { left:  2%; background:#D4A843; animation: confettiFall1 3.5s ease-in 0.0s forwards; border-radius:50%; }
.confetti-piece:nth-child(2)  { left:  6%; background:#22C55E; animation: confettiFall2 3.2s ease-in 0.1s forwards; width:8px;height:14px; }
.confetti-piece:nth-child(3)  { left: 10%; background:#EF4444; animation: confettiFall3 3.8s ease-in 0.2s forwards; border-radius:2px; }
.confetti-piece:nth-child(4)  { left: 14%; background:#F59E0B; animation: confettiFall4 3.1s ease-in 0.3s forwards; }
.confetti-piece:nth-child(5)  { left: 18%; background:#FFFFFF; animation: confettiFall5 3.6s ease-in 0.0s forwards; border-radius:50%; }
.confetti-piece:nth-child(6)  { left: 22%; background:#D4A843; animation: confettiFall6 3.3s ease-in 0.15s forwards; width:6px;height:12px; }
.confetti-piece:nth-child(7)  { left: 26%; background:#22C55E; animation: confettiFall7 3.9s ease-in 0.05s forwards; }
.confetti-piece:nth-child(8)  { left: 30%; background:#EF4444; animation: confettiFall1 3.4s ease-in 0.25s forwards; border-radius:50%; }
.confetti-piece:nth-child(9)  { left: 34%; background:#F59E0B; animation: confettiFall2 3.7s ease-in 0.1s forwards; }
.confetti-piece:nth-child(10) { left: 38%; background:#D4A843; animation: confettiFall3 3.2s ease-in 0.35s forwards; width:12px;height:8px; }
.confetti-piece:nth-child(11) { left: 42%; background:#FFFFFF; animation: confettiFall4 3.5s ease-in 0.0s forwards; border-radius:2px; }
.confetti-piece:nth-child(12) { left: 46%; background:#22C55E; animation: confettiFall5 3.8s ease-in 0.2s forwards; border-radius:50%; }
.confetti-piece:nth-child(13) { left: 50%; background:#EF4444; animation: confettiFall6 3.3s ease-in 0.4s forwards; }
.confetti-piece:nth-child(14) { left: 54%; background:#D4A843; animation: confettiFall7 3.6s ease-in 0.05s forwards; width:8px;height:16px; }
.confetti-piece:nth-child(15) { left: 58%; background:#F59E0B; animation: confettiFall1 3.1s ease-in 0.3s forwards; border-radius:50%; }
.confetti-piece:nth-child(16) { left: 62%; background:#FFFFFF; animation: confettiFall2 3.9s ease-in 0.15s forwards; }
.confetti-piece:nth-child(17) { left: 66%; background:#D4A843; animation: confettiFall3 3.4s ease-in 0.0s forwards; border-radius:2px; }
.confetti-piece:nth-child(18) { left: 70%; background:#22C55E; animation: confettiFall4 3.7s ease-in 0.2s forwards; }
.confetti-piece:nth-child(19) { left: 74%; background:#EF4444; animation: confettiFall5 3.2s ease-in 0.35s forwards; border-radius:50%; }
.confetti-piece:nth-child(20) { left: 78%; background:#F59E0B; animation: confettiFall6 3.8s ease-in 0.1s forwards; width:10px;height:6px; }
.confetti-piece:nth-child(21) { left: 82%; background:#D4A843; animation: confettiFall7 3.5s ease-in 0.25s forwards; }
.confetti-piece:nth-child(22) { left: 86%; background:#FFFFFF; animation: confettiFall1 3.3s ease-in 0.0s forwards; border-radius:50%; }
.confetti-piece:nth-child(23) { left: 90%; background:#22C55E; animation: confettiFall2 3.6s ease-in 0.15s forwards; width:6px;height:10px; }
.confetti-piece:nth-child(24) { left: 94%; background:#EF4444; animation: confettiFall3 3.9s ease-in 0.3s forwards; }
.confetti-piece:nth-child(25) { left: 98%; background:#D4A843; animation: confettiFall4 3.1s ease-in 0.05s forwards; border-radius:2px; }
.confetti-piece:nth-child(26) { left:  4%; background:#22C55E; animation: confettiFall5 4.0s ease-in 0.5s forwards; border-radius:50%; }
.confetti-piece:nth-child(27) { left:  8%; background:#F59E0B; animation: confettiFall6 3.7s ease-in 0.45s forwards; }
.confetti-piece:nth-child(28) { left: 12%; background:#D4A843; animation: confettiFall7 3.3s ease-in 0.55s forwards; width:12px;height:12px; }
.confetti-piece:nth-child(29) { left: 16%; background:#FFFFFF; animation: confettiFall1 3.8s ease-in 0.6s forwards; border-radius:50%; }
.confetti-piece:nth-child(30) { left: 20%; background:#EF4444; animation: confettiFall2 3.4s ease-in 0.4s forwards; }
.confetti-piece:nth-child(31) { left: 24%; background:#D4A843; animation: confettiFall3 4.1s ease-in 0.7s forwards; border-radius:2px; }
.confetti-piece:nth-child(32) { left: 28%; background:#22C55E; animation: confettiFall4 3.5s ease-in 0.5s forwards; }
.confetti-piece:nth-child(33) { left: 32%; background:#F59E0B; animation: confettiFall5 3.9s ease-in 0.65s forwards; border-radius:50%; }
.confetti-piece:nth-child(34) { left: 36%; background:#FFFFFF; animation: confettiFall6 3.2s ease-in 0.45s forwards; width:8px;height:14px; }
.confetti-piece:nth-child(35) { left: 40%; background:#EF4444; animation: confettiFall7 3.7s ease-in 0.55s forwards; }
.confetti-piece:nth-child(36) { left: 44%; background:#D4A843; animation: confettiFall1 4.0s ease-in 0.7s forwards; border-radius:50%; }
.confetti-piece:nth-child(37) { left: 48%; background:#22C55E; animation: confettiFall2 3.6s ease-in 0.4s forwards; }
.confetti-piece:nth-child(38) { left: 52%; background:#F59E0B; animation: confettiFall3 3.3s ease-in 0.6s forwards; border-radius:2px; }
.confetti-piece:nth-child(39) { left: 56%; background:#FFFFFF; animation: confettiFall4 4.1s ease-in 0.5s forwards; border-radius:50%; }
.confetti-piece:nth-child(40) { left: 60%; background:#D4A843; animation: confettiFall5 3.8s ease-in 0.75s forwards; }
.confetti-piece:nth-child(41) { left: 64%; background:#EF4444; animation: confettiFall6 3.4s ease-in 0.45s forwards; width:10px;height:8px; }
.confetti-piece:nth-child(42) { left: 68%; background:#22C55E; animation: confettiFall7 3.9s ease-in 0.65s forwards; }
.confetti-piece:nth-child(43) { left: 72%; background:#F59E0B; animation: confettiFall1 3.5s ease-in 0.5s forwards; border-radius:50%; }
.confetti-piece:nth-child(44) { left: 76%; background:#FFFFFF; animation: confettiFall2 4.0s ease-in 0.7s forwards; border-radius:2px; }
.confetti-piece:nth-child(45) { left: 80%; background:#D4A843; animation: confettiFall3 3.7s ease-in 0.4s forwards; }
.confetti-piece:nth-child(46) { left: 84%; background:#22C55E; animation: confettiFall4 3.2s ease-in 0.55s forwards; border-radius:50%; }
.confetti-piece:nth-child(47) { left: 88%; background:#EF4444; animation: confettiFall5 4.1s ease-in 0.6s forwards; width:6px;height:12px; }
.confetti-piece:nth-child(48) { left: 92%; background:#F59E0B; animation: confettiFall6 3.6s ease-in 0.45s forwards; }
.confetti-piece:nth-child(49) { left: 96%; background:#D4A843; animation: confettiFall7 3.3s ease-in 0.7s forwards; border-radius:2px; }
.confetti-piece:nth-child(50) { left:  1%; background:#FFFFFF; animation: confettiFall1 4.0s ease-in 0.8s forwards; border-radius:50%; }

@keyframes confettiFall1 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg); }
  100% { opacity:0; transform: translateY(105vh) rotate(720deg); }
}
@keyframes confettiFall2 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg) translateX(0); }
  100% { opacity:0; transform: translateY(105vh) rotate(-540deg) translateX(60px); }
}
@keyframes confettiFall3 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg); }
  50%  { opacity:1; transform: translateY(50vh) rotate(360deg) translateX(-40px); }
  100% { opacity:0; transform: translateY(105vh) rotate(900deg) translateX(20px); }
}
@keyframes confettiFall4 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg) translateX(0); }
  100% { opacity:0; transform: translateY(105vh) rotate(480deg) translateX(-80px); }
}
@keyframes confettiFall5 {
  0%   { opacity:1; transform: translateY(0) scale(1) rotate(0deg); }
  100% { opacity:0; transform: translateY(105vh) scale(0.5) rotate(630deg) translateX(50px); }
}
@keyframes confettiFall6 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg); }
  30%  { transform: translateY(30vh) rotate(180deg) translateX(30px); }
  60%  { transform: translateY(65vh) rotate(420deg) translateX(-20px); }
  100% { opacity:0; transform: translateY(105vh) rotate(720deg) translateX(40px); }
}
@keyframes confettiFall7 {
  0%   { opacity:1; transform: translateY(0) rotate(0deg) translateX(0); }
  40%  { transform: translateY(40vh) rotate(270deg) translateX(-50px); }
  100% { opacity:0; transform: translateY(105vh) rotate(810deg) translateX(30px); }
}

/* ============================================================
   24. SUCCESS / COMPLETE OVERLAY
   ============================================================ */
.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(10, 16, 35, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn var(--transition-normal);
}

.success-overlay.hidden { display: none; }

.success-content {
  text-align: center;
  max-width: 480px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.success-day-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: #0F1629;
  font-size: 0.875rem;
  font-weight: 700;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.success-title {
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: var(--space-4);
}

.success-quote {
  font-size: 1rem;
  font-style: italic;
  color: var(--color-muted);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.success-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  border: 2px solid rgba(212,168,67,0.3);
}

.success-progress {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: var(--space-6);
}

/* Challenge Complete gold shimmer */
.challenge-complete-overlay {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  overflow: hidden;
}

.challenge-complete-overlay.hidden { display: none; }

.challenge-complete-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0F1629 0%, #2A1A05 50%, #0F1629 100%);
  animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
  0%, 100% { background: linear-gradient(135deg, #0F1629 0%, #2A1A05 50%, #0F1629 100%); }
  50%       { background: linear-gradient(135deg, #1A2305 0%, #3D2A07 50%, #1A2305 100%); }
}

.challenge-complete-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 560px;
  width: 100%;
}

.trophy-icon {
  font-size: 5rem;
  animation: trophyBounce 1s ease infinite alternate;
  display: block;
  margin-bottom: var(--space-4);
}

@keyframes trophyBounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

.complete-title {
  font-size: clamp(2.5rem, 10vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #FFE08A, #D4A843, #FFE08A);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 2s linear infinite;
  margin-bottom: var(--space-2);
}

.complete-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-8);
}

@keyframes shimmerText {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* ============================================================
   25. LANDING PAGE
   ============================================================ */
.landing-body {
  padding-top: 0;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-8)) var(--space-4) var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(212,168,67,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(212,168,67,0.1);
  border: 1px solid rgba(212,168,67,0.25);
  color: var(--color-gold);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.hero-title .title-75 {
  color: var(--color-white);
  display: block;
}

.hero-title .title-hard {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--color-muted);
  margin-bottom: var(--space-4);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  color: var(--color-muted);
  font-size: 1rem;
  max-width: 420px;
  margin: 0 auto var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: var(--space-16) var(--space-4);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-3);
}

.section-subtitle {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: var(--space-10);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-gold);
  border-radius: var(--radius-full);
  margin: var(--space-3) auto var(--space-10);
}

/* Steps */
.steps-grid {
  display: grid;
  gap: var(--space-4);
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(212,168,67,0.15);
  color: var(--color-gold);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.step-desc {
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Tasks list */
.tasks-section {
  background: var(--color-surface);
}

.task-items-grid {
  display: grid;
  gap: var(--space-3);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .task-items-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .task-items-grid { grid-template-columns: repeat(3, 1fr); }
}

.task-item-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.task-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212,168,67,0.25);
}

.task-item-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.task-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: 2px;
}

.task-item-desc {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* Features */
.features-grid {
  display: grid;
  gap: var(--space-4);
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  background: rgba(30,42,58,0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--transition-fast);
}

.feature-card:hover {
  background: var(--color-card);
  border-color: rgba(212,168,67,0.2);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
}

.feature-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.feature-desc {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* Footer */
footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--color-muted-dark);
}

/* ============================================================
   26. AUTH PAGES (LOGIN / REGISTER)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-6)) var(--space-4) var(--space-8);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(212,168,67,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.auth-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-6);
}

.auth-logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-logo-text span {
  color: var(--color-gold);
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-sub {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-6);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-footer-links {
  text-align: center;
  margin-top: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-link {
  color: var(--color-gold);
  font-size: 0.9rem;
  transition: opacity var(--transition-fast);
}

.auth-link:hover { opacity: 0.8; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-muted-dark);
  font-size: 0.8rem;
  margin: var(--space-2) 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ============================================================
   27. DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
}

.dashboard-hero {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.dashboard-greeting {
  flex: 1;
  min-width: 200px;
}

.greeting-label {
  font-size: 0.875rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.greeting-day {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.greeting-day span {
  color: var(--color-gold);
}

.greeting-date {
  font-size: 0.9rem;
  color: var(--color-muted);
}

.quick-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.quick-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.quick-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
}

.quick-stat-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: center;
}

/* Task item in dashboard/day */
.task-row {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--transition-fast);
  border-radius: var(--radius-md);
  padding: 0 var(--space-2);
}

.task-row:last-child {
  border-bottom: none;
}

.task-row:hover {
  background: rgba(255,255,255,0.02);
}

.task-row.completed-task .checkbox-label {
  opacity: 0.6;
  text-decoration: line-through;
}

/* Day complete message */
.day-complete-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5);
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-success);
}

/* ============================================================
   28. SETTINGS PAGE
   ============================================================ */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 680px;
}

.danger-card {
  border-color: rgba(239,68,68,0.3) !important;
}

.danger-card .card-title {
  color: var(--color-danger);
}

.custom-tasks-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.custom-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  gap: var(--space-3);
}

.custom-task-name {
  font-size: 0.9rem;
  color: var(--color-white);
  flex: 1;
}

.custom-task-delete {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
  font-size: 1rem;
}

.custom-task-delete:hover {
  color: var(--color-danger);
  background: var(--color-danger-bg);
}

.add-task-row {
  display: flex;
  gap: var(--space-2);
}

.add-task-row .form-input {
  flex: 1;
}

/* Highlighted setting section (for password change redirect) */
.highlight-section {
  border-color: var(--color-gold) !important;
  box-shadow: 0 0 0 2px rgba(212,168,67,0.2) !important;
  animation: highlightPulse 1s ease 0.5s 2;
}

@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(212,168,67,0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(212,168,67,0.1); }
}

/* ============================================================
   29. ADMIN PANEL
   ============================================================ */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .admin-stats-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
}

.admin-stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.admin-stat-label {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.admin-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-gold);
  line-height: 1;
}

/* Section accordion for admin create form */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: var(--space-4) 0;
  user-select: none;
}

.collapsible-header .chevron {
  color: var(--color-muted);
  transition: transform var(--transition-normal);
}

.collapsible-header.open .chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  display: none;
  padding-top: var(--space-4);
}

.collapsible-body.open {
  display: block;
}

/* User detail modal calendar */
.modal-user-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .modal-user-grid { grid-template-columns: 1fr 1fr; }
}

.user-progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--space-2) 0;
}

.user-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-dark));
  transition: width var(--transition-slow);
}

/* ============================================================
   30. DAY PAGE
   ============================================================ */
.day-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.day-back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 40px;
}

.day-back-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--color-white);
}

.day-number-badge {
  background: linear-gradient(135deg, rgba(212,168,67,0.2), rgba(212,168,67,0.08));
  border: 1px solid rgba(212,168,67,0.3);
  color: var(--color-gold);
  font-size: 0.875rem;
  font-weight: 700;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Failure modal */
.failure-modal {
  text-align: center;
}

.failure-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.confirm-input-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.add-custom-task-row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   31. RESPONSIVE / UTILITY OVERRIDES
   ============================================================ */
@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-6);
  }

  .modal {
    padding: var(--space-6);
  }

  .dashboard-hero {
    flex-direction: column;
    text-align: center;
  }

  .quick-stats {
    justify-content: center;
  }

  .progress-ring-container {
    margin: 0 auto;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }

  .photo-upload-btns {
    flex-direction: column;
    align-items: center;
  }
}

/* Safe area insets for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-content {
    padding-bottom: calc(var(--space-12) + env(safe-area-inset-bottom));
  }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.2);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(212,168,67,0.3);
  color: white;
}
