/* DIMpos técnico — teal corporativo (#009688) alineado con logo */
:root {
    --tec-green: #009688;
    --tec-green-dark: #00796b;
    --tec-green-soft: #e0f2f1;
    --tec-ink: #1a2332;
    --tec-muted: #5c6b7a;
    --tec-border: #b2dfdb;
    --tec-bg: #f0faf9;
    --tec-card: #ffffff;
    --tec-shadow: 0 8px 30px rgba(0, 105, 97, 0.09);
    --tec-radius: 14px;
    --tec-topbar: linear-gradient(115deg, #00695c 0%, #009688 45%, #26a69a 100%);
    --tec-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

.tec-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--tec-font);
    color: var(--tec-ink);
    background: var(--tec-bg);
    line-height: 1.55;
}

/* ——— Top bar ——— */
.tec-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tec-topbar);
    box-shadow: 0 4px 24px rgba(22, 102, 71, 0.35);
}

.tec-login-body .tec-topbar {
    display: none;
}

.tec-topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.tec-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
    margin-right: auto;
}

.tec-brand__logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.tec-brand__text {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    opacity: 0.95;
}

.tec-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    cursor: pointer;
}

.tec-nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.tec-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: visible;
}

.tec-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}

.tec-nav__icon {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
}

.tec-nav__icon path,
.tec-nav__icon circle,
.tec-nav__icon rect {
    stroke: currentColor;
}

.tec-nav__link:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.tec-nav__link.is-active {
    background: #fff;
    color: var(--tec-green-dark);
}

.tec-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

/* Escritorio: menú en segunda fila, a todo el ancho (sin scroll). */
@media (min-width: 901px) {
    .tec-nav {
        width: 100%;
        order: 5;
        padding-top: 0.35rem;
        margin-top: 0.15rem;
        justify-content: center;
    }
    .tec-user {
        order: 4;
        margin-left: auto;
    }
    .tec-brand {
        order: 1;
    }
    .tec-nav-toggle {
        order: 2;
    }
}

