/* ==========================================
   DESIGN TOKENS & GLOBAL RULES
   ========================================== */
:root {
  --color-primary: #0fa573;
  --color-primary-hover: #0c8a5f;
  --color-primary-light: #e6f6f1;
  --color-secondary: #484867;
  --color-secondary-hover: #35354e;
  --color-accent: #ff7675;
  --color-bg-app: #f6f8fb;
  --color-bg-card: #ffffff;
  --color-text-main: #2d3748;
  --color-text-muted: #718096;
  --color-text-light: #a0aec0;
  --color-border: #e2e8f0;
  --color-border-focus: #0fa573;
  --color-error: #e53e3e;
  --color-success: #38a169;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 20px 40px rgba(15, 165, 115, 0.08);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-main: 'Outfit', sans-serif;
  --header-height: 80px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* ==========================================
   BUTTONS & FORM COMPONENTS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 165, 115, 0.2);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}
.btn-secondary:hover {
  background-color: #d1ebd8;
  color: var(--color-primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background-color: var(--color-border);
  color: var(--color-text-main);
}

.btn-block {
  display: flex;
  width: 100%;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--color-text-main);
  background-color: #ffffff;
  transition: var(--transition-smooth);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 4px rgba(15, 165, 115, 0.1);
}

/* ==========================================
   APP HEADER
   ========================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  display: flex;
  align-items: center;
  position: relative;
  width: 42px;
  height: 42px;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(15, 165, 115, 0.25);
}

.logo-icon i.primary-icon {
  color: white;
  width: 22px;
  height: 22px;
  transition: var(--transition-smooth);
}

.logo-icon i.secondary-icon {
  color: white;
  width: 16px;
  height: 16px;
  position: absolute;
  bottom: -20px;
  opacity: 0;
  transition: var(--transition-smooth);
}

.logo-section:hover .logo-icon i.primary-icon {
  transform: translateY(-8px);
  opacity: 0.3;
}

.logo-section:hover .logo-icon i.secondary-icon {
  bottom: 6px;
  opacity: 1;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-secondary);
  letter-spacing: -0.5px;
}

.logo-text span {
  color: var(--color-primary);
  font-weight: 500;
  font-size: 1rem;
  vertical-align: super;
  margin-left: 2px;
}

.desktop-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-weight: 550;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

.nav-link.active {
  border-bottom-color: var(--color-primary);
}

.user-actions {
  display: flex;
  gap: 12px;
}

/* ==========================================
   APP LAYOUT & WRAPPERS
   ========================================== */
.app-main {
  display: flex;
  margin-top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  position: relative;
  transition: height 0.25s ease, margin-top 0.25s ease;
}
/* When guest strip is visible, shift main down */
body.show-guest-strip .app-main {
  height: calc(100vh - var(--header-height) - 52px);
}

/* Left side: Results, search forms, and filters */
.left-panel {
  flex: 0 0 540px;
  width: 540px;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--color-bg-app);
  z-index: 10;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.02);
}

/* Right side: Sticky map */
.right-panel {
  flex: 1;
  height: 100%;
  position: relative;
  z-index: 5;
}

#map {
  width: 100%;
  height: 100%;
}

/* ==========================================
   CARDS: SEARCH FORM
   ========================================== */
.search-form-card {
  background-color: var(--color-bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

.search-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 16px;
  line-height: 1.25;
}

.search-tabs {
  display: flex;
  background-color: var(--color-bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover {
  color: var(--color-text-main);
}

.tab-btn.active {
  background-color: var(--color-bg-card);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.search-inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-light);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  transition: var(--transition-smooth);
}

.input-wrapper input:focus {
  outline: none;
  background-color: var(--color-bg-card);
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 4px rgba(15, 165, 115, 0.1);
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-light);
  cursor: pointer;
  display: none;
}

.input-wrapper input:not(:placeholder-shown) + .clear-btn {
  display: block;
}

.clear-btn:hover {
  color: var(--color-text-muted);
}

.btn-reverse {
  position: absolute;
  right: 20px;
  top: 76px;
  width: 36px;
  height: 36px;
  background-color: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.btn-reverse:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: rotate(180deg);
}

.btn-reverse i {
  width: 16px;
  height: 16px;
}

/* Autocomplete suggestions */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 99;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.suggestions-list.show {
  display: block;
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.suggestion-item:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-hover);
}

.suggestion-item i {
  color: var(--color-text-light);
  width: 14px;
  height: 14px;
}

.btn-search {
  margin-top: 8px;
}

/* ==========================================
   CARDS: FILTERS
   ========================================== */
.filters-card {
  background-color: var(--color-bg-card);
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}

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

.filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.filter-title i {
  width: 16px;
  height: 16px;
}

.reset-filter-link {
  background: none;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.reset-filter-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-item label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.size-buttons {
  display: flex;
  gap: 8px;
}

.size-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background-color: var(--color-bg-card);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.size-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.size-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 10px rgba(15, 165, 115, 0.2);
}

/* Range input styled slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: var(--transition-smooth);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  background: var(--color-primary-hover);
}

/* ==========================================
   RESULTS LISTING SECTION
   ========================================== */
.results-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.results-count {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.sort-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background-color: white;
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.sort-badge i {
  width: 12px;
  height: 12px;
}

.ads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 80px; /* Space for mobile floating btn */
}

/* Card Styling */
.ad-card {
  background-color: var(--color-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 16px;
  display: flex;
  gap: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.4s ease forwards;
}

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

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(15, 165, 115, 0.3);
}

.ad-card.selected {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.ad-card-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.ad-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-width: 0; /* Prevent text overflow */
}

.ad-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.ad-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-card-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}

.ad-card-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--color-text-main);
  font-weight: 600;
}

.route-arrow {
  color: var(--color-primary);
  font-size: 1.1rem;
}

.ad-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #f1f5f9;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 550;
}

.detail-badge i {
  width: 12px;
  height: 12px;
}

.detail-badge.size-tag {
  background-color: #ecfdf5;
  color: var(--color-primary);
}

.ad-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.ad-card-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--color-text-muted);
}

