* {
  scroll-behavior: smooth;
  box-sizing: border-box;
  font-family: Inter, Roboto, system-ui, sans-serif;
}

body {
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: #f5f6f8 !important;
  margin: 0;
  min-width: 1150px;
  min-height: 100vh;
}

#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  animation: pageFadeIn 0.45s ease forwards;
}

#app-root.fade-out {
  animation: pageFadeOut 0.35s ease forwards;
}

body.no-scroll {
  overflow: hidden;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    translate: 0 4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes pageFadeOut {
  from {
    opacity: 1;
    scale: 1;
  }
  to {
    opacity: 0;
    scale: 0.98;
  }
}

html {
  height: 100%;
  scrollbar-gutter: stable;
  overflow-y: auto;
}

h2,
.h2ProductsList {
  margin: 40px auto;
  color: rgba(34, 34, 34, 0.879);
  font-weight: normal;
}

.h2ProductsList {
  margin-bottom: 20px;
}

.product,
.price,
.stock,
.description,
.code {
  padding: 5px;
  width: 300px;
  border: none;
  margin: 20px;
  font-size: 1rem;
}

.price,
.stock,
.code {
  width: 80px;
}

.description {
  width: 460px;
}

label {
  margin: 15px 0px;
  background-color: transparent;
  font-weight: bold;
  color: whitesmoke;
}

.sendBtn,
.formBackLinkBtn {
  padding: 8px;
  width: 150px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background-color: rgb(90 87 87 / 93%);
  transition: all 0.2s;
  font-weight: bold;
  color: rgb(255 255 255);
  cursor: pointer;
}

.formBackLinkBtn {
  margin-left: 30px;
}

.sendBtn:hover {
  box-shadow: 0px 0px 5px whitesmoke;
}

.formBackLinkBtn:hover {
  box-shadow: 0 0px 4px rgba(86, 86, 86, 0.68);
}

.formBackLink {
  height: 34px;
  width: 150px;
}

.prodsLink {
  color: rgba(34, 34, 34, 0.879);
  margin: 40px auto;
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 30px;
}

.thumbnailImg {
  padding: 8px;
}

.cardContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 25px;
  justify-content: center;
  margin-top: 70px;
}

.thumbContainer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.thumbnail,
.thumbnailInput {
  width: 30%;
  font-size: 1rem;
  border: none;
  padding: 5px;
}

.thumbnailInput {
  width: 68%;
  margin-left: 20px;
}

.thumbnailImg {
  width: 70px;
}

.productCard {
  width: 200px;
  height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background-color: #b8d2d7c7;
  padding: 25px;
  text-align: center;
}

.productPriceStockCont,
.descriptionCodeCont,
.thumbnailCont {
  display: flex;
  align-items: center;
  justify-content: center;
}

.buyBtnContainer,
.actionBtnsContainer {
  width: 200px;
}

.buyBtn {
  width: 185px;
  padding: 3px;
  margin: 20px 0px;
}

.updateBtn,
.deleteBtn {
  padding: 3px;
  width: 90px;
}

.deleteBtn {
  margin-bottom: 10px;
}

.cardInput {
  background-color: transparent;
  border: none;
  font-size: 1rem;
  color: rgba(17, 17, 17, 0.841);
  margin: 8px 0px;
  text-align: center;
}

.price {
  width: 70px;
}

.stock {
  width: 40px;
}

.cartsList {
  list-style: none;
  display: flex;
  padding: 10px;
  flex-wrap: wrap;
  border: 1px solid gray;
  justify-content: center;
}

.cartsContainer {
  width: 100%;
}

.cartLi {
  width: 100px;
  padding: 8px;
  margin: 0;
}

.cartPrice,
.cartStock {
  display: inline;
}

.addCart {
  font-size: 1rem;
  display: block;
  margin-bottom: 40px;
}

.cartProducts {
  padding: 25px;
  background-color: #e6eaee;
  margin-bottom: 25px;
}

.cartName {
  padding: 25px;
  padding-top: 0;
}

.cartTitle {
  font-size: 1.2rem;
  display: inline;
  margin-right: 40px;
}

.productDiv {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  background-color: #a6d0d0;
  margin-bottom: 25px;
  padding: 20px;
  width: 80%;
}

.productContainer {
  width: 300px;
}

.productContainer,
.deleteProductBtnContainer {
  margin: 0;
}

.productContainerP {
  text-align: left;
  color: #1b6605;
}

.emptyCart,
.buyProductLink,
.backLink {
  font-size: 1.2rem;
}

