@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/poppins/v20/pxiEyp8kv8JHgFVrFJA.ttf) format('truetype');
  }
  @font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/poppins/v20/pxiByp8kv8JHgFVrLCz7V1s.ttf) format('truetype');
  }
  * {
    padding: 0;
    margin: 0;
    font-family: "Poppins", sans-serif;
    color: white;
    -webkit-touch-callout: none; 
    -webkit-user-select: none;
     -khtml-user-select: none; 
       -moz-user-select: none; 
        -ms-user-select: none; 
            user-select: none; 
            -webkit-user-drag: none;
            -khtml-user-drag: none;
            -moz-user-drag: none;
            -o-user-drag: none;
  }
  html {
    height: 100%;
  }
  :root {
    --color: #9B37FF;
    --accent:#7a3cff;
    --extra:1vw;
  }
  body {
    display: flex;
    justify-content: center;
    min-height: 100%;
  }
  #app {
    display: flex;
    justify-content: center;
    min-height: 100%;
    overflow: hidden;
    width: 100%;
  }
  .background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: grayscale(0.1);
    z-index: -1;
  }
  .container-2 {
    position: absolute;
    top: 0;
    left: -100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    flex-wrap: nowrap;
    width: 100%;
    background-color: rgba(0, 0, 0, 0);
    transition: 0.25s;
    animation: opacidad 0.5s ease forwards;
  }
  
  @keyframes opacidad {
    from {
      background-color: rgba(0, 0, 0, 0); /* Opacidad inicial transparente */
    }
    to {
      background-color: rgba(0, 0, 0, 0.308); /* Opacidad final más alta */
    }
  }
  
  .container-2.active {
    left: 0;
  }
  .container-2 .header {
    display: flex;
    border-radius: 5px;
    border: 1px solid #969696;
    background: rgba(18, 18, 18, 0.15);
    gap: 5px;
    padding: 5px;
    align-items: end;
    font-weight: bold;
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 25px;
  }
  .container-2 .header .left {
    font-size: 24px;
  }
  .container-2 .header .right {
    color: #aaa;
  }
  .container-2 .bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: linear-gradient(360deg, #0f0f0f 17.19%, rgba(45, 45, 45, 0) 100%);
    padding-bottom: 25px;
  }
  .container-2 .bottom .left {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 25px;
  }
  .container-2 .bottom .left .texts {
    display: flex;
    flex-flow: column;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
  }
  .container-2 .bottom .left .texts .title {
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color);
  }
  .container-2 .bottom .mid {
    width: 500px;
    display: flex;
    flex-flow: column;
    align-items: center;
  }
  .container-2 .bottom .mid .head {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .container-2 .bottom .mid .head .icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    border: 1px solid var(--color);
    font-weight: bold;
    font-size: 20px;
  }
  .container-2 .bottom .mid .head .title {
    font-weight: bold;
    font-size: 20px;
  }
  .container-2 .bottom .mid .description {
    text-align: center;
    font-size: 14px;
    color: #aaa;
    font-weight: bold;
    margin-top: 10px;
  }
  .container-2 .bottom .right {
    padding: 7.5px;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(128, 0, 255, 0) 20.61%, rgba(128, 0, 255, 0.31) 100%);
    box-shadow: 0px 0px 10px 0px var(--color);
    border: 2px solid var(--color);
    font-size: 24px;
    font-weight: bold;
    margin-right: 25px;
    cursor: pointer;
    transition: 0.25s;
    padding-left: 15px;
    padding-right: 15px;
    min-width: 171px;
    text-align: center;
  }
  .container-2 .bottom .right span {
    font-weight: normal;
  }
  .container-2 .bottom .right:hover {
    background-color: var(--color);
  }
  .container {
    position: absolute;
    top: 0;
    left: 0;
    height: calc(100% - 50px);
    display: flex;
    flex-flow: column;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden;
    flex-wrap: nowrap;
    width: calc(100% - 50px);
    padding: 25px;
    background-color: rgba(0, 0, 0, 0.6);
    transition: 0.25s;
  }
  .container.hidden {
    left: -100%;
  }
  .container .header {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }
  .container .header .left {
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid var(--color);
  }
  .container .header .left ion-icon {
    font-size: 32px;
    padding-right: 15px;
    border-right: 1px solid var(--color);
  }
  .container .header .left h1 > span {
    font-size: 18px;
    color: #7e7c7c;
  }
  .container .header .right h1 > span {
    font-size: 18px;
    color: #7e7c7c;
  }
  .container .main {
    width: 1406px;
    height: 600px;
    overflow: hidden;
    position: relative;
    top: -10vw;
  }
  .container .main .arrows {
    position: absolute;
    left: 50%;
    bottom: 125px;
    width: 400px;
    transform: translate(-50%, -50%);
    z-index: 10;
  }
  .container .main .arrows .arrow-left {
    position: absolute;
    left: -25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: 1px solid var(--color);
    backdrop-filter: blur(5px);
  }
  .container .main .arrows .arrow-left ion-icon {
    font-size: 24px;
  }
  .container .main .arrows .arrow-right {
    position: absolute;
    right: -25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: 1px solid var(--color);
    backdrop-filter: blur(5px);
  }
  .container .main .arrows .arrow-right ion-icon {
    font-size: 24px;
  }
  .container .main .slider {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    transition: 0.25s;
  }
  .container .main .slider .jobs {
    display: flex;
    gap: 100px;
  }
  .container .main .slider .jobs .job {
    position: relative;
    display: flex;
    flex-flow: column;
    align-items: center;
    width: 350px;
    min-width: 350px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6.6px);
    -webkit-backdrop-filter: blur(6.6px);
    border: 1px solid rgba(255, 255, 255, 0.31);
    transform: scale(0.9);
  }
  .container .main .slider .jobs .job.active {
    transform: scale(1);
  }
  .container .main .slider .jobs .job.active::before {
    display: none;
  }
  .container .main .slider .jobs .job::before {
    content: "";
    position: absolute;
    left: -1px;
    top: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    z-index: 10;
  }
  .container .main .slider .jobs .job .top {
    display: flex;
    position: relative;
    width: 100%;
  }
  .container .main .slider .jobs .job .top img {
    width: 100%;
    filter: brightness(0.6);
    border-radius: 0.7vw;
  }
  .container .main .slider .jobs .job .top .job-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid var(--color);
    white-space: nowrap;
  }
  .container .main .slider .jobs .job .top .level {
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px var(--color);
  }
  .container .main .slider .jobs .job .level-progress {
    position: relative;
    margin-top: 50px;
    margin-bottom: 50px;
    width: 100%;
    background-color: transparent;
    height: 10px;
    border: 1px solid var(--color);
    border-radius: 2.5px;
  }
  .container .main .slider .jobs .job .level-progress .level-bar {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 10px;
    background-color: var(--color);
    opacity: 0.7;
  }
  .container .main .slider .jobs .job .level-progress .next-level {
    position: absolute;
    right: 0;
    bottom: -20px;
    font-size: 10px;
    color: #c1c1c1;
  }
  .container .main .slider .jobs .job .description {
    text-align: center;
    font-size: 14px;
  }
  .container .main .slider .jobs .job .select-button {
    margin-top: 25px;
    padding: 10px;
    border: 2px solid var(--color);
    border-radius: 5px;
    font-size: 24px;
    padding-left: 25px;
    padding-right: 25px;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--color);
    transition: 0.25s;
  }
  .container .main .slider .jobs .job .select-button:hover {
    background-color: var(--color);
    opacity: 0.9;
  }
  
  .container-3 {
    position: absolute;
    top: 3vw;
    left: 49.3vw;
    height: 2vw;
    padding: 0 0.5vw;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.63) 20.61%, rgb(128, 0, 255) 100%);
    border: 2px solid var(--color);
    border-radius: 10px;
    display: none;
    align-items: center;
    white-space: nowrap;
}

.playerlist-1 {
  position: relative; 
  height: auto;
  margin-bottom: 0.3vw;
  padding: 0 0.5vw;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.63) 20.61%, rgb(128, 0, 255) 100%);
  border: 2px solid var(--color);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: 6vw;
}

#player {
  font-weight: bold;
  font-size: 0.9vw;
  color: #FFFFFF;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 6vw;
  text-align: center;
}
.container-3 img {
  width: 1.3vw;
  height: 80%;
  margin-right: 0.5vw;
}
  
#total_steps {
  font-weight: bold;
  font-size: 0.9vw;
  color: #FFFFFF;
}
  
  #total_steps_2 {
    opacity: 0.80;
    font-size: 0.9vw;
    color: #ffffff96;
    margin-left: 0.1vw;
    font-weight: bold;
  }
  
  .container-4 {
    position: relative;
    top: 19vw;
    left: 0vw;
    height: 15.5vw;
    width: 28vw;
    padding: 0 0.5vw;
    background: rgba(0,0,0,0.800000011920929);
    border-radius: 10px;
    display: none;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.253);
  }
  
  .container-5 {
    position: relative;
    top: 19vw;
    left: 0vw;
    height: 15.5vw;
    width: 28vw;
    padding: 0 0.5vw;
    background: rgba(0,0,0,0.800000011920929);
    border-radius: 10px;
    display: none;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.253);
    transition: 0.25s;
  }
  
  .container-6 {
    position: relative;
    top: 2vw;
    left: 0vw;
    height: 2.34vw;
    width: 33vw;
    padding: 0 0.5vw;
    background: linear-gradient(rgba(11, 4, 17, 0.57), rgb(127, 0, 255));
    border-radius: 10px;
    display: none;
    box-shadow: 0px 0px 10px var(--color);
    border: 2px solid var(--color);
    transition: 0.25s;
  }
  
  .container-8 {
    position: relative;
    top: 19vw;
    left: 0vw;
    height: 15.5vw;
    width: 28vw;
    padding: 0 0.5vw;
    background: rgba(0,0,0,0.800000011920929);
    border-radius: 10px;
    display: none;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.253);
  }

  .container-6 span {
    position: absolute;
    top: 0.5vw;
    width: 31.1vw;
    text-align: left;
    font-size: 0.93vw;
    left: 1vw;
  }
  
  #accept, #decline {
    position: absolute;
    top: 0.15vw;
    width: 5vw;
    text-align: center;
    font-size: 0.8vw;
    left: 0vw;
  }
  
  
  .popdown {
    animation-name: popdown;
    animation-duration: 500ms;
  }
  
  .start-container {
    display: flex;
    align-items: baseline;
  }
  
  #jobname {
    font-size: 2vw;
    color: #FFFFFF;
    position: relative;
    top: 2vw;
    left: 0%;
    display: flex;
    justify-content: center;
    text-align: center;
    padding-bottom: 0.5vw;
    font-weight: 600;
    align-items: center;
    text-decoration: underline;
    text-decoration-color: rgba(154,54,255,1);
    text-decoration-thickness: 2px;
    text-underline-offset: 19px;
  }

  #jobname2 {
    font-size: 2vw;
    color: #FFFFFF;
    position: relative;
    top: 2vw;
    left: 0%;
    display: flex;
    justify-content: center;
    text-align: center;
    padding-bottom: 0.5vw;
    font-weight: 600;
    align-items: center;
    text-decoration: underline;
    text-decoration-color: rgba(154,54,255,1);
    text-decoration-thickness: 2px;
    text-underline-offset: 19px;
  }
  
  #multiplayer-text {
    font-size: 1.3vw;
    color: #FFFFFF;
    position: absolute;
    top: 1.5vw;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    justify-content: center;
    text-align: center;
    border-bottom: 2px solid rgba(154,54,255,1);
    padding-bottom: 0.5vw;
    font-weight: 600;
    width: 18vw;
  }
  
  .start_text {
    position: absolute;
    top: 6.3vw;
    left: 0vw;
    width: 29vw;
    text-align: center;
    font-size: 1.2vw;
    font-weight: 600;
  }

  .finish_text {
    position: absolute;
    top: 5.5vw;
    left: 1.56vw;
    width: 26vw;
    text-align: center;
    font-size: 1.2vw;
    font-weight: 600;
  }
  
  .multiplayer_start_text{
    position: absolute;
    top: 5.3vw;
    left: 0vw;
    width: 29vw;
    text-align: center;
    font-size: 1vw;
    font-weight: 600;
  }
  
  .bottom-start {
    position: absolute;
    top: 7vw;
    left: 0vw;
  }

  .bottom-finish {
    position: absolute;
    top: 7vw;
    left: 0vw;
  }
  
  .bottom-player {
    position: absolute;
    top: 8vw;
    left: 0vw;
  }
  
  .bottom-team {
    position: absolute;
    top: 7vw;
    left: 0vw;
  }
  
  .bottom-player span {
    position: absolute;
    top: 0.14vw;
    width: 4.9vw;
    text-align: center;
    font-size: 1vw;
    font-weight: bold;
  }
  
  .player1{
    position: absolute;
    top: 0.4vw;
    left: 4.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 2.8vw;
    border: 2px solid #FFFFFF;
    background: #7d7d7d23;
    border-radius: 10px;
  }
  
  .player1-id{
    position: absolute;
    top: 4vw;
    left: 4.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 2px solid #7D7D7D3D;
    background: #3E3E3E;
    border-radius: 10px;
    text-align: center;
  }
  
  .player2-id{
    position: absolute;
    top: 4vw;
    left: 12vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 2px solid #7D7D7D3D;
    background: #3E3E3E;
    border-radius: 10px;
    text-align: center;
  }
  
  .player3-id{
    position: absolute;
    top: 4vw;
    left: 19.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 2px solid #7D7D7D3D;
    background: #3E3E3E;
    border-radius: 10px;
    text-align: center;
  }
  
  .send{
    position: absolute;
    top: 6.6vw;
    left: 4.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 3px solid var(--color);
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    border-radius: 10px;
    box-shadow: 0px 0px 10px var(--color);
  }
  
  .send2{
    position: absolute;
    top: 6.6vw;
    left: 12vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 3px solid var(--color);
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    border-radius: 10px;
    box-shadow: 0px 0px 10px var(--color);
  }
  
  .send3{
    position: absolute;
    top: 6.6vw;
    left: 19.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 1.8vw;
    border: 3px solid var(--color);
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    border-radius: 10px;
    box-shadow: 0px 0px 10px var(--color);
  }
  
  #place::placeholder{
    color: #7D7D7D3D;
    font-weight: bolder;
  }
  
  input:focus, select:focus, select, input.form-control:focus {
  
    outline:none !important;
  
    outline-width: 0 !important;
  
    box-shadow: none;
  
    -moz-box-shadow: none;
  
    -webkit-box-shadow: none;
  }
  
  .invite1, .invite2, .invite3 {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms, transform 500ms;
  }
  
  .invite1.show, .invite2.show, .invite3.show {
    display: block;
    animation: slideDown 1000ms ease forwards;
  }
  

  .invite1.hide, .invite2.hide, .invite3.hide {
    animation: slideUP 1000ms ease forwards;
  }
  
  .player2{
    position: absolute;
    top: 0.4vw;
    left: 12vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 2.8vw;
    border: 2px solid #FFFFFF;
    background: #7d7d7d23;
    border-radius: 10px;
  }
  
  .player3{
    position: absolute;
    top: 0.4vw;
    left: 19.4vw;
    transition: 0.25s;
    width: 4.9vw;
    height: 2.8vw;
    border: 2px solid #FFFFFF;
    background: #7d7d7d23;
    border-radius: 10px;
  }
  
  #img_user1 {
    position: absolute;
    width: 1.3vw;
    top: 0.6vw;
    left: 1.8vw;
  }
  
  #img_user2 {
    position: absolute;
    width: 1.3vw;
    top: 0.6vw;
    left: 1.8vw;
  }
  
  #img_user3 {
    position: absolute;
    width: 1.3vw;
    top: 0.6vw;
    left: 1.8vw;
  }
  
  .alone{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 10vw;
    height: 2.5vw;
    top: 3vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 3vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
  }
  
  .accept{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 5vw;
    height: 1.65vw;
    top: -6.8vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 22.4vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
  }
  
  .decline{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    top: -6.8vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 28vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
    width: 5vw;
    height: 1.65vw;
  }
  
  .startjob{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 10vw;
    height: 2.5vw;
    top: 20vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 9.4vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
    display: none;
  }
  
  .multiplayer{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 10vw;
    height: 2.5vw;
    top: 3vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 16vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
  }

  .work{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 10vw;
    height: 2.5vw;
    top: 3vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 3vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
  }

  .nowork{
    background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
    position: absolute;
    width: 10vw;
    height: 2.5vw;
    top: 3vw;
    border: 2px solid var(--color);
    border-radius: 10px;
    left: 16vw;
    box-shadow: 0px 0px 10px var(--color);
    transition: 0.25s;
  }
  
  .multiplayer:hover, .alone:hover {
    cursor: pointer;
    transform: scale(1.1);
    background: var(--color);
  }

  .work:hover, .nowork:hover {
    cursor: pointer;
    transform: scale(1.1);
    background: var(--color);
  }
  
  .accept:hover, .decline:hover {
    cursor: pointer;
    transform: scale(1.07);
    background: var(--color);
  }
  
  .player1:hover, .player2:hover, .player3:hover {
    cursor: pointer;
    transform: scale(1.05);
  }
  
  .player1 span, .player2 span, .player3 span  {
    position: absolute;
    top: 0.55vw;
    width: 5vw;
  }
  
  .send:hover, .send2:hover, .send3:hover, .startjob:hover {
    cursor: pointer;
    transform: scale(1.05);
    background: var(--color);
  }
  
  .multiplayer span, .alone span{
    position: absolute;
    top: 0.3vw;
    width: 10vw;
    text-align: center;
    font-size: 1.2vw;
  }

  .work span, .nowork span{
    position: absolute;
    top: 0.45vw;
    width: 10vw;
    text-align: center;
    font-size: 1vw;
  }
  
  .startjob span{
    position: absolute;
    top: 0.3vw;
    width: 10vw;
    text-align: center;
    font-size: 1.2vw;
  }
  
  #start_text {
    color: var(--color);
  }

  #finish_text {
    color: var(--color);
  }
  
  .close{
    position: absolute;
    top: 0.4vw;
    left: 26.4vw;
    transition: 0.25s;
    width: 2vw;
    height: 2vw;
    border: 2px solid rgba(255, 255, 255, 0.253);
    border-radius: 10px;
  }
  
  .close:hover {
    cursor: pointer;
    transform: scale(1.1);
  }
  
  .close span {
    width: 2vw;
    height: 2vw;
    position: absolute;
    text-align: center;
    padding-top: 0.2vw;
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.253);
  }

  .closefinish{
    position: absolute;
    top: 0.4vw;
    left: 26.4vw;
    transition: 0.25s;
    width: 2vw;
    height: 2vw;
    border: 2px solid rgba(255, 255, 255, 0.253);
    border-radius: 10px;
  }
  
  .closefinish:hover {
    cursor: pointer;
    transform: scale(1.1);
  }
  
  .closefinish span {
    width: 2vw;
    height: 2vw;
    position: absolute;
    text-align: center;
    padding-top: 0.2vw;
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.253);
  }
  
  .closesell{
    z-index: 11;
    position: absolute;
    top: 0.4vw;
    left: 41.4vw;
    transition: 0.25s;
    width: 2vw;
    height: 2vw;
    border: 2px solid rgba(255, 255, 255, 0.253);
    border-radius: 10px;
  }
  
  .closesell:hover {
    cursor: pointer;
    transform: scale(1.1);
  }
  
  #closesellx {
    width: 2vw;
    height: 2vw;
    position: absolute;
    text-align: center;
    padding-top: 0.2vw;
    font-size: 1vw;
    color: rgba(255, 255, 255, 0.253);
    top: 0vw;
  }

  .screen2{
    display: none;
  }
  
  .no-hover {
    pointer-events: none;
  }
  
  .no-hover:hover {
    cursor: pointer;
    transform: scale(1.05);
  }