.user-avatar-mini {
  width: 20px;
  height: 20px;
  background-color: var(--color-secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.user-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #fbbf24; /* Gold Star */
}

.user-rating i {
  width: 12px;
  height: 12px;
  fill: #fbbf24;
}

.ad-card-date {
  font-size: 0.8rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ad-card-date i {
  width: 12px;
  height: 12px;
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 40px 24px;
  background-color: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.no-results i {
  width: 48px;
  height: 48px;
  color: var(--color-text-light);
}

.no-results h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.no-results p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 320px;
}

/* ==========================================
   MODALS: OVERLAY & DRAWERS
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(25, 29, 41, 0.4);
  backdrop-filter: blur(4px);
  z-index: 20000;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Side Drawer Modal (e.g. details) */
.modal-content.drawer {
  width: 460px;
  height: 100%;
  margin-left: auto;
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-overlay.show .modal-content.drawer {
  transform: translateX(0);
}

/* Centered Form Modal (e.g. create ad) */
.modal-content.center {
  width: 100%;
  max-width: 600px;
  margin: auto;
  border-radius: var(--radius-lg);
  transform: translateY(30px);
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.show .modal-content.center {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-bg-app);
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background-color: var(--color-accent);
  color: white;
}

/* ==========================================
   DETAIL MODAL DRAWER SPECIFIC
   ========================================== */
.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 24px;
  padding-bottom: 48px;
}

.detail-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

.detail-price-tag {
  display: inline-block;
  background-color: var(--color-accent);
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: 0 4px 8px rgba(255, 118, 117, 0.2);
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.detail-route-block {
  background-color: var(--color-bg-app);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

.route-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 0;
}

.route-row i {
  color: var(--color-primary);
  width: 18px;
  height: 18px;
}

.route-connector {
  width: 2px;
  height: 16px;
  background-color: var(--color-primary);
  margin-left: 8px;
  opacity: 0.4;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  margin-top: 24px;
}

.detail-description {
  font-size: 0.92rem;
  color: var(--color-text-main);
  line-height: 1.6;
  white-space: pre-line;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.spec-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.spec-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-main);
}

/* User Card inside Drawer */
.user-detail-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--color-bg-app);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.user-avatar-large {
  width: 44px;
  height: 44px;
  background-color: var(--color-secondary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.user-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name-large {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.user-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.user-star-badge {
  display: flex;
  align-items: center;
  gap: 2px;
  background-color: #fffbeb;
  color: #d97706;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.user-star-badge i {
  width: 10px;
  height: 10px;
  fill: #fbbf24;
}

/* Interactive Action Section in Drawer */
.action-box {
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-success-state {
  text-align: center;
  padding: 16px;
  background-color: #ecfdf5;
  color: var(--color-success);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
  animation: scaleUp 0.3s ease forwards;
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ==========================================
   POST AD FORM MODAL SPECIFIC
   ========================================== */
.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.col-full {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.help-text {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 2px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* ==========================================
   TOAST BILDİRİMLERİ (TOAST NOTIFICATIONS)
   ========================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--color-secondary);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 550;
  min-width: 280px;
  max-width: 400px;
  transform: translateY(50px);
  opacity: 0;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

@keyframes toastIn {
  to { transform: translateY(0); opacity: 1; }
}

.toast.success {
  background-color: var(--color-primary);
}

.toast.error {
  background-color: var(--color-error);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.4);
  width: 100%;
  animation: progressAnimation 3s linear forwards;
}

@keyframes progressAnimation {
  to { width: 0%; }
}

/* ==========================================
   MOBILE TOGGLE BUTTON & RESPONSIVE LAYOUT
   ========================================== */
.mobile-toggle-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-secondary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(72, 72, 103, 0.3);
  z-index: 100;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mobile-toggle-btn:hover {
  background-color: var(--color-secondary-hover);
  transform: translateX(-50%) translateY(-2px);
}

/* Medium Desktop Screens (Prevent Header Overlaps) */
@media (min-width: 1025px) and (max-width: 1400px) {
  .header-container {
    padding: 0 16px;
  }
  .logo-text {
    font-size: 1.3rem;
  }
  .logo-text span {
    font-size: 0.85rem;
  }
  .desktop-nav {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.85rem;
  }
  .user-actions {
    gap: 8px;
  }
  .user-actions .btn {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }
  .user-actions .btn i {
    width: 14px;
    height: 14px;
  }
  .lang-switcher-container {
    padding: 6px 8px;
    border-radius: var(--radius-sm);
  }
  .lang-select {
    font-size: 0.78rem;
  }
  .user-profile-menu {
    padding: 6px 10px;
    height: 38px;
    border-radius: var(--radius-sm);
  }
  .user-profile-menu .user-name {
    font-size: 0.82rem;
    max-width: 80px;
  }
  .btn-wallet-header {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .btn-wallet-header i {
    width: 13px;
    height: 13px;
  }
}

/* Tablet & Mobile Screens */
@media (max-width: 1024px) {
  .app-header {
    height: 70px;
  }
  
  .app-main {
    margin-top: 70px;
    height: calc(100vh - 70px);
    flex-direction: column;
  }

  .left-panel {
    flex: 1;
    width: 100%;
    max-width: none;
    padding: 16px;
    padding-bottom: 90px;
  }

  .right-panel {
    display: none; /* Map hidden by default on mobile */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 40;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  /* When map mode is active on mobile */
  .app-main.show-map .left-panel {
    display: none;
  }
  
  .app-main.show-map .right-panel {
    display: block;
  }

  /* Modal responsive adjustment */
  .modal-content.drawer {
    width: 100%;
  }

  .modal-content.center {
    width: 90%;
    padding: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .col-full {
    grid-column: span 1;
  }
  
  .desktop-nav {
    display: none; /* Hide desktop nav links */
  }

  /* Header adjustments for smaller screens */
  .logo-text {
    display: none; /* Hide logo text, icon-only is cleaner on mobile */
  }
  .app-header {
    height: 60px;
    padding: 0 10px;
  }
  .header-container {
    padding: 0;
    gap: 8px;
  }
  .user-actions {
    gap: 6px;
  }
  /* Circular icon-only buttons on mobile screen sizes */
  .btn-secondary, .btn-publish-trip, .btn-admin-panel {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    min-width: auto !important;
  }
  .btn-secondary span, .btn-publish-trip span, .btn-admin-panel span {
    display: none !important; /* Hide button text labels on mobile */
  }
  .btn-secondary i, .btn-publish-trip i, .btn-admin-panel i {
    margin: 0 !important;
    width: 18px;
    height: 18px;
  }
  .user-profile-menu {
    padding: 4px !important;
    gap: 0 !important;
    background: none !important;
    border: none !important;
  }
  .user-profile-menu .user-name, 
  .user-profile-menu i {
    display: none !important; /* Hide user name text and chevron down on mobile */
  }
  .user-avatar-mini {
    margin: 0;
    width: 34px;
    height: 34px;
  }
  .lang-switcher-container {
    gap: 2px;
  }
  .lang-icon {
    width: 14px;
    height: 14px;
  }
  .lang-select {
    font-size: 0.75rem;
    padding-right: 12px;
  }

  /* Stack inputs & filters */
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Realign reverse button */
  .btn-reverse {
    right: 15px;
    top: 68px;
  }

  /* Responsive ad cards list (stack vertically on mobile) */
  @media (max-width: 480px) {
    .ad-card, .trip-card {
      flex-direction: column;
      padding: 12px;
      gap: 12px;
    }
    .ad-card-image {
      width: 100%;
      height: 140px;
    }
    .ad-card-top {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .ad-card-price {
      align-self: flex-start;
    }
  }
}

/* ==========================================
   LEAFLET CUSTOM MAP PINS
   ========================================== */
.custom-pin-container, .custom-ad-pin-container {
  background: none;
  border: none;
}

.map-start-pin {
  width: 16px;
  height: 16px;
  background-color: var(--color-primary);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  position: relative;
}

.map-start-pin .pulse {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0.8;
  animation: markerPulse 1.8s infinite ease-out;
  pointer-events: none;
}

@keyframes markerPulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.map-end-pin {
  width: 20px;
  height: 20px;
  background-color: var(--color-accent);
  border: 4px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: -2px 2px 6px rgba(0,0,0,0.3);
  margin-top: -6px;
}

.map-ad-pin {
  background-color: white;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  font-family: var(--font-main);
  transition: var(--transition-smooth);
  cursor: pointer;
  white-space: nowrap;
}

.map-ad-pin:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
  z-index: 999;
}

.map-ad-pin.active-pin {
  transform: scale(1.15);
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: var(--shadow-card-hover);
  animation: pinBounce 0.5s ease infinite alternate;
}

@keyframes pinBounce {
  to { transform: scale(1.15) translateY(-5px); }
}

.pin-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
}

.pin-title {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Color coding pin tags depending on size class */
.map-ad-pin.small { border-left: 4px solid #3b82f6; }
.map-ad-pin.medium { border-left: 4px solid #10b981; }
.map-ad-pin.large { border-left: 4px solid #f59e0b; }
.map-ad-pin.bulky { border-left: 4px solid #ef4444; }

/* ==========================================
   LANGUAGE SWITCHER
   ========================================== */
.lang-switcher-container {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--color-bg-app);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  transition: var(--transition-smooth);
}

.lang-switcher-container:hover {
  border-color: var(--color-primary);
}

.lang-icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.lang-select {
  background: transparent;
  border: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
  outline: none;
  padding-right: 4px;
}

/* ==========================================
   HOW IT WORKS & INSURANCE MODALS
   ========================================== */
.modal-tabs {
  display: flex;
  background-color: var(--color-bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  gap: 4px;
}

.modal-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-tab-btn:hover {
  color: var(--color-text-main);
}

.modal-tab-btn.active {
  background-color: var(--color-bg-card);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.how-flow-content {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.how-flow-content.active {
  display: flex;
  animation: fadeIn 0.4s ease forwards;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.step-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.step-text p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Insurance Features */
.ins-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.ins-feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.ins-feat-icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
  flex-shrink: 0;
  background-color: var(--color-primary-light);
  padding: 8px;
  border-radius: var(--radius-sm);
}

.ins-feat-text h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.ins-feat-text p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.safety-tips-box {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
}

.safety-tips-box h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 10px;
}

.safety-tips-box ul {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-tips-box li {
  font-size: 0.85rem;
  color: #78350f;
  line-height: 1.4;
  position: relative;
  padding-left: 14px;
}

.safety-tips-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #b45309;
  font-weight: bold;
}

/* ==========================================
   USER PROFILE MENU & AUTH BUTTONS
   ========================================== */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-bg-app);
  border: 1.5px solid var(--color-border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  height: 44px;
}

.user-profile-menu .user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-secondary);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  color: var(--color-accent);
  background-color: rgba(255, 118, 117, 0.1);
}

.btn-logout i {
  width: 16px;
  height: 16px;
}

.auth-error-alert {
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--color-error);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease forwards;
}

/* Verification Code Styling */
.verification-digit-input {
  width: 50px;
  height: 50px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  background-color: var(--color-bg-app);
  transition: var(--transition-smooth);
}

.verification-digit-input:focus {
  border-color: var(--color-accent);
  outline: none;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(255, 168, 1, 0.2);
}

.profile-dropdown a:hover {
  background-color: var(--color-bg-app);
}

/* ==========================================
   NOTIFICATION BELL & PANEL
   ========================================== */
.notif-bell-btn {
  position: relative;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}
.notif-bell-btn:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.notif-bell-btn i { width: 18px; height: 18px; }

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  overflow: hidden;
  animation: dropIn 0.2s ease-out;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-app);
}
.notif-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-secondary);
}
.notif-clear-btn {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  transition: color 0.2s;
}
.notif-clear-btn:hover { color: var(--color-accent); }

.notif-list {
  max-height: 360px;
  overflow-y: auto;
}
.notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-bg-app);
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
}
.notif-item:hover { background-color: var(--color-bg-app); }
.notif-item.unread { background-color: rgba(15, 165, 115, 0.04); }

.notif-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon-wrap i { width: 15px; height: 15px; }
.notif-type-offer { background-color: rgba(15, 165, 115, 0.12); color: var(--color-primary); }
.notif-type-accepted { background-color: rgba(16, 185, 129, 0.12); color: #10b981; }
.notif-type-info { background-color: rgba(72, 72, 103, 0.12); color: var(--color-secondary); }

.notif-text { flex: 1; min-width: 0; }
.notif-item-title { font-size: 0.83rem; font-weight: 700; color: var(--color-text-main); margin-bottom: 2px; }
.notif-item-body { font-size: 0.78rem; color: var(--color-text-muted); line-height: 1.35; }
.notif-item-date { font-size: 0.72rem; color: var(--color-text-light); margin-top: 4px; }
.notif-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 4px;
}

/* ==========================================
   VIEW COUNTER BADGE
   ========================================== */
.view-count-badge {
  background-color: rgba(15, 165, 115, 0.08) !important;
  color: var(--color-primary) !important;
  border: 1px solid rgba(15, 165, 115, 0.2) !important;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 16px;
  flex-wrap: wrap;
}
.detail-view-count,
.detail-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.detail-view-count i, .detail-date-badge i { width: 14px; height: 14px; }

/* ==========================================
   PROFILE STATS CARD (Settings Modal)
   ========================================== */
.profile-stats-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--color-primary), #0c8a5f);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 4px;
  color: white;
}
.profile-avatar-large {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: white;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.4);
}
.profile-stats-info { flex: 1; }
.profile-stats-name { font-size: 1.05rem; font-weight: 700; color: white; }
.profile-stats-email { font-size: 0.78rem; color: rgba(255,255,255,0.75); margin-top: 2px; }
.profile-stats-row { display: flex; gap: 18px; margin-top: 10px; }
.profile-stat-item { display: flex; flex-direction: column; align-items: center; }
.profile-stat-value { font-size: 1.1rem; font-weight: 700; color: white; }
.profile-stat-label { font-size: 0.68rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

.settings-success-alert {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================
   OWNER OFFER PANEL IN DETAIL MODAL
   ========================================== */
.owner-offers-section {
  margin: 20px 0;
  padding: 16px;
  background: var(--color-bg-app);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.offers-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.owner-offer-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-top: 10px;
  transition: var(--transition-smooth);
}
.owner-offer-card:hover { box-shadow: var(--shadow-md); }
.owner-offer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}
.owner-offer-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
.owner-offer-name { font-size: 0.88rem; font-weight: 700; color: var(--color-secondary); }
.owner-offer-message {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.4;
  margin: 0 0 10px;
}
.owner-offer-actions {
  display: flex;
  gap: 8px;
}
.btn-sm {
  padding: 6px 12px !important;
  font-size: 0.8rem !important;
  border-radius: var(--radius-sm) !important;
}

.offer-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.offer-status-pending { background-color: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.offer-status-accepted { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.offer-status-rejected { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ==========================================
   ACCEPTED DELIVERIES MODAL
   ========================================== */
.offer-item-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}
.offer-item-card:hover { box-shadow: var(--shadow-md); }
.offer-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.offer-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 3px;
}
.offer-item-route {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.offer-item-message {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.4;
  margin: 8px 0;
}
.offer-item-meta {
  display: flex;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--color-text-light);
  font-weight: 500;
  flex-wrap: wrap;
}

/* ==========================================
   USER PROFILE MODAL
   ========================================== */
.user-profile-hero {
  text-align: center;
  padding: 28px 20px 20px;
  background: linear-gradient(160deg, var(--color-bg-app) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.user-profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #0c8a5f);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; color: white;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(15, 165, 115, 0.3);
}
.user-profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 4px;
}
.user-profile-email {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.user-profile-stat {
  text-align: center;
  padding: 14px 8px;
  background: var(--color-bg-app);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.user-profile-stat-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-secondary);
}
.user-profile-stat-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-top: 3px;
  font-weight: 600;
}

.user-profile-ads-list { display: flex; flex-direction: column; gap: 10px; }
.user-profile-ad-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--color-bg-app);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.user-profile-ad-row:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.user-profile-ad-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.user-profile-ad-info { flex: 1; min-width: 0; }
.user-profile-ad-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-profile-ad-route {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 2px;
}
.user-profile-ad-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.user-profile-ad-price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
}
.user-profile-view-link {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* View profile hint icon in detail modal */
.view-profile-hint {
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}
.user-detail-card:hover .view-profile-hint {
  opacity: 1;
  color: var(--color-primary);
}

/* ==========================================
   ADMIN PANEL STYLES
   ========================================== */

/* Header Admin Button */
.btn-admin-panel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white !important;
  border: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
  position: relative;
}
.btn-admin-panel:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}
.admin-panel-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