.tec-user__name {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.82rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tec-user__out {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
}

.tec-user__out:hover {
    background: rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
    .tec-nav-toggle {
        display: flex;
    }

    .tec-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .tec-nav.is-open {
        display: flex;
    }

    .tec-nav__link {
        border-radius: 10px;
        text-align: center;
    }

    .tec-user {
        width: 100%;
        justify-content: space-between;
        order: 3;
        margin-left: 0;
        padding-top: 0.25rem;
    }

    .tec-user__name {
        max-width: none;
    }
}

/* ——— Main ——— */
.tec-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

.tec-page-title {
    margin: 0 0 1rem;
    font-size: clamp(1.35rem, 4vw, 1.75rem);
    font-weight: 750;
    color: var(--tec-green-dark);
}

.tec-lead {
    color: var(--tec-muted);
    margin: 0 0 1.5rem;
    max-width: 65ch;
}

/* Cards grid (mobile-first) */
.tec-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .tec-grid--downloads {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .tec-grid--downloads {
        grid-template-columns: repeat(3, 1fr);
    }

    .tec-grid--manuals {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tec-card {
    background: var(--tec-card);
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
    border: 1px solid var(--tec-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.tec-card__head {
    padding: 1rem 1.15rem;
    background: var(--tec-green-soft);
    border-bottom: 1px solid var(--tec-border);
    font-weight: 750;
    font-size: 1.05rem;
    color: var(--tec-green-dark);
}

.tec-card__body {
    padding: 1.1rem 1.15rem 1.25rem;
    flex: 1;
}

.tec-card__body p:last-child {
    margin-bottom: 0;
}

.tec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.1rem;
    border-radius: 10px;
    font-weight: 650;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.2s;
}

.tec-btn:active {
    transform: scale(0.98);
}

.tec-btn--primary {
    background: var(--tec-green);
    color: #fff;
    box-shadow: 0 4px 14px rgba(32, 140, 92, 0.35);
}

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

.tec-btn--neutral {
    background: #3d4f5c;
    color: #fff;
}

.tec-btn--neutral:hover {
    background: #2c3a45;
}

.tec-btn-block {
    width: 100%;
    margin-top: 0.75rem;
}

/* Forms */
.tec-form {
    max-width: 520px;
    background: var(--tec-card);
    padding: 1.25rem 1.35rem;
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
    border: 1px solid var(--tec-border);
}

.tec-field {
    margin-bottom: 1rem;
}

.tec-field label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: var(--tec-ink);
}

.tec-field input,
.tec-field textarea,
.tec-field select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--tec-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.tec-field input:focus,
.tec-field textarea:focus,
.tec-field select:focus {
    outline: none;
    border-color: var(--tec-green);
    box-shadow: 0 0 0 3px rgba(32, 140, 92, 0.2);
}

.tec-alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.tec-alert--ok {
    background: var(--tec-green-soft);
    color: var(--tec-green-dark);
    border: 1px solid var(--tec-green);
}

/* Paneles informativos (gestión manuales, ayudas contextuales) */
.tec-info-bubble {
    margin: 0 0 1.5rem;
    padding: 1.1rem 1.25rem 1.15rem;
    border-radius: var(--tec-radius);
    border: 1px solid var(--tec-border);
    background: linear-gradient(135deg, #ffffff 0%, var(--tec-green-soft) 100%);
    box-shadow: var(--tec-shadow);
    max-width: 52rem;
}
.tec-info-bubble__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tec-green-dark);
    letter-spacing: 0.01em;
}
.tec-info-bubble p {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--tec-ink);
    line-height: 1.58;
}
.tec-info-bubble p:last-child {
    margin-bottom: 0;
}
.tec-info-bubble ul {
    margin: 0.4rem 0 0.65rem 1.2rem;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}
.tec-info-bubble li {
    margin-bottom: 0.35rem;
}

.tec-alert--err {
    background: #fdecea;
    color: #c5221f;
    border: 1px solid #f0b4ae;
}

.tec-foot {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--tec-muted);
    font-size: 0.85rem;
}

.tec-foot p {
    margin: 0;
}

/* Login page */
.tec-login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(32, 140, 92, 0.25), transparent),
        var(--tec-bg);
}

.tec-login {
    width: 100%;
    max-width: 420px;
    background: var(--tec-card);
    padding: 2rem 1.75rem;
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
    border: 1px solid var(--tec-border);
    text-align: center;
}

.tec-login__logo {
    width: min(260px, 85%);
    height: auto;
    margin-bottom: 1rem;
}

.tec-login__title {
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    color: var(--tec-green-dark);
}

.tec-login__sub {
    margin: 0 0 1.25rem;
    color: var(--tec-muted);
    font-size: 0.92rem;
}

/* Tables (admin usuarios desktop) */
.tec-table-wrap {
    overflow-x: auto;
    background: var(--tec-card);
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
    border: 1px solid var(--tec-border);
    margin-bottom: 1.25rem;
}

.tec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.tec-table th,
.tec-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--tec-border);
}

.tec-table th {
    background: var(--tec-green-soft);
    font-weight: 700;
    color: var(--tec-green-dark);
}

.tec-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 720px) {
    .tec-hide-sm {
        display: none;
    }
}

.tec-only-mobile {
    display: none;
}

@media (max-width: 719px) {
    .tec-only-desktop {
        display: none;
    }

    .tec-only-mobile {
        display: grid;
    }
}

/* ——— Descargas destacadas ——— */
.tec-subtitle {
    font-size: 1.15rem;
    font-weight: 750;
    color: var(--tec-green-dark);
    margin: 2rem 0 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid var(--tec-green-soft);
}

.tec-dl-hero {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .tec-dl-hero {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.15rem;
    }
}

.tec-dl-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    background: var(--tec-card);
    border-radius: var(--tec-radius);
    padding: 1.35rem 1.25rem 1.15rem;
    border: 1px solid var(--tec-border);
    box-shadow: var(--tec-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
    min-height: 100%;
}

