/* ============================================================
   VACANTES TLAXCALA - Estilos globales
   Mobile-first | Dark theme | Acentos verdes
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   VARIABLES CSS
   ───────────────────────────────────────────────────────────── */
:root {
  /* Colores de fondo */
  --bg-0: #080808;
  --bg-1: #111111;
  --bg-2: #1a1a1a;
  --bg-3: #222222;
  --bg-4: #2c2c2c;
  --bg-5: #383838;

  /* Verde primario */
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-light: #4ade80;
  --green-xlight: #bbf7d0;
  --green-glow: rgba(34, 197, 94, 0.18);
  --green-glow2: rgba(34, 197, 94, 0.08);

  /* Texto */
  --text-1: #f0f0f0;
  --text-2: #a8a8a8;
  --text-3: #666666;
  --text-4: #444444;

  /* Bordes */
  --border: #2a2a2a;
  --border-light: #333333;
  --border-focus: var(--green);

  /* Estado */
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --success: #22c55e;

  /* Radio */
  --r-xs: 4px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.6);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.7);
  --shadow-green: 0 0 20px rgba(34, 197, 94, 0.3);

  /* Transiciones */
  --t: 0.18s ease;
  --t-slow: 0.3s ease;

  /* Tipografía */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --topbar-h: 60px;
  --bottom-nav-h: 64px;
  --sidebar-w: 300px;
  --max-w: 1280px;
}

/* ─────────────────────────────────────────────────────────────
   RESET Y BASE
   ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-1);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: var(--font);
}

ul,
ol {
  list-style: none;
}

p {
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   BARRA SUPERIOR
   ───────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: var(--r-sm);
  color: #fff;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
}

.logo-text {
  font-size: 1rem;
  color: var(--text-2);
  display: none;
}

.logo-text strong {
  color: var(--green);
  font-weight: 700;
}

.topbar-search {
  flex: 1;
  max-width: 520px;
  display: none;
}

.search-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
  transition: border-color var(--t);
}

.search-wrap:focus-within {
  border-color: var(--green);
}

.search-icon {
  flex-shrink: 0;
  padding: 0 12px;
  color: var(--text-3);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  width: 16px;
  height: 16px;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-1);
  font-size: 0.9rem;
  padding: 10px 0;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-btn {
  padding: 0 14px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: color var(--t);
}

.search-btn:hover {
  color: var(--green);
}

.search-btn svg {
  width: 16px;
  height: 16px;
}

.topbar-actions {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  transition: background var(--t), color var(--t);
}

.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
}

.topbar-icon-btn:hover,
.topbar-icon-btn.active {
  background: var(--bg-3);
  color: var(--text-1);
}

.badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1px solid var(--bg-0);
}

.topbar-publish {
  flex-shrink: 0;
}

.topbar-publish svg {
  width: 16px;
  height: 16px;
}

.topbar-hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--text-1);
  transition: background var(--t);
  margin-left: auto;
}

.topbar-hamburger svg {
  width: 22px;
  height: 22px;
}

.topbar-hamburger:hover {
  background: var(--bg-3);
}

/* ─────────────────────────────────────────────────────────────
   MENÚ LATERAL MÓVIL
   ───────────────────────────────────────────────────────────── */
.mobile-sidebar {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.mobile-sidebar.open {
  pointer-events: all;
}

.mobile-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity var(--t-slow);
  backdrop-filter: blur(4px);
}

.mobile-sidebar.open .mobile-sidebar-overlay {
  opacity: 1;
}

.mobile-sidebar-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  max-width: 85vw;
  background: var(--bg-0);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-sidebar.open .mobile-sidebar-panel {
  transform: translateX(0);
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  transition: background var(--t), color var(--t);
}

.sidebar-close:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.sidebar-user-username {
  color: var(--text-3);
  font-size: 0.82rem;
}

.sidebar-auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-publish {
  margin: 16px;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  color: var(--text-2);
  font-size: 0.95rem;
  transition: background var(--t), color var(--t);
}

.sidebar-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
  background: var(--bg-2);
  color: var(--text-1);
}

.sidebar-nav-item.active {
  color: var(--green);
}

.sidebar-nav-danger {
  color: var(--danger);
}

.sidebar-nav-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.sidebar-section-label {
  display: block;
  padding: 8px 20px 4px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
}

/* ─────────────────────────────────────────────────────────────
   NAVEGACIÓN INFERIOR (MOBILE)
   ───────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  height: var(--bottom-nav-h);
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 0.7rem;
  font-weight: 500;
  transition: color var(--t);
  position: relative;
  padding: 8px 4px;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--green);
}

.bottom-nav-publish {
  color: var(--text-2);
}

.publish-fab {
  width: 46px;
  height: 46px;
  background: var(--green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-green);
  margin-top: -12px;
  transition: background var(--t), transform var(--t);
}

.publish-fab svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-publish:hover .publish-fab {
  background: var(--green-dark);
  transform: scale(1.08);
}

.bottom-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1px solid var(--bg-0);
}

.bottom-nav-spacer {
  height: var(--bottom-nav-h);
}

/* ─────────────────────────────────────────────────────────────
   DROPDOWN USUARIO
   ───────────────────────────────────────────────────────────── */
