/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
  margin-top: var(--header-height);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-normal);
}

/* Sidebar Styling */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.sidebar-avatar-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid rgba(var(--primary-rgb), 0.2);
}

.sidebar-profile-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-profile-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  background-color: rgba(var(--primary-rgb), 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sidebar-item:hover {
  background-color: var(--bg-tertiary);
  color: var(--primary);
}

.sidebar-item.active {
  background-color: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
}

.sidebar-item i {
  font-size: 1.15rem;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Dashboard Main Content Area */
.dashboard-main {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
  max-width: calc(100% - var(--sidebar-width));
}

.dashboard-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.dashboard-section.active {
  display: block;
}

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

.dashboard-title-box {
  margin-bottom: 32px;
}

.dashboard-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.dashboard-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Overview Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background-color: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-card:nth-child(2) .stat-icon {
  background-color: rgba(var(--secondary-rgb), 0.08);
  color: var(--secondary);
}

.stat-card:nth-child(3) .stat-icon {
  background-color: rgba(245, 158, 11, 0.08);
  color: var(--accent);
}

.stat-card:nth-child(4) .stat-icon {
  background-color: rgba(16, 185, 129, 0.08);
  color: var(--success);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 2px 0;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 700;
}

.stat-trend.up {
  color: var(--success);
}

.stat-trend.down {
  color: var(--danger);
}

/* Charts & Main Section Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.chart-card, .list-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.card-header-flex h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

/* SVG Line Chart Styling */
.chart-container {
  width: 100%;
  height: 260px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--border-color);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0px 4px 6px rgba(var(--primary-rgb), 0.3));
}

.chart-gradient-fill {
  fill: url(#chart-gradient);
  opacity: 0.15;
}

.chart-dot {
  fill: var(--primary);
  stroke: var(--bg-secondary);
  stroke-width: 2.5;
  cursor: pointer;
  transition: r var(--transition-fast);
}

.chart-dot:hover {
  r: 8;
}

.chart-axis-text {
  font-size: 10px;
  fill: var(--text-muted);
  font-family: var(--font-body);
}

/* Countdown Panel */
.countdown-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.countdown-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.08);
}

.countdown-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.countdown-subtitle {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 24px;
}

.countdown-timer {
  display: flex;
  gap: 16px;
}

.timer-box {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 10px;
  min-width: 60px;
  text-align: center;
  backdrop-filter: blur(4px);
}

.timer-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.timer-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* Bookings List/Table Layout */
.bookings-table-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.bookings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 700px;
}

.bookings-table th {
  padding: 18px 24px;
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.bookings-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.bookings-table tr:last-child td {
  border-bottom: none;
}

.booking-dest-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.booking-dest-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.booking-dest-info h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.booking-dest-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.status-badge.confirmed {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.status-badge.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--accent);
}

.status-badge.cancelled {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.actions-cell {
  display: flex;
  gap: 8px;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-icon.delete:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Itinerary Planner Component */
.itinerary-selector-box {
  margin-bottom: 24px;
}

.itinerary-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 32px;
}

.itinerary-days-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.itinerary-day-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.day-header {
  background-color: var(--bg-tertiary);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
}

.day-header h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
}

.day-activities-list {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.activity-time-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-time {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  background-color: rgba(var(--primary-rgb), 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.activity-desc {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.btn-add-activity {
  background: none;
  border: 1px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-add-activity:hover {
  background-color: rgba(var(--primary-rgb), 0.05);
}

.itinerary-placeholder {
  grid-column: span 2;
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}

.itinerary-placeholder i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: var(--border-color);
}

/* Profile Form styling */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.profile-actions {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* Responsive Dashboard Styles */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .itinerary-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .dashboard-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 20px;
  }
  .dashboard-main {
    max-width: 100%;
    padding: 20px;
  }
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  .profile-actions {
    grid-column: span 1;
  }
}