.tec-dl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 105, 97, 0.16);
    border-color: var(--tec-green);
}

.tec-dl-card--primary .tec-dl-card__icon {
    color: var(--tec-green);
    background: var(--tec-green-soft);
}

.tec-dl-card--beta .tec-dl-card__icon {
    color: #00695c;
    background: #e8f5e9;
}

.tec-dl-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tec-dl-card__body {
    flex: 1;
    margin-bottom: 1rem;
}

.tec-dl-card__title {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--tec-green-dark);
    letter-spacing: -0.02em;
}

.tec-dl-card__title em {
    font-style: normal;
    font-weight: 800;
    color: #00796b;
    opacity: 0.9;
}

.tec-dl-card__sub {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: var(--tec-muted);
}

.tec-dl-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--tec-green);
    color: #fff;
    margin-top: auto;
}

.tec-dl-card--beta .tec-dl-card__cta {
    background: linear-gradient(135deg, #00796b, #009688);
}

.tec-dl-card--beta-caution {
    border: 3px solid #c62828;
    box-shadow: 0 0 0 1px rgba(198, 40, 40, 0.12), var(--tec-shadow);
    background: linear-gradient(180deg, #fff8f8 0%, var(--tec-card) 38%);
}

.tec-dl-card--beta-caution:hover {
    border-color: #b71c1c;
    box-shadow: 0 14px 36px rgba(198, 40, 40, 0.28);
}

.tec-dl-card__warn {
    display: block;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-align: center;
    color: #7f1010;
    background: #ffcdd2;
    border: 1px solid #e53935;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    margin: 0 0 0.85rem;
}

/* ——— Gestión manual / admin ——— */
.tec-manual-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 1.25rem;
}

.tec-btn--ghost {
    background: transparent;
    color: var(--tec-green-dark);
    border: 2px solid var(--tec-green);
    box-shadow: none;
    text-decoration: none;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
}

.tec-btn--ghost:hover {
    background: var(--tec-green-soft);
}

.tec-manual-layout {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 960px) {
    .tec-manual-layout {
        grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
        align-items: start;
    }
}

.card {
    background: var(--tec-card);
    border-radius: var(--tec-radius);
    border: 1px solid var(--tec-border);
    box-shadow: var(--tec-shadow);
    padding: 1.25rem 1.35rem;
}

.tec-ticket-informe-box {
    max-width: 640px;
}

.tec-ticket-informe-box__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
    align-items: end;
}

@media (max-width: 520px) {
    .tec-ticket-informe-box__grid {
        grid-template-columns: 1fr;
    }
}

.tec-manual-editor__title {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    color: var(--tec-green-dark);
}

.tec-manual-editor-expand-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.tec-swal-manual-editor {
    width: min(96vw, 1280px) !important;
    max-width: 1280px;
}