.topbar-avatar-menu {
  position: relative;
}

.avatar-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--r-full);
  transition: background var(--t);
}

.avatar-trigger:hover {
  background: var(--bg-3);
}

.avatar-chevron {
  width: 14px !important;
  height: 14px !important;
  color: var(--text-3);
  transition: transform var(--t);
}

.avatar-trigger[aria-expanded="true"] .avatar-chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--t), transform var(--t);
  z-index: 200;
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.dropdown-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.dropdown-username {
  color: var(--text-3);
  font-size: 0.8rem;
  margin-top: 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  color: var(--text-2);
  font-size: 0.9rem;
  transition: background var(--t), color var(--t);
}

.dropdown-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dropdown-item:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.dropdown-item-danger {
  color: var(--danger);
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
}

.badge-count {
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--r-full);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

.ml-auto {
  margin-left: auto;
}

/* ─────────────────────────────────────────────────────────────
   CONTENIDO PRINCIPAL
   ───────────────────────────────────────────────────────────── */
.main-content {
  min-height: calc(100vh - var(--topbar-h) - var(--bottom-nav-h));
  padding-top: 8px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.container-sm {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-md {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─────────────────────────────────────────────────────────────
   BOTONES
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r);
  border: 1px solid transparent;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green-glow);
}

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

.btn-ghost:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-sm {
  font-size: 0.82rem;
  padding: 7px 14px;
  gap: 5px;
}

.btn-sm svg {
  width: 14px;
  height: 14px;
}

.btn-lg {
  font-size: 1rem;
  padding: 13px 24px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  padding: 9px;
  border-radius: var(--r-sm);
}

.btn-icon.btn-sm {
  padding: 7px;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────
   FORMULARIOS
   ───────────────────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-1);
  border-radius: var(--r);
  padding: 11px 14px;
  font-size: 0.92rem;
  width: 100%;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  outline: none;
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--green);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px var(--green-glow2);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-4);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-2);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-3);
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger);
}

/* Checkbox y Radio personalizados */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--bg-3);
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  transition: background var(--t), border-color var(--t);
  margin-top: 2px;
}

.form-check-input:checked {
  background: var(--green);
  border-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.5;
}

.form-check-label a {
  color: var(--green);
  text-decoration: underline;
}

/* Input con prefijo/sufijo */
.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-3);
  transition: border-color var(--t);
}

.input-group:focus-within {
  border-color: var(--green);
}

.input-prefix,
.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-3);
  font-size: 0.9rem;
  background: var(--bg-4);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}

.input-suffix {
  border-right: none;
  border-left: 1px solid var(--border);
}

.input-group .form-input {
  border: none;
  background: transparent;
  border-radius: 0;
}

.input-group .form-input:focus {
  box-shadow: none;
}

/* Formulario grid */
.form-row {
  display: grid;
  gap: 16px;
}

.form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ─────────────────────────────────────────────────────────────
   CARDS
   ───────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 20px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

/* Card de listado (producto/servicio/vacante) */
.listing-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  position: relative;
  display: flex;
  flex-direction: column;
}

.listing-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.listing-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-3);
  position: relative;
  flex-shrink: 0;
}

.listing-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.listing-card:hover .listing-card-img img {
  transform: scale(1.04);
}

/* Listado tipo vacante (sin imagen principal) */
.listing-card.vacante-card .listing-card-img {
  display: none;
}

.listing-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.listing-card-type {
  margin-bottom: 2px;
}

.listing-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
}

.listing-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-3);
  flex-wrap: wrap;
}

.listing-card-meta svg {
  width: 13px;
  height: 13px;
}

.listing-card-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Vendedor en tarjeta ─────────────────────────────────── */
.listing-card-seller {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  margin-top: -2px;
}
.listing-card-seller-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.listing-card-seller-name {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.listing-card-seller-name:hover {
  color: var(--text-1);
}

/* ── Badge verificado global ─────────────────────────────── */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 500;
  vertical-align: middle;
}

.verified-badge::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--green);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  flex-shrink: 0;
}

.listing-card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  transition: background var(--t), color var(--t);
  z-index: 2;
  border: none;
}

.listing-card-fav svg {
  width: 16px;
  height: 16px;
}

.listing-card-fav:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
}

.listing-card-fav.active {
  background: var(--danger);
  color: #fff;
}

.listing-card-fav.active svg {
  fill: currentColor;
}

