/* --- TipografÃ­as --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap");

/* --- Design tokens --- */
:root {
  --text: #1a1f36;
  --muted: #4f566b;
  --primary: #ff7a00;
  --primary-dark: #ff7a00;
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --border: #e6e8f0;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

/* --- Base / Reset --- */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- Titulares --- */
h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.hero-title {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.1;
}

/* --- Enlaces --- */
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* --- Botones (base) --- */
.btn {
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #111;
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Variante negra opcional (antes se forzaba en todos los botones) */
.btn-black {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 1.2rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.btn-black:hover { background-color: #333; }

/* --- Cards --- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: var(--transition);
}
/* Por defecto, las cards NO â€œbotanâ€ al hover */
.card:hover {
  transform: none;
  box-shadow: none;
}

/* Solo los anuncios del marketplace tienen hover animado */
.listing-card { transition: transform .15s ease, box-shadow .15s ease; }
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }


/* --- Navbar --- */
.navbar {
  padding: 1.25rem 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-brand { font-weight: 700; letter-spacing: -0.02em; }

/* --- Formularios (global) --- */
.form-label { font-weight: 600; margin-bottom: 0.5rem; }
.form-control {
  border-radius: 12px;
  border: 2px solid var(--border);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  width: 100%;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,91,255,0.1);
  outline: none;
}

/* --- Signup card (estilos scoped para NO pisar el global) --- */
.signup-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.signup-card .form-label { font-weight: 600; color: #222; }
.signup-card .form-control {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.2s ease;
}
.signup-card .form-control:focus {
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

/* --- Utilidades --- */
.text-muted { color: var(--muted) !important; }
.bg-soft { background: var(--bg-soft); }
.shadow-soft { box-shadow: var(--shadow); } /* unificada */
.rounded-xl { border-radius: var(--radius); }
.object-fit-cover { object-fit: cover; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Sticky Sidebar --- */
.sticky-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
  max-height: calc(100vh - 4rem);
  padding: 1rem;
  overflow-y: auto;
  transition: all 0.3s ease;
}
@media (max-width: 991px) {
  .sticky-sidebar { position: static; margin-top: 1rem; padding: 0; }
}

/* --- Dashboard Sidebar (unificada) --- */
.dashboard-sidebar {
  width: 100%;
  max-width: 180px;
  padding: 0;
  border-right: 1px solid #eee;
  margin-top: 3.5rem; /* versiÃ³n final */
}
.dashboard-sidebar .btn {
  border: none;
  border-radius: 0;
  background: #fff;
  color: #333;
  text-align: left;
  padding: 10px 14px;
  font-weight: 500;
  box-shadow: none;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}
.dashboard-sidebar .btn + .btn { border-top: 1px solid #ddd; }
.dashboard-sidebar .btn:hover { background: #f8f9fa; color: #000; }

/* --- Tarjetas de listing --- */
.listing-card { transition: transform .15s ease, box-shadow .15s ease; }
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }

/* --- Badge de categorÃ­a compacta y discreta --- */
.badge-cat {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  pointer-events: none;
  line-height: 1.1;
  transition: all 0.18s ease;
}

.listing-card:hover .badge-cat {
  background: rgba(0,0,0,0.9);
  transform: translateY(-1px);
}

/* Ajuste opcional de la imagen */
.card-img-top {
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

/* Colores por categorÃ­a */
.badge-cat--pentesting      { background: #111; }
.badge-cat--ciberseguridad  { background: #0ea5e9; }
.badge-cat--auditorias      { background: #ef4444; }
.badge-cat--cursos          { background: #16a34a; }
.badge-cat--default         { background: rgba(0,0,0,.85); }

/* --- Barra de filtros --- */
.filter-bar {
  border-bottom: 1px solid #e6e8f0;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}
.filter-bar .form-control,
.filter-bar .form-select {
  min-width: 0;
  height: 38px;
  padding-top: .4rem;
  padding-bottom: .4rem;
  flex: 0 0 auto; /* evita que crezcan de mÃ¡s */
}
.filter-bar .btn { white-space: nowrap; }
.filter-bar .form-label {
  font-weight: 500;
  color: #555;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
}
.filter-bar svg { opacity: 0.7; margin-bottom: 2px; }

/* Campo con icono a la izquierda */
.input-icon { position: relative; }
.input-icon .icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px; opacity: .55;
}
.input-icon .form-control { padding-left: 36px; }

/* Grid de campos con icono/label alineada */
.filter-bar .field {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 8px;
  align-items: center;
  color: #444;
}
.filter-bar .field .form-label {
  grid-column: 1 / -1;
  padding-left: 28px;
  margin-bottom: .25rem;
  font-size: .85rem;
  font-weight: 500;
  color: #666;
  letter-spacing: .2px;
}
.filter-bar .field .field-icon {
  width: 18px; height: 18px; opacity: .75; display: block;
}
.filter-bar .field .form-control,
.filter-bar .field .form-select {
  grid-column: 2;
  height: 38px;
  min-width: 0;
}

/* Campos concretos (compÃ¡ctos/anchos) */
#id_q { min-width: 260px; }
#id_category { max-width: 160px; }
#id_price_min, #id_price_max { max-width: 90px; }

@media (max-width: 992px){
  #id_q, #id_category, #id_price_min, #id_price_max { max-width: 100%; }
  .filter-bar .form-control,
  .filter-bar .form-select { min-width: 160px; }
}

/* --- Enlaces discretos --- */
.link-muted a { text-decoration: none; }
.link-muted a:hover { text-decoration: underline; }

/* 1) Asegura un contenedor de referencia para el absoluto */
.listing-card { position: relative; }

/* 2) Badge compacta, sÃ³lo lo que ocupa el texto (no toda la fila) */
.listing-card .badge-cat {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;
  right: auto !important;

  display: inline-flex !important;   /* evita el 100% de ancho */
  align-items: center;
  width: auto !important;
  max-width: 75%;                    /* por si el nombre es largo */
  white-space: nowrap;               /* opcional: evita salto de lÃ­nea */
  overflow: hidden;
  text-overflow: ellipsis;

  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.1;

  background: rgba(0,0,0,0.8);
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  pointer-events: none;
  transition: all 0.18s ease;
}

.listing-card:hover .badge-cat {
  background: rgba(0,0,0,0.9);
  transform: translateY(-1px);
}

/* La tarjeta debe ser el contenedor de referencia */
.listing-card { position: relative; }

/* Badge compacta, arriba-izquierda, SIN ocupar el alto completo */
.listing-card .badge-cat {
  position: absolute !important;
  top: 6px !important;
  left: 6px !important;

  /* reset de reglas heredadas que causan la columna completa */
  right: auto !important;
  bottom: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: auto !important;
  max-width: 75%;
  display: inline-block !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  padding: 2px 6px !important;
  font-size: 0.625rem !important;
  font-weight: 600;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .3px;

  background: rgba(0,0,0,.8) !important;
  color: #fff !important;
  border-radius: 4px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  pointer-events: none;
  z-index: 2;
}

.listing-card:hover .badge-cat {
  background: rgba(0,0,0,.9) !important;
  transform: translateY(-1px);
}

/* --- Ajuste visual: texto de la categorÃ­a mÃ¡s grande --- */
.listing-card .badge-cat {
  font-size: 0.75rem !important;   /* antes 0.625rem (~10px) â†’ ahora ~12px */
  font-weight: 700;                /* un poco mÃ¡s de presencia */
  letter-spacing: 0.4px;
  padding: 3px 7px;                /* ligero ajuste al nuevo tamaÃ±o */
  backdrop-filter: blur(2px);
}

/* --- DistribuciÃ³n de categorÃ­as (ocupan todo el ancho) --- */
.category-toolbar {
  display: flex;
  flex-direction: column; /* en mÃ³vil se apilan */
  width: 100%;
  margin-bottom: 1rem;
}

.category-toolbar .chips-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

/* Chips visuales */
.btn-outline-dark {
  border: 1px solid #ddd;
  color: #333;
  font-weight: 500;
  border-radius: 30px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%; /* cada chip ocupa toda su celda */
}

.btn-outline-dark:hover {
  background-color: #111;
  color: #fff;
}

.btn-check:checked + .btn-outline-dark {
  background-color: #111;
  color: #fff;
  border-color: #111;
}

/* Estilo visual de los chips */
.btn-outline-dark {
  border: 1px solid #ddd;
  color: #333;
  font-weight: 500;
  border-radius: 30px;
  padding: 6px 16px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.btn-outline-dark:hover {
  background-color: #111;
  color: #fff;
}

.btn-check:checked + .btn-outline-dark {
  background-color: #111;
  color: #fff;
  border-color: #111;
}

/* --- Input con icono integrado --- */
.input-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-wrapper i {
  position: absolute;
  left: 12px;
  color: #999;
  font-size: 1rem;
  pointer-events: none;
}

.input-icon-wrapper input[type="text"],
.input-icon-wrapper input[type="search"] {
  width: 100%;
  padding-left: 2rem; /* espacio para el icono */
  border-radius: 10px;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
}

.input-icon-wrapper input:focus {
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.input-icon-wrapper input:focus + i,
.input-icon-wrapper i:focus {
  color: #111;
}

/* === CTA Buttons (para botones principales tipo "Solicitar" y "Visitar web") === */
.btn {
  font-weight: 600;
  border-radius: 14px;
  transition: all 0.25s ease;
}

/* BotÃ³n principal â€” oscuro, sÃ³lido, protagonista */
.btn-primary,
.btn-black { 
  background-color: #111;
  border: 1px solid #111;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
.btn-black:hover {
  background-color: #222;
  border-color: #222;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* BotÃ³n secundario â€” contorno negro */
.btn-outline-dark {
  border: 2px solid #111;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  background-color: transparent;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.btn-outline-dark:hover {
  background-color: #111;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sombras sutiles compartidas */
.shadow-cta {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}
.shadow-cta:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sidebar sticky: mantiene los botones siempre visibles */
.sticky-sidebar {
  position: sticky;
  top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* === ESTILO MINIMALISTA PARA LAS CATEGORÃAS (chips) === */
.chips-grid label.btn {
  background-color: #fff;
  border: 1.5px solid #ddd;
  color: #222;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 12px;
  padding: 0.5rem 1rem;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

/* Hover: sutil */
.chips-grid label.btn:hover {
  border-color: #bbb;
  background-color: #f9f9f9;
}

/* CategorÃ­a activa */
.chips-grid input:checked + label.btn {
  background-color: #111;
  border-color: #111;
  color: #fff;
  font-weight: 600;
  transform: none;
}

/* Ãconos mÃ¡s ligeros */
.chips-grid label.btn i {
  font-size: 1rem;
  opacity: 0.7;
  margin-right: 6px;
  vertical-align: middle;
}

/* Espaciado entre chips */
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* === BOTÃ“N Y TEXTAREA RECTANGULARES PARA "ENVIAR AVISO" === */
form[action*="report-error"] button.btn {
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  color: #222;
  font-weight: 500;
  border-radius: 0 !important; /* Fuerza recto */
  text-transform: none;
  letter-spacing: 0;
  padding: 0.6rem 1rem;
  box-shadow: none;
  transition: all 0.2s ease;
}

form[action*="report-error"] button.btn:hover {
  background-color: #111;
  color: #fff;
  border-color: #111;
}

/* Icono del botÃ³n */
form[action*="report-error"] button.btn i {
  font-size: 1rem;
  margin-right: 6px;
  opacity: 0.7;
  vertical-align: middle;
}

/* Textarea rectangular */
form[action*="report-error"] textarea {
  border: 1px solid #ddd;
  border-radius: 0 !important; /* Fuerza recto */
  background-color: #fff;
  color: #222;
  font-size: 0.95rem;
  resize: none;
  box-shadow: none;
  transition: border-color 0.2s ease;
}

form[action*="report-error"] textarea:focus {
  border-color: #111;
  outline: none;
}

/* === BOTÃ“N MINIMALISTA PARA "VOLVER AL MARKETPLACE" === */
a[href*="browse"].btn {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  color: #333;
  font-weight: 500;
  border-radius: 0 !important; /* recto */
  padding: 0.6rem 1.4rem;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
  transition: all 0.2s ease;
}

a[href*="browse"].btn:hover {
  background-color: #111;
  color: #fff;
  border-color: #111;
  transform: none;
}

a[href*="browse"].btn i {
  font-size: 1rem;
  opacity: 0.7;
  margin-right: 6px;
  vertical-align: middle;
}

/* === BOTÃ“N SOLICITAR (naranja cÃ¡lido) === */
.btn-solicitar {
  background-color: #ff7a00;
  border: 1px solid #e86b00;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 14px;
  padding: 0.85rem 1.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(255, 122, 0, 0.3);
}

.btn-solicitar:hover {
  background-color: #e86b00;
  border-color: #e86b00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 122, 0, 0.35);
}

/* === BOTÓN VOLVER (compacto, borde, fondo blanco) === */
.btn-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  background-color: #ffffff !important;
  color: #212529 !important;
  border: 1px solid #ced4da !important;
  border-radius: 6px !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  padding: 0.35rem 0.75rem !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease !important;
  margin-bottom: 0.75rem;
}
.btn-back:hover {
  background-color: #f8f9fa !important;
  border-color: #adb5bd !important;
  color: #212529 !important;
  text-decoration: none !important;
}

/* === Formularios Bootstrap: foco verde igual que el login/registro === */
.form-control:focus,
textarea.form-control:focus,
input.form-control:focus,
select.form-select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.25rem rgba(255, 122, 0, 0.25) !important;
  outline: none !important;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* === Estilo general del encabezado y pie === */
.navbar-cream,
.footer-cream {
  background-color: #F7F5F5;
}

/* Aseguramos coherencia en los bordes */
.navbar-cream {
  border-bottom: 1px solid #ddd;
}

.footer-cream {
  border-top: 1px solid #ddd;
}

/* ===== MenÃº lateral ===== */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #eee;
  font-weight: 500;
}

.sidebar-menu a {
  padding: 10px 18px;
  color: #333;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.sidebar-menu a:hover {
  background-color: #f9f9f9;
}

.sidebar-menu a.active {
  font-weight: 700;
  border-left: 4px solid #ff7b00; /* mismo tono que tu botÃ³n naranja */
  background-color: #FFF7F7;      /* el tono crema */
  color: #000;
}

/* Deshabilitados */
.sidebar-menu a.disabled {
  color: #bbb;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- PersonalizaciÃ³n de las alertas tipo info --- */
.alert-info {
  background-color: #fff3e0 !important;  /* fondo naranja muy claro */
  border-color: #ffb74d !important;      /* borde mÃ¡s saturado */
  color: #663c00 !important;             /* texto marrÃ³n oscuro para buena lectura */
}

/* === GalerÃ­a de imÃ¡genes uniforme === */
.listing-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Cada imagen ocupa toda la anchura del contenedor padre
   si hay una sola imagen; si hay varias, se adaptan en cuadrÃ­cula */
.listing-image {
  flex: 1 1 100%;
  max-width: 100%;
  height: 300px; /* ðŸ”§ altura uniforme */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Si hay varias imÃ¡genes, reparte el ancho */
.listing-gallery.multiple .listing-image {
  flex: 0 1 220px; /* cada imagen del mismo tamaÃ±o */
  height: 220px;
}

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

.listing-image:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
  .listing-image {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .listing-image {
    height: 160px;
  }
}

/* Contenedor de las miniaturas debajo del carrusel */
.carousel-thumbs {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
}

/* Cada miniatura */
.carousel-thumbs button {
  border: 0;
  background: transparent;
  padding: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, outline 0.2s ease;
}

/* Imagen dentro de cada miniatura */
.carousel-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Estado activo (miniatura seleccionada) */
.carousel-thumbs button.active {
  outline: 2px solid #ff7a00; /* color de Ã©nfasis */
  opacity: 1;
  transform: scale(1.05);
}

/* Hover */
.carousel-thumbs button:hover {
  opacity: 0.9;
}

/* Responsive: miniaturas mÃ¡s pequeÃ±as en pantallas pequeÃ±as */
@media (max-width: 768px) {
  .carousel-thumbs button {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 480px) {
  .carousel-thumbs button {
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   Ajustes visuales para el formulario Software
   ============================================ */
form.software-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

form.software-form .form-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

form.software-form label {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
  line-height: 1;
}

/* Alinear el campo Notas */
form.software-form textarea {
  min-height: 40px;
  resize: vertical;
  width: 220px;
}

/* Ajustar botÃ³n de AÃ±adir */
form.software-form button[type="submit"] {
  align-self: flex-end;
  padding: 0.55rem 1.4rem;
  border-radius: 1.5rem;
  white-space: nowrap;
  margin-bottom: 2px; /* Compensa alineación visual */
}

/* --- Sidebar Exclusivo Cliente --- */
.sidebar-cliente-wrapper {
  background-color: #516a7c;
  border-right: none;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-cliente {
  background-color: #516a7c !important;
  border-right: none !important;
  margin-top: 0 !important;
  padding-top: 2rem !important;
  min-width: 240px;
  width: 100%;
}

@media (min-width: 768px) {
  .sidebar-cliente {
    width: 240px;
  }
}

.sidebar-cliente .sidebar-menu {
  background: transparent !important;
  border-right: none !important;
}

/* Enlaces */
.sidebar-cliente .sidebar-menu a {
  color: #fff !important;
  opacity: 0.85;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  padding: 12px 16px;          /* un pelín menos para ganar ancho útil */
  text-decoration: none;

  /* CLAVE: alineación icono + texto + sin recortes */
  display: flex;
  align-items: center;
  gap: 0.6rem;
  white-space: normal;         /* permite salto de línea */
  overflow: visible;
}

.sidebar-cliente .sidebar-menu a:hover {
  background-color: rgba(255,255,255,0.1) !important;
  opacity: 1;
}

.sidebar-cliente .sidebar-menu a.active {
  background-color: rgba(255,255,255,0.15) !important;
  color: #fff !important;
  opacity: 1;
  border-left-color: #ff7b00 !important;
  font-weight: 600;
}

.sidebar-cliente .sidebar-menu a.disabled {
  color: rgba(255,255,255,0.4) !important;
}

/* Iconos: columna fija -> alineación vertical perfecta */
.sidebar-icon {
  width: 24px;
  min-width: 24px;             /* CLAVE en flex */
  text-align: center;
  flex: 0 0 24px;              /* fija el “carril” del icono */
}

/* Texto: que pueda encoger y partir línea si hace falta */
.sidebar-cliente .sidebar-menu a span {
  min-width: 0;                /* CLAVE: evita recortes en flex */
  white-space: normal;         /* quita el nowrap que te lo corta */
  overflow-wrap: anywhere;     /* si hay palabras largas, rompe */
  line-height: 1.2;
}

/* Sidebar Height Resets */
.sidebar-standard { top: 80px; }
.sidebar-cliente { top: 0; min-height: 100vh; height: 100%; }
