/* ===========================
   ITINERARY DASHBOARD VIEW
   =========================== */

/* Dashboard Hero */
.dashboard-hero {
  position: relative;
  padding: 2.5rem 2rem 2rem;
  background: linear-gradient(135deg, var(--color-secondary) 0%, #1a365d 50%, var(--color-accent) 100%);
  color: white;
  overflow: hidden;
}

.dashboard-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.06) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(108, 99, 255, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 60% 80%, rgba(255, 126, 89, 0.08) 0%, transparent 40%);
}

.dashboard-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.back-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.back-btn:hover {
  background: rgba(255,255,255,0.22);
  transform: translateX(-3px);
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.375rem;
  letter-spacing: -0.02em;
}

.dashboard-hero p {
  font-size: 0.95rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Hero Pill Badges */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
}

/* Tabs Container */
.tabs-container {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 64px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.tabs {
  display: flex;
  overflow-x: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 4rem;
  gap: 0.25rem;
}

.tab-btn {
  padding: 1rem 1.75rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  position: relative;
}

.tab-btn:hover {
  color: var(--color-text);
  background: rgba(255, 126, 89, 0.04);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Dashboard Body */
.dashboard-body {
  max-width: 1200px;
  margin: 0 auto;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  padding: 2rem 4rem;
  align-items: start;
}

/* Itinerary Column */
.itinerary-column {
  min-width: 0;
}

.column-header {
  margin-bottom: 1.5rem;
}

.column-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.column-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

/* List Wrapper */
.list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ===========================
   PLACE CARDS WITH COLOR VARIATION
   =========================== */

/* Card accent color palette */
:root {
  --card-color-1: #6C63FF;  /* Indigo */
  --card-color-2: #FF7E59;  /* Coral */
  --card-color-3: #10B981;  /* Emerald */
  --card-color-4: #F59E0B;  /* Amber */
  --card-color-5: #EC4899;  /* Pink */
  --card-color-6: #06B6D4;  /* Cyan */
}

.place-card {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: cardSlideIn 0.4s ease-out both;
  border-left: 4px solid var(--card-accent, var(--color-border));
}

.place-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(255, 126, 89, 0.3);
  border-left-color: var(--card-accent, var(--color-primary));
}

.place-card.sortable-ghost {
  opacity: 0.4;
  background: var(--color-primary-light);
  border-color: var(--color-primary);
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stagger animation for cards */
.place-card:nth-child(1) { animation-delay: 0s; }
.place-card:nth-child(2) { animation-delay: 0.05s; }
.place-card:nth-child(3) { animation-delay: 0.05s; }
.place-card:nth-child(4) { animation-delay: 0.15s; }
.place-card:nth-child(5) { animation-delay: 0.2s; }
.place-card:nth-child(6) { animation-delay: 0.25s; }

.drag-handle {
  padding: 1.25rem 0.75rem;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  color: var(--color-text-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  border-right: 1px solid var(--color-border);
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.drag-handle:hover {
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
  color: var(--color-text-light);
}

.drag-handle:active { cursor: grabbing; }

.card-content {
  padding: 1.25rem 1.5rem;
  flex: 1;
  min-width: 0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.3;
}

.card-category {
  font-size: 0.7rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Category Colors — English */
.card-category[data-category="Culture"] {
  background: var(--color-accent-light);
  color: var(--color-accent);
}
.card-category[data-category="Culinary"] {
  background: var(--color-warning-light);
  color: #B45309;
}
.card-category[data-category="Nature"] {
  background: var(--color-success-light);
  color: #047857;
}
.card-category[data-category="Adventure"] {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.card-category[data-category="Shopping"] {
  background: #FDF2F8;
  color: #BE185D;
}
.card-category[data-category="Relaxation"] {
  background: #ECFEFF;
  color: #0E7490;
}

/* Default category color */
.card-category:not([data-category]) {
  background: rgba(255, 126, 89, 0.1);
  color: var(--color-primary-dark);
}

.card-desc {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-background);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
}

.card-planb {
  font-size: 0.8rem;
  color: var(--color-text-light);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(108, 99, 255, 0.2);
}

.card-planb strong {
  color: var(--color-accent);
}

/* Transport Divider */
.transport-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--color-text-lighter);
  font-size: 0.8rem;
  padding: 0.625rem 0;
  margin-left: 2rem;
}

.transport-divider span.line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--color-border), transparent);
}

.transport-divider span.line:last-child {
  background: linear-gradient(90deg, transparent, var(--color-border));
}

/* ===========================
   SIDEBAR
   =========================== */

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: calc(64px + 56px + 2rem);
}

.info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.info-card:hover {
  box-shadow: var(--shadow-md);
}

.info-card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.info-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-secondary);
}

/* Packing List */
.packing-card ul {
  list-style: none;
  padding: 0;
}

.packing-card li {
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.packing-card li:last-child {
  border-bottom: none;
}

.packing-card li::before {
  content: '✓';
  font-weight: 700;
  color: var(--color-success);
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  background: var(--color-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Stats Card */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.stat-item {
  background: var(--color-background);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Tips Card */
.tips-content p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.tips-content ul {
  list-style: none;
  padding: 0;
}

.tips-content li {
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--color-text);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.tips-content li::before {
  content: '💡';
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.tips-content li:last-child {
  border-bottom: none;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .dashboard-hero-content {
    padding: 0 1rem;
  }

  .tabs {
    padding: 0 1rem;
  }

  .sidebar-column {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-column .info-card {
    flex: 1;
    min-width: 280px;
  }

  .dashboard-hero h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 640px) {
  .content-grid {
    padding: 1rem;
    gap: 1rem;
  }

  .sidebar-column {
    flex-direction: column;
  }

  .sidebar-column .info-card {
    min-width: unset;
  }

  .card-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-pills {
    flex-direction: column;
  }
}