.tec-swal-manual-editor .tec-swal-manual-html {
    margin: 0 !important;
    padding: 0 !important;
    max-height: min(78vh, 860px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.tec-swal-manual-amp-root {
    text-align: left;
    min-height: 200px;
}

.tec-swal-manual-amp-root .tox-tinymce {
    border-radius: 8px;
}

/* Barra de formato siempre visible al hacer scroll en el editor ampliado */
.tec-swal-manual-amp-root .tox-editor-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.tec-form--wide {
    max-width: none;
    width: 100%;
}

/* Árbol manual gestión: compacto (muchos apartados); orden + título + acciones en una línea cuando cabe */
.tec-manual-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tec-manual-tree ul {
    margin: 0.15rem 0 0.1rem 0;
    padding: 0 0 0 0.65rem;
    border-left: 1px solid rgba(0, 150, 136, 0.22);
}

.tec-manual-tree__li {
    margin: 0.06rem 0;
}

.tec-manual-tree__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.4rem;
    align-items: center;
    padding: 0.1rem 0.15rem 0.1rem 0.25rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    border-left: 3px solid transparent;
}

.tec-manual-tree__li--n1 > .tec-manual-tree__row {
    border-left-color: #00695c;
}

.tec-manual-tree__li--n2 > .tec-manual-tree__row {
    border-left-color: #009688;
}

.tec-manual-tree__li--n3 > .tec-manual-tree__row {
    border-left-color: #26a69a;
}

.tec-manual-tree__li--n4 > .tec-manual-tree__row {
    border-left-color: #80cbc4;
}

.tec-manual-tree__orden-wrap {
    line-height: 1;
}

/* Alinea filas "solo añadir" con el ancho del desplegable de orden */
.tec-manual-tree__orden-spacer {
    display: block;
    min-width: 2.15rem;
    width: 2.5rem;
    max-width: 3.25rem;
    flex-shrink: 0;
}

.tec-manual-tree__orden-select {
    appearance: none;
    -webkit-appearance: none;
    width: auto;
    min-width: 2.15rem;
    max-width: 3.25rem;
    padding: 0.12rem 1.1rem 0.12rem 0.28rem;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--tec-green-dark);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2300796b' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 0.22rem center;
    border: 1px solid rgba(0, 150, 136, 0.4);
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}

.tec-manual-tree__orden-select:hover {
    border-color: var(--tec-green);
}

.tec-manual-tree__orden-select:focus {
    outline: 2px solid rgba(0, 150, 136, 0.3);
    outline-offset: 1px;
}

.tec-manual-tree__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.4rem;
    min-width: 0;
    line-height: 1.3;
    font-size: 0.88rem;
}

.tec-manual-tree__tit {
    font-weight: 600;
    color: var(--tec-ink);
    min-width: 0;
}

.tec-manual-tree__meta {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--tec-green);
    padding: 0.05rem 0.28rem;
    border-radius: 3px;
    vertical-align: middle;
    line-height: 1.2;
}

.tec-manual-tree__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem 0.3rem;
    flex-shrink: 0;
    font-size: 0.8rem;
    white-space: nowrap;
}

.tec-manual-tree__del-form {
    display: inline;
    margin: 0;
}

.tec-manual-tree__quick-inline {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 0.15rem;
    font-size: 0.82rem;
    color: var(--tec-muted);
}

.tec-manual-tree__tk-btn {
    display: inline;
    margin: 0;
    padding: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tec-green-dark);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    line-height: 1.25;
    vertical-align: baseline;
}

.tec-manual-tree__tk-btn:hover {
    color: var(--tec-green);
}

.tec-manual-tree__li--solo-nuevo {
    list-style: none;
    margin: 0.06rem 0;
}

.tec-manual-tree__row--solo-nuevo {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.4rem;
    align-items: center;
    padding: 0.1rem 0.15rem 0.1rem 0.25rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    border-left: 3px solid rgba(0, 150, 136, 0.35);
}

.tec-link-danger {
    background: none;
    border: none;
    color: #c62828;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    padding: 0;
}

/* Manual público (HTML enriquecido) */
.tec-manual-pub__html {
    font-size: 0.95rem;
    line-height: 1.55;
}

.tec-manual-pub__html img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.tec-manual-pub__html p {
    margin: 0 0 0.75rem;
}

.tec-manual-pub__html h2 {
    font-size: 1.12rem;
    margin: 1rem 0 0.5rem;
    color: var(--tec-green-dark);
}

.tec-manual-pub__html h3 {
    font-size: 1.02rem;
    margin: 0.85rem 0 0.45rem;
    color: #00897b;
}

.tec-manual-pub__html h4 {
    font-size: 0.95rem;
    margin: 0.7rem 0 0.35rem;
    color: #00695c;
    font-weight: 700;
}

.tec-manual-pub__nivel {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tec-green);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tec-manual-pub--l2 .tec-card__head {
    font-size: 1rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--tec-green);
}

.tec-manual-pub--l3 .tec-card__head {
    font-size: 0.95rem;
    padding-left: 0.5rem;
    border-left: 4px solid #80cbc4;
}

