/* LookVivu Travel Portal - Premium Architectural Office Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #fafaf9;          /* Off-white / Stone 50 */
  --bg-secondary: #ffffff;
  --bg-tertiary: #f5f5f4;         /* Stone 100 */
  
  --border-color: #e7e5e4;        /* Stone 200 */
  --border-color-dark: #a8a29e;   /* Stone 400 */
  
  --accent-primary: #1c1917;      /* Stone 900 (Architectural charcoal) */
  --accent-cyan: #0891b2;         /* Cyan */
  --accent-cyan-light: rgba(8, 145, 178, 0.08);
  --accent-green: #15803d;        /* Green */
  --accent-green-light: rgba(21, 128, 61, 0.08);
  --accent-amber: #b45309;        /* Warm Amber */
  --accent-amber-light: rgba(180, 83, 9, 0.08);
  --accent-rose: #be123c;         /* Rose */
  --accent-rose-light: rgba(190, 18, 60, 0.08);

  --text-primary: #1c1917;        /* Stone 900 */
  --text-secondary: #57534e;      /* Stone 600 */
  --text-muted: #a8a29e;          /* Stone 400 */
  
  --font-main: 'Inter', sans-serif;
  --font-title: 'Be Vietnam Pro', sans-serif;
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 8px;
  --border-radius-sm: 4px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.05);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  /* Subtle blueprint grid line background for architectural vibe */
  background-image: 
    linear-gradient(rgba(28, 25, 23, 0.015) 1px, transparent 1px), 
    linear-gradient(90deg, rgba(28, 25, 23, 0.015) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-dark);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

#app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar navigation - Dùng trong Detail View */
aside.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  padding-left: 0.25rem;
  cursor: pointer;
}

nav.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

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

.nav-item.active {
  color: var(--text-primary);
  background-color: var(--bg-tertiary);
  font-weight: 600;
  border-left: 3px solid var(--text-primary);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

.nav-item.active svg {
  color: var(--text-primary);
}

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

.sidebar-footer-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-footer-team {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Main Area */
main.main-content {
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Back button */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
  width: fit-content;
}

.btn-back:hover {
  color: var(--text-primary);
}

.btn-back svg {
  width: 18px;
  height: 18px;
  transition: var(--transition-smooth);
}

.btn-back:hover svg {
  transform: translateX(-3px);
}

/* Detail Workspace Header */
header.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.header-title-area h2 {
  font-size: 1.75rem;
  font-weight: 800;
}

.header-title-area p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #2e2a24;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

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

/* Modern Minimalist Cards */
.minimal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

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

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* ================= PORTAL ARCHITECTURAL HOMEPAGE ================= */
#portal-view {
  animation: fadeIn 0.3s ease;
  width: 100%;
}

.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* Centered Logo Header style */
.portal-header-architect {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

.portal-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 1.5rem;
}

.portal-links {
  display: flex;
  gap: 1.5rem;
}

.portal-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.portal-link:hover {
  color: var(--text-primary);
}

.portal-link.active {
  color: var(--accent-cyan);
  font-weight: 700;
  border-bottom-color: var(--accent-cyan);
}

.portal-logo-center {
  margin: 0.5rem 0;
  display: flex;
  justify-content: center;
}

.portal-social-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.portal-profile-container:hover .user-profile-avatar {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.user-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text Banner Header */
.portal-banner-hero {
  text-align: center;
  margin-bottom: 4rem;
}

.portal-hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.portal-hero-title span.title-highlight {
  color: var(--accent-cyan);
}

/* Gradient text animation for lookvivu brand in hero */
.portal-hero-title .brand-gradient {
  background: linear-gradient(90deg, #0891b2, #0e7490, #06b6d4, #0891b2);
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.portal-hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Horizontal line with airplane paths fallback or clean lines */
.portal-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem auto 3rem;
  position: relative;
  width: 100%;
  max-width: 400px;
}

.portal-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed var(--border-color-dark);
  z-index: 1;
}

.portal-divider svg {
  background: var(--bg-primary);
  padding: 0 1rem;
  color: var(--text-muted);
  z-index: 2;
  width: 36px;
  height: 20px;
}

/* ================= PORTAL FEATURED HERO TRIP (CHÍNH) ================= */
.portal-featured-container {
  margin-bottom: 4rem;
}

.portal-featured-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  background-color: rgba(255, 255, 255, 0.45); /* Nền dạng glass trong suốt */
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.65); /* Viền kính sáng trắng */
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(28, 25, 23, 0.03);
  cursor: pointer;
  padding: 0.6rem;
  transition: var(--transition-smooth);
}