.container-9 {
  position: absolute;
  top: 43vw;
  left: 87vw;
  height: 7.5vw;
  width: 7vw;
  padding: 0 0.5vw;
  background: rgba(0,0,0,0.800000011920929);
  border-radius: 10px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.253);
}

.progress-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 9vh;
  flex-direction: column;
  position: absolute;
  top: 1.2vw;
  left: 0.1vw;
}
.progress-circle {
  width: 7.6vw;
  transform: rotate(-90deg);
}
.progress {
  stroke: var(--color);
  fill: none;
  stroke-width: 10;
}
.progress-background {
  stroke: #535050;
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}

.level-text{
  position: absolute;
  top: 1.7vw;
  left: 1.9vw;
  width: 4vw;
  text-align: center;
  font-size: 0.8vw;
  font-weight: 700;
  color: white;
}

.progress-text{
  position: absolute;
  top: 2.8vw;
  left: 1.9vw;
  width: 4vw;
  text-align: center;
  font-size: 0.4vw;
  font-weight: 400;
  color: white;
}

  @keyframes slide-in-top {
    0% {
      transform: translateY(-1000px);
      opacity: 0;
    }
    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  @keyframes slide-out-top {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    100% {
      transform: translateY(-1000px);
      opacity: 0;
    }
  }
  
  @keyframes popup {
    from {
        opacity: 0;
        transform: scale(0, 0);
    }
    to {
        opacity: 1.0;
        transform: scale(100%, 100%);
    }
  }

  @keyframes popup2 {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    opacity: 1.0;
    transform: translate(-50%, -50%) scale(1);
  }
}

  
  @keyframes popdown {
    from {
        opacity: 1.0;
        transform: scale(100%, 100%);
    }
    to {
        opacity: 0;
        transform: scale(0, 0);
    }
  }
  
  @keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
  }
  
  @keyframes slideUP {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
  }
  
  
.jobs .job .description,
.jobs .job .select-button {
    transition: all 0.3s ease;
}

.jobs .job .no-experience {
    margin-top: 110px;
}

.externaljob {
  position: absolute;
  top: 16.5vw;
  left: 3.4vw;
  width: 14vw;
  height: 3vw;
  border-bottom: 0.15vw solid var(--color);
}

.circle {
  position: absolute;
  right: 11vw;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  background: #0f0f0f;
  border: 1px solid var(--color);
  backdrop-filter: blur(5px);
}

.circle img {
  position: absolute;
  left: 0.55vw;
  width: 1vw;
  height: 0.9vw;
}

.externaljob span {
  position: absolute;
  left: 62%;
  top: 37%;
  width: 10vw;
  transform: translate(-50%, -50%);
  font-size: 24px;
}

.container-7 {
  position: absolute;
  top: 13.698vw;
  height: 28.854vw;
  width: 43.281vw;
  padding: 0 0.5vw;
  background: rgba(0,0,0,0.800000011920929);
  border-radius: 10px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.253);
  align-content: center;
}

.container-7 span {
  position: absolute;
  top: 0.833vw;
  width: 44.3vw;
  font-size: 1.563vw;
  left: 0vw;
  font-weight: bold;
  text-align: center;
}

.line-container7 {
  background: var(--color);
  width: 11vw;
  top: 3.385vw;
  left: 16.51vw;
  position: absolute;
  height: 0.1vw;
}


.wholesale{
  background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
  position: absolute;
  width: 11.097vw;
  height: 2.655vw;
  top: 24.604vw;
  border: 2px solid var(--color);
  border-radius: 10px;
  left: 7.958vw;
  box-shadow: 0px 0px 10px var(--color);
  transition: 0.25s;
}

.retail{
  background: linear-gradient(rgba(127,0,255,0), rgba(127,0,255,0.3100000023841858));
  position: absolute;
  top: 24.604vw;
  border: 2px solid var(--color);
  border-radius: 10px;
  left: 23.604vw;
  box-shadow: 0px 0px 10px var(--color);
  transition: 0.25s;
  width: 11.097vw;
  height: 2.655vw;
}

#wholesale, #retail {
  position: absolute;
  top: 0.75vw;
  width: 11vw;
  text-align: center;
  font-size: 0.738vw;
  left: 0vw;
  font-weight: bold;
  transition: 0.25s;
}

.wholesale:hover, .retail:hover {
  cursor: pointer;
  transform: scale(1.02);
}

.disabled {
  pointer-events: none; 
  cursor: not-allowed; 
  opacity: 0.5;
}

.disabled:hover {
  background-color: inherit; /* Mantén el color de fondo original */
  color: inherit; /* Mantén el color del texto original */
  border-color: inherit; /* Mantén el borde original */
}

.linesell {
  background: #8D8D8D;
  width: 0.04vw;
  top: 24.604vw;
  left: 21.4vw;
  position: absolute;
  height: 2.9vw;
}
#supplier {
  position: revert;
  font-weight: normal;
}

#item{
  text-align: center;
  font-size: 0.8vw;
  left: 0vw;
  font-weight: normal;
  position: revert;
  color: #e9e9e9;
}
.itemsell.empty-item:focus {
  outline: none;
}
.itemsell.empty-item {
  pointer-events: none; 
  cursor: not-allowed; 
  opacity: 0.5;
}

#desc {
  position: absolute;
  top: 4.063vw;
  width: 44.3vw;
  text-align: center;
  font-size: 0.8vw;
  left: 0vw;
  font-weight: normal;
  color: #e9e9e9;
}

.totalitem{
  position: absolute;
  width: 42.6vw;
  height: 14.6vw;
  top: 6.5vw;
  left: 0.5vw;
  grid-template-columns: repeat(5, 8vw);
  display: grid;
  overflow-y: auto;
  overflow-x: hidden;
}

.itemsell{
  position: relative;
  width: 6.51vw;
  height: 6.25vw;
  top: -0.7vw;
  left: 1vw;
  background: linear-gradient(47deg, rgba(56.93, 56.93, 56.93, 0.73) 0%, #111111 28%, #050505 68%, rgba(46, 46, 46, 0.65) 100%);
  border: 1px #555555 solid;
  margin-top: 1.1vw;
  transition: 0.25s;
}

.itemsell:focus {
  border: 1px var(--color) solid;
  transform: scale(1.02);
}

.itemsell:hover{
  cursor: pointer;
  border: 1px var(--color) solid;
  transform: scale(1.02);
}

.itemsell span{
  position: absolute;
  top: 4.5vw;
  width: 6.5vw;
  text-align: center;
  font-size: 0.833vw;
  left: 0vw;
  font-weight: normal;
}

.itemsell img {
  position: relative;
  top: 0.7vw;
  left: 1.3vw;
  width: 4vw;
}

.totalitem::-webkit-scrollbar {
  width: 8px;
}

.totalitem::-webkit-scrollbar-track {
  background-color: #333;
}

.totalitem::-webkit-scrollbar-thumb {
  background-color: #a020f0;
}

.totalitem::-webkit-scrollbar-thumb:hover {
  background-color: #b533ff;
}

#selected_item {
  position: absolute;
  top: 22vw;
  width: 44.3vw;
  text-align: center;
  font-size: 0.8vw;
  left: 0vw;
  font-weight: normal;
  color: #a020f0;
}

.price_wholesale {
  width: 2.552vw;
  height: 2.552vw;
  border: 2px solid #7D3CF8;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0);
  position: absolute;
  top: 24.7vw;
  left: 4.1vw;
}

.price_retail {
  width: 2.552vw;
  height: 2.552vw;
  border: 2px solid #7D3CF8;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0);
  position: absolute;
  top: 24.7vw;
  left: 35.8vw;
}

.price_retail span{
  position: absolute;
  top: 0.59vw;
  width: 2.5vw;
  text-align: center;
  font-size: 0.833vw;
  left: 0vw;
  font-weight: normal;
}

.price_wholesale span{
  position: absolute;
  top: 0.59vw;
  width: 2.5vw;
  text-align: center;
  font-size: 0.833vw;
  left: 0vw;
  font-weight: normal;
}

@keyframes slide-in-bottom {
  0% {
    -webkit-transform: translateY(40px);
            transform: translateY(40px);
    opacity: 0;
  }
  100% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slide-out-bottom {
  0% {
    -webkit-transform: translateY(0);
            transform: translateY(0);
    opacity: 1;
  }
  100% {
    -webkit-transform: translateY(40px);
            transform: translateY(40px);
    opacity: 0;
  }
}

@media screen and (min-width: 2440px) and (max-width: 2560px) {
  .externaljob {
    position: absolute;
    top: 11.5vw;
    left: 2.9vw;
    width: 10vw;
    height: 3vw;
    border-bottom: 0.15vw solid var(--color);
  }

  .circle {
    position: absolute;
    right: 11vw;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #0f0f0f;
    border: 1px solid var(--color);
    backdrop-filter: blur(5px);
    left: 0.4vw;
    top: 0.9vw;
  }
  
  .circle img {
    position: absolute;
    left: 0.36vw;
    width: 0.8vw;
    top: 0.35vw;
  }
  
  .externaljob span {
    position: absolute;
    left: 74%;
    top: 53%;
    width: 10vw;
    transform: translate(-50%, -50%);
    font-size: 24px;
  }
}

@media screen and (min-width: 3340px) and (max-width: 3440px) {
  .externaljob {
    position: absolute;
    top: 7.5vw;
    left: 1.9vw;
    width: 8vw;
    height: 3vw;
    border-bottom: 0.15vw solid var(--color);
  }

  .circle {
    position: absolute;
    right: 11vw;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: #0f0f0f;
    border: 1px solid var(--color);
    backdrop-filter: blur(5px);
    left: 0.7vw;
    top: 1.5vw;
  }
  
  .circle img {
    position: absolute;
    left: 0.3vw;
    width: 0.6vw;
    top: 0.3vw;
    height: 0.5vw;
  }
  
  .externaljob span {
    position: absolute;
    left: 92%;
    top: 68%;
    width: 10vw;
    transform: translate(-50%, -50%);
    font-size: 24px;
  }
}



/* JOBS CONFIG UI */

.config_ui {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 45vw;
  width: 70vw;
  padding: 0 0.5vw;
  border-radius: 33px;
  display: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  align-content: center;
  background: linear-gradient(to bottom, #15171F, #232836);
  border: 2px solid #292d38;
  text-align: center;
}

.categorias {
  display: flex;
  justify-content: center;
  gap: 0.35vw;
  margin-top: 1.8%;
  padding: 0.3vw;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.title {
  position: relative;
  font-size: 0.82vw;
  font-weight: 600;
  cursor: pointer;
  padding: 0.55vw 1.2vw;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.25s ease;
  letter-spacing: 0.03em;
  user-select: none;
}

.title:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.06);
}

.title.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(108, 92, 231, 0.15));
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.2);
}

.title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 2px;
  width: 60%;
  background: var(--color, #6c5ce7);
  border-radius: 999px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.title.active::after {
  transform: translateX(-50%) scaleX(1);
}

.title ion-icon {
  font-size: 1.1em;
  vertical-align: -2px;
  margin-right: 0.15vw;
  opacity: 0.7;
  transition: opacity 0.25s ease;
}

.title.active ion-icon {
  opacity: 1;
}

.close_config_ui{
  z-index: 11;
  position: absolute;
  top: 0.4vw;
  left: 41.4vw;
  transition: 0.25s;
  width: 2vw;
  height: 2vw;
  border: 2px solid rgba(255, 255, 255, 0.253);
  border-radius: 10px;
}

.close_config_ui:hover {
  cursor: pointer;
  transform: scale(1.1);
}

.tab-content{
  margin-top:2vw;
  text-align:center;
}

.tab-pane{
  display:none;
}

.tab-pane.active{
  display:flex;
  flex-wrap:wrap;
  gap:1.5vw;
  justify-content:center;
  align-content:flex-start;   /* 🔹 clave */
  height:37vw;                /* puedes dejar tu altura fija */
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-gutter:stable;
}


.tab-pane.active::-webkit-scrollbar {
  width: 8px;
}

.tab-pane.active::-webkit-scrollbar-track {
  background-color: #333;
}

.tab-pane.active::-webkit-scrollbar-thumb {
  background-color: #434b5f;
}

.tab-pane.active::-webkit-scrollbar-thumb:hover {
  background-color: #23262e;
}

.job-card {
  position: relative; flex: 0 0 auto;
  background: linear-gradient(to bottom, #15171F, #232836);
  color:#fff;
  width:8.5vw; height:8vw; min-width:150px; min-height:150px;
  border:2px solid #161A22; border-radius:.6vw; padding:.5vw;
  box-shadow:0 4px 12px rgba(0,0,0,.4); overflow:hidden;
}

.thumb{
  position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:80%; height:80%;
  border-radius:.4vw; overflow:hidden;
}
.thumb img{
  width:100%; height:100%; object-fit:cover; display:block;
  filter:brightness(.65);
  transition:filter .25s ease;
}

.overlay{
  position:absolute; inset:0; display:flex; justify-content:center; align-items:flex-end;
  gap:.6vw; padding-bottom:1vw;
  background:rgba(0,0,0,.45);
  opacity:0; transition: opacity .25s ease;
  z-index:1;
}

.job-title{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-60%);           /* centrado */
  z-index:2; font-weight:900;
  font-size: clamp(18px, 1.4vw, 26px);       /* grande y responsive */
  letter-spacing:.5px;
  text-shadow: 0 2px 6px rgba(0,0,0,.55);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.job-title::after{
  content:"";
  position:absolute; left:50%; transform:translateX(-50%);
  bottom:-0.15em; height:.12vw; min-height:2px;
  width: 100%;                  /* un pelín más que el texto */
  background:#7a3cff; border-radius:999px;
  box-shadow:0 0 8px rgba(122,60,255,.6);
}

.job-btn{
  background:rgba(122,60,255,.20);
  border:2px solid #7A3CFF; color:#fff; border-radius:.4vw;
  width:2.6vw; height:2.6vw; min-width:40px; min-height:40px;
  display:grid; place-items:center;
  box-shadow:0 6px 16px rgba(122,60,255,.35), inset 0 0 0 2px rgba(122,60,255,.15);
  transition: transform .12s ease, background .12s ease;
}
.job-btn img {
  filter: none !important;
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.job-btn:hover{ transform:translateY(-1px); background:rgba(122,60,255,.32); cursor: pointer;}

.job-card:hover .thumb img{ filter:brightness(.45); }
.job-card:hover .overlay{ opacity:1; }
/* mueve el título hacia arriba al hacer hover */
.job-card:hover .job-title{ transform: translate(-50%, -130%) scale(.75); }


.edit-job-container.v2 {
  width: min(1100px, 92%);
  margin: 0 auto;
  text-align: left;
  padding: 1.2em 1.2em 6.5em;
  border-radius: 16px;
  background: rgba(21, 23, 31, 0);
}

/* Cabecera */
.edit-job-container.v2 .edit-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}
.edit-job-container.v2 .title {
  text-align: center;
  margin: 0;
  font-size: 1.5em;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}
.edit-job-container.v2 .spacer { width: 48px; }

/* Grid principal: derecha más estrecha para la imagen */
.form-grid {
  display: grid;
  grid-template-columns: 2.2fr 0.8fr;
  gap: 1rem;
}
@media (max-width: 980px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Tarjetas */
.section-card {
  background: linear-gradient(135deg, rgba(30, 34, 48, 0.8) 0%, rgba(25, 28, 40, 0.6) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.section-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #fff;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

/* Tutorial grande */
.section-card.tutorial-card {
  grid-column: 1 / -1;
  padding: 1.2rem 1.2rem 1.0rem;
}
.tutorial-card .tutorial-input { font-size: 1.05em; padding: .8em 1em; }
.tutorial-card h3 { font-size: 1.15em; }

/* Campos */
.field {
  margin-top: .5em;
  margin-bottom: .5em;
  display: flex;
  flex-direction: column;
}
.field label {
  font-size: 0.9em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-bottom: 0.5em;
  letter-spacing: 0.2px;
}

.step-form .field {
  margin-top: 0;
  margin-bottom: 0;
}
.field .req {
  color: #ff6b6b;
  font-weight: bold;
  margin-left: 0.25em;
}
.field .hint, .hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: .8em;
  display: block;
  margin-top: .3em;
  line-height: 1.5;
  font-weight: 300;
}

/* Toggle inline */
.inline-toggle > label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
}
.inline-toggle input[type="checkbox"] { transform: translateY(0); }

/* Grid 2 cols */
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
  align-items: start;
}
@media (max-width: 680px) { .two-cols { grid-template-columns: 1fr; } }

/* Animaciones globales */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Inputs */
.edit-job-container.v2 input,
.edit-job-container.v2 textarea,
.edit-job-container.v2 select {
  width: 85%;
  padding: .75em 1em;
  margin-top: .5em;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(22, 26, 39, 0.8) 0%, rgba(18, 21, 32, 0.6) 100%);
  color: #fff;
  font-size: .95em;
  font-weight: 400;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.edit-job-container.v2 input::placeholder,
.edit-job-container.v2 textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 300;
}
.edit-job-container.v2 input:hover,
.edit-job-container.v2 textarea:hover,
.edit-job-container.v2 select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(26, 31, 46, 0.9) 0%, rgba(22, 26, 39, 0.7) 100%);
}
.edit-job-container.v2 input:focus,
.edit-job-container.v2 textarea:focus,
.edit-job-container.v2 select:focus {
  border-color: var(--color, #6c5ce7);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
  background: linear-gradient(135deg, rgba(26, 31, 46, 1) 0%, rgba(22, 26, 39, 0.8) 100%);
  transform: translateY(-1px);
}
.edit-job-container.v2 textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

/* Error */
.edit-job-container.v2 input.error,
.edit-job-container.v2 textarea.error {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255,107,107,0.2);
}

