/* ─── lm-tools.css ─────────────────────────────────────────────
   Estilos compartidos: Construcciones, Investigaciones, Speed-ups
   ──────────────────────────────────────────────────────────── */

.lmt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--tbt-s3, 1.5rem);
    align-items: start;
}
@media (max-width: 900px) {
    .lmt-layout { grid-template-columns: 1fr; }
}

.lmt-panel {
    background: var(--tbt-bg-2);
    border: 1px solid var(--tbt-bg-4);
    border-radius: 14px;
    padding: 1.25rem;
}

/* Tabs de categoría */
.lmt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}
.lmt-tab {
    padding: .5rem .9rem;
    background: var(--tbt-bg-3, var(--tbt-bg-2));
    border: 1px solid var(--tbt-bg-4);
    border-radius: 999px;
    color: var(--tbt-txt-sub);
    font-size: .8rem;
    font-weight: 600;
    font-family: var(--tbt-font-body);
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.lmt-tab:hover { color: var(--tbt-txt-white); border-color: var(--tbt-jade); }
.lmt-tab.active {
    background: var(--tbt-jade);
    color: #000;
    border-color: var(--tbt-jade);
}

/* Buscador */
.lmt-search {
    width: 100%;
    padding: .6rem .9rem;
    background: var(--tbt-bg-1, var(--tbt-bg-2));
    border: 1px solid var(--tbt-bg-4);
    border-radius: 8px;
    color: var(--tbt-txt-white);
    font-size: .9rem;
    font-family: var(--tbt-font-body);
    margin-bottom: 1rem;
}
.lmt-search:focus { outline: none; border-color: var(--tbt-jade); }

/* Lista de items */
.lmt-list { display: flex; flex-direction: column; gap: .55rem; max-height: 70vh; overflow-y: auto; padding-right: .25rem; }
.lmt-item {
    display: grid;
    grid-template-columns: 34px 1fr auto auto;
    align-items: center;
    gap: .6rem;
    padding: .65rem .8rem;
    background: var(--tbt-bg-1, var(--tbt-bg-2));
    border: 1px solid var(--tbt-bg-4);
    border-radius: 10px;
}
.lmt-item__thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--tbt-bg-3, var(--tbt-bg-2));
    flex-shrink: 0;
}
.lmt-item__name { font-weight: 600; font-size: .85rem; color: var(--tbt-txt-white); }
.lmt-item__sub { font-size: .72rem; color: var(--tbt-txt-muted); margin-top: .1rem; }

.lmt-lvl-group { display: flex; align-items: center; gap: .3rem; }
.lmt-lvl-label { font-size: .68rem; color: var(--tbt-txt-muted); text-transform: uppercase; letter-spacing: .05em; }
.lmt-lvl-input {
    width: 56px;
    padding: .35rem .4rem;
    background: var(--tbt-bg-2);
    border: 1px solid var(--tbt-bg-4);
    border-radius: 6px;
    color: var(--tbt-txt-white);
    font-size: .82rem;
    text-align: center;
    font-family: var(--tbt-font-body);
}
.lmt-lvl-input:focus { outline: none; border-color: var(--tbt-jade); }

.lmt-qty-input {
    width: 56px;
    padding: .35rem .4rem;
    background: var(--tbt-bg-2);
    border: 1px solid var(--tbt-bg-4);
    border-radius: 6px;
    color: var(--tbt-txt-white);
    font-size: .82rem;
    text-align: center;
    font-family: var(--tbt-font-body);
}

.lmt-item__add {
    padding: .4rem .7rem;
    background: var(--tbt-jade);
    color: #000;
    border: none;
    border-radius: 7px;
    font-weight: 700;
    font-size: .78rem;
    cursor: pointer;
    transition: filter .15s;
}
.lmt-item__add:hover { filter: brightness(1.08); }
.lmt-item__add.in-queue { background: var(--tbt-bg-4); color: var(--tbt-txt-sub); }

/* Panel resumen (derecha) */
.lmt-summary { position: sticky; top: 90px; }
.lmt-summary h3 { font-size: .95rem; margin-bottom: .9rem; color: var(--tbt-txt-white); }
.lmt-res-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem 0;
    border-bottom: 1px solid var(--tbt-bg-4);
    font-size: .85rem;
}
.lmt-res-row:last-child { border-bottom: none; }
.lmt-res-label { color: var(--tbt-txt-sub); }
.lmt-res-value { font-weight: 700; color: var(--tbt-jade); font-variant-numeric: tabular-nums; }

.lmt-queue { display: flex; flex-direction: column; gap: .4rem; margin-top: 1rem; max-height: 260px; overflow-y: auto; }
.lmt-queue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    background: var(--tbt-bg-1, var(--tbt-bg-2));
    border-radius: 8px;
    font-size: .78rem;
}
.lmt-queue-row__label { color: var(--tbt-txt-sub); }
.lmt-queue-row__remove {
    background: none;
    border: none;
    color: var(--tbt-txt-muted);
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
    padding: 0 .2rem;
}
.lmt-queue-row__remove:hover { color: #ff5c5c; }

.lmt-empty { color: var(--tbt-txt-muted); font-size: .82rem; text-align: center; padding: 1rem 0; }

.lmt-clear-btn {
    width: 100%;
    margin-top: .9rem;
    padding: .55rem;
    background: transparent;
    border: 1px solid var(--tbt-bg-4);
    border-radius: 8px;
    color: var(--tbt-txt-sub);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.lmt-clear-btn:hover { border-color: #ff5c5c; color: #ff5c5c; }

/* Grid de conteo simple (Speed-ups) */
.lmt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .6rem;
}
.lmt-grid-item {
    background: var(--tbt-bg-1, var(--tbt-bg-2));
    border: 1px solid var(--tbt-bg-4);
    border-radius: 10px;
    padding: .65rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.lmt-grid-item__thumb {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--tbt-bg-2);
    align-self: flex-start;
}
.lmt-grid-item__name { font-size: .78rem; font-weight: 600; color: var(--tbt-txt-white); }
.lmt-grid-item__input {
    width: 100%;
    padding: .4rem .5rem;
    background: var(--tbt-bg-2);
    border: 1px solid var(--tbt-bg-4);
    border-radius: 6px;
    color: var(--tbt-txt-white);
    text-align: center;
    font-size: .85rem;
    font-family: var(--tbt-font-body);
}
.lmt-grid-item__input:focus { outline: none; border-color: var(--tbt-jade); }

.lmt-section-title {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--tbt-txt-sub);
    margin: 1.4rem 0 .7rem;
}
.lmt-section-title:first-child { margin-top: 0; }

.lmt-total-time {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tbt-jade);
    text-align: center;
    padding: 1rem 0;
}