.backLink {
  margin: 0;
  margin-bottom: 25px;
  display: inline-block;
  margin-top: 70px;
}

.buyProductLink {
  margin-top: 15px;
  display: block;
}

p {
  color: rgba(34, 34, 34, 0.879);
}

.descriptionInput {
  overflow: auto;
}

.productContainerSpan {
  color: #280abb;
}

.thumbnailContainer {
  margin: 0;
}

.deleteCartBtn,
.deleteProductBtn,
#endPurchaseBtn,
#confirmPurchaseBtn,
.cancelPurchaseBtn {
  margin: 0;
  width: 110px;
  padding: 5px;
  border: none;
  border-radius: 3px;
  background-color: cadetblue;
  color: antiquewhite;
  transition: all 0.3s;
}

#endPurchaseBtn,
.deleteCartBtn,
#confirmPurchaseBtn,
.cancelPurchaseBtn {
  padding: 8px;
  font-size: 1.2rem;
  width: 250px;
  margin-right: 30px;
  margin-bottom: 20px;
}

.deleteCartBtn:hover,
.deleteProductBtn:hover,
#endPurchaseBtn:hover,
#confirmPurchaseBtn:hover,
.cancelPurchaseBtn:hover {
  background-color: rgba(222, 235, 253, 0.726);
  color: rgb(80, 132, 134);
}

#addProductBtn {
  width: 280px;
  border: none;
  border-radius: 3px;
  padding: 8px;
  background-color: cadetblue;
  color: antiquewhite;
  font-size: 1rem;
  transition: all 0.3s;
}

#addProductBtn:hover {
  background-color: rgba(176, 187, 202, 0.726);
  color: rgb(80, 132, 134);
}

.cartsLink {
  font-size: 1.2rem;
}

.cartTitleAndDeleteBtn {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 25px;
  background-color: rgba(119, 165, 240, 0.921);
  margin-bottom: 20px;
}

.cartH2 {
  margin: 0;
  color: rgb(10, 102, 130);
}

.h2PurchaseOrder {
  margin-bottom: 25px;
}

/* //////////// IMPORTADO DE MOCKS Y NORMALIZACION ////////////////// */

h2 {
  margin: 30px auto;
  color: rgba(34, 34, 34, 0.879);
}

/* Card específica admin usuarios */
#usersForm {
  margin: 0px auto;
  margin-bottom: 70px;
  background: #ffffff;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

/* Tabla admin usuarios */
#usersForm table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px; /* separación vertical */
}

/* Header */
#usersForm thead th {
  background: #f1f3f5;
  color: #495057;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px;
  text-align: center;
}

/* Filas */
#usersForm tbody tr {
  background: #f8f9fa;
  border-radius: 8px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

#usersForm tbody tr:hover {
  background: #eef3ff;
  transform: translateY(-1px);
}

/* Celdas */
#usersForm td {
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.95rem;
}

.price {
  width: 80px;
}

label {
  margin: 15px 0px;
  background-color: transparent;
  font-weight: bold;
  color: whitesmoke;
}

.sendBtn {
  margin: 20px auto;
  margin-bottom: 10px;
  padding: 8px;
  width: 150px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background-color: rgb(184, 184, 184);
  transition: all 0.2s;
  font-weight: bold;
  color: rgba(34, 34, 34, 0.879);
}

.sendBtn:hover {
  box-shadow: 0px 0px 5px whitesmoke;
}

.prodsLink {
  color: rgba(34, 34, 34, 0.879);
  margin: 40px auto;
  font-size: 1.3rem;
  text-align: center;
}

/* /////////////////////////// */

.prodsLink {
  color: rgba(34, 34, 34, 0.879);
  font-size: 1.3rem;
  margin-bottom: 30px;
}

#actionsBar {
  margin: 2rem;
  margin-top: 1rem;
  min-width: 1170px;
}

table {
  padding: 0px 20px;
  min-width: 340px;
  table-layout: fixed;
  /* border-collapse: collapse; */
  border-collapse: separate !important;
  border-spacing: 0;
  margin: 0px auto;
}

thead {
  color: whitesmoke;
  background-color: rgba(45, 87, 153, 0.921);
}

th {
  padding: 8px;
  position: relative;
}

td {
  color: rgb(57, 57, 57);
  text-align: left;
}
.table-auto th,
.table-auto td {
  text-align: left !important;
}

.usersAdminTd {
  text-align: left;
  font-weight: 500;
  color: #212529;
}