/* Botones */
.btn {
  padding: .75em 1.5em;
  border: 2px solid transparent;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(45, 51, 80, 0.8) 0%, rgba(35, 40, 62, 0.6) 100%);
  color: #fff;
  cursor: pointer;
  font-size: .95em;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn:hover {
  background: linear-gradient(135deg, rgba(60, 66, 99, 0.9) 0%, rgba(45, 51, 80, 0.7) 100%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.btn:hover::before {
  opacity: 1;
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn.primary {
  background: linear-gradient(135deg, var(--color, #6c5ce7) 0%, rgba(108, 92, 231, 0.8) 100%);
  border-color: var(--color, #6c5ce7);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn.primary:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.9) 0%, var(--color, #6c5ce7) 100%);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
  transform: translateY(-2px);
}

/* Iconos en botones y títulos */
.btn ion-icon {
  font-size: 1.1em;
  vertical-align: middle;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.clothes-editor-title ion-icon {
  font-size: 1.3em;
  color: rgba(155, 55, 255, 0.9);
  vertical-align: middle;
  margin-right: 0.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn.ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn.success { background: #2bb673; }
.btn.success:hover { background: #36c685; }
.btn.danger  { background: #e5484d; }
.btn.danger:hover { background: #f2555a; }
.btn.secondary { background: #49507a; }
.btn.secondary:hover { background: #5b6393; }

/* Switch de modo (Básico/Avanzado) */
.mode-switch {
  display: inline-flex;
  gap: .4rem;
  padding: .2rem;
  border: 1px solid #3a3f55;
  background: #141824;
  border-radius: 999px;
  margin-bottom: .7rem;
}
.mode-btn {
  padding: .35rem .8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #d9def0;
  cursor: pointer;
  font-size: .9em;
  transition: background .2s, border-color .2s;
}
.mode-btn.active { background: #7a3cff; color: #fff; border-color: #7a3cff; }
.mode-btn:hover:not(.active) { background: rgba(255,255,255,0.06); }

/* Tabs */
.tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem;
  background: rgba(20, 20, 30, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: nowrap;
}
.tab {
  padding: .55rem .85rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: .82em;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color, #6c5ce7) 0%, rgba(108, 92, 231, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.tab:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}
.tab:hover::before {
  opacity: 0.1;
}
.tab.active {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25) 0%, rgba(108, 92, 231, 0.15) 100%);
  border-color: var(--color, #6c5ce7);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.tab.active::before {
  opacity: 0.2;
}
.tabs .spacer { flex: 1; }

/* Panels */
.panel {
  animation: fade-in .25s ease;
}
.panel.hidden { display: none; }
.subsection h4 { margin:.6rem 0 .2rem; color:#e8e8ff; }

/* Imagen compacta */
.section-card.image-card { padding: .8rem; animation: fade-in .25s ease; }
.image-uploader.small {
  position: relative;
  border: 2px dashed #3a3f55;
  border-radius: 12px;
  padding: .6rem;
  min-height: 140px;
  display: grid;
  place-items: center;
  gap: .5rem;
  outline: none;
  cursor: pointer;
  user-select: none;
  transition: border-color .25s, box-shadow .25s;
}
.image-uploader.small:hover { border-color: #7a3cff; box-shadow: 0 0 0 3px rgba(122,60,255,0.2); }
.image-uploader.small.dragging { border-color: #7a3cff; box-shadow: 0 0 0 3px rgba(122,60,255,0.2); }
.image-uploader.small img { max-width: 100%; max-height: 160px; border-radius: 10px; display: block; }
.hover-edit {
  position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .15s ease; color: #ffffff;
  background: rgba(0,0,0,0.28); border-radius: 12px; text-transform: uppercase; letter-spacing: .5px;
}
.image-uploader.small:hover .hover-edit { opacity: 1; }
.file-input-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  cursor: pointer;
  opacity: 0;
}
.uploader-empty { text-align: center; color: #cdd3e0; font-size: .92em; }
#image-path-input {
  background: #161a27; color: #f1f3f7; border: 1px solid #3a3f55; border-radius: 10px;
  padding: .5em .7em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .9em;
}

/* Barra acciones */
.actions-bar {
  position: sticky; bottom: 0; left: 0; right: 0; margin-top: 1rem;
  display: flex; align-items: center; gap: .6rem; padding: .7rem;
  background: linear-gradient(180deg, rgba(10,12,18,0) 0%, rgba(10,12,18,.85) 20%, rgba(10,12,18,.95) 100%);
  backdrop-filter: blur(6px); border-top: 1px solid rgba(255,255,255,0.06); border-radius: 12px;
  z-index: 10;
}
.actions-bar .spacer { flex: 1; }

/* Rutas */
.route-toolbar { display:flex; align-items:center; gap:.6rem; margin:.4rem 0 .8rem; }
.route-card {
  border: 1px dashed #3a3f55; border-radius: 10px; padding: .7rem; margin-bottom: .7rem;
  background: rgba(22,26,39,.6); animation: pop .25s ease;
}
.route-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:.5rem; }
.route-actions { display:flex; gap:.4rem; }
.route-step { border-top: 1px solid rgba(255,255,255,.06); padding-top:.6rem; margin-top:.6rem; }
.step-actions { display:flex; gap:.4rem; }

/* Slots vehículo */
.slot-row { display:flex; gap:.5rem; align-items:flex-end; margin:.4rem 0; }
.slot-row input { flex:1; }

/* Clothes */
.clothes-wrapper { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.clothes-block h4 { margin:.2rem 0 .4rem; color:#e8e8ff; }
.clothes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap:.6rem; }
@media (max-width: 980px) { .clothes-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== DISEÑO MODERNO DE ROPA ===== */
.clothes-wrapper-modern {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

/* Header moderno con badge de género */
.clothes-block-modern {
  background: linear-gradient(135deg, rgba(20,20,30,0.6) 0%, rgba(30,30,45,0.4) 100%);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  width: 100%;
  box-sizing: border-box;
}

.clothes-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.clothes-gender-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(108,92,231,0.2), rgba(88,72,211,0.1));
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(108,92,231,0.3);
}

.clothes-gender-badge.male {
  background: linear-gradient(135deg, rgba(52,152,219,0.2), rgba(41,128,185,0.1));
  border-color: rgba(52,152,219,0.3);
}

.clothes-gender-badge.female {
  background: linear-gradient(135deg, rgba(231,76,60,0.2), rgba(192,57,43,0.1));
  border-color: rgba(231,76,60,0.3);
}

.gender-icon {
  font-size: 1.5rem;
}

.gender-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.clothes-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Botones modernos */
.btn-modern {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-modern .btn-icon {
  font-size: 1.2rem;
}

.btn-modern.primary {
  background: linear-gradient(135deg, var(--color, #6c5ce7), #5849c7);
  color: white;
}

.btn-modern.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.4);
}

.btn-modern.secondary {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-modern.secondary:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

/* Acordeón de secciones */
.clothes-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.clothes-section-collapsible {
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.clothes-section-collapsible:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
  min-height: 60px;
  box-sizing: border-box;
}

.section-header:hover {
  background: rgba(255,255,255,0.05);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon ion-icon {
  font-size: 1.5rem;
  color: rgba(155, 55, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.section-icon img.section-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(51%) sepia(88%) saturate(3068%) hue-rotate(241deg) brightness(101%) contrast(101%);
}

.section-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.section-count {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  white-space: nowrap;
}

.toggle-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-btn:hover {
  background: rgba(255,255,255,0.15);
}

.toggle-btn .chevron {
  transition: transform 0.3s ease;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.section-content {
  overflow: hidden;
  transition: all 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.clothes-section-collapsible.open .section-content {
  padding: 0 1.25rem 1.25rem;
  opacity: 1;
  max-height: 2000px;
}

.clothes-section-collapsible.open .toggle-btn .chevron {
  transform: rotate(180deg);
}

/* Grid de items de ropa */
.clothes-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  padding-top: 0.5rem;
}

/* Tarjeta de item individual */
.clothes-item-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}

.clothes-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  border-color: var(--color, #6c5ce7);
}

.clothes-item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.clothes-item-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
}

.clothes-item-icon ion-icon {
  font-size: 2rem;
  color: rgba(155, 55, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.clothes-item-icon i {
  font-size: 2rem;
  color: rgba(155, 55, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.clothes-item-icon img.clothes-icon-img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(51%) sepia(88%) saturate(3068%) hue-rotate(241deg) brightness(101%) contrast(101%);
}

.clothes-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clothes-item-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.clothes-item-tooltip {
  cursor: help;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.clothes-item-tooltip:hover {
  opacity: 1;
}

.clothes-item-inputs {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  box-sizing: border-box;
  justify-content: flex-start;
}

.input-group.full-width {
  flex: 1 1 100%;
  width: 100%;
}

.input-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin: 0 0 0.35rem 0;
  padding: 0;
  display: block;
  line-height: 1.2;
  text-align: center;
}

.input-group input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-sizing: border-box;
  min-width: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Ocultar spinners/flechas del input number */
.input-group input[type="number"]::-webkit-outer-spin-button,
.input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-group input[type="number"]:focus {
  outline: none;
  border-color: var(--color, #6c5ce7);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(108,92,231,0.2);
}

.input-group input[type="number"]:hover {
  border-color: rgba(255,255,255,0.25);
}

/* Estilos mejorados para inputs number en clothes panel */
.styled-number-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(15, 15, 35, 0.6), rgba(25, 25, 45, 0.4));
  border: 1.5px solid rgba(108, 92, 231, 0.2);
  border-radius: 10px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  min-width: 0;
  -moz-appearance: textfield;
  appearance: textfield;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

.styled-number-input::-webkit-outer-spin-button,
.styled-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.styled-number-input:hover {
  border-color: rgba(108, 92, 231, 0.4);
  background: linear-gradient(135deg, rgba(20, 20, 40, 0.7), rgba(30, 30, 50, 0.5));
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.styled-number-input:focus {
  outline: none;
  border-color: #6c5ce7;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15), rgba(88, 73, 201, 0.1));
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.2), 0 4px 16px rgba(108, 92, 231, 0.3);
  transform: translateY(-2px);
}

.styled-number-input:active {
  transform: translateY(0);
}

/* Animación de feedback visual */
@keyframes inputPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(108, 92, 231, 0); }
}

.input-updated {
  animation: inputPulse 0.4s ease-out;
}

/* Estilos para inputs con botones +/- */
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.input-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
}

.input-btn:hover {
  background: linear-gradient(135deg, #6c5ce7, #5849c9);
  border-color: #6c5ce7;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.input-btn:active {
  transform: scale(0.95);
}

.input-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.input-with-buttons input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Ocultar spinners/flechas del input number */
.input-with-buttons input[type="number"]::-webkit-outer-spin-button,
.input-with-buttons input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-with-buttons input[type="number"]:focus {
  outline: none;
  border-color: #6c5ce7;
  background: rgba(108, 92, 231, 0.15);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.input-with-buttons input[type="number"]:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* ===== NUEVO SISTEMA DE TABS PARA CLOTHES ===== */
.clothes-wrapper-tabs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.clothes-tabs-header {
  display: flex;
  gap: 0.75rem;
  background: transparent;
  padding: 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.clothes-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.clothes-tab-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--color, #6c5ce7) 0%, rgba(108, 92, 231, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.clothes-tab-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.clothes-tab-btn:hover::before {
  opacity: 0.1;
}

.clothes-tab-btn.active {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25) 0%, rgba(108, 92, 231, 0.15) 100%);
  border-color: var(--color, #6c5ce7);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.clothes-tab-btn.active::before {
  opacity: 0.2;
}

.tab-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-icon ion-icon {
  font-size: 1.5rem;
}

.tab-label {
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.clothes-tabs-container {
  position: relative;
  min-height: 400px;
}

.clothes-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.clothes-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== QUICK ACTIONS BAR ===== */
.clothes-quick-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(30, 30, 45, 0.6) 0%, rgba(20, 20, 35, 0.4) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.quick-actions-left,
.quick-actions-right {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-quick {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-quick svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-quick:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: var(--color, #6c5ce7);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-quick:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-quick.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-quick.success {
  background: linear-gradient(135deg, rgba(46, 213, 115, 0.25) 0%, rgba(46, 213, 115, 0.15) 100%);
  border-color: rgba(46, 213, 115, 0.5);
  color: #2ed573;
}

.btn-quick.error {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.25) 0%, rgba(255, 71, 87, 0.15) 100%);
  border-color: rgba(255, 71, 87, 0.5);
  color: #ff4757;
}

/* Spinner animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ===== INPUT FEEDBACK ===== */
.input-updated {
  animation: inputPulse 0.6s ease;
}

@keyframes inputPulse {
  0% {
    box-shadow: 0 0 0 0 var(--color, #6c5ce7);
    border-color: var(--color, #6c5ce7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(108, 92, 231, 0);
    border-color: var(--color, #6c5ce7);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    border-color: rgba(255, 255, 255, 0.15);
  }
}

/* ===== MEJORAR TOOLTIPS ===== */
.clothes-item-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: rgba(108, 92, 231, 0.2);
  border: 1px solid rgba(108, 92, 231, 0.4);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: help;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.clothes-item-tooltip:hover {
  background: rgba(108, 92, 231, 0.4);
  border-color: var(--color, #6c5ce7);
  transform: scale(1.1);
}

/* ===== MEJORAR INPUT LABELS ===== */
.input-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
  .clothes-header-modern {
    flex-direction: column;
    align-items: stretch;
  }

  .clothes-gender-badge {
    justify-content: center;
  }

  .clothes-actions {
    flex-direction: column;
  }

  .btn-modern {
    justify-content: center;
  }

  .clothes-items-grid {
    grid-template-columns: 1fr;
  }

  .clothes-tabs-header {
    flex-direction: column;
  }

  .clothes-tab-btn {
    width: 100%;
  }

  .clothes-quick-actions {
    flex-direction: column;
  }

  .quick-actions-left,
  .quick-actions-right {
    width: 100%;
  }

  .btn-quick {
    flex: 1;
    justify-content: center;
  }
}

/* Ajuste de espacio entre tutorial y ajustes */
.tutorial-card { margin-bottom: 1.4rem; }
.section-card.config-job-card {
  grid-column: 1 / -1;
  padding: 1.2rem 1.2rem 1.0rem;
  margin-top: 1rem;
  animation: fade-in .25s ease;
}

/* Configuración UI */
.config_ui.edit-mode .tab-content { margin-top: 1vw !important; }
.hidden { display: none !important; }

/* Rutas visuales */
.routes-simple .routes-toolbar{
  display:flex; align-items:center; gap:.6rem; margin-bottom:.7rem;
}
.routes-simple .routes-toolbar h4{
  margin:0; color:#e8e8ff; font-weight:600;
}
.routes-simple .routes-toolbar .spacer{ flex:1; }

.route-simple-card{
  border:1px solid rgba(255,255,255,0.08);
  background: rgba(22,26,39,.6);
  border-radius:12px;
  padding:1rem;
  margin-bottom:1rem;
  animation: fade-in .25s ease;
  transition: all .25s ease;
}
.route-simple-card:hover{
  border-color:rgba(122, 60, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.route-head{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:.6rem;
}
.route-title{ display:flex; align-items:center; gap:.5rem; }
.route-badge{
  display:inline-block; padding:.2rem .5rem; border-radius:999px;
  background:#7a3cff; color:#fff; font-size:.85em; font-weight:600;
}
.muted{ color:#a6aec2; }

.route-actions{ display:flex; gap:.4rem; }

.route-timeline{
  display:flex; flex-wrap:wrap; gap:.4rem; padding:.4rem 0 .6rem;
  border-top:1px dashed rgba(255,255,255,0.08);
  border-bottom:1px dashed rgba(255,255,255,0.08);
}

/* Step chips container */
.step-chips{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  padding:.8rem;
  min-height:50px;
  align-items:center;
  justify-content:flex-start;
}

.step-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  padding:.45rem .75rem;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  background:linear-gradient(135deg, #1a1f2e 0%, #161a27 100%);
  color:#f1f3f7;
  cursor:pointer;
  font-size:.9em;
  font-weight:500;
  transition: all .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.step-chip:hover{
  background:linear-gradient(135deg, #1f2638 0%, #1a1f2e 100%);
  border-color:#7a3cff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(122, 60, 255, 0.3);
}
.step-chip:active{
  transform: translateY(0px);
}
.step-chip.active{
  background:linear-gradient(135deg, #9b37ff 0%, #7a3cff 100%);
  border-color:#9b37ff;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(122, 60, 255, 0.5);
}

.step-num{
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:50%;
  background:rgba(255,255,255,.2);
  font-size:.82em;
  font-weight:600;
  color:#fff;
}
.step-chip.active .step-num{
  background:rgba(255,255,255,.3);
}
.step-name{
  font-size:.92em;
  font-weight:500;
}

.empty-timeline, .empty-routes, .step-empty{
  color:#9aa3b2; font-size:.92em; padding:.4rem 0; text-align:center;
}

/* Step details and form */
.step-details{
  padding:1rem;
  background:rgba(22,26,39,.4);
  border-radius:8px;
  margin-top:.8rem;
  border:1px solid rgba(255,255,255,0.05);
}

.step-form{
  display:flex;
  flex-direction:column;
  gap:.8rem;
}

.item-fields-group{
  overflow:hidden;
  transition: all .3s ease;
  opacity:1;
}

.item-fields-group[style*="display: none"]{
  opacity:0;
  max-height:0;
}

.step-form h4{
  margin:0 0 .8rem 0;
  color:#e8e8ff;
  font-size:1.1em;
  font-weight:600;
}

.step-form h5{
  margin:.2rem 0 .6rem;
  color:#e8e8ff;
}

.step-form .step-form-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:1rem;
  padding-bottom:.8rem;
  border-bottom:1px solid rgba(255,255,255,0.08);
}

.step-actions{
  display:flex;
  gap:.4rem;
  flex-wrap:wrap;
}

.form-row{ margin:.5rem 0; }
.form-row label{ display:block; color:#cfd6e6; margin-bottom:.25rem; }
.form-row .inline{ display:inline-flex; align-items:center; gap:.45rem; }

.form-grid.two{ display:grid; grid-template-columns:1fr 1fr; gap:.6rem; }
@media (max-width: 720px){ .form-grid.two{ grid-template-columns:1fr; } }

/* Botón coordenadas */
.coord-row{ display:flex; gap:.4rem; align-items:flex-end; }
.btn.tiny{ padding:.35rem .55rem; font-size:.85em; }

/* Altura uniforme inputs + botones del editor */
.coord-row input,
.ped-selector-wrapper .ped-selector-input,
.ped-selector-wrapper .vehicle-selector-input,
.slot-row input,
.doors-row input {
  height: 38px;
  box-sizing: border-box;
  padding: 0 .75em;
}
.doors-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

/* Botón Get Position & Select Ped - Diseño Premium */
.btn-get-coords,
.btn-select-ped,
.btn-select-vehicle,
.btn-select-door {
  position: relative !important;
  height: 38px !important;
  padding: 0 1em !important;
  box-sizing: border-box !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.15) 0%, rgba(122, 60, 255, 0.1) 100%) !important;
  border: 2px solid rgba(155, 55, 255, 0.3) !important;
  border-radius: 10px !important;
  color: #e8e8ff !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.45rem !important;
  min-width: fit-content !important;
  outline: none !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 2px 8px rgba(155, 55, 255, 0.1) !important;
}

.btn-get-coords::before,
.btn-select-ped::before,
.btn-select-vehicle::before,
.btn-select-door::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.2) 0%, rgba(122, 60, 255, 0.1) 100%) !important;
  border-radius: 8px !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  pointer-events: none !important;
}

.btn-get-coords:hover,
.btn-select-ped:hover,
.btn-select-vehicle:hover,
.btn-select-door:hover,
.btn.btn-get-coords:hover,
.btn.btn-select-ped:hover,
.btn.btn-select-vehicle:hover,
.btn.btn-select-door:hover {
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.25) 0%, rgba(122, 60, 255, 0.2) 100%) !important;
  border-color: rgba(155, 55, 255, 0.6) !important;
  box-shadow: 0 0 20px rgba(155, 55, 255, 0.3), 0 0 40px rgba(155, 55, 255, 0.15) !important;
  transform: none !important;
}

.btn-get-coords:hover::before,
.btn-select-ped:hover::before,
.btn-select-vehicle:hover::before,
.btn-select-door:hover::before {
  opacity: 1 !important;
}

.btn-get-coords:active,
.btn-select-ped:active,
.btn-select-vehicle:active,
.btn-select-door:active,
.btn.btn-get-coords:active,
.btn.btn-select-ped:active,
.btn.btn-select-vehicle:active,
.btn.btn-select-door:active {
  transform: scale(0.98) !important;
  box-shadow: 0 2px 8px rgba(155, 55, 255, 0.15) !important;
}

.btn-get-coords:disabled,
.btn-select-ped:disabled,
.btn-select-vehicle:disabled,
.btn-select-door:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
  border-color: rgba(155, 55, 255, 0.15) !important;
}

.btn-get-coords:disabled:hover,
.btn-select-ped:disabled:hover,
.btn-select-vehicle:disabled:hover,
.btn-select-door:disabled:hover {
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.15) 0%, rgba(122, 60, 255, 0.1) 100%) !important;
  transform: none !important;
  box-shadow: 0 2px 8px rgba(155, 55, 255, 0.1) !important;
}

/* Mejorar el spacing del coord-row */
.coord-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.coord-row input {
  flex: 1;
  min-width: 0;
}

.inline-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #e8e8ff !important;
  font-weight: 500 !important;
  transition: color 0.2s ease;
}

.inline-toggle label:hover {
  color: #ffffff !important;
}

.inline-toggle label span {
  line-height: 1.4;
  margin-top: 1px;
}

.inline-toggle input[type="checkbox"] {
  appearance: none;
  background: rgba(20, 24, 34, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  width: 20px;
  height: 20px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
}

.inline-toggle input[type="checkbox"]:hover {
  border-color: rgba(155, 55, 255, 0.5);
  box-shadow: 0 0 12px rgba(155, 55, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.3);
  background: rgba(30, 34, 44, 0.7);
}

.inline-toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.9) 0%, rgba(122, 60, 255, 0.85) 100%);
  border-color: rgba(155, 55, 255, 0.8);
  box-shadow: 0 0 15px rgba(155, 55, 255, 0.4), 0 2px 8px rgba(155, 55, 255, 0.3);
}

.inline-toggle input[type="checkbox"]:checked::after {
  content: "✓";
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: checkmarkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes checkmarkPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.video-tooltip {
  position: absolute;
  bottom: 120%; /* sube encima del texto */
  left: 0;
  transform: translateY(-5px);
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid #3a3f55;
  border-radius: 10px;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  z-index: 9999;
  pointer-events: none; /* no bloquea el hover */
}

.video-tooltip video {
  max-width: 200px;
  border-radius: 6px;
  display: block;
}

.video-tooltip.hidden {
  display: none;
}

/* ===== General ===== */
/* ============================================
   CREATE JOB TAB - Premium Design
   ============================================ */

#create-job.tab-pane.active {
  flex-wrap: nowrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cj-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ── Modal overlay ── */
.cj-modal {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cjModalIn 0.2s ease;
}
.cj-modal.hidden { display: none !important; }

@keyframes cjModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cj-modal .cj-panel {
  animation: cjPanelIn 0.25s ease;
}
@keyframes cjPanelIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.cj-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  border-radius: inherit;
}

.cj-view.hidden { display: none; }

/* Container */
.cj-container {
  max-width: 92%;
  width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cj-container-small {
  width: 480px;
}

/* Header */
.cj-header {
  text-align: center;
  margin-bottom: 2rem;
}

.cj-icon-wrapper {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(155,55,255,0.1), rgba(124,58,237,0.1));
  border: 2px solid rgba(155,55,255,0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color);
}
.cj-icon-wrapper svg { width: 30px; height: 30px; }

.cj-icon-small {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.cj-title {
  font-size: 1.6rem;
  margin: 0 0 0.5rem 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cj-subtitle {
  color: rgba(255,255,255,0.5);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Grid Layout */
.cj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
}

/* Card Options */
.cj-card-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.02);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  overflow: hidden;
}
.cj-card-option:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(155,55,255,0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(155,55,255,0.15);
}

.cj-card-bg { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.cj-card-option:hover .cj-card-bg { opacity: 1; }
.cj-card-gradient { position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(155,55,255,0.08), transparent 70%); }
.cj-card-secondary:hover .cj-card-gradient { background: radial-gradient(circle at 50% 0%, rgba(59,130,246,0.08), transparent 70%); }

.cj-card-icon-large {
  width: 72px; height: 72px; margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(155,55,255,0.12), rgba(124,58,237,0.08));
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  color: var(--color); transition: all 0.3s ease; z-index: 1;
}
.cj-card-icon-large svg { width: 34px; height: 34px; }
.cj-card-option:hover .cj-card-icon-large { transform: scale(1.1); }
.cj-card-secondary .cj-card-icon-large { background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(37,99,235,0.08)); color: #60a5fa; }

.cj-card-title { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 0 0 0.5rem 0; z-index: 1; }
.cj-card-description { font-size: 0.88rem; color: rgba(255,255,255,0.5); line-height: 1.5; margin: 0 0 auto 0; z-index: 1; }

.cj-card-badge {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.75rem;
  background: rgba(155,55,255,0.15); border: 1px solid rgba(155,55,255,0.3); border-radius: 14px;
  color: var(--color); font-size: 0.78rem; font-weight: 600; margin-top: 1rem; z-index: 1;
}
.cj-card-badge svg { width: 14px; height: 14px; flex-shrink: 0; }
.cj-card-secondary .cj-card-badge { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.3); color: #60a5fa; }

@media (max-width: 600px) {
  .cj-grid { grid-template-columns: 1fr; gap: 1rem; }
  .cj-card-option { padding: 1.5rem 1.2rem; }
}

/* ══════ Shared Panel ══════ */
.cj-panel {
  position: relative;
  z-index: 1;
  width: 580px;
  max-width: 92%;
  max-height: 75%;
  background: linear-gradient(to bottom, #1a1c28, #15171f);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.cj-panel-narrow { width: 460px; }

/* Header */
.cj-panel-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.2rem;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Back */
.cj-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.cj-back-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}

/* Title */
.cj-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.cj-panel-title svg { color: var(--color); flex-shrink: 0; }

/* Header search */
.cj-panel-search {
  flex: 1;
  position: relative;
  min-width: 0;
  max-width: 220px;
  margin-left: auto;
}
.cj-panel-search svg {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}
.cj-panel-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.8rem 0.5rem 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.cj-panel-search input:focus {
  border-color: rgba(155,55,255,0.4);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 2px rgba(155,55,255,0.08);
}
.cj-panel-search input::placeholder { color: rgba(255,255,255,0.25); }

/* Body */
.cj-panel-body {
  padding: 0.85rem 1.1rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.cj-panel-body-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hint text */
.cj-panel-hint {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.35);
  margin: 0 0 1rem 0;
}

/* ── Job List ── */
.cj-job-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  overflow-y: auto;
  width: 100%;
}
.cj-job-list::-webkit-scrollbar { width: 4px; }
.cj-job-list::-webkit-scrollbar-track { background: transparent; }
.cj-job-list::-webkit-scrollbar-thumb { background: rgba(155,55,255,0.2); border-radius: 10px; }
.cj-job-list::-webkit-scrollbar-thumb:hover { background: rgba(155,55,255,0.4); }

.cj-job-list .cj-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cj-job-list .cj-item::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(155,55,255,0.35);
  flex-shrink: 0;
}
.cj-job-list .cj-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
  color: #fff;
}
.cj-job-list .cj-item:active {
  background: rgba(155,55,255,0.08);
}

/* ── Name input row ── */
.cj-input-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.cj-input-row input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}
.cj-input-row input:focus {
  border-color: rgba(155,55,255,0.45);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 2px rgba(155,55,255,0.08);
}
.cj-input-row input::placeholder { color: rgba(255,255,255,0.22); }

/* Submit */
.cj-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  background: linear-gradient(135deg, var(--color), var(--accent));
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 12px rgba(155,55,255,0.25);
}
.cj-submit-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 18px rgba(155,55,255,0.35);
}
.cj-submit-btn:active { transform: scale(1); }
.cj-submit-btn svg { flex-shrink: 0; }

/* Legacy Compatibility */
.cj-back-btn-float {
  display: none;
}

.btn.big {
  display: none;
}

.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; cursor: default; pointer-events: all; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal-card { position: relative; background: #1e1f24; color: #fff; border-radius: 12px; padding: 16px 18px; width: clamp(280px, 40vw, 520px); box-shadow: 0 10px 30px rgba(0,0,0,.35); cursor: default; pointer-events: all; }
.modal-card h3 { margin: 0 0 8px; font-size: 18px; }
.modal-card p { margin: 0 0 16px; opacity: .9; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.btn { padding: 8px 12px; border-radius: 8px; border: none; background:#2c2f36; color:#fff; cursor:pointer; }
.btn:hover { filter: brightness(1.05); }
.btn.danger { background: #d14b4b; }

/* ===== CLOTHES CONFIRM MODAL ===== */
.clothes-confirm-card {
  background: linear-gradient(135deg, #1e1f24 0%, #252730 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  max-width: 420px;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-icon-header {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.modal-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2) 0%, rgba(108, 92, 231, 0.1) 100%);
  border: 2px solid rgba(108, 92, 231, 0.3);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.clothes-confirm-card h3 {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #fff;
}

.clothes-confirm-card p {
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.clothes-confirm-card .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.clothes-confirm-card .btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
  cursor: pointer;
  pointer-events: all;
}

.clothes-confirm-card .btn.secondary {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.clothes-confirm-card .btn.secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.clothes-confirm-card .btn.primary {
  background: linear-gradient(135deg, var(--color, #6c5ce7) 0%, rgba(108, 92, 231, 0.8) 100%);
  border: 1px solid var(--color, #6c5ce7);
  color: #fff;
}

.clothes-confirm-card .btn.primary:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.9) 0%, var(--color, #6c5ce7) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.clothes-confirm-card .btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

/* ===== VALIDATION ERROR MODAL ===== */
.validation-error-card {
  background: linear-gradient(135deg, #1e1f24 0%, #252730 100%);
  border: 1px solid rgba(255, 59, 48, 0.3);
  padding: 0;
  max-width: 520px;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(255, 59, 48, 0.2);
}

.validation-header {
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 59, 48, 0.05) 100%);
  border-bottom: 1px solid rgba(255, 59, 48, 0.2);
  padding: 1.5rem;
  text-align: center;
}

.validation-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, rgba(255, 59, 48, 0.2) 0%, rgba(255, 59, 48, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 59, 48, 0.4);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.3);
  animation: pulse-warning 2s ease-in-out infinite;
}

.validation-icon ion-icon {
  font-size: 32px;
  color: #ff3b30;
}

.validation-header h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}

.validation-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.validation-errors-container {
  padding: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.validation-errors-container::-webkit-scrollbar {
  width: 6px;
}

.validation-errors-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.validation-errors-container::-webkit-scrollbar-thumb {
  background: rgba(255, 59, 48, 0.3);
  border-radius: 3px;
}

.validation-errors-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 59, 48, 0.5);
}

.validation-error-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.validation-error-item:hover {
  background: rgba(255, 59, 48, 0.12);
  border-color: rgba(255, 59, 48, 0.3);
  transform: translateX(4px);
}

.validation-error-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(255, 59, 48, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 59, 48, 0.3);
}

.validation-error-icon ion-icon {
  font-size: 16px;
  color: #ff3b30;
}

.validation-error-text {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 500;
}

.validation-error-goto {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(108, 92, 231, 0.08) 100%);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.validation-error-goto:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25) 0%, rgba(108, 92, 231, 0.15) 100%);
  border-color: rgba(108, 92, 231, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(108, 92, 231, 0.3);
}

.validation-error-goto ion-icon {
  font-size: 16px;
}

.validation-error-category {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 59, 48, 0.2);
  border: 1px solid rgba(255, 59, 48, 0.3);
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.validation-error-card .modal-actions {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
}

.validation-close-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.9) 0%, rgba(108, 92, 231, 0.7) 100%);
  border: 1px solid rgba(108, 92, 231, 0.5);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.validation-close-btn:hover {
  background: linear-gradient(135deg, #6c5ce7 0%, rgba(108, 92, 231, 0.9) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.validation-close-btn ion-icon {
  font-size: 20px;
}

/* Header */
/* ============================================
   COMMUNITY TAB – exact .jobs-manager clone
   ============================================ */

/* Wrapper – identical to .jobs-manager */
.cm-manager {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
  overflow: hidden;
}

/* Toolbar – identical to .jobs-manager-toolbar */
.cm-manager-toolbar {
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background: rgba(15,15,25,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
}

.cm-manager-toolbar-left {
  flex: 0;
  max-width: 220px;
  min-width: 180px;
}

/* ── Filter pills ── */
.cm-filter-pills {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.cm-pill {
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.cm-pill:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
}
.cm-pill.active {
  background: rgba(155,55,255,0.15);
  color: #c084fc;
  border-color: rgba(155,55,255,0.3);
}

.cm-manager-toolbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Search – identical to .jobs-manager-search-box */
.cm-manager-search-box {
  position: relative;
  width: 100%;
}
.cm-manager-search-box svg {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
  pointer-events: none;
  width: 15px;
  height: 15px;
}
.cm-manager-search-box input {
  width: 100%;
  padding: 0.5rem 0.8rem 0.5rem 2.4rem;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #fff;
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}
.cm-manager-search-box input:focus {
  border-color: rgba(155,55,255,0.4);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(155,55,255,0.08);
}
.cm-manager-search-box input::placeholder {
  color: rgba(255,255,255,0.25);
}

/* Badge – identical to .jobs-count-badge */
.cm-count-badge {
  padding: 0.5rem 0.9rem;
  background: rgba(155,55,255,0.12);
  border: 1px solid rgba(155,55,255,0.25);
  border-radius: 6px;
  color: #c084fc;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  display: none;
}
.cm-count-badge.visible { display: inline-block; }

/* Refresh – same size/style as .jobs-view-btn */
.cm-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}
.cm-refresh-btn:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}
.cm-refresh-btn.spinning svg { animation: cm-spin 0.6s linear infinite; }
@keyframes cm-spin { to { transform: rotate(360deg); } }

/* Status bar */
.cm-status {
  margin: 0;
  padding: 0.7rem 1.75rem;
  font-size: 0.83rem;
  line-height: 1.4;
  flex-shrink: 0;
}
.cm-status.info  { background: rgba(155,55,255,0.06); border-bottom: 1px solid rgba(155,55,255,0.15); color: #c084fc; }
.cm-status.error { background: rgba(239,68,68,0.06); border-bottom: 1px solid rgba(239,68,68,0.15); color: #f87171; }
.cm-status.hidden { display: none; }

/* Container – identical to .jobs-container.view-grid */
.cm-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  align-content: start;
}
.cm-container::-webkit-scrollbar { width: 7px; }
.cm-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.cm-container::-webkit-scrollbar-thumb { background: rgba(155,55,255,0.25); border-radius: 10px; }
.cm-container::-webkit-scrollbar-thumb:hover { background: rgba(155,55,255,0.4); }

/* ── Card ── */
.cm-item {
  display: flex;
  flex-direction: row;
  height: 130px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s ease;
}
.cm-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(155,55,255,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ── Thumbnail (left) ── */
.cm-item-thumb {
  width: 130px;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  position: relative;
}
.cm-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.cm-item:hover .cm-item-thumb img { transform: scale(1.06); }

/* No image */
.cm-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #141423 0%, #0f0f19 100%);
}
.cm-no-image::before {
  content: 'N/A';
  position: absolute;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.12);
  letter-spacing: 0.06em;
}

/* Preview modal no image */
.cm-pv-no-image {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(20,20,35,0.95) 0%, rgba(15,15,25,0.95) 100%) !important;
  min-height: 200px;
}
.cm-pv-no-image::after {
  content: 'No Image';
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.18);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Type badge ── */
.cm-type-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  padding: 0.15rem 0.45rem;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.cm-type-basic {
  background: rgba(96,165,250,0.15);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.2);
}
.cm-type-adv {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.2);
}

/* ── Body (right) ── */
.cm-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.7rem;
}
.cm-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.25rem;
}

.cm-item-desc {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.38);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
}

/* ── Footer: meta + buttons ── */
.cm-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.cm-item-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  overflow: hidden;
}
.cm-meta-author, .cm-meta-dl {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cm-meta-author svg, .cm-meta-dl svg { flex-shrink: 0; }
.cm-meta-author {
  color: #c084fc;
  max-width: 120px;
}
.cm-meta-dl {
  color: rgba(255,255,255,0.3);
}

/* ── Buttons ── */
.cm-item-btns {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.cm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  padding: 0;
}
.cm-btn svg { flex-shrink: 0; }

.cm-btn-install {
  background: linear-gradient(135deg, #9b37ff 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(155,55,255,0.3);
}
.cm-btn-install:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(155,55,255,0.45);
}

.cm-btn-preview {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.08);
}
.cm-btn-preview:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  transform: scale(1.1);
}

.cm-btn-installed {
  background: rgba(52,211,153,0.12);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.2);
  cursor: default;
}

/* Keep old btn classes */
.btn.tiny { padding: 6px 10px; border-radius: 10px; font-size: 12px; }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,.12); }
.btn.primary { background: var(--color, #7c5cff); border: none; }

/* Empty state – identical to .jobs-empty-state */
.cm-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  text-align: center;
  color: rgba(255,255,255,0.3);
  grid-column: 1 / -1;
}
.cm-empty-state svg { margin-bottom: 1.5rem; opacity: 0.5; }
.cm-empty-state p { font-size: 1rem; margin: 0; }

/* ===== STATISTICS TAB V2 STYLES ===== */

.stats-container-v2 {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0px 2rem 0rem 2rem;
  animation: statsContainerFadeIn 0.6s ease-out;
}

@keyframes statsContainerFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Barra superior */
.stats-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  pointer-events: none;
  z-index: 1;
}

.stats-search-v2 {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.8rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s ease;
}

.stats-search-v2:focus {
  background: rgba(255,255,255,0.05);
  border-color: var(--color);
  box-shadow: 0 0 0 3px rgba(122,60,255,0.15);
}

.stats-search-v2::placeholder {
  color: rgba(255,255,255,0.3);
}

.player-suggestions-v2 {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #1a1d28;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.player-suggestions-v2.hidden {
  display: none;
}

.player-suggestion-item {
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}

.player-suggestion-item:last-child {
  border-bottom: none;
}

.player-suggestion-item:hover {
  background: rgba(122,60,255,0.12);
}

.player-suggestion-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.player-suggestion-id {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.stats-header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-last-update {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.stats-last-update span {
  color: var(--color);
  font-weight: 600;
}

/* Grid de tarjetas - Fila horizontal */
.stats-cards-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-bottom: 0.5rem;
}

.stat-card-v2:nth-child(1) { animation: slideInUp 0.5s ease-out 0.1s both; }
.stat-card-v2:nth-child(2) { animation: slideInUp 0.5s ease-out 0.2s both; }
.stat-card-v2:nth-child(3) { animation: slideInUp 0.5s ease-out 0.3s both; }
.stat-card-v2:nth-child(4) { animation: slideInUp 0.5s ease-out 0.4s both; }
.stat-card-v2:nth-child(5) { animation: slideInUp 0.5s ease-out 0.5s both; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Grid de rankings - 2 columnas */
.stats-rankings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  flex: 1;
  overflow: hidden;
}

.stats-rankings-row > .ranking-panel:nth-child(1) {
  animation: slideInLeft 0.6s ease-out 0.6s both;
}

.stats-rankings-row > .ranking-panel:nth-child(2) {
  animation: slideInRight 0.6s ease-out 0.6s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.stat-card-v2 {
  background: linear-gradient(145deg, rgba(28,28,42,0.7), rgba(22,22,35,0.5));
  border: 1px solid rgba(122,60,255,0.25);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.05);
}

.stat-card-v2::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color), var(--accent));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.stat-card-v2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.02));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: 14px;
  pointer-events: none;
}

