/* TECH · Soporte — estilos del módulo admin */

.tech,
.tech * {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
}

/* La regla `.tech *` de arriba pisaba la font-family de Font Awesome y los
   iconos salían como "rayitas"/tofu (Outfit no tiene esos glifos). Re-afirmar
   la fuente de FA para todos los <i class="fa-..."> dentro del módulo. */
.tech .fa,
.tech .fas, .tech .far, .tech .fal, .tech .fat,
.tech .fa-solid, .tech .fa-regular, .tech .fa-light, .tech .fa-thin,
.tech i[class*="fa-"] {
    font-family: 'Font Awesome 6 Free' !important;
}
.tech .fab,
.tech .fa-brands {
    font-family: 'Font Awesome 6 Brands' !important;
}

.tech.main-area {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: 100vh;
    background: var(--background, #f1f5f9);
}

.tech .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sub-navegación (pestañas) */
.tech-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 18px;
}

.tech-subnav a,
.tech-subnav button.tech-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 9px;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #475569;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    white-space: nowrap;
}

.tech-subnav a:hover,
.tech-subnav button.tech-subnav-link:hover {
    background: #f8fafc;
    color: #1e293b;
}

.tech-subnav a.active {
    background: #fee2e2;
    color: #CA3C42;
    border-color: #fecaca;
}

.tech-subnav .tech-subnav-spacer {
    flex: 1 1 auto;
}

.tech-subnav button.tech-subnav-link {
    color: #CA3C42;
}

.tech-subnav button.tech-subnav-link:hover {
    background: #fef2f2;
    color: #CA3C42;
}

@media (max-width: 640px) {
    .tech-subnav { gap: 6px; }
    .tech-subnav a,
    .tech-subnav button.tech-subnav-link { padding: 7px 12px; font-size: 0.82rem; }
    .tech-subnav .tech-subnav-spacer { display: none; }
}

/* Tabla */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.tech-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    white-space: nowrap;
}

.tech-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.tech-table tbody tr {
    cursor: pointer;
    transition: background 0.12s;
}

.tech-table tbody tr:hover {
    background: #fafafa;
}

.tech .consecutivo {
    font-family: monospace;
    font-weight: 800;
    color: #CA3C42;
}