/* Inputs tipo switch */
.usersAdminDeleteUser,
.usersAdminMakeUserAdmin {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Diferenciar acciones */
.usersAdminDeleteUser:checked {
  accent-color: #dc3545; /* rojo eliminar */
}

.usersAdminMakeUserAdmin:checked {
  accent-color: #0d6efd; /* azul admin */
}

.sendBtnUsersAdmin {
  margin-top: 0px !important;
  margin-left: 20px;
  background: #0d6dfdee;
  color: #ffffff;
  cursor: pointer;
}

.sendBtnUsersAdmin:hover {
  box-shadow: 0 0px 4px rgba(86, 86, 86, 0.68);
}

/* Marcar fila con cambios */
#usersForm tbody tr:has(input:checked) {
  outline: 2px solid rgba(13, 110, 253, 0.25);
  background: #eef4ff;
}

.post-table-action-buttons:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.thumbnailImg {
  padding: 8px;
}

.userInfo {
  text-align: center;
}

#userInfo {
  display: none;
}

#MessagesCenter {
  width: 550px;
  margin: 0;
  position: fixed;
  top: 70px;
  left: 100%;
  background-color: #b3d294e5;
  padding: 10px 40px;
}

.msgAuthor {
  display: inline-block;
  text-align: right;
  margin: 0px 10px;
}

.userImgContainer {
  text-align: right;
}

.textContainer,
.userDataContainer {
  display: flex;
  align-items: center;
  margin: 0;
}

.textContainer {
  width: 330px;
}

.userDataContainer {
  max-width: 700px;
}

#messagesDiv {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 10px;
  margin-bottom: 7px;
  border-bottom: 1px solid #bbb9b9;
}

.msgBtn {
  border: none;
  background-color: gray;
  padding: 5px;
  width: 70px;
  color: antiquewhite;
  font-size: 0.9rem;
}

.userEmailLbl {
  color: rgba(34, 34, 34, 0.879);
  width: 75px;
  display: inline-block;
  text-align: right;
}

#messagesContainer {
  margin-top: 20px;
  max-height: 340px;
  overflow-y: auto;
}

#userEmail,
.userEmail {
  width: 320px;
}

#messagesForm {
  text-align: center;
  visibility: collapse;
}

#messageContent,
#userEmail,
.userEmail {
  padding: 5px;
  width: 300px;
  border: none;
  margin: 20px;
  font-size: 1rem;
}

#messageContent {
  margin: 13px;
  font-size: 0.9rem;
}

.userTitle,
.gotoLogin,
.retryLogin {
  color: rgb(215 212 125);
  margin: 0;
  padding: 20px;
}

.userWelcome {
  margin-left: 6px;
  color: rgb(215 212 125);
  font-style: italic;
}

.userTitle {
  font-size: 1rem;
  display: flex;
  width: fit-content;
}

#tableContainer {
  width: 95%;
  margin: 0 auto;
}

.gotoLogin,
.retryLogin {
  font-size: 1.3rem;
}

#userContainer {
  background-color: rgb(33 33 33 / 81%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 40px;
  min-width: 655px;
  position: fixed;
  z-index: 999999;
}

#navBack {
  height: 50px;
  width: 100%;
  background-color: #ffffff;
  z-index: 999998;
  position: fixed;
}

#passContainer {
  display: flex;
  flex-direction: column;
}

/* Card Registro */
#regForm,
#loginForm {
  background: #ffffff;
  width: 720px;
  padding: 36px 40px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  margin: 60px auto 25px;
}

#regForm {
  width: 770px !important;
}

/* Card Mis Datos */
#userDataForm {
  background: #ffffff !important;
  width: 720px;
  padding: 32px 36px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
  margin: 0 auto 25px;
}

/* Fila de datos */
#userDataForm label.userName {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

/* Texto del label */
.labelTitle {
  color: #495057;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Inputs generales */
.userNameInput,
.userPassInput {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ced4da;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Focus */
.userNameInput:focus,
.userPassInput:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* Disabled (email) */
.userNameInput:disabled {
  background: #f1f3f5;
  color: #6c757d;
  cursor: not-allowed;
}

/* Botones primarios */
.regBtn {
  background: #0d6efd;
  width: 150px;
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  border: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.regBtn:hover:not(:disabled) {
  background: #0a58ca;
  box-shadow: 0 6px 18px rgba(13, 110, 253, 0.35);
}

.usersAdminBackBtn {
  margin: 30px auto !important;
}

#passChangeBtn {
  width: fit-content;
  background: #6c757d;
}

#passChangeBtn:hover {
  background: #5c636a;
}

/* Disabled */
.regBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Card cambio contraseña */
#passForm {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 25px 30px;
  width: 720px;
  margin: 20px auto;
  box-shadow: inset 0 0 0 1px #e9ecef;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

/* Fila */
#passForm label.userName {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

/* Animación suave al mostrar passForm */
#passForm.show {
  opacity: 1;
  transform: translateY(0);
}