/* Grid de listings */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ─────────────────────────────────────────────────────────────
   BADGES Y ETIQUETAS
   ───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.badge-producto {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.badge-servicio {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
}

.badge-vacante {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.badge-nuevo {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.badge-vendido {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.badge-pausado {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-featured {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* ─────────────────────────────────────────────────────────────
   ALERTAS (FLASH MESSAGES)
   ───────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  font-size: 0.9rem;
  border: 1px solid;
  margin-bottom: 16px;
}

.alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert span {
  flex: 1;
}

.alert-close {
  color: inherit;
  opacity: 0.7;
  flex-shrink: 0;
  padding: 0;
}

.alert-close:hover {
  opacity: 1;
}

.alert-close svg {
  width: 16px;
  height: 16px;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green-light);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* ─────────────────────────────────────────────────────────────
   AVATARES
   ───────────────────────────────────────────────────────────── */
.avatar {
  border-radius: var(--r-full);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-4);
}

.avatar-xs {
  width: 28px;
  height: 28px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
}

.avatar-md {
  width: 48px;
  height: 48px;
}

.avatar-lg {
  width: 72px;
  height: 72px;
}

.avatar-xl {
  width: 96px;
  height: 96px;
}

.avatar-xxl {
  width: 120px;
  height: 120px;
}

/* ─────────────────────────────────────────────────────────────
   TABS
   ───────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-0);
  padding: 4px;
  border-radius: var(--r);
  border: 1px solid var(--border);
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  border: none;
  background: none;
}

.tab svg {
  width: 15px;
  height: 15px;
}

.tab.active {
  background: var(--bg-3);
  color: var(--text-1);
}

.tab:hover:not(.active) {
  color: var(--text-2);
}

/* Tabs en línea (tipo filter pills) */
.tab-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tab-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 0.83rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-2);
  transition: all var(--t);
  text-decoration: none;
}

.pill svg {
  width: 14px;
  height: 14px;
}

.pill:hover {
  border-color: var(--green);
  color: var(--green);
}

.pill.active {
  background: var(--green-glow);
  border-color: var(--green);
  color: var(--green);
}

/* ─────────────────────────────────────────────────────────────
   MODAL
   ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 301;
  width: calc(100% - 32px);
  max-width: 520px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow), transform var(--t-slow);
  max-height: 90vh;
  overflow-y: auto;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  transition: background var(--t), color var(--t);
}

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

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─────────────────────────────────────────────────────────────
   TOASTS
   ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 380px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-lg);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  pointer-events: all;
  border: 1px solid;
}

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast-success {
  background: #0f2e1a;
  border-color: var(--green);
  color: var(--green-light);
}

.toast-error {
  background: #2e0f0f;
  border-color: var(--danger);
  color: #f87171;
}

.toast-info {
  background: #0f1e2e;
  border-color: var(--info);
  color: #60a5fa;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

/* (hero antiguo eliminado) */

/* ─────────────────────────────────────────────────────────────
   FILTROS DE TIPO
   ───────────────────────────────────────────────────────────── */
.type-filter {
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
}

.type-filter-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.type-filter-inner::-webkit-scrollbar {
  display: none;
}

.type-filter-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--t), border-color var(--t);
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.type-filter-btn svg {
  width: 16px;
  height: 16px;
}

.type-filter-btn:hover {
  color: var(--text-2);
}

.type-filter-btn.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ─────────────────────────────────────────────────────────────
   CATEGORÍAS
   ───────────────────────────────────────────────────────────── */
.cats-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.cats-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cats-row::-webkit-scrollbar {
  display: none;
}

/* ─────────────────────────────────────────────────────────────
   SECCIÓN DE PUBLICACIONES
   ───────────────────────────────────────────────────────────── */
.listings-section {
  padding: 20px 0 40px;
}

.listings-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

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

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
}

.section-count {
  font-size: 0.82rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────────────────────────────
   ESTADO VACÍO
   ───────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  gap: 12px;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-3);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-2);
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-3);
  max-width: 280px;
}

/* ─────────────────────────────────────────────────────────────
   PAGINACIÓN
   ───────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 0;
  flex-wrap: wrap;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--bg-2);
  transition: all var(--t);
  cursor: pointer;
}

.page-btn svg {
  width: 16px;
  height: 16px;
}

.page-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.page-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.page-dots {
  color: var(--text-3);
  padding: 0 4px;
  font-size: 0.88rem;
}

/* ─────────────────────────────────────────────────────────────
   PÁGINA DE DETALLE
   ───────────────────────────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 16px 0;
}

.detail-gallery {
  position: relative;
}

.gallery-main {
  aspect-ratio: 4/3;
  background: var(--bg-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-4);
}

.gallery-no-image svg {
  width: 48px;
  height: 48px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--r);
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--t);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: var(--green);
}

.detail-info {}

.detail-header {
  margin-bottom: 16px;
}

.detail-type-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 10px;
}

.detail-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 10px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--text-3);
}

.detail-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.detail-meta-item svg {
  width: 14px;
  height: 14px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.detail-actions-row {
  display: flex;
  gap: 10px;
}

.detail-description-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
}

.detail-description {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Seller card */
.seller-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
}

.seller-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.seller-info {
  flex: 1;
}

.seller-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.seller-username {
  color: var(--text-3);
  font-size: 0.82rem;
}

.seller-meta {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 12px;
}