/* ——— Filtros logs (admin) ——— */
.tec-log-filters {
    max-width: none;
    width: 100%;
    margin-bottom: 1.5rem;
}

.tec-log-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-end;
}

.tec-field--inline {
    flex: 0 0 auto;
}

.tec-field--inline input[type="date"] {
    min-width: 11rem;
}

.tec-field--grow {
    flex: 1 1 220px;
    min-width: 180px;
}

.tec-field--btn {
    flex: 0 0 auto;
}

.tec-field__label-spacer {
    display: block;
    visibility: hidden;
    height: 1rem;
    margin: 0;
    font-size: 0.75rem;
}

.tec-log-section {
    margin-bottom: 2rem;
}

.tec-cell-page {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tec-cell-ua {
    max-width: 280px;
    font-size: 0.82rem;
    color: var(--tec-muted);
}

@media (max-width: 639px) {
    .tec-log-filters__row .tec-field--btn {
        width: 100%;
    }

    .tec-log-filters__row .tec-field--btn .tec-btn {
        width: 100%;
    }
}

/* ——— Pestañas gestión manuales ——— */
.tec-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 0.35rem;
    background: var(--tec-green-soft);
    border-radius: 12px;
    border: 1px solid var(--tec-border);
}

.tec-tabs__link {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-weight: 650;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--tec-green-dark);
    transition: background 0.15s, color 0.15s;
}

.tec-tabs__link:hover {
    background: rgba(255, 255, 255, 0.7);
}

.tec-tabs__link.is-active {
    background: #fff;
    color: var(--tec-green-dark);
    box-shadow: 0 2px 8px rgba(0, 105, 97, 0.12);
}

.tec-guia-admin-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tec-guia-admin-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--tec-border);
}

.tec-guia-admin-list li:last-child {
    border-bottom: none;
}

.tec-guia-admin-list__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tec-check {
    display: block;
    font-size: 0.9rem;
    margin: 0.35rem 0;
    cursor: pointer;
}

/* Buscador manuales público */
.tec-buscar-manuales {
    background: var(--tec-card);
    border: 1px solid var(--tec-border);
    border-radius: var(--tec-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--tec-shadow);
}

.tec-buscar-manuales__label {
    display: block;
    font-weight: 650;
    font-size: 0.88rem;
    margin-bottom: 0.45rem;
    color: var(--tec-green-dark);
}

.tec-buscar-manuales__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tec-buscar-manuales__input {
    flex: 1 1 200px;
    min-width: 160px;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--tec-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}

.tec-guia-video {
    margin-bottom: 1rem;
}

.tec-guia-video video {
    width: 100%;
    max-height: 360px;
    border-radius: 10px;
    background: #000;
}

.tec-guia-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.tec-guia-card__title {
    flex: 1 1 auto;
    min-width: 0;
}

.tec-pdf-modal {
    max-width: min(96vw, 1100px);
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: #fff;
}

.tec-pdf-modal::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

.tec-pdf-modal__shell {
    display: flex;
    flex-direction: column;
    max-height: min(90vh, 900px);
}

.tec-pdf-modal__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--tec-border);
    background: var(--tec-green-soft);
}

.tec-pdf-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--tec-green-dark);
}

.tec-pdf-modal__frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: min(75vh, 720px);
    border: none;
    background: #e0e0e0;
}

/* ——— Tickets soporte ——— */
.tec-tabs--main {
    margin-top: 0.5rem;
}

.tec-tabs--sub {
    margin-top: -0.35rem;
    margin-bottom: 1.35rem;
    background: rgba(224, 242, 241, 0.65);
}

.tec-tabs__btn {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    font-weight: 650;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--tec-green-dark);
    transition: background 0.15s, color 0.15s;
}

.tec-tabs__btn:hover {
    background: rgba(255, 255, 255, 0.7);
}

.tec-tabs__btn.is-active {
    background: #fff;
    color: var(--tec-green-dark);
    box-shadow: 0 2px 8px rgba(0, 105, 97, 0.12);
}