#passForm {
  opacity: 0;
  transform: translateY(-8px);
}

.userName,
.userPass {
  color: rgb(10, 102, 130);
}

.userNameInput,
.userPassInput,
.userPassCheckInput {
  padding: 5px;
  width: 300px;
  border: none;
  font-size: 1rem;
}

.formTitle {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 500;
}

.formTitleRHS {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  align-self: center;
  margin-left: 1.5rem !important;
}

.tableTd {
  text-align: left;
  overflow: clip;
}

.tableTh {
  text-align: center;
}

.codeTh {
  width: 70px;
}

.unidad-transito-row > td {
  background-color: #ccff33a1 !important;
}

.unidad-transito-row:hover > td {
  background-color: #b4e600af !important;
}

.vin-floating-tooltip {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 99999;
}

.vin-floating-tooltip .form-check-input:checked {
  background-color: #ffc107;
  border-color: #ffc107;
}

.loginFormTitle,
.regFormTitle {
  margin: 0 0 30px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 500;
  color: #212529;
}

/* filas del login */
#loginForm label.userName {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
}

/* inputs */
#loginForm .userNameInput,
#loginForm .userPassInput {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 18px;
  border-radius: 9px;
  border: 1px solid #ced4da;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#loginForm input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

/* botón principal */
#loginForm .loginBtn {
  margin: 25px auto 10px;
  display: block;
  width: 180px;
  padding: 12px;
  background: #0d6efd;
  color: #ffffff;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  transition: all 0.2s ease;
}

#loginForm .loginBtn:hover {
  background: #0a58ca;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
}

/* Filas del registro */
#regForm label.userName {
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

/* Texto del label */
#regForm .labelTitle {
  color: #495057;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Inputs registro */
#regForm .userNameInput,
#regForm .userPassInput,
#regForm .userPassCheckInput {
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid #ced4da;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#regForm input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

#errorPassCheck,
#errorValidPass {
  margin: 10px 0 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  font-size: 0.85rem;
  font-weight: 500;
  display: none; /* JS lo maneja */
}

#regForm #sendBtn {
  margin: 30px auto 10px;
  display: block;
  width: 180px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 1rem;
  border-radius: 10px;
  padding: 12px;
  border: none;
  transition: all 0.2s ease;
}

#regForm #sendBtn:hover:not(:disabled) {
  background: #0a58ca;
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
}

#regForm #sendBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Login link container */
.gotoLoginContainer {
  margin-top: 25px;
  text-align: center;
}

/* Texto */
.loginContainerText {
  margin-right: 8px;
  color: #6c757d;
  font-size: 0.95rem;
}

/* Botón */
.gotoLoginContainer .regBtn {
  background: #6c757d;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
}

.gotoLoginContainer .regBtn:hover {
  background: #5c636a;
}

/* Link */
.loginLink {
  color: #ffffff;
  text-decoration: none;
}

/* ===== VALIDACIONES INLINE ===== */

.field {
  position: relative;
}

/* input válido */
.input-valid {
  border-color: #198754 !important;
}

.input-valid:focus {
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
}

/* input inválido */
.input-invalid {
  border-color: #dc3545 !important;
}

.input-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* mensaje inline */
.inline-error {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #dc3545;
  display: none;
}

.userDataBtnContainer {
  margin-top: 10px !important;
  width: 400px;
  margin: 0px auto;
  display: flex;
  flex-direction: row;
  gap: 50px;
}

.loginBtn {
  margin-top: 25px;
  border: none;
  font-size: 1rem;
  padding: 7px;
  width: 100px;
  color: #605f5f;
  font-weight: bold;
  background-color: #c8c8c8;
  transition: all 0.3s;
}

.labelTitle::after {
  content: " *";
  color: #dc3545;
}

.regLink {
  text-decoration: none;
}

.loginBtn:hover,
.regBtn:hover {
  background-color: #ebd829;
}

.gotoRegisterContainer,
.gotoLoginContainer {
  margin: 20px;
  text-align: center;
}

.regContainerText,
.loginContainerText {
  display: inline-block;
  margin-right: 10px;
  color: #4f4f4f;
}

.infoTitle,
.infoItem {
  color: #4f4f4f;
}

.infoItem {
  font-weight: 400;
}