/* ─────────────────────────────────────────────────────────────
   PÁGINA DE MENSAJES
   ───────────────────────────────────────────────────────────── */
.messages-layout {
  display: grid;
  grid-template-columns: 1fr;
  height: calc(100vh - var(--topbar-h) - var(--bottom-nav-h));
  overflow: hidden;
}

.conv-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.conv-list-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

.conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
  position: relative;
}

.conv-item:hover {
  background: var(--bg-3);
}

.conv-item.active {
  background: var(--bg-3);
}

.conv-item-avatar {
  flex-shrink: 0;
  position: relative;
}

.conv-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--green);
  border-radius: var(--r-full);
  border: 2px solid var(--bg-2);
}

.conv-item-body {
  flex: 1;
  min-width: 0;
}

.conv-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conv-item-preview {
  font-size: 0.8rem;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-item-preview.unread {
  color: var(--text-2);
  font-weight: 500;
}

.conv-item-time {
  font-size: 0.73rem;
  color: var(--text-4);
  margin-top: 3px;
}

.conv-unread-badge {
  width: 20px;
  height: 20px;
  background: var(--green);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chat-header-back {
  display: flex;
  align-items: center;
  color: var(--text-2);
  transition: color var(--t);
}

.chat-header-back:hover {
  color: var(--text-1);
}

.chat-header-back svg {
  width: 20px;
  height: 20px;
}

.chat-header-info {
  flex: 1;
}

.chat-header-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.chat-header-listing {
  font-size: 0.78rem;
  color: var(--text-3);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-bubble {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 85%;
}

.message-bubble.mine {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.message-text {
  background: var(--bg-3);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-1);
  line-height: 1.5;
  word-break: break-word;
}

.message-bubble.mine .message-text {
  background: var(--green);
  color: #fff;
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-4);
  margin-top: 4px;
}

.message-bubble.mine .message-time {
  text-align: right;
}

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.chat-textarea {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-1);
  padding: 10px 14px;
  font-size: 0.9rem;
  resize: none;
  outline: none;
  min-height: 44px;
  max-height: 120px;
  font-family: var(--font);
  line-height: 1.5;
  transition: border-color var(--t);
}

.chat-textarea:focus {
  border-color: var(--green);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  background: var(--green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--t), transform var(--t);
}

.chat-send-btn:hover {
  background: var(--green-dark);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-4);
}

.chat-empty svg {
  width: 48px;
  height: 48px;
}

.chat-empty p {
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────────
   PERFIL PÚBLICO
   ───────────────────────────────────────────────────────────── */
.profile-cover {
  height: 160px;
  background: linear-gradient(135deg, #0d2618 0%, #0a1a0e 100%);
  position: relative;
  overflow: hidden;
}

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

.profile-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
}

.profile-header {
  padding: 0 16px;
  position: relative;
}

.profile-avatar-wrap {
  margin-top: -48px;
  margin-bottom: 12px;
}

.profile-avatar {
  border: 4px solid var(--bg-1);
  box-shadow: var(--shadow);
}

.profile-info {
  margin-bottom: 16px;
}

.profile-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-1);
}

.profile-username {
  color: var(--text-3);
  font-size: 0.88rem;
  margin-top: 2px;
}

.profile-bio {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 10px;
  line-height: 1.6;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-top: 14px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-1);
  display: block;
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-3);
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────────────
   FORMULARIO PUBLICAR
   ───────────────────────────────────────────────────────────── */
.publish-form {
  padding: 20px 0;
}

.publish-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--t);
  background: var(--bg-2);
  text-align: center;
}

.type-option svg {
  width: 28px;
  height: 28px;
  color: var(--text-3);
  transition: color var(--t);
}

.type-option span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-3);
  transition: color var(--t);
}

.type-option:hover {
  border-color: var(--border-light);
}

.type-option.active {
  border-color: var(--green);
  background: var(--green-glow2);
}

.type-option.active svg,
.type-option.active span {
  color: var(--green);
}

.publish-section {
  margin-bottom: 20px;
}

.publish-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Upload de imágenes */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
  background: var(--bg-2);
}

.image-upload-area:hover,
.image-upload-area.dragover {
  border-color: var(--green);
  background: var(--green-glow2);
}

.image-upload-area svg {
  width: 36px;
  height: 36px;
  color: var(--text-4);
  margin: 0 auto 8px;
}

.image-upload-area p {
  font-size: 0.88rem;
  color: var(--text-3);
}

.image-upload-area strong {
  color: var(--green);
}

.images-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.image-preview-item {
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--border);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background var(--t);
}

.image-preview-remove:hover {
  background: var(--danger);
}

.image-preview-remove svg {
  width: 13px;
  height: 13px;
}

.image-preview-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-full);
}