/* Badge de tipo */
.tech .tipo-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.tech .tipo-soporte { background: #e0e7ff; color: #3730a3; }
.tech .tipo-visita  { background: #dbeafe; color: #1d4ed8; }
.tech .tipo-bug     { background: #fef3c7; color: #92400e; }

/* Pills de estado */
.pill-estado,
.pill-prioridad {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    white-space: nowrap;
}

.pill-nuevo       { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.pill-en_proceso  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill-en_espera   { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.pill-resuelto    { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.pill-cerrado     { background: #e2e8f0; color: #334155; border: 1px solid #cbd5e1; }

/* Pills de prioridad */
.pill-baja    { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.pill-media   { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.pill-alta    { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.pill-urgente { background: #b91c1c; color: #ffffff; border: 1px solid #991b1b; }

/* Botones (fallback si dash-ui no define btn-ui) */
.tech .btn-ui {
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    transition: filter 0.15s, transform 0.15s;
}

.tech .btn-ui:hover { filter: brightness(0.96); }

.tech .btn-ui-primary {
    background: #CA3C42;
    color: #ffffff;
}

/* Inputs (fallback) */
.tech .input-field {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    background: #fff;
    color: #1e293b;
    outline: none;
}

.tech .input-field:focus {
    border-color: #CA3C42;
    box-shadow: 0 0 0 3px rgba(202, 60, 66, 0.12);
}

/* Modal de detalle/gestión (SweetAlert2 wide) */
.tech-modal { text-align: left; }

.tech-modal .seccion {
    margin-bottom: 16px;
}

.tech-modal .seccion h4 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #CA3C42;
}

.tech-modal .kv {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 4px 10px;
    font-size: 0.88rem;
    color: #334155;
}

.tech-modal .kv b {
    color: #64748b;
    font-weight: 600;
}

.tech-modal .det-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
}

.tech-modal .adjuntos a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    margin: 2px 4px 2px 0;
}

.tech-modal .bitacora-item {
    border-left: 3px solid #e2e8f0;
    padding: 6px 0 6px 12px;
    margin-bottom: 8px;
    font-size: 0.84rem;
}

.tech-modal .bitacora-item .meta {
    font-size: 0.72rem;
    color: #94a3b8;
}

.tech-modal label.fld {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin: 10px 0 4px;
}

.tech-modal select,
.tech-modal textarea,
.tech-modal input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    box-sizing: border-box;
}

.tech-modal textarea {
    resize: vertical;
    min-height: 60px;
}

/* ---------- Kanban (Desarrollo) ---------- */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: start;
}

.kanban-col {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    min-height: 120px;
}

.kanban-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 2px 4px;
}

.kanban-col-head h3 {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.kanban-col-head .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.kanban-col[data-col="nuevo"] .dot { background: #94a3b8; }
.kanban-col[data-col="en_proceso"] .dot { background: #1d4ed8; }
.kanban-col[data-col="hecho"] .dot { background: #16a34a; }

.kanban-col-head .count {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 2px 9px;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kanban-empty {
    text-align: center;
    color: #cbd5e1;
    font-size: 0.8rem;
    padding: 18px 0;
}

.kanban-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.kanban-card .kc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.kanban-card .kc-consec {
    font-family: monospace;
    font-weight: 800;
    color: #CA3C42;
    font-size: 0.8rem;
}

.kanban-card .kc-asunto {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.3;
    margin-bottom: 8px;
}

.kanban-card .kc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.kanban-card .kc-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #e0e7ff;
    text-transform: capitalize;
}

.kanban-card .kc-badge.kc-modulo {
    background: #f0fdfa;
    color: #0f766e;
    border-color: #ccfbf1;
}

.kanban-card .kc-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.kanban-card .kc-btn {
    border: none;
    cursor: pointer;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 5px 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: filter 0.14s;
}

.kanban-card .kc-btn:hover { filter: brightness(0.95); }
.kanban-card .kc-btn-next { background: #dbeafe; color: #1d4ed8; }
.kanban-card .kc-btn-done { background: #dcfce7; color: #15803d; }

@media (max-width: 900px) {
    .kanban-board { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tech .container-fluid { padding: 1rem; }
    .tech-modal .kv { grid-template-columns: 1fr; }
}

/* Filtros rápidos por tipo (pills) */
.tipo-pill {
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.tipo-pill:hover { background: #f1f5f9; }
.tipo-pill.active {
    background: #fef2f2;
    border-color: #CA3C42;
    color: #CA3C42;
}

/* Checklist de ítems del detalle rico compartido (detalle-registro.js).
   También definidas inline en desarrollo.html; aquí para que apliquen en index.html. */
.ck-item { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.ck-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; white-space: nowrap; }
.ck-badge.pendiente { background: #f1f5f9; color: #475569; }
.ck-badge.en_proceso { background: #dbeafe; color: #1d4ed8; }
.ck-badge.hecho { background: #fef3c7; color: #92400e; }
.ck-badge.verificado { background: #dcfce7; color: #166534; }
.ck-badge.rehacer { background: #fee2e2; color: #991b1b; }
.ck-act { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; border-radius: 8px; padding: 5px 10px; font-size: 0.76rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.ck-act:hover { background: #eef2ff; }
.ck-act.primary { background: #CA3C42; color: #fff; border-color: #CA3C42; }
.ck-act.ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.ck-act.warn { background: #fff1f1; color: #CA3C42; border-color: #f5c6c7; }
.ck-coment { font-size: 0.78rem; color: #334155; border-left: 2px solid #e2e8f0; padding: 2px 0 2px 8px; margin-top: 4px; white-space: pre-wrap; }
.ck-coment .meta { font-size: 0.68rem; color: #94a3b8; }