.labelTitle {
  width: 200px;
  display: inline-block;
}

.navList {
  display: flex;
  align-items: center;
  margin: 20px;
  padding: 0;
}

.cartNav {
  width: 70%;
}

.navItem {
  list-style: none;
  padding: 3px 0px;
}

.cartLink,
.chatLink,
.itemLink,
.navItem,
.cartLinkSpan {
  text-decoration: none;
  color: rgb(234 234 234);
}

.cartLink,
.chatLink {
  font-weight: 500;
  display: inline-block;
  padding: 8px 0px;
  position: relative;
}

.cartLink:after,
.chatLink:after {
  bottom: 0;
  content: "";
  display: block;
  height: 2px;
  left: 50%;
  position: absolute;
  background: #9c6db9;
  transition:
    width 0.3s ease 0s,
    left 0.3s ease 0s;
  width: 0;
}

.cartLink:hover:after,
.chatLink:hover:after {
  width: 100%;
  left: 0;
}

.navItem {
  font-weight: 500;
}

.userAvatar {
  width: 40px;
  color: #1a191996;
}

.avatarItem {
  border-radius: 50%;
  background-color: #aae8e8a3;
  padding: 5px;
  margin: 15px;
}

.dropdown {
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.dropdown-content {
  visibility: collapse;
  /* opacity: 0; */
  transition: all 0.5s;
  position: absolute;
  right: -20px;
  width: 180px;
  box-shadow: 0px 1px 6px 1px rgb(179 173 173 / 40%);
  background-color: #f7f7f7;
  border-radius: 0px 3px 3px 3px;
  padding: 8px;
  /* margin-top: -10px; */
  border-radius: 5px;
  /* transition: all 0.5s ease; */
}
.dropdown:hover .dropdown-content {
  visibility: visible;
  /* opacity: 1; */
}

.dropdown-content a {
  display: block;
  font-size: 0.9rem;
  color: rgb(127, 125, 125);
  padding: 5px;
  text-decoration: none;
  border-radius: 3px;
}

.dropdown-content a:hover {
  color: #ffffff;
  background-color: #a8d3daf0;
}

#chatLink {
  cursor: pointer;
}

#closeChat {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #60080875;
  font-weight: bold;
  background-color: #d75f5fc7;
  position: absolute;
  top: 0;
  left: 0;
  font-size: 2rem;
  transition: box-shadow 0.3s;
  cursor: pointer;
}

#closeChat:hover {
  box-shadow: 0px 0px 10px #d75f5f;
}

#closePrivateChat {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #60080875;
  font-weight: bold;
  background-color: #d75f5fc7;
  position: sticky;
  top: -7%;
  left: 100%;
  font-size: 1rem;
  transition: box-shadow 0.3s;
  cursor: pointer;
}

#closePrivateChat:hover {
  box-shadow: 0px 0px 10px #d75f5f;
}

#privateMssgContainer {
  padding: 20px;
}

.privateMssgTitle {
  margin-bottom: 20px;
}

.connUsersContainer {
  display: flex;
  width: 100%;
  justify-content: center;
}

.sndMssgBtn {
  border: none;
  padding: 3px;
  color: rgba(44, 44, 44, 0.817);
  width: 120px;
  border-radius: 5px;
  cursor: pointer;
  background-color: #8dce57;
  transition: background-color 0.3s;
}

.sndMssgBtn:hover {
  background-color: #7eb94e;
}

/* //////////////// CARROUSEL */ /* //////////////// */
.car {
  position: relative;
  width: 80%;
  max-width: 600px;
  overflow: hidden;
}
.img-wrap {
  display: flex;
  transition: transform 0.5s ease;
}
.img-wrap img {
  width: 100%;
  height: auto;
}

.prev {
  left: 10px;
}
.next {
  right: 10px;
}

#picsBtn {
  font-size: 3rem;
  top: 29px;
  position: relative;
  padding: 0;
  width: 100%;
}

#tableTdPhoto {
  padding: 0;
}

#graphStat {
  margin: 0 auto;
  height: 500px;
  margin-top: 2.5rem;
}

.statsBtnsContainer {
  display: flex;
  justify-content: space-between;
}

#inputGroup {
  justify-content: space-around;
}

#rangoFechas {
  max-width: 80%;
}

#btnFormSubmit {
  border-radius: 0px 8px 8px 0px;
}

.table-auto td.wrap {
  white-space: normal;
  max-width: 350px;
}

thead {
  text-align: center;
  color: #b3ce7aef;
}