/* ─────────────────────────────────────────────────────────────
   PÁGINA CUENTA / CONFIGURACIÓN
   ───────────────────────────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h) - var(--bottom-nav-h));
}

.account-sidebar {
  background: var(--bg-0);
  border-right: 1px solid var(--border);
  padding: 20px 0;
}

.account-sidebar-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-4);
  padding: 0 20px;
  margin-bottom: 8px;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
  cursor: pointer;
}

.account-nav-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.account-nav-item:hover,
.account-nav-item.active {
  background: var(--bg-2);
  color: var(--text-1);
}

.account-nav-item.active {
  color: var(--green);
}

.account-content {
  padding: 24px 16px;
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  margin-bottom: var(--bottom-nav-h);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 20px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 12px;
}

.footer-logo svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}

.footer-logo strong {
  color: var(--green);
  font-weight: 700;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-3);
  transition: color var(--t);
}

.footer-contact-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--green);
}

.footer-contact-item:hover {
  color: var(--text-1);
}

.footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--r-full);
  font-size: 0.83rem;
  font-weight: 600;
  transition: background var(--t);
}

.footer-whatsapp:hover {
  background: #128c7e;
}

.footer-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-3);
  transition: color var(--t);
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-copy,
.footer-made {
  font-size: 0.78rem;
  color: var(--text-4);
}

/* ─────────────────────────────────────────────────────────────
   PÁGINAS DE AUTH (login/register)
   ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--bg-0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-1);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-3);
}

.auth-form-footer a {
  color: var(--green);
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-4);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─────────────────────────────────────────────────────────────
   UTILIDADES
   ───────────────────────────────────────────────────────────── */
.flex {
  display: flex;
}

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

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.flex-1 {
  flex: 1;
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.85rem;
}

.text-xs {
  font-size: 0.78rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.text-green {
  color: var(--green);
}

.text-muted {
  color: var(--text-3);
}

.text-danger {
  color: var(--danger);
}

.mt-1 {
  margin-top: 4px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.p-4 {
  padding: 16px;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Spinner de carga */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE: Tablet (≥ 640px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }

  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    padding: 20px 0;
  }

  .auth-card {
    padding: 40px 36px;
  }

  .profile-cover {
    height: 200px;
  }

  .profile-avatar-wrap {
    margin-top: -60px;
  }

  .images-preview-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE: Desktop (≥ 1024px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {

  /* Ocultar bottom-nav y hamburguesa */
  .bottom-nav,
  .bottom-nav-spacer,
  .topbar-hamburger {
    display: none !important;
  }

  /* Mostrar logo texto y search en topbar */
  .logo-text {
    display: block;
  }

  .topbar-search {
    display: flex;
  }

  .topbar-actions {
    display: flex;
  }

  /* Layout de mensajes */
  .messages-layout {
    grid-template-columns: 320px 1fr;
  }

  .chat-header-back {
    display: none;
  }

  /* Layout de detalle */
  .detail-layout {
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
  }

  /* Account layout */
  .account-layout {
    grid-template-columns: 240px 1fr;
  }

  .account-content {
    padding: 32px 40px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px 40px 48px;
  }

  .site-footer {
    margin-bottom: 0;
  }

  /* Listings grid */
  .listings-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  /* Detail actions en fila */
  .detail-actions {
    flex-direction: column;
  }

  /* Profile cover */
  .profile-cover {
    height: 240px;
  }

  .profile-avatar-wrap {
    margin-top: -72px;
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE: Wide (≥ 1280px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1280px) {
  .listings-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .topbar-inner {
    padding: 0 32px;
  }

  .container,
  .container-md {
    padding: 0 32px;
  }

  .listings-inner {
    padding: 0 32px;
  }
}



/* ─────────────────────────────────────────────────────────────
   LAYOUT PRINCIPAL DE LISTADOS (index.php)
   ───────────────────────────────────────────────────────────── */
.listings-page {
  padding: 0 0 60px;
}

.listings-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding-top: 16px;
}

/* Sidebar de filtros — oculto en móvil */
.filters-sidebar {
  display: none;
}

.listings-main {
  min-width: 0;
}

/* ─────────────────────────────────────────────────────────────
   FILTROS SIDEBAR (desktop)
   ───────────────────────────────────────────────────────────── */
.filter-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.filter-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 12px;
}

.filter-type-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-type-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
  cursor: pointer;
}

.filter-type-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.filter-type-item:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.filter-type-item.active {
  background: var(--green-glow2);
  color: var(--green);
  font-weight: 600;
}

.filter-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-4);
  font-weight: 500;
}

.filter-type-item.active .filter-count {
  color: var(--green-dark);
}

.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
}

.filter-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  color: var(--text-2);
  transition: background var(--t), color var(--t);
}

.filter-cat-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--cat-color, var(--green));
}

.filter-cat-item:hover {
  background: var(--bg-3);
  color: var(--text-1);
}

.filter-cat-item.active {
  background: var(--bg-4);
  color: var(--text-1);
  font-weight: 600;
}

.filter-cat-item.active svg {
  filter: brightness(1.3);
}

.filter-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-4);
  margin-top: 10px;
  padding: 4px 0;
  transition: color var(--t);
}

.filter-clear svg {
  width: 13px;
  height: 13px;
}

.filter-clear:hover {
  color: var(--danger);
}