.stat-card-v2:hover::before {
  opacity: 0.6;
}

.stat-card-v2:hover::after {
  opacity: 0.5;
}

.stat-card-v2:hover {
  transform: translateY(-2px);
  border-color: rgba(122,60,255,0.35);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  background: linear-gradient(145deg, rgba(32,32,45,0.8), rgba(26,26,38,0.6));
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122,60,255,0.3), rgba(168,85,247,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  border: 1px solid rgba(122,60,255,0.4);
  box-shadow: 0 4px 12px rgba(122,60,255,0.3), inset 0 1px 2px rgba(255,255,255,0.1);
  transition: all 0.35s ease;
}

.stat-card-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color), var(--accent));
  opacity: 0.15;
  transition: opacity 0.35s ease;
}

.stat-card-v2:hover .stat-card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 12px rgba(122,60,255,0.3), inset 0 1px 2px rgba(255,255,255,0.15);
}

.stat-card-v2:hover .stat-card-icon::after {
  opacity: 0.2;
}

.stat-card-icon svg {
  position: relative;
  z-index: 1;
  color: var(--color);
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: all 0.35s ease;
}

.stat-card-v2:hover .stat-card-icon svg {
  color: rgba(255,255,255,0.95);
  transform: scale(1.05);
  filter: drop-shadow(0 2px 6px rgba(122,60,255,0.4));
}