.portal-featured-card:hover {
  transform: translateY(-4px);
  background-color: rgba(255, 255, 255, 0.6);
  border-color: rgba(8, 145, 178, 0.3); /* Viền màu xanh cyan nổi bật khi hover */
  box-shadow: 0 12px 40px 0 rgba(28, 25, 23, 0.06);
}

.portal-featured-img-wrapper {
  position: relative;
  height: 460px;
  border-radius: 20px;
  overflow: hidden;
}

.portal-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portal-featured-card:hover .portal-featured-img {
  transform: scale(1.03);
}

.portal-featured-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background-color: var(--accent-cyan);
  color: #ffffff;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 5;
}

.portal-featured-badge.upcoming { background-color: var(--accent-amber); }
.portal-featured-badge.active { background-color: var(--accent-cyan); }
.portal-featured-badge.completed { background-color: var(--border-color-dark); }

.portal-featured-info {
  padding: 2.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-primary); /* Chuyển sang chữ đen */
}

.portal-featured-tagline {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.portal-featured-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary); /* Chữ tiêu đề đen */
  line-height: 1.25;
  margin-top: 0.5rem;
}

.portal-featured-meta {
  font-size: 0.85rem;
  color: var(--text-secondary); /* Metadata chữ xám tối */
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
}

