/* DNJ Exchange - Official Theme Stylesheet */
:root {
  /* Official DNJ Colors */
  --dnj-red: #E03C31;
  --dnj-green: #41A33D;
  --dnj-blue: #0063A6;
  --dnj-yellow: #F2C318;
  
  --bg: #ffffff;
  --bg-secondary: #f4f6f8;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --border: #e2e8f0;
  --border-accent: rgba(0, 99, 166, 0.2);
  
  /* Primary accents mapped to official colors */
  --accent: var(--dnj-blue);
  --accent-hover: #00508a;
  --accent-2: var(--dnj-red);
  --accent-3: var(--dnj-green);
  
  --gradient: linear-gradient(135deg, var(--dnj-blue) 0%, #0B67B0 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(0, 99, 166, 0.05), rgba(0, 99, 166, 0.1));
  
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --success: var(--dnj-green);
  --warning: var(--dnj-yellow);
  --danger: var(--dnj-red);
  --whatsapp: #25d366;
  
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 65px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-secondary);
}

body {
  background-color: transparent;
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

/* Subtle squiggly pattern background matching the logo's vibe */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2394a3b8' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
  z-index: -1;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Layout */
.page {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 90px;
  background-color: transparent;
}

.page-enter {
  animation: fadeIn 0.3s var(--transition) forwards;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.header-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.logo-subtitle {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-left: 8px;
}

.header-actions {
  display: flex;
  gap: 4px;
}

.content {
  padding: 16px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(0, 99, 166, 0.2);
}
.card.match-card {
  border: 2px solid var(--dnj-blue);
  box-shadow: 0 8px 24px rgba(0, 99, 166, 0.15);
  background: #ffffff;
  position: relative;
  overflow: hidden;
}
.card.match-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 6px;
  background: linear-gradient(90deg, var(--dnj-red), var(--dnj-green), var(--dnj-blue));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 100px; /* Fully rounded buttons */
  padding: 14px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.96);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--dnj-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 99, 166, 0.25);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 16px rgba(0, 99, 166, 0.3);
}

.btn-secondary {
  background: #f1f5f9;
  color: var(--dnj-blue);
  font-weight: 700;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #fef2f2;
  color: var(--dnj-red);
}

.btn-success {
  background: #f0fdf4;
  color: var(--dnj-green);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.02);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--dnj-blue);
  transform: translateY(-1px);
}
.btn-icon:active {
  transform: scale(0.95);
}

.btn-full {
  width: 100%;
}

/* Tabs */
/* Tabs */
.tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 16px 16px; /* Increased bottom padding to 16px to contain the shadow */
  margin-left: -16px;
  margin-right: -16px;
  scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.tabs-container::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome/Safari */
}

.tab-btn {
  flex-shrink: 0; /* CRITICAL: Prevents buttons from squishing & wrapping their text */
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.01);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.tab-btn.active {
  background: white;
  color: var(--dnj-blue);
  border-color: var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Gradient tab for Mis Matches */
.tab-matches.active {
  background: linear-gradient(135deg, var(--dnj-green) 0%, var(--dnj-blue) 100%);
  color: white;
  border-color: transparent;
  box-shadow: -2px 4px 10px rgba(65, 163, 61, 0.25), 2px 4px 10px rgba(0, 99, 166, 0.25);
  position: relative;
  overflow: hidden;
}

.tab-matches.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmer-tab 2.5s infinite;
}

@keyframes shimmer-tab {
  to { transform: translateX(200%); }
}

/* "Todos" simplified cards */
.all-searching-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
  font-style: italic;
}

.all-searching-card {
  padding: 14px 16px;
}

.all-searching-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.all-searching-name {
  font-weight: 700;
  font-size: 14px;
}

.all-searching-parish {
  font-size: 12px;
  color: var(--text-muted);
}

