/* ==========================================================================
   JimnyCamp — Global Styles
   Design System: Nature green + amber gold, Inter, Soft UI Evolution
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-primary:    #059669;
  --color-secondary:  #10B981;
  --color-cta:        #FBBF24;
  --color-surface:    #F0FDF4;
  --color-text:       #064E3B;
  --color-border:     #A7F3D0;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 20px rgba(0,0,0,0.10);
  --shadow-xl:  0 20px 40px rgba(0,0,0,0.14);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  24px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #F0FDF4;
  color: #1F2937;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Tailwind custom colours (used via class utilities) ---------- */
.bg-surface   { background-color: #F0FDF4; }
.font-inter   { font-family: 'Inter', system-ui, sans-serif; }

/* Forest colour shorthands */
.text-forest-400 { color: #6EE7B7; }
.text-forest-600 { color: #059669; }
.text-forest-700 { color: #047857; }
.text-forest-800 { color: #065F46; }
.text-forest-900 { color: #064E3B; }
.bg-forest-500   { background-color: #059669; }

/* ---------- Night-sky hero background ---------- */
.bg-forest {
  background: linear-gradient(160deg, #064E3B 0%, #065F46 30%, #047857 65%, #059669 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ---------- Twinkling stars ---------- */
.star {
  position: absolute;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: twinkle 3s infinite alternate;
  pointer-events: none;
}
@keyframes twinkle {
  from { opacity: 0.2; transform: scale(0.7); }
  to   { opacity: 1;   transform: scale(1.3); }
}
@media (prefers-reduced-motion: reduce) {
  .star { animation: none; opacity: 0.6; }
}

/* ---------- Glass card (landing) ---------- */
.glass-card {
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.15);
}

/* ---------- Logo badges ---------- */
.logo-badge {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #059669, #FBBF24);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(5,150,105,0.4);
}
.logo-badge-sm {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #059669, #FBBF24);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(5,150,105,0.3);
  flex-shrink: 0;
}

/* ---------- Form fields ---------- */
.field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #064E3B;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  padding: 11px 15px;
  border: 2px solid #A7F3D0;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #064E3B;
  background: #F0FDF4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5,150,105,0.15);
}
.field-input::placeholder { color: #86EFAC; }

/* ---------- Buttons ---------- */
.btn-cta {
  display: block;
  width: 100%;
  padding: 13px 24px;
  background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%);
  color: #064E3B;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 18px rgba(251,191,36,0.45);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(251,191,36,0.55); }
.btn-cta:active { transform: translateY(0); }
.btn-cta:focus-visible { outline: 3px solid #059669; outline-offset: 2px; }

.btn-outline-sm {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  border: 1.5px solid #A7F3D0;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
  background: white;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.btn-outline-sm:hover { border-color: #059669; background: #ECFDF5; color: #064E3B; }
.btn-outline-sm:focus-visible { outline: 3px solid #059669; outline-offset: 2px; }

/* ---------- Continue pill (landing) ---------- */
.continue-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #F0FDF4;
  border: 2px solid #A7F3D0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.continue-pill:hover {
  border-color: #059669;
  background: #ECFDF5;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.continue-pill:focus-visible { outline: 3px solid #059669; outline-offset: 2px; }

.resume-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: linear-gradient(135deg, #059669, #10B981);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Divider ---------- */
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0;
  color: #86EFAC;
  font-size: 0.78rem;
  font-weight: 500;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: #BBFDE8;
}

/* ---------- Avatar dots ---------- */
.avatar-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  color: white;
  border: 2px solid white;
  margin-left: -8px;
  flex-shrink: 0;
}
.avatar-dot:first-child { margin-left: 0; }

.avatar-dot-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.avatar-dot-xs {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700;
  color: white;
  border: 1.5px solid white;
  margin-left: -4px;
  flex-shrink: 0;
}
.avatar-dot-xs:first-child { margin-left: 0; }

/* ---------- Cards ---------- */
.card {
  background: white;
  border: 1px solid #E9F5EE;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F0FDF4;
}
.card-icon {
  width: 18px; height: 18px;
  color: #059669;
  flex-shrink: 0;
}
.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #064E3B;
  margin: 0;
}

/* ---------- List items (shared/personal) ---------- */
.item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: #FAFFFE;
  border: 1px solid #E8F5EE;
  transition: background 0.15s;
}
.item-row:hover { background: #F0FDF4; }

.check-btn {
  width: 22px; height: 22px;
  flex-shrink: 0;
  border: 2px solid #A7F3D0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.check-btn:hover { border-color: #059669; }
.check-btn:focus-visible { outline: 3px solid #059669; outline-offset: 1px; }
.check-btn.checked { background: #059669; border-color: #059669; }

.del-btn {
  color: #D1D5DB;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.del-btn:hover { color: #EF4444; background: #FEF2F2; }
.del-btn:focus-visible { outline: 3px solid #EF4444; outline-offset: 1px; }

/* ---------- Add forms ---------- */
.add-form {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.add-input {
  flex: 1;
  min-width: 0;
  padding: 9px 13px;
  border: 2px solid #A7F3D0;
  border-radius: 10px;
  font-size: 0.875rem;
  font-family: 'Inter', system-ui, sans-serif;
  color: #064E3B;
  background: #F0FDF4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.add-input:focus { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.12); }
.add-input::placeholder { color: #86EFAC; }
.add-btn {
  padding: 9px 18px;
  background: #059669;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.add-btn:hover { background: #047857; transform: translateY(-1px); }
.add-btn:active { transform: translateY(0); }
.add-btn:focus-visible { outline: 3px solid #059669; outline-offset: 2px; }

/* ---------- Calendar grid ---------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9CA3AF;
  text-transform: uppercase;
  padding: 4px 0 8px;
}
.cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1.5px solid transparent;
  background: white;
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
  gap: 2px;
}
.cal-day:hover { border-color: #059669; background: #F0FDF4; }
.cal-day:focus-visible { outline: 3px solid #059669; outline-offset: 1px; }

.cal-day.cal-me { background: #059669; color: white; border-color: #059669; }
.cal-day.cal-me:hover { background: #047857; }
.cal-day.cal-all { background: #FBBF24; color: #064E3B; border-color: #F59E0B; }
.cal-day.cal-all:hover { background: #F59E0B; }
.cal-day.cal-others { background: #ECFDF5; border-color: #A7F3D0; color: #064E3B; }

.cal-day-num { font-size: 0.82rem; line-height: 1; }

.cal-dots {
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.cal-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- Scrollbar styling ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F0FDF4; border-radius: 8px; }
::-webkit-scrollbar-thumb { background: #A7F3D0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #059669; }

/* ---------- Badge helpers ---------- */
.badge-green {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #065F46;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Tab navigation ---------- */
.tab-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6B7280;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.tab-btn:hover { color: #059669; }
.tab-btn.tab-active { color: #059669; border-bottom-color: #059669; }
.tab-btn:focus-visible { outline: 3px solid #059669; outline-offset: -1px; }

.tab-section { min-height: 200px; }

/* ---------- Polls ---------- */
.poll-option {
  position: relative;
  overflow: hidden;
  padding: 10px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  background: white;
  transition: border-color 0.15s, background 0.15s;
}
.poll-option:hover { border-color: #A7F3D0; background: #FAFFFE; }
.poll-option-voted {
  border-color: #059669;
  background: #F0FDF4;
}
.poll-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(5,150,105,0.08);
  transition: width 0.4s ease;
  border-radius: 10px 0 0 10px;
  pointer-events: none;
}
.poll-option-voted .poll-bar { background: rgba(5,150,105,0.14); }

/* ---------- Ideas ---------- */
.idea-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.idea-card:hover { border-color: #A7F3D0; box-shadow: var(--shadow-sm); }

.upvote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  border: 1.5px solid #A7F3D0;
  border-radius: 8px;
  background: white;
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  font-family: 'Inter', system-ui, sans-serif;
}
.upvote-btn:hover { background: #ECFDF5; border-color: #059669; transform: translateY(-1px); }
.upvote-btn.upvoted { background: #059669; border-color: #059669; color: white; }
.upvote-btn:focus-visible { outline: 3px solid #059669; outline-offset: 2px; }
.votes-label { font-size: 0.72rem; font-weight: 800; }

/* ---------- Route stops ---------- */
.route-stop {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 8px 0 0;
  position: relative;
}
.route-stop-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 30px;
}
.route-stop-number {
  width: 30px; height: 30px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2.5px solid white;
  box-shadow: 0 2px 6px rgba(5,150,105,0.35);
  z-index: 1;
  position: relative;
}
.route-stop-line {
  width: 3px;
  flex: 1;
  min-height: 28px;
  background: linear-gradient(to bottom, #10B981, #D1FAE5);
  border-radius: 2px;
  margin-top: 2px;
}
.drag-handle {
  cursor: grab;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 4px 2px;
  color: #d1d5db;
  opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
  user-select: none;
}
.drag-handle:hover { opacity: 1; color: #6b7280; }
.drag-handle:active { cursor: grabbing; }
.route-stop.drag-over {
  outline: 2px dashed #10b981;
  border-radius: 8px;
  background: #f0fdf4;
}

/* ---------- Calendar selected state ---------- */
.cal-day-selected {
  background: #059669 !important;
  color: white !important;
  border-color: #059669 !important;
}
.cal-day-selected:hover { background: #047857 !important; border-color: #047857 !important; }

.cal-blank { /* empty day spacer */ }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .glass-card { padding: 24px 20px; }
  .card { padding: 16px; }
  .tab-btn { padding: 8px 12px; font-size: 0.78rem; }
}