/* contenedor con scroll */
.table-responsive {
  max-height: 65vh; /* ajustable */
  overflow: auto;
  /* position: relative; */
}

/* tabla */
.table-auto {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

/* header sticky */
.table-auto thead th {
  position: sticky;
  top: 0;
  background: #111;
  color: #b3ce7aef;
  z-index: 20;
  text-align: center;
}

/* celdas */
.table-auto th,
.table-auto td {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
}

/* columna con wrap */
.table-auto td.wrap {
  white-space: normal;
  max-width: 350px;
}

/* resizer */
.th-resize {
  position: absolute;
  right: 0;
  top: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  z-index: 30;
}

.mdi {
  font-size: 22px;
  vertical-align: middle;
}

.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.form-check-input {
  margin-top: 0;
}

.form-switch .form-check-input {
  margin: 0 !important;
}

.card-title {
  letter-spacing: 0.5px;
}

.fade-slide {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideIn 0.35s ease-out forwards;
}

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

.mini-chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-chart {
  max-width: 39rem !important;
}

.mini-bar-container {
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.fade-out {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.fade-in {
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInMove 0.25s ease forwards;
}

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

#estadisticas {
  margin-left: 2rem;
  margin-right: 2rem;
  margin-bottom: 0 !important;
  justify-content: space-evenly;
}

#filtersCard {
  margin: 2rem;
}

.timeline {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 120px;
}

.timeline-bar {
  flex: 1;
  background: linear-gradient(180deg, #0d6efd, #6ea8fe);
  border-radius: 4px 4px 0 0;
  position: relative;
  animation: growUp 0.4s ease forwards;
}

@keyframes growUp {
  from {
    height: 0;
  }
}

.timeline-bar span {
  position: absolute;
  bottom: 100%;
  font-size: 0.7rem;
  white-space: nowrap;
  transform: rotate(-45deg);
  transform-origin: left bottom;
}

#evolucion {
  margin: 0 2rem;
  display: flex !important;
  width: 100%;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  width: 35em;
}

.bar-wrapper {
  position: relative;
  flex: 1;
  height: 14px;
  background: #e9ecef;
  border-radius: 7px;
  overflow: visible;
  cursor: pointer;
}

.bar {
  height: 14px;
  width: 0%;
  background: linear-gradient(90deg, #0d6efd, #4dabf7);
  border-radius: 7px;
  transition:
    width 0.45s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease,
    height 0.15s ease;
}

.label {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.value {
  flex: 0 0 36px;
  text-align: right;
  font-size: 0.8rem;
}

.mini-bar-row .label {
  flex: 0 0 240px;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-bar-row .bar {
  transition: width 0.5s ease;
}

.fade-slide {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.fade-slide.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* 🔹 Tooltip */
.mini-tooltip {
  position: absolute;
  top: -8px;
  /* left: 50%; */
  transform: translate(-50%, -100%);
  background: #212529;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 9999;
}

.mini-tooltip::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #212529 transparent transparent transparent;
}

/* Hover */
.bar-wrapper:hover .mini-tooltip {
  opacity: 1;
  transform: translate(-50%, -110%);
}

.mini-tooltip .pct {
  color: #9fd3ff;
  font-weight: 600;
}

/* 🔹 Hover highlight barra */
.bar-wrapper:hover .bar {
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.35);
}

/* 🔹 Efecto “focus” en toda la fila */
.mini-bar-row:hover {
  background: rgba(13, 110, 253, 0.05);
  border-radius: 6px;
}

/* 🔹 Pequeño crecimiento vertical */
.bar-wrapper:hover .bar {
  height: 18px;
}

/* .bar {
  height: 14px;
  transition: width 0.5s ease, filter 0.15s ease, box-shadow 0.15s ease,
    height 0.15s ease;
} */

.badge {
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.badge.show {
  transform: scale(1.05);
}

#badgeConDanio {
  padding: 8px;
  font-size: 0.9rem;
}

.form-label,
.form-check-label {
  color: #5e6366e0;
}

.form-check {
  display: FLEX !important;
  align-items: CENTER;
  padding: 0px 20px !important;
  gap: 8px;
  background-color: #ffffff;
  margin: 0 !important;
  box-shadow: 3px 3px 7px 0px #e2e2e2;
  justify-content: center;
  display: flex;
}

.form-check-label {
  margin-right: 5px;
}

.col-md-8 {
  padding-left: 60px !important;
}

.mini-bar-row.clickable {
  cursor: pointer;
}

.mini-bar-row.clickable:hover .bar {
  filter: brightness(1.25);
}

.mini-bar-row.active {
  background: rgba(13, 110, 253, 0.08);
  border-radius: 6px;
}

.filterContainer {
  margin-top: 0 !important;
  padding: 0 !important;
}

.movimientoLabel {
  margin: 0 !important;
  height: 30px;
  display: flex !important;
  align-items: center;
}

.movimientoLabelBtn {
  margin: 0 !important;
}

.form-chkTop {
  height: 47px !important;
}

#movimientoContainer {
  flex-direction: column;
  height: 63px;
  background-color: #ffffff;
  padding: 4px 10px;
  box-shadow: 3px 3px 7px 0px #e2e2e2;
}

#btnLimpiarFiltros {
  margin: 0 !important;
  padding: 15px;
  font-size: 0.9rem;
  height: 63px;
  width: 8rem;
  border-radius: 0;
}

#soloVINConDanio {
  height: 63px;
}