/* Overlay & Layout */
.admin-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(246, 248, 251, 0.98); /* Light premium backdrop */
  z-index: 9999;
  display: none;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.admin-panel-overlay.show {
  display: block;
  opacity: 1;
}
.admin-panel-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px 60px;
}

/* Admin Header */
.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
  margin-bottom: 30px;
}
.admin-panel-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-panel-logo i {
  width: 32px;
  height: 32px;
  color: #4f46e5;
}
.admin-panel-logo h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0;
}
.admin-panel-logo span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.admin-panel-close {
  background: white;
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-main);
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}
.admin-panel-close:hover {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fca5a5;
  transform: rotate(90deg);
}

/* Stats Bar */
.admin-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.admin-stat-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}
.admin-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-stat-icon.total {
  background-color: #e0e7ff;
  color: #4f46e5;
}
.admin-stat-icon.pending {
  background-color: #fef3c7;
  color: #d97706;
}
.admin-stat-icon.active {
  background-color: #d1fae5;
  color: #059669;
}
.admin-stat-icon.rejected {
  background-color: #fee2e2;
  color: #dc2626;
}
.admin-stat-info {
  display: flex;
  flex-direction: column;
}
.admin-stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.2;
}
.admin-stat-lbl {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}
.admin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}
.admin-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #4f46e5;
  transform: scaleX(0);
  transition: var(--transition-smooth);
}
.admin-tab.active {
  color: #4f46e5;
}
.admin-tab.active::after {
  transform: scaleX(1);
}
.admin-tab-badge {
  background-color: #4f46e5;
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Ad Cards */
.admin-ads-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-ad-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}
.admin-ad-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}
.admin-ad-thumb {
  position: relative;
  width: 140px;
  height: 110px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.admin-ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-status-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.admin-status-badge.status-pending {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.admin-status-badge.status-active {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.admin-status-badge.status-rejected {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.admin-status-badge.status-unpublished {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.admin-ad-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.admin-ad-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}
.admin-ad-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0;
}
.admin-ad-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: #4f46e5;
  background-color: #f5f3ff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.admin-ad-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.admin-ad-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-ad-meta i {
  width: 14px;
  height: 14px;
}
.admin-ad-size-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.admin-ad-size-badge.size-small { background-color: #e0f2fe; color: #0369a1; }
.admin-ad-size-badge.size-medium { background-color: #fef3c7; color: #b45309; }
.admin-ad-size-badge.size-large { background-color: #fae8ff; color: #86198f; }
.admin-ad-size-badge.size-bulky { background-color: #fee2e2; color: #991b1b; }

.admin-ad-desc {
  font-size: 0.85rem;
  color: var(--color-text-main);
  line-height: 1.45;
  margin-bottom: 12px;
}
.admin-reject-reason {
  background-color: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #c53030;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-reject-reason i {
  width: 14px;
  height: 14px;
}

.admin-ad-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text-main);
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.admin-action-btn i {
  width: 14px;
  height: 14px;
}
.admin-action-btn:hover {
  background-color: var(--color-bg-app);
}
.admin-action-btn.approve {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
}
.admin-action-btn.approve:hover {
  background: linear-gradient(135deg, #059669, #047857);
}
.admin-action-btn.reject {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
}
.admin-action-btn.reject:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.admin-action-btn.unpublish {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #4b5563;
}
.admin-action-btn.unpublish:hover {
  background: #e5e7eb;
}
.admin-action-btn.delete {
  background: #fff5f5;
  border-color: #fed7d7;
  color: #c53030;
}
.admin-action-btn.delete:hover {
  background: #ffebeb;
}

/* Empty State */
.admin-empty-state {
  background: white;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.admin-empty-state p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 118, 117, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(255, 118, 117, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 118, 117, 0); }
}

/* Toast info styling overrides */
.toast.info {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  color: #1e3a8a;
}
.toast.info i {
  color: #3b82f6;
}
.toast.info .toast-progress {
  background-color: #3b82f6;
}

/* ==========================================
   EXPLORE MODE SWITCHER TABS
   ========================================== */
.explore-mode-toggles {
  display: flex;
  background-color: #e2e8f0;
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}
.explore-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: none;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}
.explore-mode-btn.active {
  background-color: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.explore-mode-btn i {
  width: 16px;
  height: 16px;
}

/* ==========================================
   TRANSPORTER TRIP CARD DESIGN
   ========================================== */
.trip-card {
  border-left: 4px solid #4f46e5 !important;
}
.trip-card:hover {
  border-color: #4338ca !important;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.08) !important;
}
.trip-card-indicator {
  background-color: #f5f3ff;
  color: #4f46e5;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 10px;
  margin-left: 20px;
}

/* Blue Trip Markers on Map */
.map-ad-pin.trip-pin {
  border: 2px solid #4f46e5;
  background: white;
  color: #4f46e5;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}
.map-ad-pin.trip-pin .pin-price {
  background: #4f46e5;
  color: white;
}

/* ==========================================
   INTERACTIVE LIVE CHAT STYLES
   ========================================== */
#chat-messages-container::-webkit-scrollbar {
  width: 6px;
}
#chat-messages-container::-webkit-scrollbar-track {
  background: transparent;
}
#chat-messages-container::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}
#chat-message-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 165, 115, 0.15);
}

/* =========================================================================
   DARK THEME MODE VARIABLE OVERRIDES
   ========================================================================= */
:root.dark-theme {
  --color-bg-app: #0f172a;       /* slate-900 */
  --color-bg-card: #1e293b;      /* slate-800 */
  --color-text-main: #f8fafc;    /* slate-50 */
  --color-text-muted: #94a3b8;   /* slate-400 */
  --color-border: #334155;       /* slate-700 */
  --color-secondary: #f8fafc;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* Apply background changes to body and container elements */
:root.dark-theme body {
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
}
:root.dark-theme header,
:root.dark-theme .header-container {
  background-color: var(--color-bg-card);
  border-bottom-color: var(--color-border);
}
:root.dark-theme .search-panel {
  background-color: var(--color-bg-card);
  box-shadow: var(--shadow-md);
}
:root.dark-theme .ad-card {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
}
:root.dark-theme .modal-content {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
}
:root.dark-theme .form-control {
  background-color: var(--color-bg-app);
  border-color: var(--color-border);
  color: var(--color-text-main);
}
:root.dark-theme .form-control:focus {
  background-color: var(--color-bg-app);
}
:root.dark-theme .profile-dropdown {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}
:root.dark-theme .explore-mode-toggles {
  background-color: #334155;
}
:root.dark-theme .explore-mode-btn.active {
  background-color: #1e293b;
  color: var(--color-primary);
}
:root.dark-theme .profile-stats-card {
  background-color: var(--color-bg-app);
  border-color: var(--color-border);
}


/* =========================================================================
   FLOATING CUSTOMER HELP CHAT WIDGET
   ========================================================================= */
.support-widget-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}
.support-widget-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 165, 115, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.support-widget-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(15, 165, 115, 0.45);
}
.support-widget-btn i {
  width: 24px;
  height: 24px;
}
.support-widget-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: #ef4444;
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Chat Panel */
.support-panel {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  height: 480px;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.support-panel-header {
  padding: 12px 16px;
  background-color: var(--color-bg-app);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.support-agent-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981; /* Green by default */
}
.support-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
}

.support-messages-body {
  flex-grow: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--color-bg-card);
}
.support-msg-bubble {
  max-width: 85%;
  padding: 8px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 4px;
}
.support-msg-bubble.agent {
  align-self: flex-start;
  background-color: #f1f5f9;
  color: var(--color-text-main);
  border-radius: 12px 12px 12px 0px;
}
.support-msg-bubble.user {
  align-self: flex-end;
  background-color: var(--color-primary);
  color: white;
  border-radius: 12px 12px 0px 12px;
}

.support-faq-btn {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 0.76rem;
  color: var(--color-text-main);
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  transition: var(--transition-smooth);
}
.support-faq-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.support-panel-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg-app);
  display: flex;
  gap: 8px;
}
.support-panel-footer input {
  flex-grow: 1;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 0 14px;
  font-size: 0.8rem;
  outline: none;
  background-color: var(--color-bg-card);
  color: var(--color-text-main);
}
.support-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.support-send-btn i {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}