.filter-select {
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* ─────────────────────────────────────────────────────────────
   FILTROS BARRA MÓVIL
   ───────────────────────────────────────────────────────────── */
.mobile-filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-type-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.mobile-type-tabs::-webkit-scrollbar {
  display: none;
}

.mobile-type-tab {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-3);
  background: var(--bg-3);
  border: 1px solid var(--border);
  transition: all var(--t);
  white-space: nowrap;
}

.mobile-type-tab:hover {
  color: var(--text-1);
  border-color: var(--border-light);
}

.mobile-type-tab.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  font-weight: 600;
}

.mobile-filter-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-2);
  position: relative;
  transition: background var(--t), color var(--t);
}

.mobile-filter-btn svg {
  width: 17px;
  height: 17px;
}

.mobile-filter-btn:hover {
  background: var(--bg-4);
  color: var(--text-1);
}

.filter-active-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  border: 1.5px solid var(--bg-0);
}

/* ─────────────────────────────────────────────────────────────
   DRAWER DE FILTROS MÓVIL
   ───────────────────────────────────────────────────────────── */
.mobile-filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.mobile-filter-drawer.open {
  pointer-events: all;
}

.mobile-filter-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity var(--t-slow);
  backdrop-filter: blur(4px);
}

.mobile-filter-drawer.open .mobile-filter-overlay {
  opacity: 1;
}

.mobile-filter-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transform: translateY(100%);
  transition: transform var(--t-slow);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-filter-drawer.open .mobile-filter-panel {
  transform: translateY(0);
}

.mobile-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-filter-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.mobile-filter-body {
  overflow-y: auto;
  padding: 16px 20px;
  flex: 1;
}

.mobile-filter-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.filter-section {
  margin-bottom: 20px;
}

.filter-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.filter-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-2);
  transition: all var(--t);
}

.filter-cat-chip svg {
  width: 13px;
  height: 13px;
  color: var(--cat-color, var(--green));
}

.filter-cat-chip:hover {
  border-color: var(--cat-color, var(--green));
  color: var(--text-1);
}

.filter-cat-chip.active {
  background: var(--bg-4);
  border-color: var(--cat-color, var(--green));
  color: var(--text-1);
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   ENCABEZADO DE LISTADOS
   ───────────────────────────────────────────────────────────── */
.listings-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.listings-meta {
  min-width: 0;
}

.listings-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 2px;
}

.listings-heading em {
  color: var(--green);
  font-style: normal;
}

.listings-count {
  font-size: 0.8rem;
  color: var(--text-3);
}

.listings-sort {
  flex-shrink: 0;
}

.sort-select {
  font-size: 0.82rem;
  padding: 7px 10px;
  min-width: 140px;
}

/* ─────────────────────────────────────────────────────────────
   CARD DE LISTADO — nuevas clases
   ───────────────────────────────────────────────────────────── */
/* Imagen-link wrapper */
.listing-card-img-wrap {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-3);
  position: relative;
  flex-shrink: 0;
  text-decoration: none;
}

.listing-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
  display: block;
}

.listing-card:hover .listing-card-img-wrap img {
  transform: scale(1.04);
}

/* Featured card */
.listing-featured {
  border-color: rgba(34, 197, 94, 0.35);
}

.listing-featured:hover {
  border-color: var(--green);
}

/* Categoría */
.listing-card-category {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.listing-card-category svg {
  width: 12px;
  height: 12px;
}

/* Empresa (vacantes) */
.listing-card-company {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.listing-card-company svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Ubicación y tiempo */
.listing-card-location,
.listing-card-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.listing-card-location svg,
.listing-card-time svg {
  width: 12px;
  height: 12px;
}

/* Etiqueta pequeña (condición, tipo de trabajo) */
.listing-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-4);
  color: var(--text-2);
  width: fit-content;
}

/* Badges sobre imagen */
.listing-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.listing-badge svg {
  width: 11px;
  height: 11px;
}

.listing-badge-featured {
  top: 8px;
  left: 8px;
  background: rgba(245, 158, 11, 0.9);
  color: #fff;
}

.listing-badge-type {
  bottom: 8px;
  left: 8px;
}

.listing-badge-producto {
  background: rgba(59, 130, 246, 0.85);
  color: #fff;
}

.listing-badge-servicio {
  background: rgba(34, 197, 94, 0.85);
  color: #fff;
}

.listing-badge-vacante {
  background: rgba(168, 85, 247, 0.85);
  color: #fff;
}

/* Botón favorito */
.btn-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-1);
  transition: background var(--t), color var(--t), transform var(--t);
  z-index: 3;
  border: none;
  cursor: pointer;
}

.btn-fav svg {
  width: 16px;
  height: 16px;
}

.btn-fav:hover {
  background: rgba(239, 68, 68, 0.8);
  color: #fff;
  transform: scale(1.1);
}

.btn-fav.active {
  background: var(--danger);
  color: #fff;
}

.btn-fav.active svg {
  fill: currentColor;
}