.stat-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-card-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.stat-card-v2:hover .stat-card-label {
  color: rgba(255,255,255,0.85);
}

.stat-card-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.stat-card-v2:hover .stat-card-value {
  color: rgba(255,255,255,0.95);
}

/* Paneles de rankings */
.ranking-panel {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(28,28,42,0.95), rgba(22,22,35,0.9));
  border: 1px solid rgba(122,60,255,0.25);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 0 1px rgba(122,60,255,0.15) inset;
  position: relative;
  transition: all 0.3s ease;
}

.ranking-panel:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(122,60,255,0.2) inset;
  border-color: rgba(122,60,255,0.35);
}

.ranking-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color), var(--accent), transparent);
  opacity: 0.6;
}

.ranking-header {
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(122,60,255,0.15), rgba(168,85,247,0.08));
  border-bottom: 1px solid rgba(122,60,255,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  backdrop-filter: blur(10px);
}

.ranking-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,60,255,0.5), transparent);
}

.ranking-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  letter-spacing: 0.3px;
}

.ranking-search-wrapper {
  position: relative;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(122,60,255,0.15);
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.02));
}

.ranking-search-wrapper .search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(122,60,255,0.7);
  pointer-events: none;
  z-index: 1;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.ranking-search-input {
  width: 91%;
  padding: 0.65rem 0.9rem 0.65rem 2.5rem;
  background: linear-gradient(135deg, rgba(20,20,35,0.6), rgba(15,15,25,0.4));
  border: 1px solid rgba(122,60,255,0.25);
  border-radius: 10px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.ranking-search-input:hover {
  border-color: rgba(122,60,255,0.3);
  background: linear-gradient(135deg, rgba(24,24,38,0.65), rgba(18,18,28,0.45));
}

.ranking-search-input:focus {
  background: linear-gradient(135deg, rgba(26,26,42,0.75), rgba(20,20,32,0.55));
  border-color: rgba(122,60,255,0.4);
  box-shadow: 0 0 0 2px rgba(122,60,255,0.15), inset 0 2px 6px rgba(0,0,0,0.3);
}

.ranking-search-input:focus ~ .search-icon {
  color: rgba(122,60,255,0.85);
}

.ranking-search-input::placeholder {
  color: rgba(255,255,255,0.4);
  font-weight: 400;
}

.ranking-tabs {
  display: flex;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(20,20,35,0.8), rgba(15,15,25,0.6));
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(122,60,255,0.15);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.3);
  position: relative;
}

.ranking-tab {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.ranking-tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.03));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  z-index: -1;
}

.ranking-tab svg {
  width: 18px;
  height: 18px;
}

.ranking-tab svg {
  color: rgba(255,255,255,0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ranking-tab:hover::before {
  opacity: 0.6;
}

.ranking-tab:hover svg {
  color: rgba(255,255,255,0.75);
}

.ranking-tab.active {
  background: linear-gradient(135deg, var(--color), var(--accent));
  box-shadow: 0 2px 8px rgba(122,60,255,0.3);
}

.ranking-tab.active::after {
  width: 0;
}

.ranking-tab.active svg {
  color: #fff;
}

.ranking-list {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
  background: transparent;
}

.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(35,40,55,0.8), rgba(30,35,48,0.7));
  border: 1px solid rgba(80,90,120,0.3);
  border-radius: 12px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  animation: rankingItemFadeIn 0.4s ease-out backwards;
}

@keyframes rankingItemFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.ranking-item:nth-child(1) { animation-delay: 0.05s; }
.ranking-item:nth-child(2) { animation-delay: 0.1s; }
.ranking-item:nth-child(3) { animation-delay: 0.15s; }
.ranking-item:nth-child(4) { animation-delay: 0.2s; }
.ranking-item:nth-child(5) { animation-delay: 0.25s; }
.ranking-item:nth-child(6) { animation-delay: 0.3s; }
.ranking-item:nth-child(7) { animation-delay: 0.35s; }
.ranking-item:nth-child(8) { animation-delay: 0.4s; }
.ranking-item:nth-child(9) { animation-delay: 0.45s; }
.ranking-item:nth-child(10) { animation-delay: 0.5s; }

.ranking-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color), var(--accent));
  border-radius: 12px 0 0 12px;
  opacity: 0;
  transition: all 0.35s ease;
}

.ranking-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.03));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: 12px;
  pointer-events: none;
}

.ranking-item:hover {
  background: linear-gradient(135deg, rgba(45,52,70,0.95), rgba(38,44,60,0.85));
  border-color: rgba(122,60,255,0.4);
  transform: translateX(4px);
  box-shadow: none;
}

.ranking-item:hover::before {
  opacity: 0.7;
  width: 4px;
}

.ranking-item:hover::after {
  opacity: 0.5;
}

.ranking-item-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.ranking-position {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(122,60,255,0.3), rgba(168,85,247,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ranking-position::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ranking-item:hover .ranking-position {
  transform: scale(1.05);
}

.ranking-item:hover .ranking-position::before {
  opacity: 0.5;
}

.ranking-position.gold {
  background: linear-gradient(135deg, #ffd700, #ffb700, #ff8c00);
  color: #000;
  border: 2px solid rgba(255,215,0,0.5);
  box-shadow: 0 4px 12px rgba(255,215,0,0.4), inset 0 2px 4px rgba(255,255,255,0.3);
  font-size: 0.9rem;
}

.ranking-position.silver {
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8, #c0c0c0);
  color: #1a1a1a;
  border: 2px solid rgba(192,192,192,0.6);
  box-shadow: 0 4px 12px rgba(192,192,192,0.4), inset 0 2px 4px rgba(255,255,255,0.4);
  font-size: 0.9rem;
}

.ranking-position.bronze {
  background: linear-gradient(135deg, #e89a5d, #cd7f32, #b8733c);
  color: #0a0a0a;
  border: 2px solid rgba(205,127,50,0.5);
  box-shadow: 0 4px 12px rgba(205,127,50,0.4), inset 0 2px 4px rgba(255,255,255,0.25);
  font-size: 0.9rem;
}

.ranking-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ranking-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.ranking-item:hover .ranking-name {
  color: rgba(255,255,255,0.95);
}

.ranking-subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.3;
  font-weight: 500;
  transition: color 0.3s ease;
}

.ranking-item:hover .ranking-subtitle {
  color: rgba(255,255,255,0.65);
}

.ranking-value {
  font-weight: 800;
  color: var(--color);
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.3rem 0.7rem;
  background: linear-gradient(135deg, rgba(122,60,255,0.2), rgba(168,85,247,0.1));
  border-radius: 8px;
  border: 1px solid rgba(122,60,255,0.3);
  box-shadow: 0 2px 6px rgba(122,60,255,0.15), inset 0 1px 2px rgba(255,255,255,0.08);
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ranking-item:hover .ranking-value {
  background: linear-gradient(135deg, rgba(122,60,255,0.25), rgba(168,85,247,0.15));
  border-color: rgba(122,60,255,0.4);
  box-shadow: 0 2px 8px rgba(122,60,255,0.25), inset 0 1px 2px rgba(255,255,255,0.1);
}

/* Scrollbars */
.ranking-list::-webkit-scrollbar,
.player-suggestions-v2::-webkit-scrollbar {
  width: 8px;
}

.ranking-list::-webkit-scrollbar-track,
.player-suggestions-v2::-webkit-scrollbar-track {
  background: linear-gradient(135deg, rgba(15,15,25,0.5), rgba(10,10,20,0.3));
  border-radius: 10px;
  border: 1px solid rgba(122,60,255,0.1);
}

.ranking-list::-webkit-scrollbar-thumb,
.player-suggestions-v2::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(122,60,255,0.5), rgba(168,85,247,0.35));
  border-radius: 10px;
  border: 1px solid rgba(122,60,255,0.25);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.15);
  transition: all 0.3s ease;
}

.ranking-list::-webkit-scrollbar-thumb:hover,
.player-suggestions-v2::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(122,60,255,0.65), rgba(168,85,247,0.5));
}

/* Responsive */
@media (max-width: 1400px) {
  .stats-cards-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1200px) {
  .stats-rankings-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .stats-cards-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-header-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-search-wrapper {
    max-width: 100%;
  }

  .stats-cards-row {
    grid-template-columns: 1fr;
  }

  .ranking-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.player-detail-card {
  position: relative;
  background: linear-gradient(145deg, rgba(28,28,40,0.98), rgba(20,20,32,0.95));
  border: 1px solid rgba(122,60,255,0.3);
  border-radius: 20px;
  width: 75vw;
  max-width: 1300px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgb(0 0 0 / 60%), 0 0 0 1px rgb(122 60 255 / 20%) inset;
  z-index: 1001;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.player-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30,30,45,0.9), rgba(25,25,38,0.8));
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.player-detail-close:hover {
  background: linear-gradient(135deg, rgba(220,38,38,0.9), rgba(185,28,28,0.8));
  border-color: rgba(220,38,38,0.5);
  transform: scale(1.05) rotate(90deg);
  box-shadow: 0 6px 16px rgba(220,38,38,0.4);
}

.player-detail-close span {
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.3s ease;
}

.player-detail-header {
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, rgba(25,25,40,0.95), rgba(20,20,35,0.9));
  border-bottom: 1px solid rgba(122,60,255,0.2);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.player-detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.08), transparent);
  pointer-events: none;
}

.player-detail-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color), var(--accent));
}

.player-detail-content {
  flex: 1;
  overflow-y: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.player-avatar {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122,60,255,0.15), rgba(168,85,247,0.1));
  border: 2px solid rgba(122,60,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(122,60,255,0.2), inset 0 1px 2px rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.player-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  z-index: -1;
}

.player-avatar:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(122,60,255,0.3), inset 0 1px 2px rgba(255,255,255,0.05);
  border-color: rgba(122,60,255,0.6);
}

.player-avatar i {
  font-size: 2.8rem;
  color: rgba(255,255,255,0.9);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.player-avatar img {
  width: 64px;
  height: 64px;
  filter: brightness(1.1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.player-info {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-info h2 {
  font-size: 1.4rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.player-info h2::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color), var(--accent));
  box-shadow: 0 0 10px var(--color);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.player-info p {
  font-size: 0.75rem;
  margin: 0;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-left: 11px;
}

.player-detail-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.8rem;
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, rgba(15,15,25,0.4), rgba(10,10,20,0.3));
  border-bottom: 1px solid rgba(122,60,255,0.15);
  position: relative;
  flex-shrink: 0;
}

.player-detail-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,60,255,0.5), transparent);
}

.player-stat-item {
  text-align: center;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(135deg, rgba(28,28,42,0.7), rgba(22,22,35,0.5));
  border-radius: 12px;
  border: 1px solid rgba(122,60,255,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 110px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.player-stat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.03));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.player-stat-item:hover {
  background: linear-gradient(135deg, rgba(32,32,46,0.85), rgba(26,26,38,0.65));
  border-color: rgba(122,60,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.player-stat-item:hover::before {
  opacity: 1;
}

.player-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.player-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color);
}

.player-detail-sections {
  padding: 1.5rem 2rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(18,18,28,0.3), rgba(15,15,22,0.2));
  flex: 1;
  min-height: 0;
}

.player-detail-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(135deg, rgba(28,28,42,0.5), rgba(22,22,35,0.3));
  border: 1px solid rgba(122,60,255,0.15);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
}

.player-detail-section h3 {
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 1.2rem 0;
  border-bottom: 2px solid var(--color);
  padding-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  position: relative;
}

.player-detail-section h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
}

.player-detail-section h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--color);
  border-radius: 2px;
}

.player-jobs-list,
.player-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 450px;
  padding: 0.75rem 8px 0.75rem 0;
  margin: 0;
}

.player-jobs-list::-webkit-scrollbar,
.player-activity-list::-webkit-scrollbar {
  width: 5px;
}

.player-jobs-list::-webkit-scrollbar-track,
.player-activity-list::-webkit-scrollbar-track {
  background-color: transparent;
}

.player-jobs-list::-webkit-scrollbar-thumb,
.player-activity-list::-webkit-scrollbar-thumb {
  background-color: rgba(155, 55, 255, 0.4);
  border-radius: 10px;
}

.player-jobs-list::-webkit-scrollbar-thumb:hover,
.player-activity-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(155, 55, 255, 0.7);
}

.player-job-item,
.player-activity-item {
  padding: 1rem 1.25rem;
  background: rgba(30,34,48,0.6);
  border-left: 3px solid rgba(155, 55, 255, 0.3);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  position: relative;
}

.player-job-item:hover {
  background: rgba(30,34,48,0.9);
  border-left-color: var(--color);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.player-activity-item {
  border-left-color: rgba(122, 60, 255, 0.5);
  background: linear-gradient(90deg, rgba(155, 55, 255, 0.1) 0%, rgba(30,34,48,0.6) 15%);
}

.player-activity-item:hover {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(155, 55, 255, 0.18) 0%, rgba(30,34,48,0.9) 15%);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(155, 55, 255, 0.2);
}

/* Estilos por tipo de actividad */
.activity-job-start {
  border-left-color: rgba(52, 211, 153, 0.6);
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.12) 0%, rgba(30,34,48,0.6) 15%);
}

.activity-job-start:hover {
  border-left-color: rgb(52, 211, 153);
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.2) 0%, rgba(30,34,48,0.9) 15%);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.25);
}

.activity-job-complete {
  border-left-color: rgba(59, 130, 246, 0.6);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(30,34,48,0.6) 15%);
}