.all-searching-zones {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zones-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-searching {
  background: #eff6ff;
  color: var(--dnj-blue);
  animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}
.badge-reserved {
  background: #fffbeb;
  color: #b45309;
}
.badge-completed {
  background: #f0fdf4;
  color: var(--dnj-green);
}
.badge-cancelled {
  background: #f1f5f9;
  color: var(--text-muted);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-label {
  display: block;
  color: var(--dnj-blue);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.input {
  width: 100%;
  background: #f8fafc;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}
.input:focus {
  border-color: var(--dnj-blue);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 99, 166, 0.1);
}
.input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 30px;
  background: var(--dnj-red);
  box-shadow: 0 8px 24px rgba(224, 60, 49, 0.4);
  border: none;
  cursor: pointer;
  font-size: 32px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.fab:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(224, 60, 49, 0.5);
}
.fab:active {
  transform: scale(0.9);
}

/* Creator Disclaimer */
.creator-disclaimer {
  margin-top: 32px;
  padding: 16px 8px;
  padding-right: 90px; /* Crucial padding to prevent the text from overlapping the fixed FAB */
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  text-align: left;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  border-radius: 100px;
  padding: 14px 24px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show {
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Spinner */
.spinner-fullpage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  z-index: 1000;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--dnj-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  height: 60vh;
}
.empty-state-icon {
  width: 90px;
  height: 90px;
  border-radius: 45px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 24px;
  color: var(--dnj-blue);
}
.empty-state-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--dnj-blue);
  margin-bottom: 12px;
}
.empty-state-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  width: calc(100% - 48px);
  max-width: 400px;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}
.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--dnj-blue);
  margin-bottom: 24px;
  text-align: center;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

/* Zone Selector (New Request) */
.zone-selector {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.selected-pills-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
}
.selected-pills-bar::-webkit-scrollbar { height: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dnj-green);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
  animation: fadeIn 0.2s ease-out;
  box-shadow: 0 2px 8px rgba(65, 163, 61, 0.3);
}
.pill-remove {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  cursor: pointer;
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.zone-grid {
  padding: 24px 16px;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
}
.zone-sector-row {
  display: grid;
  grid-template-columns: 36px repeat(10, 1fr);
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.zone-sector-label {
  color: var(--dnj-blue);
  font-weight: 900;
  font-size: 18px;
  text-align: center;
}
.zone-chip {
  aspect-ratio: 1;
  border-radius: var(--radius-xs);
  background: #f1f5f9;
  border: 2px solid transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.zone-chip:active {
  transform: scale(0.85);
}
.zone-chip.selected {
  background: var(--dnj-green);
  color: white;
  box-shadow: 0 4px 12px rgba(65, 163, 61, 0.4);
  transform: scale(1.1);
  z-index: 2;
}
.zone-chip.disabled {
  opacity: 0.3;
  background: #e2e8f0;
  cursor: not-allowed;
  pointer-events: none;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
}
.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: #cbd5e1;
  transition: var(--transition);
}
.step-dot.active {
  background: var(--dnj-blue);
  width: 24px;
}

/* Dashboard Request Cards */
.request-card {
  margin-bottom: 16px;
}
.request-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.request-date {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}
.request-zones {
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 12px;
  border-radius: var(--radius-sm);
}
.zones-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dnj-blue);
  margin-bottom: 8px;
  display: block;
  font-weight: 800;
}
.zones-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.zone-tag {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.zone-tag.offer { color: var(--dnj-green); border: 1px solid #bbf7d0; }
.zone-tag.want { color: var(--dnj-blue); border: 1px solid #bfdbfe; }

.match-detail {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px dashed #e2e8f0;
}
.match-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}
.match-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--dnj-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 99, 166, 0.3);
}
.match-exchange-box {
  background: white;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.match-exchange-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.match-exchange-side .zones-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}
.match-exchange-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  margin: 2px 0;
}
.match-exchange-divider .divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.match-exchange-divider .divider-icon {
  font-size: 16px;
  line-height: 1;
}
.request-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Onboarding */
.onboarding-hero {
  padding: 56px 24px 40px;
  text-align: center;
}
.hero-logo-letters {
  font-size: 90px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -4px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: baseline;
}
.hero-logo-letters .d { color: var(--dnj-red); }
.hero-logo-letters .n { color: var(--dnj-green); }
.hero-logo-letters .j { color: var(--dnj-blue); }

.slogan {
  color: var(--dnj-blue);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  margin: 24px 0;
  padding: 0 16px;
}
.slogan-verse {
  display: block;
  font-size: 14px;
  margin-top: 8px;
  opacity: 0.8;
}