/* ─────────────────────────────────────────────────────────────
   ESTADO VACÍO (mejorado)
   ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-4);
}

.empty-icon svg {
  width: 32px;
  height: 32px;
}

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

.empty-desc {
  font-size: 0.88rem;
  color: var(--text-3);
  max-width: 300px;
  line-height: 1.6;
}

.empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   SCROLL TO TOP
   ───────────────────────────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t), background var(--t), transform var(--t);
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.scroll-top-btn svg {
  width: 18px;
  height: 18px;
}

.scroll-top-btn:hover {
  background: var(--bg-4);
  color: var(--text-1);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────────────
   TOPBAR SCROLLED
   ───────────────────────────────────────────────────────────── */
.topbar.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   BOTTOM NAV HIDDEN (al hacer scroll hacia abajo)
   ───────────────────────────────────────────────────────────── */
.bottom-nav.hidden {
  transform: translateY(100%);
}

/* ─────────────────────────────────────────────────────────────
   DROPDOWN MENU: estado open
   ───────────────────────────────────────────────────────────── */
.dropdown-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  visibility: visible;
}

/* ─────────────────────────────────────────────────────────────
   TOAST NOTIFICATIONS
   ───────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 360px;
  padding: 0 16px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--text-1);
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  width: 100%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}

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

.toast svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.toast span {
  flex: 1;
}

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

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

.toast-warning svg {
  color: var(--warning);
}

.toast-info svg {
  color: var(--info);
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background var(--t), color var(--t);
}

.toast-close:hover {
  background: var(--bg-4);
  color: var(--text-1);
}

.toast-close svg {
  width: 14px;
  height: 14px;
}

/* ─────────────────────────────────────────────────────────────
   MODAL: estado open
   ───────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  backdrop-filter: blur(4px);
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  z-index: 510;
  background: var(--bg-1);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  width: calc(100% - 32px);
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  transition: transform var(--t-slow), opacity var(--t-slow);
  opacity: 0;
}

.modal.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translate(-50%, -50%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-3);
  transition: background var(--t), color var(--t);
}

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

.modal-close svg {
  width: 18px;
  height: 18px;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE ADICIONAL: Desktop (≥ 1024px)
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {

  /* Layout con sidebar */
  .listings-inner {
    grid-template-columns: 220px 1fr;
    gap: 24px;
    padding-top: 24px;
  }

  .filters-sidebar {
    display: block;
  }

  .mobile-filters-bar {
    display: none;
  }

  /* Scroll to top position */
  .scroll-top-btn {
    bottom: 24px;
    right: 24px;
  }

  /* Toast position */
  .toast-container {
    bottom: 24px;
    left: auto;
    right: 24px;
    transform: none;
    align-items: flex-end;
  }
}

@media (min-width: 1280px) {
  .listings-inner {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }
}


/* =============================================================
   VT-HERO — Nuevo hero desde cero (clases únicas vt-hero-*)
   Mobile-first · 390px base
   ============================================================= */