/* iOS style Floating SMS Notification Banner */
.sms-notification-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 90%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  z-index: 99999;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: #1c1c1e;
}

.dark-theme .sms-notification-banner {
  background: rgba(28, 28, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f2f2f7;
}

.sms-notification-banner.show {
  transform: translateX(-50%) translateY(0);
}

.sms-notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sms-notif-app-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sms-notif-app-icon {
  font-size: 0.9rem;
}

.sms-notif-app-name {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8e8e93;
}

.sms-notif-time {
  font-size: 0.68rem;
  color: #8e8e93;
}

.sms-notif-body {
  font-size: 0.85rem;
  line-height: 1.4;
}

.sms-notif-body strong {
  font-weight: 600;
}

#sms-notif-code {
  font-family: monospace;
  font-size: 1rem;
  color: var(--color-accent);
  background: rgba(255, 168, 1, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 2px;
}

/* Horizontal scrolling settings tabs for narrow screens */
.settings-tabs-header {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.settings-tabs-header::-webkit-scrollbar {
  display: none;
}
.settings-tab-btn {
  flex-shrink: 0;
}

/* Responsive customer support widget on narrow viewports */
@media (max-width: 480px) {
  .support-widget-container {
    bottom: 15px;
    right: 15px;
  }
  .support-panel {
    position: fixed;
    bottom: 80px;
    right: 15px;
    left: 15px;
    width: calc(100vw - 30px);
    height: calc(100vh - 120px);
    max-height: 520px;
  }
}

/* ==========================================
   ADMIN PANEL RESPONSIVE VIEWPORTS LAYOUT
   ========================================== */
@media (max-width: 768px) {
  .admin-panel-container {
    margin: 15px auto;
    padding: 0 16px 30px;
  }
  .admin-panel-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }
  .admin-panel-logo h2 {
    font-size: 1.25rem;
  }
  .admin-panel-logo span {
    font-size: 0.78rem;
  }

  /* Admin tab bar scrolling */
  .admin-tabs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
  }
  .admin-tab {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.85rem;
  }

  /* Support chat layout stack */
  .admin-support-chat-grid {
    display: grid;
    grid-template-columns: 1fr !important;
    height: auto !important;
    gap: 12px;
    border: none !important;
  }
  .admin-support-sessions-sidebar {
    border-right: none !important;
    border-bottom: 1px solid var(--color-border);
    max-height: 180px;
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  #admin-support-chat-window {
    height: 380px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
  }
}

