/* ── Historial de Mantenimiento – Estilos ─────────────────────────────── */

#hm-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 960px;
    margin: 0 auto;
}

/* ── Tabla ─────────────────────────────────────────────────────────────── */
.hm-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.hm-table thead tr {
    background: #F8FAFC;
    color: #64748B;
}

.hm-table th,
.hm-table td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}


table.hm-table td, 
table.hm-table th{
    border: none !important;
}

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

.hm-table tbody tr:hover {
    background: #f8fafc;
}

.hm-empty {
    text-align: center;
    color: #94a3b8;
    padding: 24px 10px !important;
    font-style: italic;
    background: transparent !important;
}

/* ── Badge de estado ───────────────────────────────────────────────────── */
.hm-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: #475569;
}

.hm-badge.activo    { background: #dcfce7; color: #166534; }
.hm-badge.pendiente { background: #fef9c3; color: #854d0e; }
.hm-badge.inactivo  { background: #fee2e2; color: #991b1b; }

/* ── Acciones en tabla ─────────────────────────────────────────────────── */
.hm-acciones {
    gap: 6px;
}

.hm-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1;
    transition: background .15s;
}

.hm-icon-btn:hover { background: #f1f5f9; }
.hm-icon-btn.editar  { color: #2563eb; }
.hm-icon-btn.eliminar { color: #dc2626; }

/* ── Formulario ────────────────────────────────────────────────────────── */
.hm-form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.hm-form-title {
    margin: 0 0 20px;
    font-size: 16px;
    font-weight: 700;
    color: #1e3a5f;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hm-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hm-campo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hm-col-2 {
    grid-column: span 2;
}

.hm-campo label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.hm-req { color: #dc2626; margin-left: 2px; }

.hm-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color .2s, box-shadow .2s;
}

.hm-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    background: #fff;
}

.hm-input.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* ── Botones ───────────────────────────────────────────────────────────── */
.hm-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.hm-btn:active { transform: scale(.97); }

.hm-btn-primary {
    background: #1e3a5f;
    color: #fff;
}

.hm-btn-primary:hover { opacity: .88; }

.hm-btn-secondary {
    background: #e2e8f0;
    color: #374151;
}

.hm-btn-secondary:hover { background: #cbd5e1; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .hm-form-grid { grid-template-columns: 1fr; }
    .hm-col-2     { grid-column: span 1; }
    .hm-table th, .hm-table td { font-size: 12px; padding: 8px; }
}