/* ── Contenedor principal ─────────────────────────────────── */
.vt-hero {
  background: #080808 !important;
  padding: 56px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

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

.vt-hero .vt-hero-inner {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ── Título ──────────────────────────────────────────────── */
.vt-hero .vt-hero-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff !important;
  line-height: 1.2;
  letter-spacing: -0.3px;
  margin: 0 0 12px;
  padding: 0;
}

.vt-hero .vt-hero-accent {
  display: block;
  color: #22c55e !important;
  margin-top: 4px;
}

/* ── Subtítulo ───────────────────────────────────────────── */
.vt-hero .vt-hero-sub {
  font-size: 14px;
  font-weight: 400;
  color: #666 !important;
  line-height: 1.45;
  margin: 0 0 30px;
  padding: 0;
}

/* ── Card principal con borde verde ──────────────────────── */
.vt-hero .vt-hero-card {
  width: 100%;
  border: 1.5px solid rgba(34,197,94,0.48) !important;
  border-radius: 20px !important;
  background: #0c0c0c !important;
  padding: 22px 18px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow:
    0 0 45px rgba(34,197,94,0.06),
    0 0 90px rgba(34,197,94,0.02);
}

/* ── Tabs dentro de la card ──────────────────────────────── */
.vt-hero .vt-hero-tabs {
  display: flex;
  width: 100%;
}

.vt-hero .vt-hero-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: none !important;
  border-radius: 8px;
  background: transparent !important;
  color: rgba(255,255,255,0.38) !important;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.vt-hero .vt-hero-tab svg,
.vt-hero .vt-hero-tab i {
  width: 15px;
  height: 15px;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.vt-hero .vt-hero-tab:hover {
  color: rgba(255,255,255,0.55) !important;
}
.vt-hero .vt-hero-tab:hover svg,
.vt-hero .vt-hero-tab:hover i {
  opacity: 0.55;
}

.vt-hero .vt-hero-tab.active {
  color: rgba(255,255,255,0.85) !important;
  background: transparent !important;
}
.vt-hero .vt-hero-tab.active svg,
.vt-hero .vt-hero-tab.active i {
  opacity: 0.7;
}

/* ── Input de búsqueda ───────────────────────────────────── */
.vt-hero .vt-hero-form {
  width: 100%;
}

.vt-hero .vt-hero-input,
.vt-hero input[type="search"].vt-hero-input,
.vt-hero input.vt-hero-input {
  display: block;
  width: 100% !important;
  height: 52px;
  border: 1.5px solid rgba(34,197,94,0.42) !important;
  border-radius: 9999px !important;
  background: #111 !important;
  padding: 0 24px;
  text-align: center;
  color: #f0f0f0 !important;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2px;
  outline: none;
  box-shadow: 0 0 18px rgba(34,197,94,0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

.vt-hero .vt-hero-input::placeholder {
  color: rgba(34,197,94,0.4) !important;
  font-weight: 400;
  letter-spacing: 0.3px;
  opacity: 1;
}

.vt-hero .vt-hero-input:focus {
  border-color: rgba(34,197,94,0.62) !important;
  background: #111 !important;
  box-shadow:
    0 0 0 3px rgba(34,197,94,0.08),
    0 0 28px rgba(34,197,94,0.05);
}

/* Quitar X nativa de input search en WebKit */
.vt-hero .vt-hero-input::-webkit-search-cancel-button,
.vt-hero .vt-hero-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

/* ── Pills / filtros inferiores ──────────────────────────── */
.vt-hero .vt-hero-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 680px;
  padding: 22px 0 16px;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.vt-hero .vt-hero-pills::-webkit-scrollbar { display: none; }

.vt-hero .vt-hero-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 9999px !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  background: #151515 !important;
  color: rgba(255,255,255,0.44) !important;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
  transition: all 0.2s;
}

.vt-hero .vt-hero-pill:hover {
  border-color: rgba(34,197,94,0.3) !important;
  color: #22c55e !important;
}

.vt-hero .vt-hero-pill.active {
  background: #22c55e !important;
  color: #fff !important;
  border-color: #22c55e !important;
  font-weight: 600;
}

.vt-hero .vt-hero-pill-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.07) !important;
  background: #151515 !important;
  color: rgba(255,255,255,0.35) !important;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.2s;
  font-family: var(--font);
  padding: 0;
  outline: none;
}

.vt-hero .vt-hero-pill-icon svg,
.vt-hero .vt-hero-pill-icon i {
  width: 16px;
  height: 16px;
}

.vt-hero .vt-hero-pill-icon:hover {
  border-color: rgba(255,255,255,0.14) !important;
  color: rgba(255,255,255,0.5) !important;
}

/* ── Responsive 640px ─────────────────────────────────────── */
@media (min-width: 640px) {
  .vt-hero { padding: 72px 28px 0; }
  .vt-hero .vt-hero-title { font-size: 36px; letter-spacing: -0.5px; }
  .vt-hero .vt-hero-sub { font-size: 15px; margin-bottom: 36px; }
  .vt-hero .vt-hero-card {
    max-width: 540px;
    padding: 28px 28px 32px;
    gap: 24px;
    border-radius: 22px !important;
  }
  .vt-hero .vt-hero-tab { font-size: 15px; height: 44px; }
  .vt-hero .vt-hero-input { height: 56px; font-size: 16px; }
  .vt-hero .vt-hero-pills { padding: 28px 0 22px; gap: 12px; justify-content: center; }
  .vt-hero .vt-hero-pill { height: 42px; padding: 0 24px; font-size: 15px; }
  .vt-hero .vt-hero-pill-icon { width: 42px; height: 42px; }
}

/* ── Responsive 1024px ────────────────────────────────────── */
@media (min-width: 1024px) {
  .vt-hero { padding: 96px 40px 0; }
  .vt-hero .vt-hero-title { font-size: 46px; letter-spacing: -0.7px; }
  .vt-hero .vt-hero-sub { font-size: 16px; margin-bottom: 42px; }
  .vt-hero .vt-hero-card {
    max-width: 600px;
    padding: 32px 36px 38px;
    gap: 26px;
    border-radius: 24px !important;
  }
  .vt-hero .vt-hero-tab {
    font-size: 16px;
    height: 46px;
    border-radius: 10px;
  }
  .vt-hero .vt-hero-tab svg,
  .vt-hero .vt-hero-tab i { width: 17px; height: 17px; }
  .vt-hero .vt-hero-input { height: 60px; font-size: 17px; }
  .vt-hero .vt-hero-pills { padding: 34px 0 26px; gap: 14px; }
  .vt-hero .vt-hero-pill { height: 46px; padding: 0 30px; font-size: 16px; }
  .vt-hero .vt-hero-pill-icon { width: 46px; height: 46px; }
}

/* ── Responsive 1280px ────────────────────────────────────── */
@media (min-width: 1280px) {
  .vt-hero .vt-hero-title { font-size: 52px; letter-spacing: -0.9px; }
  .vt-hero .vt-hero-card { max-width: 680px; }
}