.tec-lead--small {
    font-size: 0.95rem;
    margin-top: -0.25rem;
    margin-bottom: 1rem;
}

.tec-muted {
    color: var(--tec-muted);
    margin: 0;
}

.tec-ticket-form {
    max-width: 720px;
}

.tec-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tec-ticket-card {
    background: var(--tec-card);
    border: 1px solid var(--tec-border);
    border-radius: var(--tec-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--tec-shadow);
}

.tec-ticket-card--hecho {
    border-left: 4px solid #43a047;
    background: linear-gradient(90deg, rgba(67, 160, 71, 0.06) 0%, var(--tec-card) 12%);
}

.tec-ticket-list--hechos .tec-ticket-card--hecho {
    border-left-color: #5c6bc0;
    background: linear-gradient(90deg, rgba(92, 107, 192, 0.1) 0%, #f8f9fc 14%);
    border-color: #c5cae9;
}

.tec-ticket-card--admin {
    border-left: 4px solid var(--tec-green);
}

.tec-ticket-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    margin-bottom: 0.65rem;
    font-size: 0.82rem;
    color: var(--tec-muted);
}

.tec-ticket-card__head time {
    margin-left: auto;
}

.tec-ticket-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--tec-ink);
}

.tec-ticket-card__sub {
    margin: 0 0 0.5rem;
    font-size: 0.86rem;
    color: var(--tec-muted);
}

.tec-ticket-card__body {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.35rem;
}

.tec-ticket-card__meta {
    font-weight: 600;
    color: var(--tec-ink);
}

.tec-prio {
    display: inline-block;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    color: #fff;
}

.tec-prio--p1 {
    background: #c62828;
}

.tec-prio--p2 {
    background: #ef6c00;
}

.tec-prio--p3 {
    background: #1565c0;
}

.tec-prio--p4 {
    background: #546e7a;
}

.tec-sla-info-callout {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 0 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--tec-radius);
    border: 1px solid rgba(0, 150, 136, 0.35);
    background: linear-gradient(135deg, #e0f7f5 0%, #fff 55%);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--tec-ink);
}

.tec-sla-info-callout__icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1;
    color: var(--tec-green-dark);
}

.tec-sla-info-callout__body strong {
    color: var(--tec-green-dark);
}

.tec-ticket-sla {
    margin: 0.35rem 0 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    font-size: 0.86rem;
    background: rgba(0, 150, 136, 0.08);
    color: var(--tec-ink);
}

.tec-ticket-sla--overdue {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

.tec-ticket-sla--overdue strong,
.tec-ticket-sla--overdue .tec-ticket-sla__warn {
    color: #b71c1c;
}

.tec-ticket-sla__warn {
    font-weight: 700;
}

.tec-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.tec-badge--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.tec-badge--work {
    background: rgba(33, 150, 243, 0.14);
    color: #0b4f8f;
}

.tec-badge--wait {
    background: rgba(156, 39, 176, 0.12);
    color: #4a1160;
}

.tec-ticket-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    align-items: center;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--tec-border);
}

.tec-inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.tec-select--sm {
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--tec-border);
    font-family: inherit;
    font-size: 0.88rem;
}

.tec-btn--sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
}

.tec-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tec-ticket-card__head:has(.tec-badge) time {
    margin-left: 0;
}

@media (max-width: 540px) {
    .tec-ticket-card__head time {
        margin-left: 0;
        width: 100%;
    }
}

.tec-badge--open {
    background: #fff3e0;
    color: #e65100;
}

.tec-ticket-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: #eceff1;
    color: #37474f;
}

.tec-ticket-tag--area {
    background: rgba(0, 121, 107, 0.12);
    color: #004d40;
    border: 1px solid rgba(0, 121, 107, 0.28);
}

.tec-ticket-tag--tipo {
    margin-right: 0.25rem;
}

.tec-ticket-tag--programa {
    background: rgba(63, 81, 181, 0.12);
    color: #283593;
    border: 1px solid rgba(63, 81, 181, 0.28);
}