@media (max-width: 600px) {
  /* Admin list items layout shift to vertical stack */
  .admin-ad-card {
    flex-direction: column;
    padding: 14px;
    gap: 14px;
  }
  .admin-ad-thumb {
    width: 100% !important;
    height: 150px !important;
  }
  .admin-ad-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .admin-ad-price {
    align-self: flex-start;
  }
  .admin-ad-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .admin-action-btn {
    flex-grow: 1;
    justify-content: center;
  }
}


/* ==========================================
   SITE FOOTER
   ========================================== */
/* ==========================================
   COMPACT SITE FOOTER (single row)
   ========================================== */
.app-footer {
  background-color: var(--color-secondary);
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  font-family: var(--font-main);
  flex-shrink: 0;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-brand .footer-logo span {
  font-size: 1rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}
.footer-brand .footer-logo span em {
  color: var(--color-primary);
  font-style: normal;
}
.footer-grid { display: none; } /* hidden — was 4-col, replaced with single row */
.footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}
.footer-bottom p {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}
.footer-bottom-links {
  display: flex;
  gap: 12px;
}
.footer-bottom-links a {
  font-size: 0.75rem;
  color: #64748b;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.footer-bottom-links a:hover { color: var(--color-primary); }
.footer-socials {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.footer-social-btn {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}
.footer-social-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}
.footer-social-btn svg { width: 13px; height: 13px; }
/* Hide verbose footer columns that were in the old design */
.footer-brand p, .footer-badge-row, .footer-col, .footer-col h4, .footer-col ul { display: none !important; }
@media (max-width: 600px) {
  .footer-bottom p { display: none; }
  .app-footer { padding-bottom: 70px; height: auto; padding-top: 10px; padding-bottom: 10px; }
}

/* ==========================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--color-bg-card);
  border-top: 1px solid var(--color-border);
  z-index: 5000;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: stretch;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-family: var(--font-main);
  font-size: 0.65rem;
  font-weight: 600;
  transition: color 0.2s ease;
  padding: 0;
  position: relative;
}
.mobile-nav-item i {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}
.mobile-nav-item.active {
  color: var(--color-primary);
}
.mobile-nav-item.active i {
  transform: translateY(-2px);
}
.mobile-nav-item:hover { color: var(--color-primary); }
.mobile-nav-item .mobile-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  background: #ef4444;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Center post button - hero action */
.mobile-nav-item.mobile-nav-cta {
  flex: 0 0 64px;
}
.mobile-nav-cta-circle {
  width: 46px;
  height: 46px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 165, 115, 0.4);
  transition: var(--transition-smooth);
}
.mobile-nav-item.mobile-nav-cta:hover .mobile-nav-cta-circle,
.mobile-nav-item.mobile-nav-cta.active .mobile-nav-cta-circle {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(15, 165, 115, 0.5);
}
.mobile-nav-cta-circle i {
  color: white;
  width: 22px;
  height: 22px;
}
@media (max-width: 1024px) {
  .mobile-bottom-nav { display: flex; }
  /* Ensure content doesn't hide behind bottom nav */
  .app-main { padding-bottom: 64px; }
  /* Move mobile toggle up */
  .mobile-toggle-btn { bottom: 85px !important; }
  /* Move support widget up so it doesn't overlap the map button */
  .support-widget-container { bottom: 145px !important; }
}