.activity-job-complete:hover {
  border-left-color: rgb(59, 130, 246);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, rgba(30,34,48,0.9) 15%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.activity-level-up {
  border-left-color: rgba(251, 191, 36, 0.6);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.12) 0%, rgba(30,34,48,0.6) 15%);
}

.activity-level-up:hover {
  border-left-color: rgb(251, 191, 36);
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.2) 0%, rgba(30,34,48,0.9) 15%);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.activity-earnings {
  border-left-color: rgba(34, 197, 94, 0.6);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.12) 0%, rgba(30,34,48,0.6) 15%);
}

.activity-earnings:hover {
  border-left-color: rgb(34, 197, 94);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.2) 0%, rgba(30,34,48,0.9) 15%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.player-job-name,
.player-activity-text {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
}

.player-job-level {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.player-activity-time {
  font-size: 0.75rem;
  color: rgba(200, 200, 220, 0.7);
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-weight: 400;
  white-space: nowrap;
  font-style: italic;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.player-activity-item:hover .player-activity-time {
  opacity: 1;
  color: rgba(220, 220, 240, 0.9);
}

.player-job-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.player-job-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

/* ===== JOB DETAIL MODAL ===== */
#job-detail-modal {
  --color: #7a3cff;
  --accent: #a855f7;
}

.job-detail-card {
  position: relative;
  background: linear-gradient(145deg, rgba(28,28,40,0.98), rgba(20,20,32,0.95));
  border: 1px solid rgba(122,60,255,0.3);
  border-radius: 20px;
  width: 75vw;
  max-width: 1300px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(122,60,255,0.2) inset;
  z-index: 1001;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.job-detail-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30,30,45,0.9), rgba(25,25,38,0.8));
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.job-detail-close:hover {
  background: linear-gradient(135deg, rgba(220,38,38,0.9), rgba(185,28,28,0.8));
  border-color: rgba(220,38,38,0.5);
  transform: scale(1.05) rotate(90deg);
  box-shadow: 0 6px 16px rgba(220,38,38,0.4);
}

.job-detail-close span {
  font-size: 1.2rem;
  color: #fff;
  transition: transform 0.3s ease;
}

.job-detail-header {
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, rgba(25,25,40,0.95), rgba(20,20,35,0.9));
  border-bottom: 1px solid rgba(122,60,255,0.2);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.job-detail-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.08), transparent);
  pointer-events: none;
}

.job-detail-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--color), var(--accent));
}

.job-detail-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(122,60,255,0.15), rgba(168,85,247,0.1));
  border: 2px solid rgba(122,60,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 8px 24px rgba(122,60,255,0.2), inset 0 1px 2px rgba(255,255,255,0.05);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.job-detail-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  z-index: -1;
}

.job-detail-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(122,60,255,0.3), inset 0 1px 2px rgba(255,255,255,0.05);
  border-color: rgba(122,60,255,0.6);
}

.job-info {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-info h2 {
  font-size: 1.4rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.job-info h2::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color), var(--accent));
  box-shadow: 0 0 10px var(--color);
  animation: pulse 2s ease-in-out infinite;
}

.job-info p {
  font-size: 0.75rem;
  margin: 0;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding-left: 11px;
}

.job-detail-content {
  flex: 1;
  overflow-y: hidden;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.job-detail-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.8rem;
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, rgba(15,15,25,0.4), rgba(10,10,20,0.3));
  border-bottom: 1px solid rgba(122,60,255,0.15);
  position: relative;
  flex-shrink: 0;
}

.job-detail-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122,60,255,0.5), transparent);
}

.job-stat-item {
  text-align: center;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(135deg, rgba(28,28,42,0.7), rgba(22,22,35,0.5));
  border-radius: 12px;
  border: 1px solid rgba(122,60,255,0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  flex: 1;
  min-width: 110px;
}

.job-stat-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(122,60,255,0.05), rgba(168,85,247,0.03));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.job-stat-item:hover {
  background: linear-gradient(135deg, rgba(32,32,46,0.85), rgba(26,26,38,0.65));
  border-color: rgba(122,60,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.job-stat-item:hover::before {
  opacity: 1;
}

.job-stat-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.job-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color);
}

.job-detail-sections {
  padding: 1.5rem 2rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(18,18,28,0.3), rgba(15,15,22,0.2));
  flex: 1;
  min-height: 0;
}

.job-detail-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(135deg, rgba(28,28,42,0.5), rgba(22,22,35,0.3));
  border: 1px solid rgba(122,60,255,0.15);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
}

.job-detail-section h3 {
  font-size: 1.05rem;
  color: #fff;
  margin: 0 0 1.2rem 0;
  border-bottom: 2px solid var(--color);
  padding-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  position: relative;
}

.job-detail-section h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), transparent);
}

.job-top-players-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 450px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 8px 0.75rem 0;
  margin: 0;
}

.job-player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: rgba(30,34,48,0.5);
  border-radius: 10px;
  border-left: 3px solid var(--color);
  transition: all 0.2s ease;
}

.job-player-item:hover {
  background: rgba(155,55,255,0.1);
  transform: translateX(5px);
}

.job-player-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.9rem;
}

.job-player-value {
  font-weight: 700;
  color: var(--color);
  font-size: 0.95rem;
}

.job-extra-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.job-extra-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(30,34,48,0.5);
  border-radius: 10px;
  border: 1px solid rgba(155,55,255,0.2);
}

.job-extra-stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.job-extra-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color);
}

.player-job-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.player-job-stat-value {
  font-weight: 700;
  color: var(--color);
}

/* Scrollbar personalizado para el modal */
.player-detail-content::-webkit-scrollbar {
  width: 6px;
}

.player-detail-content::-webkit-scrollbar-track {
  background-color: transparent;
  margin: 10px 0;
}

.player-detail-content::-webkit-scrollbar-thumb {
  background-color: rgba(155, 55, 255, 0.5);
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.player-detail-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--color);
}

/* Responsive para statistics */
@media (max-width: 768px) {
  .stats-overview {
    grid-template-columns: 1fr;
  }

  .stats-tops-container {
    grid-template-columns: 1fr;
  }

  .stats-top-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-detail-header {
    flex-direction: column;
    text-align: center;
  }

  .player-detail-stats {
    grid-template-columns: 1fr;
  }

  .player-detail-sections {
    grid-template-columns: 1fr;
  }
}

/* ---- Skeleton loading (horizontal) ---- */
.cm-skel-item {
  display: flex;
  flex-direction: row;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
}
.cm-skel-img {
  width: 130px;
  flex-shrink: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 300% 100%;
  animation: cm-shimmer 2s ease infinite;
}
.cm-skel-body { padding: 0.7rem; flex: 1; }
.cm-skel-line {
  height: 10px;
  margin: 0.5rem 0;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 300% 100%;
  animation: cm-shimmer 2s ease infinite;
}
@keyframes cm-shimmer { 0%{background-position:300% 0} 100%{background-position:-300% 0} }
.cm-spin-icon { animation: cm-spin 0.6s linear infinite; }

/* ---- Preview Modal ---- */
.cm-modal {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  place-items: center;
  background: transparent;
}
.cm-modal.show { display: grid; }

/* Pop-up open */
.cm-modal.show .cm-modal-card {
  animation: cmPopUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes cmPopUp {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* Pop-in close */
.cm-modal.cm-closing .cm-modal-card {
  animation: cmPopIn 0.2s ease-in forwards;
}
@keyframes cmPopIn {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.85); }
}

/* Blur config_ui */
.config_ui.cm-blur {
  overflow: hidden;
}
.config_ui.cm-blur::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 9997;
  background: rgba(0,0,0,0.45);
  pointer-events: none;
  animation: cmBlurIn 0.3s ease forwards;
}
@keyframes cmBlurIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cm-modal-card {
  width: min(480px, 90vw);
  background: linear-gradient(180deg, #15171f 0%, #1a1d2a 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.cm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cm-modal-header strong { font-size: 1.05rem; font-weight: 600; color: #fff; }
.cm-modal-x {
  width: 30px; height: 30px;
  border-radius: 6px; border: none;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cm-modal-x:hover { background: rgba(239,68,68,0.12); color: #f87171; }
.cm-modal-cover { background: rgba(0,0,0,0.3); position: relative; }
.cm-modal-cover img { width: 100%; height: 200px; object-fit: cover; display: block; }
.cm-modal-cover::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(transparent, rgba(21,23,31,0.9));
}
.cm-modal-body { padding: 1.25rem; }
.cm-modal-meta { display: flex; flex-direction: column; gap: 0.5rem; }
.cm-modal-meta-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}
.cm-modal-meta-row svg { width: 14px; height: 14px; flex-shrink: 0; color: rgba(255,255,255,0.25); }
.cm-modal-desc { font-size: 0.85rem; color: rgba(255,255,255,0.35); line-height: 1.5; margin-top: 0.5rem; }
.cm-modal-footer { display: flex; gap: 0.6rem; padding: 0 1.25rem 1.25rem; }
.cm-modal-footer .cm-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cm-modal-footer .cm-action-btn svg { flex-shrink: 0; }

/* Close btn */
.cm-modal-footer .cm-btn-preview {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.08);
}
.cm-modal-footer .cm-btn-preview:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateY(-1px);
}
.cm-modal-footer .cm-btn-preview:active { transform: translateY(0); }

/* Install btn */
.cm-modal-footer .cm-btn-install {
  background: linear-gradient(135deg, #9b37ff 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 3px 12px rgba(155,55,255,0.3);
}
.cm-modal-footer .cm-btn-install:hover {
  box-shadow: 0 5px 20px rgba(155,55,255,0.45);
  transform: translateY(-2px);
}
.cm-modal-footer .cm-btn-install:active { transform: translateY(0); }

/* Installed btn */
.cm-modal-footer .cm-btn-installed {
  background: rgba(52,211,153,0.12) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52,211,153,0.25) !important;
  box-shadow: none !important;
  cursor: default;
}
.cm-modal-footer .cm-btn-installed:hover { transform: none; }

@media (max-width: 450px) {
  .cm-modal-card { width: 95vw; }
  .cm-modal-cover img { height: 140px; }
  .cm-modal-body { padding: 0.85rem; }
  .cm-modal-footer { padding: 0 0.85rem 0.85rem; }
}

.modal.hidden { display:none; }
.modal {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: rgba(0,0,0,.5); z-index: 9999;
}
.modal-content {
  width: min(560px, 92vw); background: #121212; color: #fff; border-radius: 12px;
  padding: 18px 18px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.modal-content h3 { margin: 0 0 8px; }
.modal-content .field { display:flex; flex-direction:column; gap:6px; margin: 10px 0; }
.modal-content input, .modal-content textarea {
  background:#1b1b1b; border:1px solid #2a2a2a; color:#eee; border-radius:8px; padding:10px;
}
.modal-content .actions { display:flex; gap:10px; justify-content:flex-end; margin-top:12px; }
.btn.primary { background: var(--color,#6c5ce7); color:#fff; border:none; padding:10px 14px; border-radius:8px; }

/* ============================================
   PUBLISH MODAL
   ============================================ */
.pub-modal-card {
  width: min(480px, 90vw);
  background: #16161c;
  border: 1px solid rgba(155, 55, 255, .15);
  border-radius: 16px;
  padding: 28px 24px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(155, 55, 255, .08);
  text-align: center;
}
.pub-modal-icon {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(155, 55, 255, .12);
  border-radius: 14px;
  color: #9B37FF;
}
.pub-modal-card h3 {
  margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #fff;
}
.pub-subtitle {
  margin: 0 0 18px; font-size: 13px; color: #888; line-height: 1.4;
}
.pub-field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left;
}
.pub-label {
  font-size: 12px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: .5px;
}
.pub-label small { text-transform: none; font-weight: 400; color: #666; }
.pub-modal-card input, .pub-modal-card textarea {
  background: #0e0e14; border: 1px solid #2a2a3a; color: #eee;
  border-radius: 10px; padding: 11px 14px; font-size: 14px;
  transition: border-color .2s;
  font-family: inherit;
  resize: vertical;
}
.pub-modal-card input:focus, .pub-modal-card textarea:focus {
  outline: none; border-color: #9B37FF;
}
.pub-char-count {
  display: block;
  text-align: right;
  font-size: 11px;
  color: #555;
  margin-top: 4px;
}
.pub-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px;
}
.pub-btn {
  padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.pub-btn-cancel {
  background: #222230; color: #aaa;
}
.pub-btn-cancel:hover { background: #2a2a3a; color: #fff; }
.pub-btn-confirm {
  background: #9B37FF; color: #fff;
}
.pub-btn-confirm:hover { background: #8a2be0; }
.pub-btn-confirm:disabled {
  opacity: .5; cursor: not-allowed;
}

/* States: sending / result */
.pub-state {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0;
}
.pub-state.hidden { display: none; }
.pub-spinner {
  width: 36px; height: 36px;
  border: 3px solid #2a2a3a; border-top-color: #9B37FF;
  border-radius: 50%;
  animation: pub-spin .7s linear infinite;
}
@keyframes pub-spin { to { transform: rotate(360deg); } }
.pub-state span {
  font-size: 14px; color: #aaa;
}
.pub-result-icon-ok {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(52, 211, 153, .12);
  display: flex; align-items: center; justify-content: center;
}
.pub-result-icon-ok svg { color: #34d399; }
.pub-result-icon-err {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(248, 113, 113, .12);
  display: flex; align-items: center; justify-content: center;
}
.pub-result-icon-err svg { color: #f87171; }
#pub-result-msg { font-size: 14px; font-weight: 500; }
#pub-result-msg.success { color: #34d399; }
#pub-result-msg.error { color: #f87171; }


/* ============================================
   PUBLISH: Stats preview
   ============================================ */
.pub-stats-preview {
  margin-top: 10px;
  padding: 12px;
  background: rgba(155,55,255,0.04);
  border: 1px solid rgba(155,55,255,0.1);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pub-stats-preview:empty { display: none; }
.pub-stat-item {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  transition: border-color .15s;
}
.pub-stat-item:hover {
  border-color: rgba(155,55,255,0.2);
}
.pub-stat-item .psi-icon {
  font-size: 15px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.pub-stat-item .psi-label {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  flex: 1;
  min-width: 0;
}
.pub-stat-item .psi-val {
  font-weight: 700;
  font-size: 12px;
  color: #c084fc;
  white-space: nowrap;
}


/* ============================================
   PUBLISH: Validation errors
   ============================================ */
.pub-validation {
  margin-top: 10px;
  padding: 14px 16px;
  background: rgba(248, 113, 113, 0.06);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 12px;
}
.pub-validation.hidden { display: none; }
.pub-val-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 6px;
}
.pub-val-header svg {
  flex-shrink: 0;
  stroke: #f87171;
}
.pub-val-subtitle {
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
  margin: 0 0 8px;
}
.pub-val-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
}
.pub-val-list li {
  font-size: 11.5px;
  color: rgba(255,255,255,0.6);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  line-height: 1.4;
}
.pub-val-list li:last-child { border-bottom: none; }
.pub-val-list::-webkit-scrollbar { width: 4px; }
.pub-val-list::-webkit-scrollbar-track { background: transparent; }
.pub-val-list::-webkit-scrollbar-thumb { background: rgba(248,113,113,0.25); border-radius: 2px; }

/* ============================================
   COMMUNITY: Card badges
   ============================================ */
.cm-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0.15rem 0 0.35rem;
}
.cm-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.cm-badge-basic {
  background: rgba(96,165,250,0.1);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.15);
}
.cm-badge-advanced {
  background: rgba(251,191,36,0.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.15);
}
.cm-badge-category {
  background: rgba(155,55,255,0.08);
  color: #c084fc;
  border: 1px solid rgba(155,55,255,0.15);
}
.cm-badge-payment {
  background: rgba(52,211,153,0.08);
  color: #34d399;
  border: 1px solid rgba(52,211,153,0.15);
}
.cm-btn-installed {
  background: rgba(52,211,153,0.12) !important;
  color: #34d399 !important;
  box-shadow: none !important;
  border: 1px solid rgba(52,211,153,0.25) !important;
  cursor: default !important;
  pointer-events: none;
  opacity: 0.85;
}

/* ============================================
   COMMUNITY: Preview modal stats grid
   ============================================ */
.cm-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.cm-pv-stat {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
}
.cm-pv-stat:hover {
  border-color: rgba(155,55,255,0.15);
}
.cm-pv-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}
.cm-pv-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* ============================================
   JOBS TAB - Clean Modern Design
   ============================================ */

/* ══════════════════════════════════════════════
   JOBS MANAGER — complete redesign
   ══════════════════════════════════════════════ */

/* ---- Layout shell ---- */
/* ---- Jobs tab layout override ---- */
#jobs.tab-pane.active {
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
}

.jm {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- Header / toolbar ---- */
.jm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgba(12, 14, 22, 0.6);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  flex-shrink: 0;
}

.jm-search {
  flex: 1;
  position: relative;
  max-width: 380px;
}

.jm-search ion-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: rgba(255,255,255,0.25);
  pointer-events: none;
  transition: color 0.25s;
}

.jm-search:focus-within ion-icon {
  color: #a78bfa;
}

.jm-search input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2.35rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #fff;
  font-size: 0.82rem;
  transition: all 0.25s ease;
  font-family: inherit;
}

.jm-search input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.jm-search input::placeholder { color: rgba(255,255,255,0.2); }

.jm-header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.jm-count {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 8px;
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 700;
}

.jm-view-toggle {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.25);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.05);
}

.jm-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.jm-view-btn:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }

.jm-view-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

/* ---- Body / scroll area ---- */
.jm-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.25rem 1.25rem;
  min-height: 0;
}

.jm-body::-webkit-scrollbar { width: 5px; }
.jm-body::-webkit-scrollbar-track { background: transparent; }
.jm-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.18); border-radius: 10px; }
.jm-body::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,0.32); }

/* ---- Empty state ---- */
.jm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  gap: 0.75rem;
  color: rgba(255,255,255,0.2);
}

.jm-empty ion-icon { font-size: 3rem; opacity: 0.4; }
.jm-empty span { font-size: 0.9rem; font-weight: 500; }

/* ╔══════════════════════════════════════╗
   ║         GRID VIEW                   ║
   ╚══════════════════════════════════════╝ */

.jm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 0.75rem;
  align-content: start;
  justify-content: center;
}

/* Card */
.jm-grid .jm-item {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 18, 28, 0.75);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  width: 200px;
  height: 240px;
}

.jm-grid .jm-item:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow:
    0 8px 28px rgba(0,0,0,0.35),
    0 0 0 1px rgba(139, 92, 246, 0.12);
}