.post-table-action {
  display: flex;
  opacity: 0;
  /* transform: translateY(10px); */
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.post-table-action.show {
  opacity: 1;
  /* transform: translateY(0); */
  visibility: visible;
}

.post-table-action-buttons {
  opacity: 0;
  transform: translateX(-30px) scale(0.9);
}

/* se anima cuando se agrega esta clase */
.post-table-action-buttons.animate-in {
  animation: slideFadeIn 420ms cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateX(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ////////////////////////////////// */
.choices {
  width: 100%;
}

.choices__inner {
  min-height: 38px;
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
}

.choices__input {
  font-size: 0.95rem;
}

.choices__list--multiple .choices__item {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  color: #212529;
}

/* 🔹 Dropdown de Choices */
.choices__list--dropdown,
.choices__list[aria-expanded="true"] {
  background-color: #fff !important;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1050;
}

/* 🔹 Input search */
.choices__input--cloned {
  background-color: #fff !important;
}

/* 🔹 Item */
.choices__list--dropdown .choices__item {
  background-color: #fff;
  color: #212529;
}

/* 🔹 Hover */
.choices__list--dropdown .choices__item--selectable:hover {
  background-color: #f1f3f5;
}

.choices * {
  background-color: inherit;
}

.choices__list--dropdown * {
  background-color: #fff;
}

.choices {
  position: relative;
  z-index: 30 !important;
}

/* 🔹 Dropdown */
.choices__list--dropdown,
.choices__list[aria-expanded="true"] {
  position: absolute;
  z-index: 1065;
}

.card,
.card-body,
.table-responsive {
  overflow: visible !important;
}

#filtersCard,
#filtersCard .card-body {
  overflow: visible !important;
}

/* 🔥 FIX DEFINITIVO FLATPICKR */
.flatpickr-calendar {
  z-index: 11000 !important;
}

.text-muted {
  margin-top: 3rem;
  text-align: center;
  font-size: larger;
  font-weight: 600;
}

#paginacion {
  position: static;
  clear: both;
}

.tabla-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.tabla-scroll {
  max-height: 60vh; /* 🔑 ajustá según tu layout */
  overflow-y: auto; /* 🔑 scroll vertical */
  overflow-x: auto;
  /* overflow: visible !important; */
}

#vinInput {
  width: 220px;
}

#VINinputGroup {
  justify-content: center;
}

#title-VIN-input,
#title-date-input {
  flex-direction: row;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
}

#title-VIN-input {
  margin-bottom: 35px;
  margin-top: 1rem !important;
  min-width: 1200px;
}

.usersFormTitle {
  margin: 30px auto;
}

#btnExportPdf,
#btnExportExcel {
  width: 5rem;
  height: 30px;
}

.actionBtnsWrapper {
  display: flex;
  gap: 40px;
  margin-top: 25px;
  justify-content: center;
  margin-bottom: 25px;
}

:root {
  --toast-bg: #ffffff;
  --toast-text: #374151; /* gris oscuro */
  --toast-border: #e5e7eb; /* gris claro */
  --toast-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);

  --toast-success: #16a34a;
  --toast-error: #dc2626;
  --toast-info: #2563eb;
  --toast-warn: #d97706;
}

.toast-app {
  background: var(--toast-bg) !important;
  color: var(--toast-text) !important;
  border: 1px solid var(--toast-border);
  border-left-width: 4px;
  border-radius: 10px;
  box-shadow: var(--toast-shadow);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1rem;
  padding: 12px 16px;
  min-width: 260px;
}

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

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

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

.toast-warn {
  border-left-color: var(--toast-warn);
}

#btnUpdateDamages,
#btnDeletePicts,
#btnDeleteVIN,
#btnDeleteDamages {
  min-width: 155px;
}