.input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-prefix {
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  white-space: nowrap;
  font-weight: 700;
}
.input-with-prefix {
  flex: 1;
}
.form-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
  font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Multi-match UI ===== */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.matches-list .match-detail {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: #f8fafc;
}
.matches-list .match-detail.match-detail-completed {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.match-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
/* Todos tab: card already has a match with me */
.all-searching-card.has-my-match {
  border: 1.5px solid var(--dnj-green);
  background: #f0fdf4;
  position: relative;
}
.all-searching-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--dnj-green);
  color: white;
  font-size: 11px;
  font-weight: 800;
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.d-none { display: none !important; }

/* ===== Disclaimer Popup ===== */
#disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#disclaimer-overlay.visible {
  opacity: 1;
}

#disclaimer-modal {
  background: white;
  border-radius: 24px;
  padding: 36px 28px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 64px -12px rgba(0,0,0,0.35);
  transform: translateY(24px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden; /* Clips the ::before inside the rounded corners */
}

#disclaimer-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--dnj-red), var(--dnj-green), var(--dnj-blue));
}
#disclaimer-overlay.visible #disclaimer-modal {
  transform: translateY(0);
}

#disclaimer-logo {
  height: 80px;
  width: auto;
  border-radius: 12px;
  margin-bottom: 20px;
}

#disclaimer-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--dnj-blue);
  margin-bottom: 16px;
}

#disclaimer-body,
#disclaimer-body2 {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

#disclaimer-body2 {
  font-size: 13px;
  background: #fff8f8;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 12px;
  color: #be123c;
  margin-bottom: 24px;
}
#disclaimer-body2 strong {
  color: #9f1239;
}

#disclaimer-accept-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--dnj-red) 0%, var(--dnj-green) 50%, var(--dnj-blue) 100%);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0, 99, 166, 0.3);
}
#disclaimer-accept-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 99, 166, 0.4);
}
#disclaimer-accept-btn:active {
  transform: scale(0.97);
}

/* ===== Tutorial Popup ===== */
#tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#tutorial-overlay.visible {
  opacity: 1;
}

#tutorial-modal {
  background: white;
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 32px 64px -12px rgba(0,0,0,0.35);
  transform: translateY(24px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  border-top: 5px solid transparent;
}

/* Dynamic border-top colors based on steps */
#tutorial-modal.accent-red { border-top-color: var(--dnj-red); }
#tutorial-modal.accent-green { border-top-color: var(--dnj-green); }
#tutorial-modal.accent-blue { border-top-color: var(--dnj-blue); }
#tutorial-modal.accent-yellow { border-top-color: var(--dnj-yellow); }

#tutorial-overlay.visible #tutorial-modal {
  transform: translateY(0);
}

/* Progress Dots */
.tutorial-progress-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: all 0.3s ease;
}
.progress-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--dnj-blue);
}
#tutorial-modal.accent-red .progress-dot.active { background: var(--dnj-red); }
#tutorial-modal.accent-green .progress-dot.active { background: var(--dnj-green); }
#tutorial-modal.accent-blue .progress-dot.active { background: var(--dnj-blue); }
#tutorial-modal.accent-yellow .progress-dot.active { background: var(--dnj-yellow); }

.progress-dot.completed {
  background: #cbd5e1;
}

/* Icon circular container */
.tutorial-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

#tutorial-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

#tutorial-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
  min-height: 80px; /* Prevents modal height jumping */
}

/* Actions panel */
.tutorial-actions {
  display: flex;
  gap: 12px;
}

#tutorial-prev-btn {
  flex: 1;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: white;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
#tutorial-prev-btn:hover {
  background: #f8fafc;
  color: var(--text);
}

#tutorial-next-btn {
  flex: 2;
  padding: 14px;
  border: none;
  border-radius: 100px;
  background: var(--dnj-blue);
  color: white;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 99, 166, 0.2);
}
#tutorial-modal.accent-red #tutorial-next-btn {
  background: var(--dnj-red);
  box-shadow: 0 4px 12px rgba(224, 60, 49, 0.2);
}
#tutorial-modal.accent-green #tutorial-next-btn {
  background: var(--dnj-green);
  box-shadow: 0 4px 12px rgba(65, 163, 61, 0.2);
}
#tutorial-modal.accent-blue #tutorial-next-btn {
  background: var(--dnj-blue);
  box-shadow: 0 4px 12px rgba(0, 99, 166, 0.2);
}
#tutorial-modal.accent-yellow #tutorial-next-btn {
  background: var(--dnj-yellow);
  color: #5b4600;
  box-shadow: 0 4px 12px rgba(242, 195, 24, 0.25);
}