.tec-ticket-respuesta {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    background: var(--tec-green-soft);
    border-radius: 10px;
    border: 1px solid var(--tec-border);
}

.tec-ticket-respuesta strong {
    display: block;
    font-size: 0.82rem;
    color: var(--tec-green-dark);
}

.tec-ticket-respuesta__txt {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tec-ticket-respuesta--interno {
    background: #f5f5f5;
}

.tec-ticket-respuesta--interno strong {
    color: var(--tec-muted);
}

.tec-ticket-cerrar-form {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--tec-border);
}

.tec-ticket-cerrar-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--tec-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.92rem;
}

.tec-ticket-filters {
    background: var(--tec-card);
    border: 1px solid var(--tec-border);
    border-radius: var(--tec-radius);
    padding: 1rem 1.15rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--tec-shadow);
}

.tec-ticket-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: flex-end;
}

.tec-ticket-filters__row .tec-field {
    margin-bottom: 0;
    min-width: 140px;
}

.tec-ticket-filters__row .tec-field--btn {
    margin-left: auto;
}

@media (max-width: 639px) {
    .tec-ticket-filters__row .tec-field--btn {
        width: 100%;
        margin-left: 0;
    }

    .tec-ticket-filters__row .tec-field--btn .tec-btn {
        width: 100%;
    }
}

/* ——— Licencias (solo lectura) ——— */
.tec-lic-head {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: baseline;
    justify-content: space-between;
    margin: 0 0 1rem;
}

.tec-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92em;
}

.tec-lic-mods {
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.tec-badge--pro {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.tec-badge--std {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.tec-badge--digi {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tec-badge--tax {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.tec-badge--muted {
    background: #f1f3f5;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* ——— Videos formación ——— */
.tec-vf-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 1.25rem;
    align-items: start;
}

.tec-vf-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.25rem;
}

.tec-vf-list__item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: var(--tec-card);
    border: 1px solid var(--tec-border);
    border-radius: var(--tec-radius);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--tec-shadow);
    transition: border-color 0.15s, background 0.15s;
}

.tec-vf-list__item:hover {
    border-color: var(--tec-green);
    background: var(--tec-green-soft);
}

.tec-vf-list__item.is-active {
    border-color: var(--tec-green);
    background: var(--tec-green-soft);
    box-shadow: 0 0 0 2px rgba(0, 150, 136, 0.2);
}

.tec-vf-list__play {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tec-green);
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    margin-top: 0.15rem;
}

.tec-vf-list__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.tec-vf-list__title {
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--tec-ink);
}

.tec-vf-list__desc {
    font-size: 0.82rem;
    color: var(--tec-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tec-vf-list__date {
    font-size: 0.75rem;
    color: var(--tec-muted);
}

.tec-vf-player-wrap {
    min-width: 0;
    max-width: 100%;
}

.tec-vf-player-card {
    background: var(--tec-card);
    border: 1px solid var(--tec-border);
    border-radius: var(--tec-radius);
    box-shadow: var(--tec-shadow);
    overflow: hidden;
}

.tec-vf-player__video {
    background: #0d1117;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    line-height: 0;
}

.tec-vf-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(65vh, 480px);
    display: block;
    object-fit: contain;
    vertical-align: top;
    background: #0d1117;
}

.tec-vf-player__info {
    padding: 1.15rem 1.25rem 1.35rem;
}

.tec-vf-player__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: var(--tec-green-dark);
}

.tec-vf-player__desc {
    margin: 0 0 0.75rem;
    color: var(--tec-muted);
    font-size: 0.95rem;
}

.tec-vf-player__meta {
    font-size: 0.85rem;
    color: var(--tec-muted);
    margin-bottom: 1rem;
}

.tec-vf-player__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .tec-vf-layout {
        grid-template-columns: 1fr;
    }
    .tec-vf-list {
        max-height: none;
    }
    .tec-vf-video {
        max-height: min(50vh, 360px);
    }
}