/* transición base de las filas */
.resultadosVINtr {
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    height 220ms ease;
}

/* estado de colapso */
.row-collapsing {
  opacity: 0;
  transform: translateY(-8px);
}

/* fade de celdas */
.cell-fade {
  transition: opacity 160ms ease;
}

/* Overlay siempre full viewport */
.glightbox-container {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.92) !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
}

/* Centrado real del contenido */
.glightbox-content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  max-height: 100vh !important;
}

/* Imagen nunca desbordada */
.glightbox-content img {
  max-width: 95vw !important;
  max-height: 95vh !important;
  object-fit: contain !important;
}

body > .glightbox-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 99999 !important;
}

.glightbox-container,
.glightbox-overlay,
.glightbox-content {
  transform: none !important;
  will-change: auto !important;
}

.vin-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vin-link:hover {
  text-decoration: underline;
  color: #0a58ca;
}

.vin-text {
  color: inherit;
  font-weight: normal;
}

.vin-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.vin-link {
  transition: color 0.2s ease;
}

.vin-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.vin-link:hover {
  color: #0a58ca;
}

.vin-link:hover::after {
  transform: scaleX(1);
}

.vin-link,
.vin-link:hover,
.vin-link:focus,
.vin-link:active {
  text-decoration: none !important;
}

.vin-link::after {
  pointer-events: none;
}

.area-cell {
  position: relative;
  padding-left: 28px;
}

.damage-delete-icon {
  position: static;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: #dc3545;
  cursor: pointer;
  opacity: 0.85;
}

.damage-delete-icon:hover {
  opacity: 1;
  color: #bb2d3b;
}

.resultadosVINtr {
  transition:
    opacity 0.2s ease,
    height 0.2s ease;
}

.pending-change {
  background-color: rgba(255, 193, 7, 0.25);
}

.pending-change-preview {
  background-color: rgba(255, 193, 7, 0.15);
}

.glightbox-container .gallery-controls {
  position: fixed;
  top: 12px;
  right: 100px;
  z-index: 99999;
  display: flex;
  gap: 12px;
  border-radius: 12px;
  background-color: whitesmoke;
  padding: 1rem 1.5rem;
  border: solid 0.5px #ff000096;
  /* box-shadow: 1px 1px 8px 2px #d50c0ccf; */
}

.modal {
  z-index: 100000 !important;
}

.modal-backdrop {
  z-index: 99999 !important;
}

.gallery-spinner {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
}
.vin-text {
  color: inherit;
  cursor: default;
  text-decoration: none;
}

.vin-link {
  cursor: pointer;
}

.vin-cell {
  /* display: flex; */
  align-items: center;
  gap: 6px;
}

.add-damage-icon {
  cursor: pointer;
  color: #198754; /* verde */
  font-size: 1.1rem;
  line-height: 1;
}

.add-damage-icon:hover {
  color: #146c43;
}

.new-damage-row {
  background-color: #f8f9fa;
}

.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vin-delete-icon {
  color: #dc3545;
  cursor: pointer;
  margin-right: 6px;
}

.vin-delete-icon:hover {
  opacity: 0.8;
}

.vin-cartaporte-icon {
  color: #3fb41ef8;
  cursor: pointer;
  margin-right: 6px;
}

.vin-cartaporte-icon:hover {
  opacity: 0.8;
}

#movimientoFilterWrap {
  display: flex;
  height: 40px;
  gap: 8px;
}

#contFiltroLugar,
#contFiltroDestino {
  width: 300px;
  margin-top: -25px;
}

#vinError {
  position: absolute;
  top: 40px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top: 2px solid white;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  animation: spin 0.6s linear infinite;
}

.d-none {
  display: none;
}

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

.loginBtn:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.roleContainer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.usersAdminTable td {
  vertical-align: middle;
}

.usersAdminContainer {
  max-width: 900px;
  margin: 25px auto;
}

.usersAdminTable {
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.usersAdminTable thead {
  background: #f8f9fa;
  font-weight: 600;
}

.usersAdminTable tbody tr {
  transition: background 0.15s ease;
}

.usersAdminTable tbody tr:hover {
  background: #f6f8fa;
}

.usersEmail {
  font-weight: 500;
  color: #333;
}

.roleSelect {
  max-width: 180px;
  border: none;
}

.deleteUserBtn {
  min-width: 90px;
}

#userSearch {
  width: 94%;
  margin: 0px auto;
  padding: 8px;
}

.roleSpinner {
  width: 18px;
  height: 18px;
}