/* ==========================================
   GUEST ANNOUNCEMENT STRIP (replaces full hero banner)
   ========================================== */
/* The full hero banner is now a slim strip shown only to guests */
.hero-banner {
  background: linear-gradient(90deg, #0f172a 0%, #0c3d2e 100%);
  height: 52px;
  display: none; /* hidden by default, shown via JS for guests */
  align-items: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(15,165,115,0.25);
  flex-shrink: 0;
}
.hero-banner.visible {
  display: flex;
}
.hero-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(15,165,115,0.2) 0%, transparent 70%);
  pointer-events: none;
}
/* Compact strip layout */
.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.hero-content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,165,115,0.2);
  border: 1px solid rgba(15,165,115,0.35);
  color: #4ade80;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: 0;
}
.hero-eyebrow i { width: 11px; height: 11px; }
.hero-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-title span { color: var(--color-primary); }
.hero-title br { display: none; }
.hero-subtitle { display: none; }
.hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}
.hero-btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}
.hero-btn-secondary:hover { background: rgba(255,255,255,0.15); }
.hero-btn-primary i, .hero-btn-secondary i { width: 13px; height: 13px; }
/* Stats row — compact inline */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.hero-stat-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: none;
  border: none;
  min-width: auto;
}
.hero-stat-num {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.hero-stat-lbl {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
}
/* Strip close button */
.hero-strip-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.hero-strip-close:hover { color: #94a3b8; }
.hero-strip-close i { width: 14px; height: 14px; }
@media (max-width: 768px) {
  .hero-stats { display: none; }
  .hero-btn-secondary { display: none; }
  .hero-title { font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .hero-eyebrow { display: none; }
}

/* ==========================================
   STAR RATING COMPONENT
   ========================================== */
.star-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.star-rating-row .stars {
  display: flex;
  gap: 2px;
}
.star-rating-row .stars i {
  width: 14px;
  height: 14px;
  color: #f59e0b;
  fill: #f59e0b;
}
.star-rating-row .stars i.empty { 
  color: #d1d5db;
  fill: none; 
}
.star-rating-row .rating-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 600;
}
/* Interactive star picker */
.star-picker {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 12px 0;
}
.star-picker-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #d1d5db;
  padding: 2px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.star-picker-btn i { width: 28px; height: 28px; }
.star-picker-btn.selected,
.star-picker-btn:hover ~ .star-picker-btn,
.star-picker:hover .star-picker-btn:hover {
  color: #f59e0b;
}
.star-picker:hover .star-picker-btn { color: #d1d5db; }
.star-picker .star-picker-btn:hover,
.star-picker .star-picker-btn:hover ~ .star-picker-btn { color: inherit; }
.star-picker-btn.filled { color: #f59e0b; transform: scale(1.1); }

/* Rating Modal */
.rating-modal-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}
.rating-star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 2rem;
  transition: transform 0.15s ease;
  padding: 2px;
  line-height: 1;
}
.rating-star-btn:hover { transform: scale(1.2); }

/* ==========================================
   DARK MODE — ADDITIONAL FIXES
   ========================================== */
:root.dark-theme .app-footer {
  background-color: #020617;
}
:root.dark-theme .mobile-bottom-nav {
  background: #1e293b;
  border-top-color: #334155;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
:root.dark-theme .admin-panel-overlay {
  background-color: #0f172a;
}
:root.dark-theme .admin-panel-container { color: var(--color-text-main); }
:root.dark-theme .admin-stat-card {
  background-color: #1e293b;
  border-color: #334155;
}
:root.dark-theme .admin-ad-card {
  background-color: #1e293b;
  border-color: #334155;
}
:root.dark-theme .admin-tab {
  color: #94a3b8;
}
:root.dark-theme .admin-tab.active {
  color: var(--color-primary);
}
:root.dark-theme .admin-tabs {
  border-bottom-color: #334155;
}
:root.dark-theme .admin-panel-header {
  border-bottom-color: #334155;
}
:root.dark-theme .admin-panel-close {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
:root.dark-theme .admin-action-btn {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}
/* Chat modal dark mode */
:root.dark-theme #chat-modal .modal-content {
  background-color: #1e293b;
}
:root.dark-theme #chat-modal .chat-messages-body {
  background-color: #0f172a !important;
}
:root.dark-theme #chat-modal .chat-input-form {
  background-color: #1e293b !important;
  border-top-color: #334155 !important;
}
:root.dark-theme #chat-modal input[type="text"] {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}
/* Support widget dark mode */
:root.dark-theme .support-panel {
  background: #1e293b;
  border-color: #334155;
}
:root.dark-theme .support-panel-header {
  background-color: #1e293b;
  border-bottom-color: #334155;
}
:root.dark-theme .support-messages-body {
  background-color: #0f172a;
}
:root.dark-theme .support-panel-footer {
  background-color: #1e293b;
  border-top-color: #334155;
}
:root.dark-theme .support-panel-footer input {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}
:root.dark-theme .notif-panel {
  background-color: #1e293b;
  border-color: #334155;
}
:root.dark-theme .notif-panel-header {
  border-bottom-color: #334155;
}
:root.dark-theme .filters-card {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
}
:root.dark-theme .filter-header {
  border-bottom-color: var(--color-border);
}
:root.dark-theme .search-form-card {
  background-color: var(--color-bg-card);
  border-color: var(--color-border);
}
:root.dark-theme .tab-btn {
  color: var(--color-text-muted);
}
:root.dark-theme .tab-btn.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: var(--color-bg-app);
}
:root.dark-theme .explore-mode-btn {
  background-color: #1e293b;
  color: #94a3b8;
}
:root.dark-theme select.form-control,
:root.dark-theme select.lang-select {
  background-color: var(--color-bg-app);
  color: var(--color-text-main);
  border-color: var(--color-border);
}
:root.dark-theme .size-btn {
  background-color: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}