/* Image area — aspect-ratio keeps it proportional */
.jm-grid .jm-item-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0e16;
  flex-shrink: 0;
}

/* Background image */
.jm-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.jm-grid .jm-item:hover .jm-img-bg {
  transform: scale(1.06);
}

/* Tag badge on image */
.jm-tag {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.jm-tag ion-icon { font-size: 0.6rem; }

.jm-tag-basic {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.jm-tag-adv {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.jm-tag-ext {
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Warning badge */
.jm-warn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 6;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  cursor: help;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
  animation: jm-pulse 2s ease-in-out infinite;
}

@keyframes jm-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 2px 18px rgba(239, 68, 68, 0.7); }
}

.jm-item-warn { border-color: rgba(239, 68, 68, 0.15) !important; opacity: 0.85; }
.jm-item-warn:hover { border-color: rgba(239, 68, 68, 0.3) !important; }

/* Card body — always visible in grid with name + desc */
.jm-grid .jm-item-body {
  padding: 0.5rem 0.65rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-height: 0;
}

.jm-grid .jm-item-name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.jm-grid .jm-item-meta {
  display: flex;
  margin-bottom: 0.1rem;
}

.jm-item-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Hover overlay — covers entire card (direct child of .jm-item) */
.jm-item-hover-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(8, 10, 18, 0.78);
  backdrop-filter: blur(3px);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.96);
}

.jm-grid .jm-item:hover .jm-item-hover-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.jm-ha-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
  font-family: inherit;
}

.jm-ha-btn ion-icon { font-size: 0.95rem; }

.jm-ha-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.55);
}

.jm-ha-secondary {
  display: flex;
  gap: 0.35rem;
}

.jm-ha-btn-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.jm-ha-publish {
  background: rgba(59, 130, 246, 0.2);
  color: #93bbfd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.jm-ha-publish:hover { background: rgba(59, 130, 246, 0.35); transform: scale(1.08); }

.jm-ha-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.jm-ha-delete:hover { background: rgba(239, 68, 68, 0.3); transform: scale(1.08); }

/* Row actions — hidden in grid */
.jm-grid .jm-item-row-actions { display: none; }

/* ╔══════════════════════════════════════╗
   ║         LIST VIEW                   ║
   ╚══════════════════════════════════════╝ */

.jm-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.jm-list .jm-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.85rem;
  border-radius: 11px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.25s ease;
  position: relative;
}

.jm-list .jm-item::after {
  content: '';
  position: absolute;
  left: 0; top: 15%; bottom: 15%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.jm-list .jm-item:hover {
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.jm-list .jm-item:hover::after { opacity: 1; }

/* Row image */
.jm-list .jm-item-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0e16;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

.jm-list .jm-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: inset 0.3s ease;
}

.jm-list .jm-item:hover .jm-img-bg { inset: -4px; }

/* Hide grid-only elements in list */
.jm-list .jm-item-hover-overlay,
.jm-list .jm-tag { display: none; }

/* Row info */
.jm-list .jm-item-body {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.jm-list .jm-item-body .jm-item-desc {
  -webkit-line-clamp: 1;
  font-size: 0.73rem;
  margin-top: 0.15rem;
}

/* Row actions (list) */
.jm-item-row-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.jm-ra-config {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.8), rgba(124,58,237,0.85));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(139,92,246,0.2);
}

.jm-ra-config ion-icon { font-size: 0.9rem; }
.jm-ra-config:hover { box-shadow: 0 4px 14px rgba(139,92,246,0.35); filter: brightness(1.1); }

.jm-ra-publish,
.jm-ra-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.jm-ra-publish {
  background: rgba(59,130,246,0.1);
  color: #7db8fd;
  border: 1px solid rgba(59,130,246,0.15);
}

.jm-ra-publish:hover { background: rgba(59,130,246,0.22); }

.jm-ra-delete {
  background: rgba(239,68,68,0.08);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,0.12);
}

.jm-ra-delete:hover { background: rgba(239,68,68,0.2); }

/* ---- Name & meta in body ---- */
.jm-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.jm-item-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.jm-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.jm-meta-tag ion-icon { font-size: 0.6rem; }

.jm-meta-tag.jm-tag-basic {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.18);
}

.jm-meta-tag.jm-tag-adv {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.jm-meta-tag.jm-tag-ext {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.18);
}

/* Grid: name/meta shown via .jm-grid .jm-item-name/.jm-item-meta above */

/* List: show name/meta in body */
.jm-list .jm-item-name { display: block; }
.jm-list .jm-item-meta { display: flex; }

/* Show row actions only in list mode */
.jm-list .jm-item-row-actions { display: flex; }

/* ---- Tooltip (JS-based, appended to body) ---- */
.jm-tooltip {
  position: fixed;
  padding: 0.35rem 0.7rem;
  background: rgba(15, 15, 25, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e2e0ff;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 99999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.jm-tooltip.show {
  opacity: 1;
}

/* ---- Warn badge positioning in list ---- */
.jm-list .jm-warn {
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  top: 3px;
  right: 3px;
}

/* ===== CLOTHES EDITOR WITH CAMERA ===== */
#clothes-editor-camera {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}

.clothes-editor-sidebar {
  position: absolute;
  right: 0;
  top: 0;
  width: 450px;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(16, 18, 27, 0.98) 0%,
    rgba(12, 14, 21, 0.98) 50%,
    rgba(8, 10, 16, 0.98) 100%);
  border-left: 1px solid rgba(108, 92, 231, 0.3);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.8),
              inset 1px 0 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.clothes-editor-header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg,
    rgba(108, 92, 231, 0.15) 0%,
    rgba(74, 58, 255, 0.08) 100%);
  position: relative;
}

.clothes-editor-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(108, 92, 231, 0.5),
    transparent);
}

.clothes-editor-header h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(108, 92, 231, 0.3);
}

.clothes-editor-header .subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.clothes-editor-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1.25rem 2rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.clothes-editor-tab {
  flex: 1;
  padding: 0.875rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.clothes-editor-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(74, 58, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.clothes-editor-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(108, 92, 231, 0.3);
  color: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.clothes-editor-tab:hover::before {
  opacity: 1;
}

.clothes-editor-tab.active {
  background: linear-gradient(135deg, #6c5ce7 0%, #5849c9 100%);
  border-color: #6c5ce7;
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.clothes-editor-tab.active::before {
  opacity: 0;
}

.clothes-editor-tab ion-icon {
  font-size: 1.1rem;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.clothes-editor-tab img.tab-icon-img {
  width: 1.1rem;
  height: 1.1rem;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.5rem;
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.clothes-editor-tab.active img.tab-icon-img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7500%) hue-rotate(0deg) brightness(100%) contrast(100%);
}

.clothes-editor-content {
  flex: 1;
  padding: 1.5rem 2rem 2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.clothes-editor-content::-webkit-scrollbar {
  width: 6px;
}

.clothes-editor-content::-webkit-scrollbar-track {
  background: transparent;
}

.clothes-editor-content::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.3);
  border-radius: 10px;
}

.clothes-editor-content::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.5);
}

/* Clothes Editor Items - New Design */
.ce-item {
  margin-bottom: 1rem;
  padding: 0;
  background: transparent;
  border: none;
}

.ce-item:last-child {
  margin-bottom: 0;
}

.ce-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.ce-icon {
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ce-icon ion-icon {
  font-size: 1.5rem;
  color: rgba(155, 55, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ce-icon i {
  font-size: 1.5rem;
  color: rgba(155, 55, 255, 0.9);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ce-icon img.ce-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(51%) sepia(88%) saturate(3068%) hue-rotate(241deg) brightness(101%) contrast(101%);
}

.ce-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.3px;
}

.ce-sublabel {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ce-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.375rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ce-double-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.ce-control-col {
  display: flex;
  flex-direction: column;
}

.ce-btn-minus,
.ce-btn-plus {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.ce-btn-minus:hover,
.ce-btn-plus:hover {
  background: linear-gradient(135deg, #6c5ce7, #5849c9);
  border-color: #6c5ce7;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.ce-btn-minus:active,
.ce-btn-plus:active {
  transform: scale(0.95);
}

.ce-input-wrapper {
  flex: 1;
  position: relative;
}

.ce-input {
  width: 100%;
  height: 36px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: all 0.2s ease;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  letter-spacing: 1px;
}

.ce-input:focus {
  outline: none;
  border-color: rgba(108, 92, 231, 0.5);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

/* Remove number input arrows */
.ce-input::-webkit-outer-spin-button,
.ce-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ce-input[type=number] {
  -moz-appearance: textfield;
}

.clothes-editor-actions {
  padding: 1.75rem 2rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 1rem;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
}

.btn-editor {
  flex: 1;
  padding: 1.125rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-editor::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-editor:hover::before {
  left: 100%;
}

.btn-editor svg {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-editor.secondary {
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.15), rgba(200, 40, 40, 0.15));
  border: 1.5px solid rgba(255, 80, 80, 0.3);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 60, 60, 0.15);
}

.btn-editor.secondary:hover {
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.25), rgba(200, 40, 40, 0.25));
  border-color: rgba(255, 80, 80, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 60, 60, 0.25);
}

.btn-editor.secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 60, 60, 0.2);
}

.btn-editor.primary {
  background: linear-gradient(135deg, #6c5ce7 0%, #5849c9 100%);
  border: 1.5px solid rgba(108, 92, 231, 0.5);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-editor.primary:hover {
  background: linear-gradient(135deg, #7c6cf7 0%, #6859d9 100%);
  border-color: rgba(108, 92, 231, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108, 92, 231, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-editor.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(108, 92, 231, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .clothes-editor-sidebar {
    width: 100%;
    max-width: 100%;
  }
}

/* Prop Placement Controls Panel - Compact Design */
#prop-placement-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#prop-placement-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#prop-placement-controls .placement-controls-panel {
  width: 280px;
  border-radius: 16px;
  overflow: hidden;
}

#prop-placement-controls .placement-header {
  padding: 0.85rem 0.75rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#prop-placement-controls .placement-header h3 {
  font-size: 0.9rem;
}

#prop-placement-controls .placement-header h3 ion-icon {
  font-size: 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
}

#prop-placement-controls .placement-controls-grid {
  padding: 0.85rem 0.75rem;
  gap: 0.65rem;
}

#prop-placement-controls .control-compact {
  padding: 0.5rem 0.65rem;
}

#prop-placement-controls .control-compact span {
  font-size: 0.8rem;
}

#prop-placement-controls .control-keys-compact kbd {
  padding: 0.28rem 0.45rem;
  font-size: 0.7rem;
  min-width: 1.8rem;
}

#prop-placement-controls .placement-actions-mini {
  padding: 0.5rem 0.65rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#prop-placement-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#prop-placement-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#prop-placement-controls .action-mini span {
  font-size: 0.7rem;
}

.placement-controls-panel {
  width: fit-content;
  min-width: 280px;
  background: rgba(15, 15, 25, 0.96);
  border: 2px solid rgba(124, 108, 247, 0.4);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  pointer-events: all;
  overflow: visible;
}

.placement-header {
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, rgba(124, 108, 247, 0.2) 0%, rgba(108, 92, 231, 0.15) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  position: relative;
}

.placement-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.placement-header h3 ion-icon {
  font-size: 1.4rem;
  color: rgba(155, 55, 255, 0.9);
  width: 1.4rem;
  height: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tool-counter {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  background: rgba(155, 55, 255, 0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(155, 55, 255, 1);
  border: 1px solid rgba(155, 55, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Tool Preview Controls - Optimizado */
#tool-preview-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#tool-preview-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#tool-preview-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#tool-preview-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#tool-preview-controls .placement-header h3 {
  font-size: 0.95rem;
}

#tool-preview-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#tool-preview-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#tool-preview-controls .control-compact span {
  font-size: 0.85rem;
}

#tool-preview-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#tool-preview-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#tool-preview-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#tool-preview-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#tool-preview-controls .action-mini span {
  font-size: 0.7rem;
}

.control-compact span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Tool In Hand Controls - Mismo estilo que Tool Preview */
#alternative-hand-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#alternative-hand-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#alternative-hand-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#alternative-hand-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#alternative-hand-controls .placement-header h3 {
  font-size: 0.95rem;
}

#alternative-hand-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#alternative-hand-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#alternative-hand-controls .control-compact span {
  font-size: 0.85rem;
}

#alternative-hand-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#alternative-hand-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
}

#alternative-hand-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#alternative-hand-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#alternative-hand-controls .action-mini span {
  font-size: 0.7rem;
}

#tool-in-hand-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#tool-in-hand-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#tool-in-hand-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#tool-in-hand-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#tool-in-hand-controls .placement-header h3 {
  font-size: 0.95rem;
}

#tool-in-hand-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#tool-in-hand-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#tool-in-hand-controls .control-compact span {
  font-size: 0.85rem;
}

#tool-in-hand-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#tool-in-hand-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#tool-in-hand-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#tool-in-hand-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#tool-in-hand-controls .action-mini span {
  font-size: 0.7rem;
}

#tool-belt-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#tool-belt-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#tool-belt-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#tool-belt-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#tool-belt-controls .placement-header h3 {
  font-size: 0.95rem;
}

#tool-belt-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#tool-belt-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#tool-belt-controls .control-compact span {
  font-size: 0.85rem;
}

#tool-belt-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#tool-belt-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#tool-belt-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#tool-belt-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#tool-belt-controls .action-mini span {
  font-size: 0.7rem;
}

#prop-in-hand-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#prop-in-hand-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#prop-in-hand-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#prop-in-hand-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#prop-in-hand-controls .placement-header h3 {
  font-size: 0.95rem;
}

#prop-in-hand-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#prop-in-hand-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#prop-in-hand-controls .control-compact span {
  font-size: 0.85rem;
}

#prop-in-hand-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#prop-in-hand-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#prop-in-hand-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#prop-in-hand-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#prop-in-hand-controls .action-mini span {
  font-size: 0.7rem;
}

#vehicle-props-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#vehicle-props-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#vehicle-props-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#vehicle-props-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#vehicle-props-controls .placement-header h3 {
  font-size: 0.95rem;
}

#vehicle-props-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#vehicle-props-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#vehicle-props-controls .control-compact span {
  font-size: 0.85rem;
}

#vehicle-props-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#vehicle-props-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#vehicle-props-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#vehicle-props-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#vehicle-props-controls .action-mini span {
  font-size: 0.7rem;
}

#prop-process-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#prop-process-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#prop-process-controls .placement-controls-panel {
  width: 300px;
  border-radius: 16px;
  overflow: hidden;
}

#prop-process-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#prop-process-controls .placement-header h3 {
  font-size: 0.95rem;
}

#prop-process-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#prop-process-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#prop-process-controls .control-compact span {
  font-size: 0.85rem;
}

#prop-process-controls .control-keys-compact kbd {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  min-width: 2rem;
}

#prop-process-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#prop-process-controls .action-mini {
  padding: 0.35rem 0.5rem;
  box-sizing: border-box;
}

#prop-process-controls .action-mini kbd {
  font-size: 0.65rem;
  padding: 0.25rem 0.35rem;
  min-width: 2rem;
}

#prop-process-controls .action-mini span {
  font-size: 0.7rem;
}

.control-compact span ion-icon {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.placement-controls-grid {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.control-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.125rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: all 0.2s ease;
  gap: 0.625rem;
}

.control-compact:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(124, 108, 247, 0.4);
  transform: translateX(-3px);
  box-shadow: 0 2px 8px rgba(124, 108, 247, 0.2);
}

.control-compact span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.control-keys-compact {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.control-keys-compact kbd {
  min-width: 34px;
  height: 34px;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(180deg, rgba(60, 60, 80, 0.95) 0%, rgba(40, 40, 60, 1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 3px solid rgba(124, 108, 247, 0.6);
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  flex-shrink: 0;
}

.placement-actions-compact {
  padding: 1rem 1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.action-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.125rem;
  border-radius: 10px;
  border: 2px solid;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  gap: 0.625rem;
}

.action-compact.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%);
  border-color: rgba(34, 197, 94, 0.5);
}

.action-compact.success:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.3) 100%);
  border-color: rgba(34, 197, 94, 0.7);
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.35);
}

.action-compact.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.2) 100%);
  border-color: rgba(239, 68, 68, 0.5);
}

.action-compact.danger:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.3) 100%);
  border-color: rgba(239, 68, 68, 0.7);
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.action-compact kbd {
  min-width: 70px;
  height: 36px;
  padding: 0.5rem 0.875rem;
  background: linear-gradient(180deg, rgba(60, 60, 80, 0.95) 0%, rgba(40, 40, 60, 1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 3px solid rgba(124, 108, 247, 0.6);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  flex-shrink: 0;
}

.action-compact span {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
  order: -1;
}

.action-compact.success span {
  color: rgb(86, 230, 140);
}

.action-compact.danger span {
  color: rgb(252, 129, 129);
}

/* Actions Mini - Versión compacta */
.placement-actions-mini {
  padding: 0.625rem 1rem 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.action-mini {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1.5px solid;
  transition: all 0.2s ease;
  cursor: default;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  flex: 1;
}

.action-mini.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(22, 163, 74, 0.15) 100%);
  border-color: rgba(34, 197, 94, 0.4);
}

.action-mini.success:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.25) 100%);
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.action-mini.danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(220, 38, 38, 0.15) 100%);
  border-color: rgba(239, 68, 68, 0.4);
}

.action-mini.danger:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.25) 100%);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.action-mini kbd {
  min-width: 50px;
  height: 26px;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(180deg, rgba(60, 60, 80, 0.9) 0%, rgba(40, 40, 60, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 2px solid rgba(124, 108, 247, 0.5);
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  flex-shrink: 0;
}

.action-mini span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.action-mini.success span {
  color: rgb(86, 230, 140);
}

.action-mini.danger span {
  color: rgb(252, 129, 129);
}

/* Door Selector Controls - Positioned on Right */
#door-selector-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#door-selector-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#door-selector-controls .placement-controls-panel {
  width: 300px;
  pointer-events: all;
  border-radius: 16px;
  overflow: hidden;
}

#door-selector-controls .placement-header {
  padding: 0.8rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#door-selector-controls .placement-header h3 {
  font-size: 0.85rem;
  margin: 0;
  flex-shrink: 0;
  min-width: 0;
}

#door-selector-controls #door-name {
  display: none;
}

.door-selector-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  margin: 0 0.7rem;
  background: linear-gradient(135deg, rgba(124, 108, 247, 0.15) 0%, rgba(108, 92, 231, 0.1) 100%);
  border: 1px solid rgba(124, 108, 247, 0.3);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.door-selector-status .status-icon {
  font-size: 1.5rem;
  font-weight: bold;
  color: #666;
  min-width: 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
}