#tutorial-next-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
#tutorial-next-btn:active {
  transform: scale(0.97);
}

/* ===== Premium Dark Mode System ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #090e1a;
    --bg-secondary: #030712;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --border: #1f2937;
    --border-accent: rgba(56, 189, 248, 0.15);
    
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    
    --text: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  }

  html {
    background-color: var(--bg-secondary);
  }

  body::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%2338bdf8' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
  }

  .header {
    background: rgba(17, 24, 39, 0.85);
    border-color: var(--border);
  }

  .modal-overlay {
    background: rgba(3, 7, 18, 0.7);
  }

  .modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
  }

  .welcome-popup, .disclaimer-popup {
    background: var(--bg-card);
    border-color: var(--border);
  }

  /* Popups: Disclaimer & Tutorial */
  #disclaimer-modal, #tutorial-modal {
    background: var(--bg-card);
    border-color: var(--border);
  }
  #disclaimer-body2 {
    background: rgba(224, 60, 49, 0.1);
    border-color: rgba(224, 60, 49, 0.2);
    color: #fda4af;
  }
  #disclaimer-body2 strong {
    color: #fecdd3;
  }
  #tutorial-prev-btn {
    background: #1f2937;
    border-color: var(--border);
    color: var(--text-muted);
  }
  #tutorial-prev-btn:hover {
    background: #374151;
    color: var(--text);
  }

  /* Form Labels & Titles */
  .form-label, .modal-title, .empty-state-title, #disclaimer-title, #step-title, .zone-sector-label {
    color: var(--accent) !important;
  }
  .slogan {
    color: var(--accent) !important;
  }

  /* Input fields dark overrides */
  .input {
    background: #030712 !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  .input:focus {
    background: #090e1a !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15) !important;
  }
  .input-prefix {
    background: #1f2937 !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
  }
  .input-prefix span {
    color: var(--text) !important;
  }

  /* Buttons */
  .btn-secondary {
    background: #1f2937 !important;
    color: #38bdf8 !important;
  }
  .btn-secondary:hover {
    background: #374151 !important;
  }
  .btn-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
  }
  .btn-success {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
  }
  .btn-icon {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--text) !important;
  }

  /* Toast message confirmations */
  .toast {
    background: #1f2937 !important;
    color: #f3f4f6 !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  }

  /* Empty state */
  .empty-state-icon {
    background: #1f2937 !important;
  }

  /* Active and Completed matches containers */
  .card.match-card {
    background-color: var(--bg-card) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.15) !important;
  }
  .matches-list .match-detail {
    border-color: var(--border) !important;
    background: #0f172a !important;
  }
  .matches-list .match-detail.match-detail-completed {
    border-color: rgba(16, 185, 129, 0.2) !important;
    background: #022c22 !important;
  }
  .all-searching-card.has-my-match {
    border-color: var(--dnj-green) !important;
    background: #022c22 !important;
  }

  /* Card content sections details */
  .request-zones {
    background: #1f2937 !important;
  }
  .zone-tag {
    background: #0f172a !important;
    box-shadow: none !important;
  }
  .zone-tag.offer {
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
  }
  .zone-tag.want {
    border-color: rgba(56, 189, 248, 0.2) !important;
    color: #38bdf8 !important;
  }

  .match-user-info {
    background: #1f2937 !important;
    border-color: var(--border) !important;
  }
  .match-exchange-box {
    background: #0f172a !important;
    border: 1px solid var(--border) !important;
  }

  /* Selector de zonas (Nueva Solicitud) */
  .selected-pills-bar {
    background: rgba(17, 24, 39, 0.95) !important;
    border-color: var(--border) !important;
  }
  .zone-chip {
    background: #1f2937 !important;
    color: var(--text) !important;
  }
  .zone-chip.disabled {
    background: #0f172a !important;
    color: var(--text-dim) !important;
    opacity: 0.25 !important;
  }
  .step-dot {
    background: #475569 !important;
  }
}