:root.dark-theme .size-btn.active {
  background-color: var(--color-primary);
  color: white;
}
:root.dark-theme .hero-banner {
  background: linear-gradient(90deg, #020617 0%, #052e1c 100%);
}

/* ==========================================
   MAP CLUSTER & POPUP STYLING
   ========================================== */
.map-cluster-pin {
  background: linear-gradient(135deg, var(--color-primary), #0fa56e);
  color: white;
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 4px 14px rgba(15, 165, 115, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid white;
  white-space: nowrap;
  transition: transform 0.2s;
}
.map-cluster-pin:hover {
  transform: scale(1.05);
}
.map-cluster-badge {
  background: white;
  color: var(--color-primary);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.map-popup-list {
  padding: 4px;
  min-width: 200px;
  font-family: var(--font-main);
}
.map-popup-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.map-popup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.map-popup-item:hover {
  background: rgba(15, 165, 115, 0.08);
  border-color: rgba(15, 165, 115, 0.15);
}
.map-popup-item-title {
  font-size: 0.8rem;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
.map-popup-item-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* ==========================================
   WALLET SYSTEM STYLES
   ========================================== */

/* Header Wallet Button */
.btn-wallet-header {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #0fa573, #0c8a5f);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}
.btn-wallet-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 165, 115, 0.3);
}
.btn-wallet-header i {
  width: 15px;
  height: 15px;
}
.wallet-balance-text {
  font-variant-numeric: tabular-nums;
}

/* Wallet Modal Content */
.wallet-modal-content {
  max-width: 520px;
  padding: 0 !important;
  overflow: hidden;
}

/* Wallet Balance Hero Card */
.wallet-balance-hero {
  background: linear-gradient(135deg, #0fa573 0%, #0c8a5f 40%, #484867 100%);
  padding: 28px 28px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.wallet-balance-hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.wallet-balance-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}
.wallet-balance-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wallet-balance-icon i {
  width: 28px;
  height: 28px;
  color: white;
}
.wallet-balance-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wallet-balance-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wallet-balance-amount {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

/* Wallet Tabs */
.wallet-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg-app);
}
.wallet-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.wallet-tab-btn:hover {
  color: var(--color-text-main);
  background-color: rgba(15, 165, 115, 0.04);
}
.wallet-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 700;
}
.wallet-tab-btn i {
  width: 15px;
  height: 15px;
}

/* Wallet Tab Content */
.wallet-tab-content {
  padding: 24px;
}

/* Wallet Method Grid */
.wallet-method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.wallet-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-card);
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}
.wallet-method-card:hover {
  border-color: var(--color-primary);
  background-color: rgba(15, 165, 115, 0.03);
}
.wallet-method-card.active {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(15, 165, 115, 0.12);
}
.wallet-method-card i {
  width: 22px;
  height: 22px;
  color: var(--color-text-muted);
}
.wallet-method-card.active i {
  color: var(--color-primary);
}
.wallet-method-card span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.wallet-method-card.active span {
  color: var(--color-primary);
}

/* Wallet Transaction List */
.wallet-tx-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wallet-tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-card);
  transition: var(--transition-smooth);
}
.wallet-tx-item:hover {
  border-color: rgba(15, 165, 115, 0.2);
  box-shadow: var(--shadow-sm);
}
.wallet-tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wallet-tx-icon.deposit {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}
.wallet-tx-icon.deposit i {
  color: #16a34a;
}
.wallet-tx-icon.withdraw {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
}
.wallet-tx-icon.withdraw i {
  color: #ef4444;
}
.wallet-tx-icon.escrow_hold {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
}
.wallet-tx-icon.escrow_hold i {
  color: #d97706;
}
.wallet-tx-icon.escrow_release {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}
.wallet-tx-icon.escrow_release i {
  color: #4f46e5;
}
.wallet-tx-icon i {
  width: 18px;
  height: 18px;
}
.wallet-tx-info {
  flex: 1;
  min-width: 0;
}
.wallet-tx-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wallet-tx-date {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.wallet-tx-amount {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wallet-tx-amount.positive {
  color: #16a34a;
}
.wallet-tx-amount.negative {
  color: #ef4444;
}
.wallet-tx-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}
.wallet-tx-empty i {
  width: 48px;
  height: 48px;
  opacity: 0.25;
  margin-bottom: 10px;
}
.wallet-tx-empty p {
  font-size: 0.88rem;
  font-weight: 600;
}

/* Support End Chat Button hover */
.support-end-chat-btn:hover {
  background-color: #ef4444 !important;
  color: white !important;
}

/* ==========================================
   PERFORMANCE: Reduced Motion & Tablet Optimizations
   ========================================== */

/* Respect user's motion preferences (accessibility + performance) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Tablet performance optimizations (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Reduce animation durations on tablets */
  .modal-overlay,
  .modal-content,
  .modal-content.drawer,
  .modal-content.center,
  .ad-card,
  .btn,
  .filter-panel,
  .toast-notification {
    transition-duration: 0.15s !important;
  }

  /* GPU-accelerated scrolling for list panels */
  .left-panel,
  .drawer-body,
  .ad-list {
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
  }

  /* Simplify box-shadow on tablets for better paint performance */
  .ad-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
  }
}

/* ==========================================
   EXTRA MOBILE UI OPTIMIZATIONS (Anti-Squish)
   ========================================== */