.door-selector-status.selected .status-icon {
  color: #22c55e;
}

.door-selector-status .status-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  justify-content: center;
}

.door-selector-status .status-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.door-selector-status .status-name {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.door-selector-status .status-count {
  display: none;
}

#door-selector-controls .placement-controls-grid {
  padding: 0.75rem 0.7rem;
  gap: 0.5rem;
}

#door-selector-controls .control-compact {
  padding: 0.45rem 0.6rem;
}

#door-selector-controls .control-compact span {
  font-size: 0.75rem;
}

#door-selector-controls .control-keys-compact kbd {
  padding: 0.28rem 0.45rem;
  font-size: 0.7rem;
  min-width: 1.8rem;
}

#door-selector-controls .placement-actions-mini {
  padding: 0.5rem 0.7rem;
  gap: 0.4rem;
  flex-direction: column;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#door-selector-controls .action-mini {
  padding: 0.3rem 0.45rem;
  width: 100%;
  box-sizing: border-box;
}

#door-selector-controls .action-mini kbd {
  font-size: 0.6rem;
  padding: 0.22rem 0.3rem;
  min-width: 2.2rem;
}

#door-selector-controls .action-mini span {
  font-size: 0.65rem;
}

/* Particle Preview Controls - Positioned on Right */
#particle-preview-controls {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#particle-preview-controls.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(100px);
  pointer-events: none;
}

#particle-preview-controls .placement-controls-panel {
  width: 300px;
  pointer-events: all;
  border-radius: 16px;
  overflow: hidden;
}

#particle-preview-controls .placement-header {
  padding: 0.95rem 0.85rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#particle-preview-controls .placement-header h3 {
  font-size: 0.95rem;
}

#particle-preview-controls .placement-controls-grid {
  padding: 0.95rem 0.85rem;
  gap: 0.7rem;
}

#particle-preview-controls .control-compact {
  padding: 0.55rem 0.7rem;
}

#particle-preview-controls .control-compact span {
  font-size: 0.75rem;
}

#particle-preview-controls .control-keys-compact {
  gap: 0.35rem;
}

#particle-preview-controls .control-keys-compact kbd {
  font-size: 0.7rem;
  padding: 0.28rem 0.4rem;
  min-width: 2rem;
}

#particle-preview-controls .placement-actions-mini {
  padding: 0.6rem 0.75rem;
  gap: 0.45rem;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

#particle-preview-controls .action-mini {
  padding: 0.4rem 0.6rem;
}

#particle-preview-controls .action-mini kbd {
  font-size: 0.7rem;
  padding: 0.3rem 0.45rem;
  min-width: 2.5rem;
}

#particle-preview-controls .action-mini span {
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  #prop-placement-controls {
    right: 0.5rem;
    top: 15%;
  }

  #door-selector-controls {
    right: 0.5rem;
    top: 15%;
  }

  #particle-preview-controls {
    right: 0.5rem;
    top: 15%;
  }

  .placement-controls-panel {
    width: 280px;
  }
}

/* ===== Modal selector de peds ===== */
.ped-selector-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.ped-selector-input {
  flex: 1;
  height: 38px;
  padding: 0 1em;
  background: rgba(20, 24, 34, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  line-height: 38px;
  box-sizing: border-box;
}

.ped-selector-input:focus {
  outline: none;
  border-color: var(--color);
  background: rgba(20, 24, 34, 0.8);
}


/* Modal */
.ped-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ped-selector-modal.show {
  opacity: 1;
  pointer-events: all;
}

.ped-selector-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
}

.ped-selector-content {
  position: relative;
  width: 70%;
  max-width: 800px;
  max-height: 70vh;
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.98) 0%, rgba(15, 18, 26, 0.98) 100%);
  border: 1px solid rgba(155, 55, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ped-selector-modal.show .ped-selector-content {
  transform: scale(1) translateY(0);
}

.ped-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ped-selector-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.ped-selector-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ped-selector-close:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: rgba(255, 0, 0, 0.5);
  transform: rotate(90deg);
}

.ped-selector-search {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ped-search-input,
.vehicle-search-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.ped-search-input:focus,
.vehicle-search-input:focus {
  outline: none;
  border-color: var(--color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(155, 55, 255, 0.1);
  width: 96%;
}

.ped-selector-grid {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.6rem;
  align-content: start;
  will-change: scroll-position;
}

.ped-selector-grid::-webkit-scrollbar {
  width: 10px;
}

.ped-selector-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.ped-selector-grid::-webkit-scrollbar-thumb {
  background: var(--color);
  border-radius: 5px;
}

.ped-selector-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.ped-selector-loading,
.ped-selector-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.ped-card {
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  will-change: border-color;
}

.ped-card:hover {
  background: rgba(155, 55, 255, 0.15);
  border-color: var(--color);
}

.ped-card-img-wrapper {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.ped-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.ped-card-name {
  font-size: 0.65rem;
  font-weight: 500;
  color: #e8e8ff;
  text-align: center;
  word-break: break-word;
  line-height: 1.1;
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Animation Selector Modal Styles */
.animation-selector-card {
  max-width: 950px !important;
  width: 90vw !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 2rem !important;
  position: relative;
}

.animation-selector-card .modal-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.animation-selector-card .modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255,55,55,0.2);
  border-color: rgba(255,55,55,0.5);
  color: #fff;
}

.animation-search {
  margin-bottom: 1rem;
}

.animation-search input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.animation-search input:focus {
  border-color: #9B37FF;
}

.animation-search input::placeholder {
  color: rgba(255,255,255,0.4);
}

.animation-categories {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.anim-cat-btn {
  padding: 0.5rem 1.2rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.anim-cat-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.anim-cat-btn.active {
  background: #9B37FF;
  color: #fff;
  border-color: #9B37FF;
}

.animation-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 450px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.animation-list::-webkit-scrollbar {
  width: 8px;
}

.animation-list::-webkit-scrollbar-track {
  background: transparent;
}

.animation-list::-webkit-scrollbar-thumb {
  background: rgba(155,55,255,0.3);
  border-radius: 10px;
}

.animation-list::-webkit-scrollbar-thumb:hover {
  background: rgba(155,55,255,0.5);
}

.animation-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.animation-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: #9B37FF;
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(155,55,255,0.2);
}

.animation-item-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
}

.animation-item-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
  min-width: 200px;
  flex-shrink: 0;
}

.animation-item-details {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  font-family: 'Courier New', monospace;
  flex: 1;
}

.animation-item-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.6rem;
}

.anim-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  background: linear-gradient(135deg, #9B37FF 0%, #8B2FE6 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(155, 55, 255, 0.3);
}

.anim-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.anim-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(155, 55, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.anim-btn:hover::before {
  opacity: 1;
}

.anim-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(155, 55, 255, 0.3);
}

.anim-btn ion-icon {
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.anim-btn-preview {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.anim-btn-preview:hover {
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.5);
}

.animation-selector-card .modal-actions {
  margin-top: 1.5rem;
  display: none;
}

/* Animation Preview Controls */
#animation-preview-controls {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}

.animation-preview-panel {
  background: rgba(30, 31, 36, 0.98);
  border: 2px solid rgba(155, 55, 255, 0.4);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  min-width: 220px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #9B37FF;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(155, 55, 255, 0.2);
}

.preview-header ion-icon {
  font-size: 1.3rem;
}

.preview-timer {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(155, 55, 255, 0.6);
}

.preview-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem;
  background: rgba(155, 55, 255, 0.1);
  border-radius: 8px;
  margin-top: 1rem;
}

.preview-action kbd {
  background: rgba(155, 55, 255, 0.3);
  border: 1px solid rgba(155, 55, 255, 0.5);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-weight: 600;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(155, 55, 255, 0.2);
}

.preview-action span {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Teleport Loading Screen ===== */
#teleport-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#teleport-loading.hidden {
  display: none;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 400px;
}

.loading-spinner {
  font-size: 4rem;
  color: #9B37FF;
  animation: spin 1.5s linear infinite;
}

.loading-spinner ion-icon {
  filter: drop-shadow(0 0 20px rgba(155, 55, 255, 0.8));
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.loading-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
  text-shadow: 0 0 20px rgba(155, 55, 255, 0.6);
}

.loading-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  text-align: center;
  font-weight: 400;
}

.loading-bar-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.loading-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #9B37FF 0%, #7A3CFF 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
  box-shadow: 0 0 15px rgba(155, 55, 255, 0.6);
  position: relative;
  overflow: hidden;
}

.loading-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.loading-percentage {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #9B37FF;
  text-shadow: 0 0 10px rgba(155, 55, 255, 0.4);
  font-variant-numeric: tabular-nums;
}

/* Payment item field - oculto por defecto */
.payment-item-field {
  display: none;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mejorar el label del payment method */
.payment-method-select + .hint {
  margin-top: 0.5rem !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.85rem !important;
}

/* ===== ESTILOS MEJORADOS PARA PAYMENT METHOD ===== */

/* Campo de Payment Method */
.field.payment-method-field,
.field.payment-item-field {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}

.field.payment-method-field label,
.field.payment-item-field label {
  font-size: 0.9em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-bottom: 0.5em;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-size: 0.75em;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.field.payment-method-field:hover label,
.field.payment-item-field:hover label {
  opacity: 1;
}

/* Custom Select Wrapper */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

/* Trigger del Select */
.custom-select-trigger {
  width: 85%;
  padding: 0.75em 1em;
  margin-top: 0.5em;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(22, 26, 39, 0.8) 0%, rgba(18, 21, 32, 0.6) 100%);
  color: #fff;
  font-size: 0.95em;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-select-trigger:hover {
  border-color: rgba(155, 55, 255, 0.4);
  background: linear-gradient(135deg, rgba(26, 30, 45, 0.9) 0%, rgba(22, 26, 38, 0.7) 100%);
  box-shadow: 0 4px 12px rgba(155, 55, 255, 0.15);
  transform: translateY(-1px);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: rgba(155, 55, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(155, 55, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, rgba(28, 32, 47, 0.95) 0%, rgba(24, 28, 40, 0.8) 100%);
}

.selected-value {
  flex: 1;
  font-weight: 500;
}

.select-arrow {
  color: rgba(155, 55, 255, 0.8);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 0.5em;
  filter: drop-shadow(0 0 4px rgba(155, 55, 255, 0.3));
}

.custom-select-wrapper.open .select-arrow {
  transform: rotate(180deg);
  filter: drop-shadow(0 0 6px rgba(155, 55, 255, 0.5));
}

/* Lista de opciones mejorada */
.custom-select-options {
  position: absolute;
  top: calc(100% + 0.5em);
  left: 0;
  width: 85%;
  background: linear-gradient(145deg, rgba(25, 29, 45, 0.98) 0%, rgba(20, 24, 38, 0.98) 100%);
  border: 2px solid rgba(155, 55, 255, 0.4);
  border-radius: 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 30px rgba(155, 55, 255, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.custom-select-wrapper.open .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Opciones individuales mejoradas */
.custom-option {
  padding: 1em 1.2em;
  display: flex;
  align-items: center;
  gap: 1em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.custom-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(155, 55, 255, 0.9) 0%, rgba(122, 60, 255, 0.7) 100%);
  transform: scaleY(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(155, 55, 255, 0.5);
}

.custom-option::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(155, 55, 255, 0.08) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.custom-option:hover::before,
.custom-option.selected::before {
  transform: scaleY(1);
}

.custom-option:hover::after {
  opacity: 1;
}

.custom-option:hover {
  background: linear-gradient(90deg, rgba(155, 55, 255, 0.12) 0%, rgba(122, 60, 255, 0.06) 100%);
  padding-left: 1.8em;
  color: rgba(255, 255, 255, 0.95);
}

.custom-option.selected {
  background: linear-gradient(90deg, rgba(155, 55, 255, 0.25) 0%, rgba(122, 60, 255, 0.12) 100%);
  color: rgba(155, 55, 255, 1);
  font-weight: 600;
  padding-left: 1.8em;
}

.custom-option.selected::after {
  opacity: 1;
}

/* Contenedor de icono */
.option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.15) 0%, rgba(122, 60, 255, 0.1) 100%);
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(155, 55, 255, 0.2);
}

.custom-option:hover .option-icon {
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.25) 0%, rgba(122, 60, 255, 0.15) 100%);
  transform: scale(1.1) rotate(-5deg);
  border-color: rgba(155, 55, 255, 0.4);
  box-shadow: 0 4px 12px rgba(155, 55, 255, 0.3);
}

.custom-option.selected .option-icon {
  background: linear-gradient(135deg, rgba(155, 55, 255, 0.35) 0%, rgba(122, 60, 255, 0.25) 100%);
  box-shadow: 0 4px 16px rgba(155, 55, 255, 0.4);
  border-color: rgba(155, 55, 255, 0.6);
  transform: scale(1.05);
}

/* Icono SVG */
.option-icon-svg {
  display: block;
  color: rgba(155, 55, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.custom-option:hover .option-icon-svg {
  color: rgba(155, 55, 255, 1);
  filter: drop-shadow(0 0 8px rgba(155, 55, 255, 0.6));
}

.custom-option.selected .option-icon-svg {
  color: rgba(155, 55, 255, 1);
  filter: drop-shadow(0 0 10px rgba(155, 55, 255, 0.7));
}

.option-label {
  flex: 1;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.2s ease;
}

.custom-option:hover .option-label {
  font-weight: 600;
}

/* Separadores entre opciones */
.custom-option:not(:last-child) {
  border-bottom: 1px solid rgba(155, 55, 255, 0.1);
}

/* Animación de entrada de opciones */
.custom-select-wrapper.open .custom-option {
  animation: slideInOption 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}

.custom-select-wrapper.open .custom-option:nth-child(1) { animation-delay: 0.05s; }
.custom-select-wrapper.open .custom-option:nth-child(2) { animation-delay: 0.1s; }
.custom-select-wrapper.open .custom-option:nth-child(3) { animation-delay: 0.15s; }
.custom-select-wrapper.open .custom-option:nth-child(4) { animation-delay: 0.2s; }
.custom-select-wrapper.open .custom-option:nth-child(5) { animation-delay: 0.25s; }
.custom-select-wrapper.open .custom-option:nth-child(6) { animation-delay: 0.3s; }
.custom-select-wrapper.open .custom-option:nth-child(7) { animation-delay: 0.35s; }
.custom-select-wrapper.open .custom-option:nth-child(8) { animation-delay: 0.4s; }

@keyframes slideInOption {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Campo de Item Name mejorado */
.payment-item-field {
  display: none;
  animation: fadeSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.payment-item-field input {
  width: 85%;
  padding: 0.75em 1em;
  margin-top: 0.5em;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(22, 26, 39, 0.8) 0%, rgba(18, 21, 32, 0.6) 100%);
  color: #fff;
  font-size: 0.95em;
  font-weight: 400;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.payment-item-field input:focus {
  border-color: rgba(155, 55, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(155, 55, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, rgba(26, 30, 45, 0.9) 0%, rgba(22, 26, 38, 0.7) 100%);
  transform: translateY(-1px);
}

.payment-item-field input:hover {
  border-color: rgba(155, 55, 255, 0.3);
  box-shadow: 0 4px 12px rgba(155, 55, 255, 0.1);
}

.payment-item-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
}

/* Hints mejorados */
.field.payment-method-field .hint,
.field.payment-item-field .hint {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85em;
  display: block;
  margin-top: 0.5em;
  line-height: 1.5;
  font-weight: 300;
  font-style: italic;
}

/* Efecto de brillo al abrir el dropdown */
.custom-select-wrapper.open {
  animation: pulseGlow 0.6s ease-out;
  z-index: 20;
  position: relative;
}

@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(155, 55, 255, 0.3));
  }
}

/* Input with buttons */
.input-with-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.input-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
}

.input-btn:hover {
  background: linear-gradient(135deg, #6c5ce7, #5849c9);
  border-color: #6c5ce7;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.input-btn:active {
  transform: scale(0.95);
}

.input-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.input-with-buttons input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-with-buttons input[type="number"]::-webkit-outer-spin-button,
.input-with-buttons input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-with-buttons input[type="number"]:focus {
  outline: none;
  border-color: #6c5ce7;
  background: rgba(108, 92, 231, 0.15);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.input-with-buttons input[type="number"]:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

/* ===== Editor Redesign - Section Groups ===== */
.editor-section {
  background: rgba(22, 26, 39, 0.4);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.editor-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95em;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.editor-section-header ion-icon {
  font-size: 1.15em;
  color: var(--color, #6c5ce7);
}

/* ===== Tab Icons ===== */
.tab ion-icon {
  font-size: 1em;
  vertical-align: -1px;
  margin-right: 0.2rem;
}

/* ===== Toggle Switch (checkbox to slider) ===== */
.inline-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px !important;
  height: 22px !important;
  background: rgba(255,255,255,0.15) !important;
  border-radius: 11px !important;
  border: none !important;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3) !important;
  flex-shrink: 0;
  margin: 0;
  vertical-align: middle;
  backdrop-filter: none !important;
}
.inline-toggle input[type="checkbox"]::after {
  content: '' !important;
  position: absolute !important;
  width: 16px !important;
  height: 16px !important;
  background: white !important;
  border-radius: 50% !important;
  top: 3px !important;
  left: 3px !important;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  transform: translateX(0) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
  display: block !important;
  text-shadow: none !important;
  font-size: 0 !important;
  color: transparent !important;
  animation: none !important;
}
.inline-toggle input[type="checkbox"]:hover {
  background: rgba(255,255,255,0.22) !important;
  border: none !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3) !important;
}
.inline-toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--color, #6c5ce7) 0%, rgba(155, 55, 255, 0.85) 100%) !important;
  border: none !important;
  box-shadow: 0 0 12px rgba(155, 55, 255, 0.3), inset 0 1px 3px rgba(0,0,0,0.15) !important;
}
.inline-toggle input[type="checkbox"]:checked::after {
  transform: translateX(18px) !important;
}

/* ===== Coord Format Hint ===== */
.coord-format-hint {
  font-size: 0.75em;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  margin-left: 0.4em;
}

/* ===== Three Cols Grid ===== */
.three-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1em;
  align-items: start;
}
@media (max-width: 680px) { .three-cols { grid-template-columns: 1fr; } }

/* ===== Legacy Skill Select ===== */
.legacy-level-select {
  cursor: pointer;
}
.legacy-level-select option { background: #0e0e14; color: #eee; }