/* Glassy clean countdown for featured card */
.portal-featured-countdown-wrapper {
  background: rgba(255, 255, 255, 0.55); /* Lớp nền kính mờ bên trong */
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.portal-featured-cd-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.portal-featured-countdown {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portal-featured-cd-segment {
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  min-width: 48px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.portal-featured-cd-segment:not(:last-child)::after {
  content: ':';
  position: absolute;
  right: -0.35rem;
  top: 50%;
  transform: translateY(-60%);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.portal-featured-cd-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.portal-featured-cd-lbl {
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.portal-featured-btn {
  align-self: flex-start;
  background-color: var(--accent-primary); /* Nút đen chữ trắng làm điểm nhấn */
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.portal-featured-btn:hover {
  background-color: var(--accent-cyan);
  color: #ffffff;
}

.portal-featured-btn svg {
  transition: transform 0.25s ease;
}

.portal-featured-btn:hover svg {
  transform: translateX(4px);
}

/* ================= PORTAL ITINERARY COLLAPSE (SỔ XUỐNG) ================= */
.portal-collapse-timeline {
  background-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 28px;
  padding: 2.25rem 2.5rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px 0 rgba(28, 25, 23, 0.04);
  display: none;
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.portal-collapse-timeline.show {
  display: block !important;
  animation: slideDownFade 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.portal-collapse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.portal-collapse-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.portal-collapse-close-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.portal-collapse-close-btn:hover {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

/* Secondary list header */
.portal-grid-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1rem;
}

.portal-grid-title {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  position: relative;
  color: var(--text-primary);
}

.portal-grid-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.85rem;
  width: 40px;
  height: 2px;
  background-color: var(--accent-primary);
}

.portal-grid-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Hide section when no secondary trips (single trip mode) */
.portal-grid-section-hidden {
  display: none !important;
}

/* Empty state for filtered grids */
.portal-empty-state {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  border: 1.5px dashed var(--border-color-dark);
  border-radius: 28px;
  background-color: var(--bg-secondary);
  gap: 0.75rem;
}

.portal-empty-state svg {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.portal-empty-state-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.portal-empty-state-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
}

/* ARCHITECTURAL TRIPS GRID - Rounded layout with thick slate borders */
.trips-grid-architect {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.trip-card-architect {
  background-color: var(--accent-primary); /* Slate-gray base border frame */
  border-radius: 28px; /* Highly rounded Travlla corner */
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  padding: 0.6rem; /* Thick border frame effect */
  transition: var(--transition-smooth);
}

.trip-card-architect:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.trip-card-arch-img-wrapper {
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 20px; /* Matching inner rounded corner */
  overflow: hidden;
  position: relative;
}

.trip-card-arch-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trip-card-architect:hover .trip-card-arch-img {
  transform: scale(1.04);
}

.trip-arch-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trip-arch-badge.upcoming { background-color: var(--accent-amber); color: #ffffff; }
.trip-arch-badge.active { background-color: var(--accent-cyan); color: #ffffff; }
.trip-arch-badge.completed { background-color: rgba(28, 25, 23, 0.65); color: #ffffff; backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.1); }

.trip-card-arch-footer {
  padding: 1.25rem 0.75rem;
  text-align: center;
  background-color: var(--accent-primary);
  color: #ffffff;
}

.trip-card-arch-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.trip-card-arch-dest {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Detail view back-switch layout styling */
#detail-view {
  padding: 2rem 3rem;
}

/* ================= DETAIL VIEW WORKSPACE ================= */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.indigo { background-color: var(--accent-primary-light); color: var(--accent-primary); }
.stat-icon.green { background-color: var(--accent-green-light); color: var(--accent-green); }
.stat-icon.sky { background-color: rgba(8, 145, 178, 0.08); color: var(--accent-cyan); }

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

.stat-info .value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.1rem;
}

/* Countdown box inside details workspace */
.countdown-box {
  display: flex;
  gap: 0.5rem;
}

.countdown-segment {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.6rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  min-width: 54px;
}

.countdown-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Next Activity details */
.next-activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.next-activity-time {
  font-size: 0.8rem;
  color: var(--accent-amber);
  font-weight: 600;
  background-color: var(--accent-amber-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--border-radius-sm);
}

.next-activity-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.next-activity-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.next-activity-location svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Member avatars */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.member-avatar {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.25rem;
  border-radius: var(--border-radius-md);
  text-align: center;
}

.avatar-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0 auto 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.avatar-icon.Nam { background-color: rgba(28, 25, 23, 0.1); color: var(--accent-primary); }
.avatar-icon.Nữ { background-color: rgba(190, 18, 60, 0.1); color: var(--accent-rose); }

.member-name {
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Member chips — dashboard */
#dash-members-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.member-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.member-chip:hover {
  border-color: var(--border-color-dark);
  background: var(--bg-secondary);
}

.member-chip-me {
  border-color: var(--accent-cyan) !important;
  background: var(--accent-cyan-light) !important;
}

.member-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}

.member-chip-avatar.male   { background: var(--accent-cyan); }
.member-chip-avatar.female { background: #ec4899; }

.member-chip-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.member-chip-gender {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  flex-shrink: 0;
}

.you-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--accent-cyan-light);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.member-chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0.15rem;
  border-radius: 4px;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.member-chip-remove:hover {
  color: var(--accent-rose);
  background: var(--accent-rose-light);
}

/* Lock icon on sidebar tab */
.nav-item .tab-lock-icon {
  margin-left: auto;
  opacity: 0.45;
  display: flex;
  align-items: center;
}

/* TIMELINE (Itinerary) - Vertical minimal line */
.timeline-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.timeline-tab-btn {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.timeline-tab-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.timeline-tab-btn.active {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

.timeline-container {
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-color-dark);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 3px solid var(--border-color-dark);
  z-index: 2;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.timeline-dot:hover {
  border-color: var(--accent-primary);
}

.timeline-item.completed .timeline-dot {
  border-color: var(--accent-green);
  background-color: var(--accent-green);
}

.timeline-content-card {
  padding: 1rem 1.25rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  transition: var(--transition-smooth);
}

.timeline-content-card:hover {
  border-color: var(--border-color-dark);
}

.timeline-item.completed .timeline-content-card {
  opacity: 0.65;
}

.timeline-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.timeline-item-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.timeline-item.completed .timeline-item-time {
  color: var(--accent-green);
}

.timeline-item-actions {
  display: flex;
  gap: 0.25rem;
}

.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

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

.action-icon-btn.delete-btn:hover {
  color: var(--accent-rose);
  background-color: var(--accent-rose-light);
}

.timeline-item-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-item-location {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.timeline-item-location svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.timeline-item-notes {
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-left: 2px solid var(--border-color-dark);
  padding-left: 0.75rem;
  margin-top: 0.5rem;
}

/* DIARY */
.diary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.diary-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.diary-img-container {
  height: 180px;
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.diary-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.diary-card:hover .diary-img {
  transform: scale(1.03);
}

.diary-tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.diary-tag.general { color: var(--text-primary); }
.diary-tag.activities { color: var(--accent-amber); }
.diary-tag.food { color: var(--accent-cyan); }
.diary-tag.accommodation { color: var(--accent-rose); }
.diary-tag.other { color: var(--text-secondary); }

.diary-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.diary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.diary-author {
  font-weight: 600;
  color: var(--text-primary);
}

.diary-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.diary-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.diary-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
  display: flex;
  justify-content: flex-end;
}

.gallery-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  position: relative;
  height: 130px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-text {
  font-size: 0.75rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* EXPENSES */
.expense-overview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Day bar chart */
#exp-day-chart-wrapper {
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Leaderboard */
#exp-member-leaderboard {
  max-height: 240px;
  overflow-y: auto;
}

/* Split table */
#exp-split-table table td,
#exp-split-table table th {
  white-space: nowrap;
}

/* Filter selects on expense table */
#exp-filter-category,
#exp-filter-payer {
  height: 34px;
  cursor: pointer;
}

.budget-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--accent-primary);
  border-radius: 4px;
  width: 0%;
  transition: width 0.6s ease;
}

.progress-bar-fill.warning {
  background-color: var(--accent-rose);
}

/* Chart */
.chart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 160px;
}

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

.chart-slice {
  fill: none;
  stroke-width: 12;
  transition: stroke-dasharray 0.3s ease;
}

.chart-labels-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin-top: 1rem;
}

.chart-label-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.chart-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Table */
.expense-table-wrapper {
  overflow-x: auto;
  margin-top: 0.5rem;
}

table.expense-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

table.expense-table th {
  padding: 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

table.expense-table td {
  padding: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

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

table.expense-table tr:hover td {
  background-color: var(--bg-primary);
}

.exp-category-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.exp-category-badge.transport { background-color: var(--bg-tertiary); color: var(--text-primary); }
.exp-category-badge.activities { background-color: var(--accent-amber-light); color: var(--accent-amber); }
.exp-category-badge.accommodation { background-color: var(--accent-rose-light); color: var(--accent-rose); }
.exp-category-badge.food { background-color: var(--accent-cyan-light); color: var(--accent-cyan); }
.exp-category-badge.other { background-color: var(--bg-tertiary); color: var(--text-secondary); }

.expense-amount-val {
  font-weight: 600;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(28, 25, 23, 0.3);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: var(--transition-smooth);
}

.modal-backdrop.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Form layouts */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  border-radius: var(--border-radius-md);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  background-color: var(--bg-secondary);
  border-color: var(--accent-primary);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Image viewer */
.img-viewer-content {
  background: transparent;
  border: none;
  box-shadow: none;
  max-width: 90vw;
  max-height: 90vh;
  padding: 0;
}

.img-viewer-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

/* Responsive styles */
@media (max-width: 1024px) {
  #app-container {
    flex-direction: column;
  }
  
  aside.sidebar {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 0.75rem 0;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    z-index: 999;
  }
  
  .logo-container {
    order: 1;
    margin-bottom: 0 !important;
    flex: 0 0 auto;
  }
  
  .sidebar-profile {
    order: 2;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    flex: 0 0 auto;
  }
  
  nav.nav-menu {
    order: 3;
    flex: 0 0 100%;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    gap: 0.5rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
  }
  
  nav.nav-menu::-webkit-scrollbar {
    display: none; /* WebKit/Chrome/Safari */
  }
  
  .nav-item {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  #detail-view {
    padding: 1.5rem;
  }
  
  main.main-content {
    margin-left: 0;
  }
  
  .grid-3, .grid-2, .expense-overview {
    grid-template-columns: 1fr;
  }

  /* Featured card stacks vertically on tablet */
  .portal-featured-card {
    grid-template-columns: 1fr;
  }

  .portal-featured-img-wrapper {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .portal-container {
    padding: 1.5rem 1rem;
  }

  .portal-header-architect {
    margin-bottom: 2rem;
    border-bottom: none;
    padding-bottom: 0;
  }

  .portal-nav-row {
    display: grid !important;
    grid-template-areas:
      "logo profile"
      "tabs tabs";
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1.25rem 0.5rem;
    width: 100%;
  }

  .portal-logo-center {
    grid-area: logo;
    margin: 0;
    justify-content: flex-start;
  }

  .portal-social-profile {
    grid-area: profile;
    width: auto !important;
    margin: 0;
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .portal-links {
    grid-area: tabs;
    width: 100%;
    justify-content: space-between;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
  }
  
  .portal-hero-title {
    font-size: 1.8rem;
    letter-spacing: -0.75px;
    line-height: 1.25;
    margin-top: 1rem;
  }
  
  .trips-grid-architect {
    grid-template-columns: 1fr;
  }

  /* Featured card stacks vertically on mobile */
  .portal-featured-card {
    grid-template-columns: 1fr;
  }

  .portal-featured-img-wrapper {
    height: 240px;
  }

  .portal-featured-info {
    padding: 1.5rem;
  }

  .portal-featured-title {
    font-size: 1.4rem;
  }

  .portal-collapse-timeline {
    padding: 1.5rem;
  }
}

/* ================= ROLE-BASED LOGIN & USER PROFILE STYLING ================= */

.portal-profile-container {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.portal-profile-container:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-color-dark);
}

.portal-profile-container .user-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-profile-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-profile-status {
  font-size: 0.6rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* Sidebar profile container hover */
.sidebar-profile {
  transition: var(--transition-smooth);
}

.sidebar-profile:hover {
  background-color: var(--bg-tertiary) !important;
  border-radius: var(--border-radius-md);
  padding: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

/* Role Select Cards */
.role-select-card {
  border: 1px solid var(--border-color) !important;
  background-color: var(--bg-secondary);
}

.role-select-card:hover {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-color-dark) !important;
}

.role-select-card.active {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 2px var(--accent-cyan-light);
}

/* Disabled clicks for non-admin */
.disabled-click {
  pointer-events: none;
  cursor: default;
}

/* ================= LIVE TIMELINE HIGHLIGHTS ================= */

@keyframes pulseCyan {
  0% {
    box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(8, 145, 178, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(8, 145, 178, 0);
  }
}

.pulse-active-dot {
  animation: pulseCyan 1.5s infinite !important;
  border-color: var(--accent-cyan) !important;
  background-color: var(--accent-cyan) !important;
}

@keyframes pulseWhite {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.pulse-dot-white {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: white;
  display: inline-block;
  animation: pulseWhite 1.2s infinite;
}

@keyframes pulseCyanStatic {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.pulse-dot {
  animation: pulseCyanStatic 1.5s infinite;
}

.active-live-card {
  border: 2px solid var(--accent-cyan) !important;
  box-shadow: 0 0 16px rgba(8, 145, 178, 0.15) !important;
  background-color: rgba(8, 145, 178, 0.02) !important;
}

/* ================= SYSTEM ADMIN PANEL & QUICK LOGIN ================= */
.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, 
.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-main);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: var(--transition-smooth);
}

.admin-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.admin-table thead tr {
  background-color: var(--bg-tertiary);
}

.admin-table-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.btn-quick-login {
  border: 1px solid var(--border-color) !important;
  background-color: var(--bg-tertiary) !important;
  transition: all 0.2s ease;
}

.btn-quick-login:hover {
  background-color: var(--bg-secondary) !important;
  border-color: var(--accent-cyan) !important;
  transform: translateY(-1px);
}

.btn-quick-login.active {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 2px var(--accent-cyan-light);
}

/* ================= LEAFLET MAP CUSTOM STYLING ================= */
.leaflet-container {
  font-family: var(--font-main) !important;
}

.leaflet-popup-content-wrapper {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-radius: var(--border-radius-md) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
}

.leaflet-bar {
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: var(--border-radius-sm) !important;
}

.leaflet-bar a {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  transition: var(--transition-smooth);
}

.leaflet-bar a:hover {
  background-color: var(--bg-tertiary) !important;
  color: var(--accent-cyan) !important;
}

/* ================= TOAST NOTIFICATIONS ================= */
.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 360px;
  pointer-events: all;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.toast-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.toast-hide {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
}

.toast-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast.success .toast-icon { background-color: var(--accent-green-light); color: var(--accent-green); }
.toast.error   .toast-icon { background-color: var(--accent-rose-light);  color: var(--accent-rose); }
.toast.info    .toast-icon { background-color: var(--accent-cyan-light);   color: var(--accent-cyan); }
.toast.warning .toast-icon { background-color: var(--accent-amber-light);  color: var(--accent-amber); }

/* ================= CUSTOM CONFIRM DIALOG ================= */
#confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#confirm-overlay.show { opacity: 1; }

#confirm-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.75rem;
  max-width: 380px;
  width: 90%;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

#confirm-overlay.show #confirm-dialog { transform: scale(1); }

#confirm-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-rose-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--accent-rose);
}

#confirm-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

#confirm-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

#btn-confirm-yes {
  background-color: var(--accent-rose);
  color: white;
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
#btn-confirm-yes:hover { opacity: 0.85; transform: translateY(-1px); }

#btn-confirm-no {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.55rem 1.25rem;
  border-radius: var(--border-radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}
#btn-confirm-no:hover { background-color: var(--bg-secondary); }