@media (max-width: 768px) {
  /* Give inputs and buttons more breathing room */
  .form-control {
    padding: 14px 16px;
    font-size: 1rem; /* Prevent iOS zoom */
  }
  
  .btn {
    padding: 14px 20px;
    min-height: 48px;
    font-size: 1rem;
  }
  
  /* Make cards less squished */
  .ad-card, .trip-card {
    padding: 16px;
    gap: 16px;
  }
  
  /* Fix modal widths to use more screen real estate but breathe */
  .modal-content.center {
    width: 95% !important;
    padding: 24px 16px !important;
  }
  
  .modal-header h2 {
    font-size: 1.4rem;
  }
  
  /* Spacing in forms */
  .form-group {
    margin-bottom: 20px;
  }

  /* Make sure labels are readable */
  .form-group label {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  /* Optimize left panel padding */
  .left-panel {
    padding: 12px;
  }

  /* Shrink header wallet button on mobile to save space */
  .btn-wallet-header {
    padding: 6px 10px !important;
    font-size: 0.8rem !important;
    min-height: auto;
  }
  .btn-wallet-header i {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 480px) {
  /* ==================
     HEADER OPTIMIZATIONS
     ================== */
  /* Hide redundant '+' button from header since bottom nav has it */
  .user-actions .btn-secondary { display: none !important; }
  
  /* Shrink language switcher */
  .lang-icon { display: none !important; }
  .lang-switcher-container { padding: 0 !important; }
  .lang-select {
    padding-left: 8px !important;
    padding-right: 24px !important;
    font-size: 0.8rem !important;
    height: 36px !important;
  }

  /* Make header elements scrollable to prevent squishing */
  .header-container { gap: 8px !important; flex-wrap: nowrap !important; overflow: hidden; }
  .logo-section { flex-shrink: 0; }
  .user-actions { 
    gap: 8px !important; 
    overflow-x: auto !important;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding-bottom: 2px; /* For smooth scrolling */
  }
  .user-actions::-webkit-scrollbar { display: none; }
  .logo-text { font-size: 1.15rem !important; }
  .logo-icon i { width: 18px !important; height: 18px !important; }

  /* Bottom sheet style for modals on small phones */
  .modal-content.center {
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important; 
    margin: auto auto 0 auto !important; /* Push to bottom */
    padding: 24px !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom) + 12px) !important;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
  }
  
  .modal-overlay.show .modal-content.center {
    transform: translateY(0);
  }
  
  .ad-card-image {
    height: 180px !important; /* Taller image on phones */
  }
}

/* ==========================================================================
   SETTINGS MODAL - FULL PAGE SIDEBAR LAYOUT
   ========================================================================== */

/* The Modal Container */
.settings-modal-container {
  background: var(--color-bg-app);
  width: 90%;
  max-width: 1100px;
  height: 85vh;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: 1px solid var(--color-border);
}

.modal-overlay.show .settings-modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header */
.settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-app);
  z-index: 10;
}

.settings-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.settings-modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.settings-modal-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

/* Body Layout */
.settings-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* LEFT SIDEBAR */
.settings-sidebar {
  width: 260px;
  background: var(--color-bg-app);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  padding: 24px 16px;
  flex-shrink: 0;
}

.settings-sidebar-group {
  margin-bottom: 24px;
}

.settings-sidebar-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-sidebar-group-label i {
  width: 14px;
  height: 14px;
}

.settings-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.settings-sidebar-item i {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

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

.settings-sidebar-item.active {
  background: rgba(59, 130, 246, 0.1); /* Primary color low opacity */
  color: var(--color-primary);
  font-weight: 600;
}

.settings-sidebar-item.active i {
  color: var(--color-primary);
}

/* Danger Item in Sidebar */
.settings-sidebar-item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.settings-sidebar-item--danger:hover i {
  color: #ef4444;
}

/* RIGHT CONTENT AREA */
.settings-content-area {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: var(--color-bg-subtle);
}

/* Form container inside content area */
#settings-form {
  max-width: 600px;
  margin: 0 auto;
}

/* Section Transitions */
.settings-section {
  animation: fadeIn 0.3s ease;
}

.settings-section-animate {
  animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Section Header */
.settings-section-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.settings-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.settings-section-title--danger {
  color: #ef4444;
}

/* Content Blocks */
.settings-block {
  background: var(--color-bg-app);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.settings-block-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 16px 0;
}

.settings-block-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 20px 0;
  line-height: 1.5;
}

/* Avatar Upload Block */
.settings-avatar-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.settings-avatar-upload-box {
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.settings-avatar-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--color-bg-hover);
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.settings-avatar-upload-box:hover .settings-avatar-preview {
  border-color: var(--color-primary);
}

.settings-avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-text-muted);
}

.settings-avatar-placeholder i {
  width: 20px;
  height: 20px;
}

.settings-avatar-placeholder span {
  font-size: 0.75rem;
  font-weight: 500;
}

.settings-avatar-hints {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.settings-avatar-hints li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 14px;
}

.settings-avatar-hints li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* Inline Fields */
.settings-inline-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-inline-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-inline-edit-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.settings-inline-edit-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-primary);
}

.settings-inline-edit-btn i {
  width: 16px;
  height: 16px;
}

/* Display Name Options */
.settings-displayname-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-displayname-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.settings-displayname-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.settings-displayname-option-text {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
}

.settings-displayname-save-btn {
  font-size: 0.85rem;
  padding: 8px 16px;
}

/* Profile Stats Card (Overrides for new layout) */
#settings-section-personal .profile-stats-card {
  box-shadow: none;
  border: 1px solid var(--color-border);
  margin-bottom: 24px;
}

/* Readonly Hints & Info Boxes */
.settings-readonly-hint, .settings-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.settings-readonly-hint i, .settings-info-box i {
  color: var(--color-primary);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-readonly-hint span, .settings-info-box span {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.5;
}

/* Danger Box */
.settings-danger-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.settings-danger-box i {
  color: #ef4444;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-danger-box p {
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}

.settings-delete-btn {
  background: #ef4444;
  color: white;
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.settings-delete-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Toggles & Checkboxes */
.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.settings-toggle-row:hover {
  background: var(--color-bg-hover);
}

.settings-toggles-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Activity Stats */
.settings-activity-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.settings-activity-stat-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.settings-activity-stat-card i {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.settings-activity-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

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

/* Payment Cards */
.settings-payment-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-payment-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  font-weight: 500;
  color: var(--color-text-muted);
}

.settings-payment-card i {
  color: var(--color-text-muted);
}

.settings-payment-badge {
  margin-left: auto;
  font-size: 0.75rem;
  background: var(--color-border);
  padding: 4px 8px;
  border-radius: 12px;
}

/* Actions Bottom */
.settings-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  .settings-modal-container {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    transform: translateY(0);
  }
  
  .settings-modal-body {
    flex-direction: column;
  }
  
  .settings-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    gap: 16px;
  }
  
  .settings-sidebar-group {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .settings-sidebar-group-label {
    display: none; /* Hide labels on mobile to save horizontal space */
  }
  
  .settings-sidebar-nav {
    flex-direction: row;
    gap: 8px;
  }
  
  .settings-sidebar-item {
    width: auto;
    padding: 8px 12px;
  }
  
  .settings-content-area {
    padding: 20px;
  }
  
  .settings-activity-stats {
    grid-template-columns: 1fr;
  }
  
  .settings-avatar-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

